Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
39348aa2
Commit
39348aa2
authored
Sep 07, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple mixer: allow downmixing to 5.0 (not just 5.1)
This was already supported, but filtered out while probing.
parent
cdb6ccc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
33 deletions
+24
-33
modules/audio_filter/channel_mixer/simple.c
modules/audio_filter/channel_mixer/simple.c
+24
-33
No files found.
modules/audio_filter/channel_mixer/simple.c
View file @
39348aa2
...
...
@@ -33,7 +33,6 @@
#include <vlc_aout.h>
#include <vlc_filter.h>
#include <vlc_block.h>
#include <assert.h>
/*****************************************************************************
* Module descriptor
...
...
@@ -66,15 +65,6 @@ static bool IsSupported( const audio_format_t *p_input, const audio_format_t *p_
return
false
;
}
/* Only conversion to Mono, Stereo, 4.0 and 5.1 */
if
(
p_output
->
i_physical_channels
!=
AOUT_CHAN_CENTER
&&
p_output
->
i_physical_channels
!=
AOUT_CHANS_2_0
&&
p_output
->
i_physical_channels
!=
AOUT_CHANS_4_0
&&
p_output
->
i_physical_channels
!=
AOUT_CHANS_5_1
)
{
return
false
;
}
/* Only from 7.x/5.x/4.0/3.x/2.0
* NB 5.X rear and middle are handled the same way
* We don't support 2.1 -> 2.0 (trivial can do it)
...
...
@@ -93,10 +83,6 @@ static bool IsSupported( const audio_format_t *p_input, const audio_format_t *p_
return
false
;
}
/* Only downmixing */
if
(
aout_FormatNbChannels
(
p_input
)
<=
aout_FormatNbChannels
(
p_output
)
)
return
false
;
return
true
;
}
...
...
@@ -338,20 +324,9 @@ static int OpenFilter( vlc_object_t *p_this )
const
bool
b_input_3_0
=
!
b_input_7_0
&&
!
b_input_5_0
&&
!
b_input_4_center_rear
&&
(
i_input_physical
&
~
AOUT_CHAN_LFE
)
==
AOUT_CHANS_3_0
;
if
(
p_filter
->
fmt_out
.
audio
.
i_physical_channels
==
AOUT_CHANS_2_0
)
{
if
(
b_input_7_0
)
do_work
=
DoWork_7_x_to_2_0
;
else
if
(
b_input_6_1
)
do_work
=
DoWork_6_1_to_2_0
;
else
if
(
b_input_5_0
)
do_work
=
DoWork_5_x_to_2_0
;
else
if
(
b_input_4_center_rear
)
do_work
=
DoWork_4_0_to_2_0
;
else
if
(
b_input_3_0
)
do_work
=
DoWork_3_x_to_2_0
;
}
else
if
(
p_filter
->
fmt_out
.
audio
.
i_physical_channels
==
AOUT_CHAN_CENTER
)
uint32_t
output
=
p_filter
->
fmt_out
.
audio
.
i_physical_channels
;
if
(
output
==
AOUT_CHAN_CENTER
)
{
if
(
b_input_7_0
)
do_work
=
DoWork_7_x_to_1_0
;
...
...
@@ -364,22 +339,38 @@ static int OpenFilter( vlc_object_t *p_this )
else
do_work
=
DoWork_2_x_to_1_0
;
}
else
if
(
p_filter
->
fmt_out
.
audio
.
i_physical_channels
==
AOUT_CHANS_4_0
)
else
if
(
output
==
AOUT_CHANS_2_0
)
{
if
(
b_input_7_0
)
do_work
=
DoWork_7_x_to_2_0
;
else
if
(
b_input_6_1
)
do_work
=
DoWork_6_1_to_2_0
;
else
if
(
b_input_5_0
)
do_work
=
DoWork_5_x_to_2_0
;
else
if
(
b_input_4_center_rear
)
do_work
=
DoWork_4_0_to_2_0
;
else
if
(
b_input_3_0
)
do_work
=
DoWork_3_x_to_2_0
;
}
else
if
(
output
==
AOUT_CHANS_4_0
)
{
if
(
b_input_7_0
)
do_work
=
DoWork_7_x_to_4_0
;
else
else
if
(
b_input_5_0
)
do_work
=
DoWork_5_x_to_4_0
;
}
else
else
if
(
(
output
&
~
AOUT_CHAN_LFE
)
==
AOUT_CHANS_5_0
||
(
output
&
~
AOUT_CHAN_LFE
)
==
AOUT_CHANS_5_0_MIDDLE
)
{
assert
(
b_input_7_0
||
b_input_6_1
);
if
(
b_input_7_0
)
do_work
=
DoWork_7_x_to_5_x
;
else
else
if
(
b_input_6_1
)
do_work
=
DoWork_6_1_to_5_x
;
}
if
(
do_work
==
NULL
)
return
VLC_EGENERIC
;
p_filter
->
pf_audio_filter
=
Filter
;
p_filter
->
p_sys
=
(
void
*
)
do_work
;
return
VLC_SUCCESS
;
...
...
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