Revision 998d9ee7 libavcodec/ac3_parser.c
libavcodec/ac3_parser.c | ||
---|---|---|
128 | 128 |
return 0; |
129 | 129 |
} |
130 | 130 |
|
131 |
int ff_ac3_parse_header_full(GetBitContext *gbc, AC3HeaderInfo *hdr){ |
|
132 |
int ret, i; |
|
133 |
ret = ff_ac3_parse_header(gbc, hdr); |
|
134 |
if(!ret){ |
|
135 |
if(hdr->bitstream_id>10){ |
|
136 |
/* Enhanced AC-3 */ |
|
137 |
skip_bits(gbc, 5); // skip bitstream id |
|
138 |
|
|
139 |
/* skip dialog normalization and compression gain */ |
|
140 |
for (i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { |
|
141 |
skip_bits(gbc, 5); // skip dialog normalization |
|
142 |
if (get_bits1(gbc)) { |
|
143 |
skip_bits(gbc, 8); //skip Compression gain word |
|
144 |
} |
|
145 |
} |
|
146 |
/* dependent stream channel map */ |
|
147 |
if (hdr->frame_type == EAC3_FRAME_TYPE_DEPENDENT && get_bits1(gbc)) { |
|
148 |
hdr->channel_map = get_bits(gbc, 16); //custom channel map |
|
149 |
return 0; |
|
150 |
} |
|
151 |
} |
|
152 |
//default channel map based on acmod and lfeon |
|
153 |
hdr->channel_map = ff_eac3_default_chmap[hdr->channel_mode]; |
|
154 |
if(hdr->lfe_on) |
|
155 |
hdr->channel_map |= AC3_CHMAP_LFE; |
|
156 |
} |
|
157 |
return ret; |
|
158 |
} |
|
159 |
|
|
160 | 131 |
static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, |
161 | 132 |
int *need_next_header, int *new_frame_start) |
162 | 133 |
{ |
Also available in: Unified diff