From: Yasuhiro Ikeda Date: Thu, 9 Dec 2010 02:59:49 +0000 (+0900) Subject: Save more memory with weightp in >8-bit X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=39a5799f9af0b117181f5f6866f292733876a173;p=x264.git Save more memory with weightp in >8-bit --- diff --git a/common/macroblock.c b/common/macroblock.c index 9075efc9..f68fd6d5 100644 --- a/common/macroblock.c +++ b/common/macroblock.c @@ -272,8 +272,8 @@ int x264_macroblock_cache_allocate( x264_t *h ) luma_plane_size = h->fdec->i_stride[0] * (h->mb.i_mb_height*16+2*i_padv); if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_SMART ) - //SMART can weight one ref and one offset -1 - numweightbuf = 2; + //smart can weight one ref and one offset -1 in 8-bit + numweightbuf = 1 + (BIT_DEPTH == 8); else //simple only has one weighted ref numweightbuf = 1;