[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder
Justin Ruggles
justinruggles
Sat Jun 7 18:43:51 CEST 2008
Michael Niedermayer wrote:
> On Sat, Jun 07, 2008 at 10:30:31AM -0400, Justin Ruggles wrote:
>> @@ -49,7 +49,6 @@ static const uint8_t surround_levels[4] = { 2, 4, 0, 4 };
>> int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
>> {
>> int frame_size_code;
>> - int num_blocks;
>>
>> memset(hdr, 0, sizeof(*hdr));
>>
>> @@ -97,6 +96,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
>> hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
>> hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
>> hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
>> + hdr->num_blocks = 6;
>> hdr->frame_type = EAC3_FRAME_TYPE_AC3_CONVERT; //EAC3_FRAME_TYPE_INDEPENDENT;
>> } else {
>> /* Enhanced AC-3 */
>> @@ -118,9 +118,9 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
>> return AC3_PARSE_ERROR_SAMPLE_RATE;
>> hdr->sample_rate = ff_ac3_sample_rate_tab[sr_code2] / 2;
>> hdr->sr_shift = 1;
>> - num_blocks = 6;
>> + hdr->num_blocks = 6;
>
> cant these = 6 be factored out before the if/elses?
new version of PATCH 01/32 attached.
-Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-get-the-number-of-blocks-from-the-ac3-parser-and-use.patch
Type: text/x-patch
Size: 3989 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080607/de81e2fb/attachment.bin>
More information about the ffmpeg-devel
mailing list