From 9eb5b912e317b4d3d106a55080b7aafd3d0f4af7 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Mon, 10 Nov 2008 00:55:20 -0500 Subject: [PATCH] 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. --- 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 aaccdf25..0dd7af52 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 9efe88a7..cca9c453 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 ); -- 2.47.3