]> git.videolan.org Git - x264.git/commitdiff
Properly weight slice header lambda in chroma weightp analysis
authorJason Garrett-Glaser <jason@x264.com>
Mon, 20 Jun 2011 23:20:21 +0000 (16:20 -0700)
committerJason Garrett-Glaser <jason@x264.com>
Sun, 10 Jul 2011 04:15:48 +0000 (21:15 -0700)
encoder/slicetype.c

index d6240b3caa58fd2b47b0bc99b354205500b91adf..397218985189aae1f469a8b6d5e9c0d370c69f42 100644 (file)
@@ -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;