[x264-devel] Properly weight slice header lambda in chroma weightp analysis

Jason Garrett-Glaser git at videolan.org
Sun Jul 10 06:17:54 CEST 2011


x264 | branch: master | Jason Garrett-Glaser <jason at x264.com> | Mon Jun 20 16:20:21 2011 -0700| [2809cb6ce63817a58c5639642fe05bc50747e126] | committer: Jason Garrett-Glaser

Properly weight slice header lambda in chroma weightp analysis

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

 encoder/slicetype.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index d6240b3..3972189 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -136,6 +136,9 @@ static int x264_weight_slice_header_cost( x264_t *h, x264_weight_t *w, int b_chr
 {
     /* Add cost of weights in the slice header. */
     int lambda = x264_lambda_tab[X264_LOOKAHEAD_QP];
+    /* 4 times higher, because chroma is analyzed at full resolution. */
+    if( b_chroma )
+        lambda *= 4;
     int numslices;
     if( h->param.i_slice_count )
         numslices = h->param.i_slice_count;



More information about the x264-devel mailing list