From: Jason Garrett-Glaser Date: Fri, 24 Dec 2010 22:28:42 +0000 (-0500) Subject: Fix satd predictors with high bit depth X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=a4406c19e75eda4ee5754827cc9381276be403ab;p=x264.git Fix satd predictors with high bit depth Resulted in odd CRF-mode results with --no-mbtree, as well as suboptimal VBV handling. --- diff --git a/encoder/slicetype.c b/encoder/slicetype.c index 7eff5701..9d5718c5 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -1647,5 +1647,9 @@ int x264_rc_analyse_slice( x264_t *h ) } } - return cost; + if( BIT_DEPTH > 8 ) + for( int y = 0; y < h->mb.i_mb_height; y++ ) + h->fdec->i_row_satd[y] >>= (BIT_DEPTH - 8); + + return cost >> (BIT_DEPTH - 8); }