[Ffmpeg-devel] OptionDef to AVOption migration problems
Panagiotis Issaris
takis.issaris
Fri Sep 22 17:18:39 CEST 2006
Hi,
I've run into several issues now regarding the migration of the OptionDef
options to AVOptions.
One of them is that the defaults for the AVOptions are being stored
in "avctx_opts". The problem with this is that AVCodecContext contains one
field "bit_rate" which is used for both audio and video bitrates. When the
parameters are set in the per-stream AVCodecContext,
it isn't an issue, but for the defaults it is as there is only one for both
video and audio related defaults.
Another problem occurs with some parameters which have units which are not
common, such as lmax, which scales the parameter with 112:
1508 #define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
...
2322 static void opt_lmax(const char *arg)
2323 {
2324 video_lmax = atof(arg)*FF_QP2LAMBDA;
2325 }
Other parameters have range checks which can't be done using AVOptions for the
moment. In an AVOption you specify a maximum and a minimum. It can't be
specified whether the boudaries are inclusive or not.
2315 if (video_qscale <= 0 ||
2316 video_qscale > 255) {
2317 fprintf(stderr, "qscale must be > 0.0 and <= 255\n");
Some parameters such as "-s" parse the argument to get the frame width and
height, but as there is no possibility to register a callback function in the
AVOption struct, this can't be parsed.
Any suggestions would be greatly appreciated :)
With friendly regards,
Takis
More information about the ffmpeg-devel
mailing list