From 50cae3cf1db1065a3570bd9ef29059c8ab49979e Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Fri, 24 Dec 2010 17:28:42 -0500 Subject: [PATCH] Fix satd predictors with high bit depth Resulted in odd CRF-mode results with --no-mbtree, as well as suboptimal VBV handling. --- encoder/slicetype.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/encoder/slicetype.c b/encoder/slicetype.c index fcf30a5c..5c52aaf9 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); } -- 2.40.0