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
5d9de36f
Commit
5d9de36f
authored
Aug 03, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a52dec: pass sample formats by address rather than value
parent
819fe74d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tofloat32.c
+16
-15
No files found.
modules/audio_filter/converter/a52tofloat32.c
View file @
5d9de36f
...
@@ -105,14 +105,15 @@ vlc_module_end ()
...
@@ -105,14 +105,15 @@ vlc_module_end ()
* Open:
* Open:
*****************************************************************************/
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
,
filter_sys_t
*
p_sys
,
static
int
Open
(
vlc_object_t
*
p_this
,
filter_sys_t
*
p_sys
,
audio_format_t
input
,
audio_format_t
output
)
const
audio_format_t
*
restrict
input
,
const
audio_format_t
*
restrict
output
)
{
{
p_sys
->
b_dynrng
=
var_InheritBool
(
p_this
,
"a52-dynrng"
);
p_sys
->
b_dynrng
=
var_InheritBool
(
p_this
,
"a52-dynrng"
);
p_sys
->
b_dontwarn
=
0
;
p_sys
->
b_dontwarn
=
0
;
/* No upmixing: it's not necessary and some other filters may want to do
/* No upmixing: it's not necessary and some other filters may want to do
* it themselves. */
* it themselves. */
if
(
aout_FormatNbChannels
(
&
output
)
>
aout_FormatNbChannels
(
&
input
)
)
if
(
aout_FormatNbChannels
(
output
)
>
aout_FormatNbChannels
(
input
)
)
{
{
if
(
!
var_InheritBool
(
p_this
,
"a52-upmix"
)
)
if
(
!
var_InheritBool
(
p_this
,
"a52-upmix"
)
)
{
{
...
@@ -121,18 +122,18 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
...
@@ -121,18 +122,18 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
}
}
/* We'll do our own downmixing, thanks. */
/* We'll do our own downmixing, thanks. */
p_sys
->
i_nb_channels
=
aout_FormatNbChannels
(
&
output
);
p_sys
->
i_nb_channels
=
aout_FormatNbChannels
(
output
);
switch
(
(
output
.
i_physical_channels
&
AOUT_CHAN_PHYSMASK
)
switch
(
(
output
->
i_physical_channels
&
AOUT_CHAN_PHYSMASK
)
&
~
AOUT_CHAN_LFE
)
&
~
AOUT_CHAN_LFE
)
{
{
case
AOUT_CHAN_CENTER
:
case
AOUT_CHAN_CENTER
:
if
(
(
output
.
i_original_channels
&
AOUT_CHAN_CENTER
)
if
(
(
output
->
i_original_channels
&
AOUT_CHAN_CENTER
)
||
(
output
.
i_original_channels
||
(
output
->
i_original_channels
&
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
))
)
&
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
))
)
{
{
p_sys
->
i_flags
=
A52_MONO
;
p_sys
->
i_flags
=
A52_MONO
;
}
}
else
if
(
output
.
i_original_channels
&
AOUT_CHAN_LEFT
)
else
if
(
output
->
i_original_channels
&
AOUT_CHAN_LEFT
)
{
{
p_sys
->
i_flags
=
A52_CHANNEL1
;
p_sys
->
i_flags
=
A52_CHANNEL1
;
}
}
...
@@ -143,23 +144,23 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
...
@@ -143,23 +144,23 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
break
;
break
;
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
:
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
:
if
(
output
.
i_original_channels
&
AOUT_CHAN_DOLBYSTEREO
)
if
(
output
->
i_original_channels
&
AOUT_CHAN_DOLBYSTEREO
)
{
{
p_sys
->
i_flags
=
A52_DOLBY
;
p_sys
->
i_flags
=
A52_DOLBY
;
}
}
else
if
(
input
.
i_original_channels
==
AOUT_CHAN_CENTER
)
else
if
(
input
->
i_original_channels
==
AOUT_CHAN_CENTER
)
{
{
p_sys
->
i_flags
=
A52_MONO
;
p_sys
->
i_flags
=
A52_MONO
;
}
}
else
if
(
input
.
i_original_channels
&
AOUT_CHAN_DUALMONO
)
else
if
(
input
->
i_original_channels
&
AOUT_CHAN_DUALMONO
)
{
{
p_sys
->
i_flags
=
A52_CHANNEL
;
p_sys
->
i_flags
=
A52_CHANNEL
;
}
}
else
if
(
!
(
output
.
i_original_channels
&
AOUT_CHAN_RIGHT
)
)
else
if
(
!
(
output
->
i_original_channels
&
AOUT_CHAN_RIGHT
)
)
{
{
p_sys
->
i_flags
=
A52_CHANNEL1
;
p_sys
->
i_flags
=
A52_CHANNEL1
;
}
}
else
if
(
!
(
output
.
i_original_channels
&
AOUT_CHAN_LEFT
)
)
else
if
(
!
(
output
->
i_original_channels
&
AOUT_CHAN_LEFT
)
)
{
{
p_sys
->
i_flags
=
A52_CHANNEL2
;
p_sys
->
i_flags
=
A52_CHANNEL2
;
}
}
...
@@ -197,7 +198,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
...
@@ -197,7 +198,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
if
(
output
.
i_physical_channels
&
AOUT_CHAN_LFE
)
if
(
output
->
i_physical_channels
&
AOUT_CHAN_LFE
)
{
{
p_sys
->
i_flags
|=
A52_LFE
;
p_sys
->
i_flags
|=
A52_LFE
;
}
}
...
@@ -213,7 +214,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
...
@@ -213,7 +214,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
}
}
aout_CheckChannelReorder
(
pi_channels_in
,
NULL
,
aout_CheckChannelReorder
(
pi_channels_in
,
NULL
,
output
.
i_physical_channels
&
AOUT_CHAN_PHYSMASK
,
output
->
i_physical_channels
&
AOUT_CHAN_PHYSMASK
,
p_sys
->
i_nb_channels
,
p_sys
->
i_nb_channels
,
p_sys
->
pi_chan_table
);
p_sys
->
pi_chan_table
);
...
@@ -375,7 +376,7 @@ static int OpenFilter( vlc_object_t *p_this )
...
@@ -375,7 +376,7 @@ static int OpenFilter( vlc_object_t *p_this )
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
i_ret
=
Open
(
VLC_OBJECT
(
p_filter
),
p_sys
,
i_ret
=
Open
(
VLC_OBJECT
(
p_filter
),
p_sys
,
p_filter
->
fmt_in
.
audio
,
p_filter
->
fmt_out
.
audio
);
&
p_filter
->
fmt_in
.
audio
,
&
p_filter
->
fmt_out
.
audio
);
p_filter
->
pf_audio_filter
=
Convert
;
p_filter
->
pf_audio_filter
=
Convert
;
p_filter
->
fmt_out
.
audio
.
i_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
p_filter
->
fmt_out
.
audio
.
i_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
...
...
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