Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
f2e4eb62
Commit
f2e4eb62
authored
Aug 31, 2008
by
Justin Ruggles
Browse files
cosmetics: indentation
Originally committed as revision 15089 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5d2dd908
Changes
1
Hide whitespace changes
Inline
Side-by-side
libavcodec/ac3dec.c
View file @
f2e4eb62
...
...
@@ -966,31 +966,31 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* signal-to-noise ratio offsets and fast gains (signal-to-mask ratios) */
if
(
!
s
->
eac3
||
!
blk
){
if
(
s
->
snr_offset_strategy
&&
get_bits1
(
gbc
))
{
int
snr
=
0
;
int
csnr
;
csnr
=
(
get_bits
(
gbc
,
6
)
-
15
)
<<
4
;
for
(
i
=
ch
=
!
cpl_in_use
;
ch
<=
s
->
channels
;
ch
++
)
{
/* snr offset */
if
(
ch
==
i
||
s
->
snr_offset_strategy
==
2
)
snr
=
(
csnr
+
get_bits
(
gbc
,
4
))
<<
2
;
/* run at least last bit allocation stage if snr offset changes */
if
(
blk
&&
s
->
snr_offset
[
ch
]
!=
snr
)
{
bit_alloc_stages
[
ch
]
=
FFMAX
(
bit_alloc_stages
[
ch
],
1
);
}
s
->
snr_offset
[
ch
]
=
snr
;
int
snr
=
0
;
int
csnr
;
csnr
=
(
get_bits
(
gbc
,
6
)
-
15
)
<<
4
;
for
(
i
=
ch
=
!
cpl_in_use
;
ch
<=
s
->
channels
;
ch
++
)
{
/* snr offset */
if
(
ch
==
i
||
s
->
snr_offset_strategy
==
2
)
snr
=
(
csnr
+
get_bits
(
gbc
,
4
))
<<
2
;
/* run at least last bit allocation stage if snr offset changes */
if
(
blk
&&
s
->
snr_offset
[
ch
]
!=
snr
)
{
bit_alloc_stages
[
ch
]
=
FFMAX
(
bit_alloc_stages
[
ch
],
1
);
}
s
->
snr_offset
[
ch
]
=
snr
;
/* fast gain (normal AC-3 only) */
if
(
!
s
->
eac3
)
{
int
prev
=
s
->
fast_gain
[
ch
];
s
->
fast_gain
[
ch
]
=
ff_ac3_fast_gain_tab
[
get_bits
(
gbc
,
3
)];
s
->
fast_gain
[
ch
]
=
ff_ac3_fast_gain_tab
[
get_bits
(
gbc
,
3
)];
/* run last 2 bit allocation stages if fast gain changes */
if
(
blk
&&
prev
!=
s
->
fast_gain
[
ch
])
bit_alloc_stages
[
ch
]
=
FFMAX
(
bit_alloc_stages
[
ch
],
2
);
}
}
}
}
else
if
(
!
s
->
eac3
&&
!
blk
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"new snr offsets must be present in block 0
\n
"
);
return
-
1
;
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"new snr offsets must be present in block 0
\n
"
);
return
-
1
;
}
}
...
...
@@ -1022,7 +1022,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
coupling leak changes */
if
(
blk
&&
(
fl
!=
s
->
bit_alloc_params
.
cpl_fast_leak
||
sl
!=
s
->
bit_alloc_params
.
cpl_slow_leak
))
{
bit_alloc_stages
[
CPL_CH
]
=
FFMAX
(
bit_alloc_stages
[
CPL_CH
],
2
);
bit_alloc_stages
[
CPL_CH
]
=
FFMAX
(
bit_alloc_stages
[
CPL_CH
],
2
);
}
s
->
bit_alloc_params
.
cpl_fast_leak
=
fl
;
s
->
bit_alloc_params
.
cpl_slow_leak
=
sl
;
...
...
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