]> git.videolan.org Git - x264.git/commitdiff
Save more memory with weightp in >8-bit
authorYasuhiro Ikeda <wipple625@gmail.com>
Thu, 9 Dec 2010 02:59:49 +0000 (11:59 +0900)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 14 Dec 2010 16:27:14 +0000 (08:27 -0800)
common/macroblock.c

index 9075efc97706f8fc9c7131d3531a2f1e3910c6fd..f68fd6d58266d577128167e8f530fababce53bc7 100644 (file)
@@ -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;