[x264-devel] Warn users when using --(psnr|ssim) without --tune (psnr|ssim)
Takashi Mochizuki
mochi at da2.so-net.ne.jp
Sat Apr 23 02:58:44 CEST 2011
I think these snippet has a problem with x264_encoder_reconfig().
+ else if( h->param.rc.i_aq_mode && h->param.analyse.b_psnr )
+ {
+ x264_log( h, X264_LOG_WARNING, "--psnr used with AQ on: results will be invalid!\n" );
+ s = "psnr";
+ }
If libx264.a is used with --tune psnr --psnr equivalent parameters,
libx264 claims "--psnr used with AQ on..." when x264_encoder_reconfig() is called.
Because current implementation in x264_validate_parameters() could force i_aq_mode to 1.
So it should be:
+ else if( h->param.rc.i_aq_mode && h->param.rc.f_aq_strength != 0 && h->param.analyse.b_psnr )
>> encoder/encoder.c - x264_validate_parameters()
>> 775 h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 );
>> 776 h->param.rc.f_aq_strength = x264_clip3f( h->param.rc.f_aq_strength, 0, 3 );
>> 777 if( h->param.rc.f_aq_strength == 0 )
>> 778 h->param.rc.i_aq_mode = 0;
>> 779 /* MB-tree requires AQ to be on, even if the strength is zero. */
>> 780 if( !h->param.rc.i_aq_mode && h->param.rc.b_mb_tree )
>> 781 {
>> 782 h->param.rc.i_aq_mode = 1;
>> 783 h->param.rc.f_aq_strength = 0;
>> 784 }
>>
>> Thus, when I use --tune psnr with mb_tree, it forces aq_mode on, and I will get
Takashi Mochizuki
More information about the x264-devel
mailing list