Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6a15830f
Commit
6a15830f
authored
Apr 15, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple downmixer: allow Xiph 6.1 -> 2.0
Close #7900
parent
e9da9535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
modules/audio_filter/channel_mixer/simple.c
modules/audio_filter/channel_mixer/simple.c
+19
-1
No files found.
modules/audio_filter/channel_mixer/simple.c
View file @
6a15830f
...
@@ -125,6 +125,22 @@ static void DoWork_7_x_to_2_0( filter_t * p_filter, block_t * p_in_buf, block_t
...
@@ -125,6 +125,22 @@ static void DoWork_7_x_to_2_0( filter_t * p_filter, block_t * p_in_buf, block_t
}
}
}
}
static
void
DoWork_6_1_to_2_0
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
,
block_t
*
p_out_buf
)
{
VLC_UNUSED
(
p_filter
);
float
*
p_dest
=
(
float
*
)
p_out_buf
->
p_buffer
;
const
float
*
p_src
=
(
const
float
*
)
p_in_buf
->
p_buffer
;
for
(
int
i
=
p_in_buf
->
i_nb_samples
;
i
--
;
)
{
*
p_dest
++
=
p_src
[
0
]
+
0
.
7071
*
(
p_src
[
3
]
+
(
p_src
[
2
]
+
p_src
[
5
])
/
2
);
*
p_dest
++
=
p_src
[
1
]
+
0
.
7071
*
(
p_src
[
4
]
+
(
p_src
[
2
]
+
p_src
[
5
])
/
2
);
p_src
+=
6
;
/* We always have LFE here */
p_src
++
;
}
}
static
void
DoWork_5_x_to_2_0
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
,
block_t
*
p_out_buf
)
{
static
void
DoWork_5_x_to_2_0
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
,
block_t
*
p_out_buf
)
{
float
*
p_dest
=
(
float
*
)
p_out_buf
->
p_buffer
;
float
*
p_dest
=
(
float
*
)
p_out_buf
->
p_buffer
;
const
float
*
p_src
=
(
const
float
*
)
p_in_buf
->
p_buffer
;
const
float
*
p_src
=
(
const
float
*
)
p_in_buf
->
p_buffer
;
...
@@ -280,6 +296,7 @@ static void DoWork_7_x_to_5_x( filter_t * p_filter, block_t * p_in_buf, block_t
...
@@ -280,6 +296,7 @@ static void DoWork_7_x_to_5_x( filter_t * p_filter, block_t * p_in_buf, block_t
}
}
static
void
DoWork_6_1_to_5_x
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
,
block_t
*
p_out_buf
)
{
static
void
DoWork_6_1_to_5_x
(
filter_t
*
p_filter
,
block_t
*
p_in_buf
,
block_t
*
p_out_buf
)
{
VLC_UNUSED
(
p_filter
);
float
*
p_dest
=
(
float
*
)
p_out_buf
->
p_buffer
;
float
*
p_dest
=
(
float
*
)
p_out_buf
->
p_buffer
;
const
float
*
p_src
=
(
const
float
*
)
p_in_buf
->
p_buffer
;
const
float
*
p_src
=
(
const
float
*
)
p_in_buf
->
p_buffer
;
for
(
int
i
=
p_in_buf
->
i_nb_samples
;
i
--
;
)
for
(
int
i
=
p_in_buf
->
i_nb_samples
;
i
--
;
)
...
@@ -337,6 +354,8 @@ static int OpenFilter( vlc_object_t *p_this )
...
@@ -337,6 +354,8 @@ static int OpenFilter( vlc_object_t *p_this )
{
{
if
(
b_input_7_0
)
if
(
b_input_7_0
)
p_filter
->
p_sys
->
pf_dowork
=
DoWork_7_x_to_2_0
;
p_filter
->
p_sys
->
pf_dowork
=
DoWork_7_x_to_2_0
;
else
if
(
b_input_6_1
)
p_filter
->
p_sys
->
pf_dowork
=
DoWork_6_1_to_2_0
;
else
if
(
b_input_5_0
)
else
if
(
b_input_5_0
)
p_filter
->
p_sys
->
pf_dowork
=
DoWork_5_x_to_2_0
;
p_filter
->
p_sys
->
pf_dowork
=
DoWork_5_x_to_2_0
;
else
if
(
b_input_4_center_rear
)
else
if
(
b_input_4_center_rear
)
...
@@ -425,4 +444,3 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
...
@@ -425,4 +444,3 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
return
p_out
;
return
p_out
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment