From 39a5799f9af0b117181f5f6866f292733876a173 Mon Sep 17 00:00:00 2001 From: Yasuhiro Ikeda Date: Thu, 9 Dec 2010 11:59:49 +0900 Subject: [PATCH] Save more memory with weightp in >8-bit --- common/macroblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3