From: Jason Garrett-Glaser Date: Sat, 27 Feb 2010 22:26:02 +0000 (-0800) Subject: Fix crash with intra-refresh + aq-mode 0 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=7d533c57ee25a73c79b10ef7fb36324727e38582;p=x264.git Fix crash with intra-refresh + aq-mode 0 --- diff --git a/encoder/slicetype.c b/encoder/slicetype.c index bb2ed64c..01b0de6e 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -1397,7 +1397,10 @@ int x264_rc_analyse_slice( x264_t *h ) int intra_cost = (h->fenc->i_intra_cost[mb_xy] * ip_factor + 128) >> 8; int inter_cost = h->fenc->lowres_costs[b-p0][p1-b][mb_xy]; int diff = intra_cost - inter_cost; - h->fdec->i_row_satd[y] += (diff * frames[b]->i_inv_qscale_factor[mb_xy] + 128) >> 8; + if( h->param.rc.i_aq_mode ) + h->fdec->i_row_satd[y] += (diff * frames[b]->i_inv_qscale_factor[mb_xy] + 128) >> 8; + else + h->fdec->i_row_satd[y] += diff; cost += diff; } }