[FFmpeg-cvslog] r15151 - in trunk: configure libavcodec/Makefile

Justin Ruggles justin.ruggles
Wed Sep 3 02:17:41 CEST 2008


M?ns Rullg?rd wrote:
> Justin Ruggles <justin.ruggles at gmail.com> writes:
> 
>> Diego Biurrun wrote:
>>> On Wed, Sep 03, 2008 at 12:45:18AM +0200, Aurelien Jacobs wrote:
>>>> On Wed, 3 Sep 2008 00:27:56 +0200
>>>> Diego Biurrun <diego at biurrun.de> wrote:
>>>>
>>>>> On Tue, Sep 02, 2008 at 10:54:53PM +0200, Aurelien Jacobs wrote:
>>>>>> On Tue, 2 Sep 2008 19:06:29 +0200
>>>>>> Diego Biurrun <diego at biurrun.de> wrote:
>>>>>>
>>>>>>> On Tue, Sep 02, 2008 at 06:04:27AM +0200, jbr wrote:
>>>>>>>> Log:
>>>>>>>> add a separate line in Makefile for E-AC-3 decoder and only compile it when
>>>>>>>> GPL is enabled. fixes building without GPL or with liba52.
>>>>>>>>
>>>>>>>> --- trunk/configure	(original)
>>>>>>>> +++ trunk/configure	Tue Sep  2 06:04:26 2008
>>>>>>>> @@ -848,6 +848,7 @@ byteswap_h_deps="!armv4l"
>>>>>>>>  # decoders / encoders
>>>>>>>>  ac3_decoder_deps="gpl !liba52"
>>>>>>>>  dxa_decoder_deps="zlib"
>>>>>>>> +eac3_decoder_deps="gpl"
>>>>>>>>
>>>>>>>> --- trunk/libavcodec/Makefile	(original)
>>>>>>>> +++ trunk/libavcodec/Makefile	Tue Sep  2 06:04:26 2008
>>>>>>>> @@ -63,6 +63,7 @@ OBJS-$(CONFIG_DVDSUB_ENCODER)          +
>>>>>>>>  OBJS-$(CONFIG_DXA_DECODER)             += dxa.o
>>>>>>>> +OBJS-$(CONFIG_EAC3_DECODER)            += eac3dec.o ac3dec.o ac3tab.o ac3dec_data.o ac3.o mdct.o fft.o
>>>>>>> I think it's easier to just make the E-AC-3 decoder depend on the AC-3
>>>>>>> decoder.
>>>>>> ./configure --enable-gpl --enable-decoder=eac3 --disable-decoder=ac3
>>>>>> works fine, and I see no valid reason to prevent it
>>>>> Small wonder - these flags have no effect at all.
>>>> They have an effect !
>>>> With this configure line the ac3_decoder won't be registered with
>>>> register_avcodec().
>>>> And thus CODEC_ID_AC3 won't be handled by any decoder.
>>> Let me rephrase: They are pointless since the code is compiled, but the
>>> codec is not registered.  What for?  Disabling codecs makes sense when
>>> you wish to reduce libavcodec's size.
>> I could reduce the size of the code for those who don't want E-AC-3
>> decoding by splitting it up some more.  I would basically put #ifdefs
>> around the parts in ac3dec.c that call functions in eac3dec.c so that
>> eac3dec.c does not have to be built.  I would revert to the old behavior
>> if E-AC-3 is passed to the decoder when it's not enabled.  Also, I would
>> split out those tables (especially the VQ tables) which are only used
>> for E-AC-3.
> 
> IMO, the decoder should accept both variants, whichever codec id is
> used, if both are enabled.

If both are enabled, both would be accepted, of course.

>> I don't completely agree with Aurel that they should be treated
>> equally.  E-AC-3 is a superset of AC-3.  The user may want to disable
>> that superset to save size, but keep the base AC-3 support.  It is
>> fairly easy thing to do if we choose to allow it.
> 
> Having the option to disable E-AC-3 only might be useful.

I can see a problem now with disabling the E-AC-3 decoder but not AC-3.
 The codec_id is tied to the AVCodec, so any E-AC-3 content would be
rejected if eac3_decoder is disabled.  That is not good, because an AC-3
decoder can also handle E-AC-3 content, it just doesn't decode it.  It
is required to look at the bitstream id in each frame's header and skip
it if it doesn't handle it.  This allows for the decoding of mixed
streams, which are assigned the E-AC-3 codec_id.

I'm open to suggestions for a clean way to allow both codec_id's while
not compiling full E-AC-3 support.

-Justin






More information about the ffmpeg-cvslog mailing list