Calculate required space of batch buffer to avoid buffer overflow in encoding on BDW
authorZhao Yakui <yakui.zhao@intel.com>
Thu, 19 Dec 2013 05:37:16 +0000 (13:37 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 27 Feb 2014 02:26:17 +0000 (10:26 +0800)
commit8b100cfe0aa2030c8158163efcd460e82d2aeec0
treede09d239e80ccc8e1499fed7e08965a8e98c17b1
parent9816bf521dc28c51911db140630342a516f9258e
Calculate required space of batch buffer to avoid buffer overflow in encoding on BDW

The required size is based on the number of macroblocks and slice parameter.
Then it can avoid that too large buffer is allocated or possible overflow.
This is picked up from that on Haswell/Ivybridge.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
src/gen8_mfc.c