[x264-devel] Allow setting a wider range of chroma QP offsets

Anton Mitrofanov git at videolan.org
Sat Jul 23 02:38:55 CEST 2011


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Wed Jul 20 22:54:43 2011 +0400| [882badfe748f8190c6716472b8c8841b227093c1] | committer: Jason Garrett-Glaser

Allow setting a wider range of chroma QP offsets
This allows use of the full range of chroma QP offsets, even in combination with the automatic psy-based adjustments.

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

 encoder/encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index 1cc1918..72d4d3a 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -721,7 +721,6 @@ static int x264_validate_parameters( x264_t *h, int b_open )
         h->param.analyse.inter &= ~X264_ANALYSE_I8x8;
         h->param.analyse.intra &= ~X264_ANALYSE_I8x8;
     }
-    h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12);
     h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 );
     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 );
@@ -766,6 +765,7 @@ static int x264_validate_parameters( x264_t *h, int b_open )
     h->param.analyse.f_psy_trellis = x264_clip3f( h->param.analyse.f_psy_trellis, 0, 10 );
     h->mb.i_psy_rd = h->param.analyse.i_subpel_refine >= 6 ? FIX8( h->param.analyse.f_psy_rd ) : 0;
     h->mb.i_psy_trellis = h->param.analyse.i_trellis ? FIX8( h->param.analyse.f_psy_trellis / 4 ) : 0;
+    h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -32, 32);
     /* In 4:4:4 mode, chroma gets twice as much resolution, so we can halve its quality. */
     if( b_open && i_csp >= X264_CSP_I444 && i_csp < X264_CSP_BGR && h->param.analyse.b_psy )
         h->param.analyse.i_chroma_qp_offset += 6;



More information about the x264-devel mailing list