[Ffmpeg-devel] [PATCH] remove ac3 tables from parser.c

Justin Ruggles justinruggles
Fri Mar 9 15:42:47 CET 2007


Justin Ruggles wrote:
> Limin Wang wrote:
>>Hi,
>>
>>* Justin Ruggles <justinruggles at bellsouth.net> [2007-03-08 18:21:09 -0500]:
>>
>>
>>
>>>This removes duplication in the AC-3 tables between encoder and parser.
>>>
>>>For now, there is not a place for common AC-3 code, so with this patch,
>>>parser.c includes ac3tab.h.  Once there is an ac3.c, parser.c will be
>>>changed to include ac3.h instead.
>>>
>>>-Justin
>>
>>
>>I think table data shouldn't put into header file. we can put it into c file
>>and extern the array in the header file or define a function to get it.
>>So just remove the static and extern them in ac3tab.h.
> 
> 
> Okay, so to avoid the arguments here, maybe I should just wait until
> there is a c file for common ac3 data and functions.  Right now the only
> way I can see to avoid the duplication and do what you're describing is
> to make the ac3 parser dependent on the ac3 encoder, which I don't think
> would be a good thing.
> 
> Right now I'm just trying to reduce the ac3 decoder patch one step at a
> time.  I guess I'll start somewhere else and do this step later.

Now is a better time for a more complete patch to do this.  The attached
patch does the same as the last one, but generates the frame size table
at runtime.  It also does not duplicate the tables in the object files.

-Justin




More information about the ffmpeg-devel mailing list