[Ffmpeg-devel] [PATCH] x264 interface update

Robert Swain robert.swain
Sun Dec 18 05:36:00 CET 2005


Hello,

I've been working on the x264 interface, attempting to update its
configurability before the next release of ffmpeg, if it goes ahead. I have
attached a patch which brings the configurability up to a current level. I
have not done anything about the default values of parameters being reused,
only those that I have added. Each parameter addition was for a reason, but
if any of you have reason that may be overriding then I'd appreciate your
input. I'd like to look into altering the defaults of reused parameters for
external codecs at a later date and merely provide a default command line
that matches the defaults with those of x264.

-gop_size 250 -rc_buffer_size 0 -rc_max_rate 0 -cqp 26 -max_b_frames 
0 -b_frame_strategy 1 -bframebias 0 -keyint_min 25 -sc_threshold 40 -deblock 
0:0 -qmin 10 -qmax 51 -max_qdiff 4 -qcompress 0.6 -qblur 0.5 -complexityblur 
20.0 -refs 1 -partitions p8x8,b8x8,i8x8,i4x4 -directpred temporal -me_method 
7 -me_range 16 -level 51 -ratetol 1.0 -i_quant_factor 0.7 -b_quant_factor 
1.3 -chromaoffset 0 -rc_eq "blurCplx^(1-qComp)" -loglevel 2 -thread_count 
1 -ac -bpyramid 0 -loop -wpred 0 -brdo 0 -mixed_refs 0 -chroma_me 1 -8x8dct 
0 -fastpskip 1 -psnr -aud 0
(Note 1: All parameters are included regardless of whether the command line 
is functional/good or whether they differ from the ffmpeg defaults)
(Note 2: for the 'flags2' flags -<flag> 1 means enabled, and 0 disabled, for 
clarity)

I have a few questions which I would like to resolve before anything is done
with this patch and I think they are the only things that remain to be done.

- Why do 'flags2' flags require an argument despite the argument not
appearing to have a function? (I tried -brdo 0 and -brdo 1, and both enabled
brdo)
I looked for more code affecting flags but not flags2 but could not find any
beyond what is contained within the patch. I suspect I didn't look hard
enough. The resolution preferred from my perspective would be either to make
'flags2' flags function as 'flags' flags, that is to require no argument (I
tested -loop), or for 'flags2' flags to have a functional argument, 0
meaning disabled, 1 meaning enabled. Personally I would like flags2 to
function as flags, and if the optional argument method is deemed a good
idea, then they both use it.

- Why does setting a float in the default value parameter of the
libavcodec/utils.c options array not actually set the default value to that
value?
I used GDB to print the value of avctx->ratetol for example. In the value in
options[] (libavcodec/utils.c) was 1, but in AVCodecContext it was 0. Should
avcodec_get_context_defaults() be used for setting default values?

- What is the accepted method for altering the default value of a flag? A
couple of the flags I added should be enabled by default. Furthermore, what
is the accepted method of disabling a flag? Once a flag is enabled by
default, how can it be disabled?

Beyond that, any comments are gratefully received.

Thank you for your time,
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_x264_update.0.diff
Type: application/octet-stream
Size: 19820 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20051218/f9515e14/attachment.obj>



More information about the ffmpeg-devel mailing list