[Ffmpeg-devel] [PATCH] access all bitrates for amr nb encoding

Benoit Fouet benoit.fouet
Thu Feb 22 10:58:57 CET 2007


Hi,

Michael Niedermayer wrote:
> Hi
>
> On Wed, Feb 21, 2007 at 11:38:51AM +0100, Benoit Fouet wrote:
>   
>> Hi,
>>
>> Michael Niedermayer wrote:
>>     
>>> Hi
>>>
>>> On Mon, Feb 19, 2007 at 02:30:14PM +0100, Benoit Fouet wrote:
>>> [...]
>>>   	   
>>>       
>>>>>  there are also 2 or so places where you would need to append
>>>>> a option to override some flags in opt_*
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> i don't understand that.
>>>>     
>>>>         
>>> you dont have to unless you want to get rid of *_opts :)
>>>
>>>
>>>   
>>>       
>> ok, so you suggest i should look at having 3 *_opts (video, audio and
>> subtitles), or a _opts table ?
>>     
>
> hmm as you ask ...
> add a CODEC_TYPE_NB at the end of enum CodecType and
>
>   
i've just sent a patch for this one
[snip]

>>> option parsing works very simply
>>> first the old parsing is done (this is irrelevant for us)
>>>
>>>   
>>>       
>> you mean the one using the OptionDef table in ffmpeg.c, right ?
>>     
>
> yes
>
>
> [...]
>   
it will need a little refresh when all the rest is done, i think...

>>> then at appropriate places in the code the stuff from
>>> avctx_opts/avformat_opts is copied into the actual contexts
>>>
>>>   
>>>       
>> this is what i still have problems to see how is done...
>> and i guess i have to understand if i want to split it correctly (and do
>> things at their right places too)
>>     
>
> just grep for avctx_opts and replace it by avctx_opts[codec_type which looks
> appropriate]
>
>
>   
i'm doing something like that at the moment... i'll get back when i get
all this working correctly (i mean, at least regression tests (which
have just finished successfully) and a bench of tests i have too)

>>> the problem with audio/video is that there is just 1 avctx_opts which can
>>> not hold 2 different bitrates ...
>>>
>>> if its simply split and the options are appropriately put into each then the
>>> problem is solved
>>>
>>>   
>>>       
>> i think too this would be the simpliest way to do so, but as i already
>> said, my view is far from being an expert one !
>> this would mean to modify the OFFSET macro (for instance) so that it can
>> handle properly the split, i guess...
>>     
>
> no, that wasnt what i had in mind though iam open to other suggestions ...
> what i had in mind was to not change the AVOption stuff in utils.c at all
> but rather change opt_default in ffmpeg.c
>
>
> [...]
>   
>   
your solution is far more simple, so i'll try to implement it and see
what it leads to :)
Thanks a lot for your time explaining !

Ben





More information about the ffmpeg-devel mailing list