[x264-devel] Warn users when using --(psnr|ssim) without --tune (psnr|ssim)

Yasuhiro Ikeda wipple625 at gmail.com
Sat Apr 23 16:06:06 CEST 2011


I think this patch is enough to meet your requirement.

2011/4/23 Takashi Mochizuki <mochi at da2.so-net.ne.jp>

> 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
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20110423/438d7eba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psnr-ssim-warning.patch
Type: application/octet-stream
Size: 944 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20110423/438d7eba/attachment.obj>


More information about the x264-devel mailing list