From: Jason Garrett-Glaser Date: Mon, 20 Jun 2011 23:20:21 +0000 (-0700) Subject: Properly weight slice header lambda in chroma weightp analysis X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=2809cb6ce63817a58c5639642fe05bc50747e126;p=x264.git Properly weight slice header lambda in chroma weightp analysis --- diff --git a/encoder/slicetype.c b/encoder/slicetype.c index d6240b3c..39721898 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;