From 7b71d586bce87181a4978ee3f8eb775b0481f6d4 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Mon, 1 Sep 2008 10:35:41 -0700 Subject: [PATCH] Fix speed regression in r951 Row SATDs are only necessary in VBV mode, so don't need to be checked if VBV is off. --- encoder/slicetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder/slicetype.c b/encoder/slicetype.c index e68b06ed..767e02ff 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -248,7 +248,7 @@ static int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a, * If we have tried this frame as P, then we have also tried * the preceding frames as B. (is this still true?) */ /* Also check that we already calculated the row SATDs for the current frame. */ - if( frames[b]->i_cost_est[b-p0][p1-b] >= 0 && frames[b]->i_row_satds[b-p0][p1-b][0] != -1 ) + if( frames[b]->i_cost_est[b-p0][p1-b] >= 0 && (!h->param.rc.i_vbv_buffer_size || frames[b]->i_row_satds[b-p0][p1-b][0] != -1) ) { i_score = frames[b]->i_cost_est[b-p0][p1-b]; } -- 2.47.3