summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavcodec/eac3dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/eac3dec.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/eac3dec.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/eac3dec.c b/chromium/third_party/ffmpeg/libavcodec/eac3dec.c
index b55ee2a34c2..8e931fddeb6 100644
--- a/chromium/third_party/ffmpeg/libavcodec/eac3dec.c
+++ b/chromium/third_party/ffmpeg/libavcodec/eac3dec.c
@@ -345,23 +345,22 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
if (get_bits1(gbc)) {
/* center and surround mix levels */
if (s->channel_mode > AC3_CHMODE_STEREO) {
- skip_bits(gbc, 2); // skip preferred stereo downmix mode
+ s->preferred_downmix = get_bits(gbc, 2);
if (s->channel_mode & 1) {
/* if three front channels exist */
- skip_bits(gbc, 3); //skip Lt/Rt center mix level
- s->center_mix_level = get_bits(gbc, 3);
+ s->center_mix_level_ltrt = get_bits(gbc, 3);
+ s->center_mix_level = get_bits(gbc, 3);
}
if (s->channel_mode & 4) {
/* if a surround channel exists */
- skip_bits(gbc, 3); //skip Lt/Rt surround mix level
- s->surround_mix_level = get_bits(gbc, 3);
+ s->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7);
+ s->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7);
}
}
/* lfe mix level */
- if (s->lfe_on && get_bits1(gbc)) {
- // TODO: use LFE mix level
- skip_bits(gbc, 5); // skip LFE mix level code
+ if (s->lfe_on && (s->lfe_mix_level_exists = get_bits1(gbc))) {
+ s->lfe_mix_level = get_bits(gbc, 5);
}
/* info for mixing with other streams and substreams */
@@ -413,10 +412,11 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
s->bitstream_mode = get_bits(gbc, 3);
skip_bits(gbc, 2); // skip copyright bit and original bitstream bit
if (s->channel_mode == AC3_CHMODE_STEREO) {
- skip_bits(gbc, 4); // skip Dolby surround and headphone mode
+ s->dolby_surround_mode = get_bits(gbc, 2);
+ s->dolby_headphone_mode = get_bits(gbc, 2);
}
if (s->channel_mode >= AC3_CHMODE_2F2R) {
- skip_bits(gbc, 2); // skip Dolby surround EX mode
+ s->dolby_surround_ex_mode = get_bits(gbc, 2);
}
for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
if (get_bits1(gbc)) {