[FFmpeg-devel] [PATCH] [RFC] E-AC-3 vs. AC-3 separation

Justin Ruggles justin.ruggles
Thu Jul 23 02:13:00 CEST 2009


Diego Biurrun wrote:
> On Thu, Jul 23, 2009 at 01:27:35AM +0200, Diego Biurrun wrote:
>> On Wed, Jul 22, 2009 at 06:37:19PM -0400, Justin Ruggles wrote:
>>> Diego Biurrun wrote:
>>>> On Tue, Jul 21, 2009 at 07:17:06PM -0400, Justin Ruggles wrote:
>>>>> Diego Biurrun wrote:
>>>>>> Here is a feeble attempt to separate the E-AC-3 and the AC-3 decoders.
>>>>>> I have the nagging feeling that it might not be quite so easy, but it
>>>>>> could be a start..
>>>>> If it compiles when E-AC-3 is disabled but AC-3 is enabled, then it
>>>>> actually looks ok.  They could be separated even more by splitting up
>>>>> ac3dec_data.c into 2 files.  For example, the VQ tables, which are
>>>>> pretty big, are not needed for regular AC-3 and are only used in eac3dec.c.
>>>> Your wish is my command, see the attached patch..
>>>>
>>>> --- libavcodec/ac3dec_data.h	(revision 19483)
>>>> +++ libavcodec/ac3dec_data.h	(working copy)
>>>> @@ -22,19 +22,9 @@
>>>>  #ifndef AVCODEC_AC3DEC_DATA_H
>>>>  #define AVCODEC_AC3DEC_DATA_H
>>>>  
>>>> -#include "libavutil/common.h"
>>>> +#include <stdint.h>
>>>>  
>>>>  extern const uint8_t ff_ac3_ungroup_3_in_5_bits_tab[32][3];
>>>> -extern const uint8_t ff_eac3_hebap_tab[64];
>>>> -extern const uint8_t ff_eac3_bits_vs_hebap[20];
>>>> -extern const int16_t ff_eac3_gaq_remap_1[12];
>>>> -extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2];
>>>> -extern const int16_t ff_eac3_gaq_remap_2_4_b[9][2];
>>>> -
>>>> -extern const int16_t (* const ff_eac3_mantissa_vq[8])[6];
>>>> -extern const uint8_t ff_eac3_frm_expstr[32][6];
>>>> -extern const uint8_t ff_eac3_default_cpl_band_struct[18];
>>> ff_eac3_default_cpl_band_struct needs to stay with ac3dec_data.c because
>>> it is used in ac3dec.c by the shared AC-3/E-AC-3 code.
>>>
>>> Everything else in this patch looks ok if it works.
>> You were right of course, here is a new version that does all the fancy
>> stuff, like, say, compile... ;-)
> 
> Update: This additional patch is needed so that the eac3_decoder does
> not get mistakenly enabled.

both patches look ok.

-Justin



More information about the ffmpeg-devel mailing list