[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder

Justin Ruggles justinruggles
Sat Jun 7 18:31:33 CEST 2008


Michael Niedermayer wrote:
> On Sat, Jun 07, 2008 at 10:30:31AM -0400, Justin Ruggles wrote:
>> Hi,
>>
>> Here is a patch set to incrementally add support for E-AC-3 to the AC-3
>> decoder.  There are 32 total patches.  I'm just attaching them all in
>> this email instead of doing the git-send-email thing.
> 
> lets hope we wont get entangled in the approved, commented and not yet
> reviewed patches ...

i'll try to keep it all straight.

> [...]
>> @@ -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?

yes, i'll change it.

> [...]
>>      int phase_flags_in_use;                 ///< phase flags in use
>>      int phase_flags[18];                    ///< phase flags
>> +    int   num_cpl_subbands;                 ///< number of coupling sub bands
>> +    int   num_cpl_bands;                    ///< number of coupling bands
>>      int cpl_band_struct[18];                ///< coupling band structure
> 
> funny whitespace, this also applies to a few others

that's already existing in current svn.  that patch only reorders the
fields, and does not do any other whitespace changes.  those come in a
later patch.  i can do all the changes in the same commit if that would
be simpler.

thanks,
justin




More information about the ffmpeg-devel mailing list