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

Michael Niedermayer michaelni
Wed Feb 21 19:18:13 CET 2007


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:
> > [...]
> >   
> >>> getting rid of *_opts can be done by simply keeping a single 
> >>> opt_names, opt_values and opt_name_count and simply going over them every
> >>> time a context must be initalized, i dont know if that is a good idea but
> >>> its possible,
> >>>       
> >> i've not yet worked out the correlation between options and context... i
> >> mean, for instance, how options for input file(s) are not used for
> >> output... but i go on reading :)
> >>
> >>     
> >>>  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

use _opts[CODEC_TYPE_NB] :)


[...]

> 
> >>> if there is no exact match bit it starts with "a"/"v"/"s" and the remainder
> >>> has a match then it would be set only for audio/video/subtitles, does that 
> >>> work? or do we have some name clashes here?
> >>>
> >>> [...]
> >>>   
> >>>       
> >> i'm not sure i understand you (once again :) )
> >> i've not a clear vision of all this works, actually... so it's quite
> >> hard to follow you.
> >>     
> >
> > 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


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


> 
> > 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


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070221/dfd21c62/attachment.pgp>



More information about the ffmpeg-devel mailing list