]> git.videolan.org Git - x264.git/commitdiff
Allow | as a separator between psy-rd and psy-trellis values.
authorAlexander Strange <astrange@ithinksw.com>
Mon, 10 Nov 2008 05:55:20 +0000 (00:55 -0500)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 15 Feb 2010 08:59:58 +0000 (00:59 -0800)
[,:/] are all taken when setting psy-trellis in a zone in an mencoder option.

Also fix a comment typo and remove a useless line of code.

common/common.c
encoder/encoder.c

index aaccdf25158047d55777ae43cbbccdf454fa800b..0dd7af527050a2b07bb8d72062685cd11486d627 100644 (file)
@@ -515,7 +515,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value )
     OPT("psy-rd")
     {
         if( 2 == sscanf( value, "%f:%f", &p->analyse.f_psy_rd, &p->analyse.f_psy_trellis ) ||
-            2 == sscanf( value, "%f,%f", &p->analyse.f_psy_rd, &p->analyse.f_psy_trellis ) )
+            2 == sscanf( value, "%f,%f", &p->analyse.f_psy_rd, &p->analyse.f_psy_trellis ) ||
+            2 == sscanf( value, "%f|%f", &p->analyse.f_psy_rd, &p->analyse.f_psy_trellis ))
         { }
         else if( sscanf( value, "%f", &p->analyse.f_psy_rd ) )
         {
index 9efe88a7ac8acba6aef996683b619dec20e9a50d..cca9c453032ba2cd24c6f2352f5005f6848e74cf 100644 (file)
@@ -84,7 +84,7 @@ static void x264_slice_header_init( x264_t *h, x264_slice_header_t *sh,
     x264_param_t *param = &h->param;
     int i;
 
-    /* First we fill all field */
+    /* First we fill all fields */
     sh->sps = sps;
     sh->pps = pps;
 
@@ -685,8 +685,6 @@ static int x264_validate_parameters( x264_t *h )
     /* Psy trellis has a similar effect. */
     if( h->mb.i_psy_trellis )
         h->param.analyse.i_chroma_qp_offset -= h->param.analyse.f_psy_trellis < 0.25 ? 1 : 2;
-    else
-        h->mb.i_psy_trellis = 0;
     h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12);
     h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 );
     h->param.rc.f_aq_strength = x264_clip3f( h->param.rc.f_aq_strength, 0, 3 );