From: Jason Garrett-Glaser Date: Mon, 1 Sep 2008 17:35:41 +0000 (-0700) Subject: Fix speed regression in r951 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=7b71d586bce87181a4978ee3f8eb775b0481f6d4;p=x264.git Fix speed regression in r951 Row SATDs are only necessary in VBV mode, so don't need to be checked if VBV is off. --- 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]; }