[x264-devel] commit: Allow | as a separator between psy-rd and psy-trellis values. ( Alexander Strange )

git version control git at videolan.org
Mon Feb 15 10:20:25 CET 2010


x264 | branch: master | Alexander Strange <astrange at ithinksw.com> | Mon Nov 10 00:55:20 2008 -0500| [9eb5b912e317b4d3d106a55080b7aafd3d0f4af7] | committer: Jason Garrett-Glaser 

Allow | as a separator between psy-rd and psy-trellis values.
[,:/] 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.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=9eb5b912e317b4d3d106a55080b7aafd3d0f4af7
---

 common/common.c   |    3 ++-
 encoder/encoder.c |    4 +---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/common/common.c b/common/common.c
index aaccdf2..0dd7af5 100644
--- a/common/common.c
+++ b/common/common.c
@@ -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 ) )
         {
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 9efe88a..cca9c45 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -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 );



More information about the x264-devel mailing list