Calculate required space of batch buffer to avoid buffer overflow in encoding on BDW
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 <21bae65ecea50a19bd9d0fef489914760189fd5b@intel.com>

gbeauchesne/libva-intel-driver,gbeauchesne/libva-intel-driver,01org/iotg-lin-gfx-va-driver,gbeauchesne/libva-intel-driver,uartie/vaapi-intel-driver,uartie/vaapi-intel-driver,chenxianqin/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,uartie/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,01org/iotg-lin-gfx-va-driver,uartie/vaapi-intel-driver,gbeauchesne/libva-intel-driver,chenxianqin/vaapi-intel-driver,chenxianqin/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,chenxianqin/vaapi-intel-driver,gbeauchesne/libva-intel-driver,uartie/vaapi-intel-driver,chenxianqin/vaapi-intel-driver