summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao, Halley <halley.zhao@intel.com>2014-01-09 03:14:24 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-02-27 10:30:26 +0800
commit579235a0c65df039573d34a921178a8ac77c3f20 (patch)
tree95117d5e6b66c68fc5280c823c301215512cbcf8
parent07cad1269421e3351ba271a235445eb35a6e6170 (diff)
downloadlibva-intel-driver-579235a0c65df039573d34a921178a8ac77c3f20.tar.gz
libva-intel-driver-579235a0c65df039573d34a921178a8ac77c3f20.tar.bz2
libva-intel-driver-579235a0c65df039573d34a921178a8ac77c3f20.zip
vp8 dec: follows va_dec_vp8.h update
key_frame:0 means an intra frame bool_coder_ctx.count is the remaining bits in bool_coder_ctx.value, range[0,7) slice_data_offset/macroblock_offset update Signed-off-by: Zhao Halley <halley.zhao@intel.com>
-rw-r--r--src/gen8_mfd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c
index 6a10663..abf3078 100644
--- a/src/gen8_mfd.c
+++ b/src/gen8_mfd.c
@@ -2855,7 +2855,7 @@ gen8_mfd_vp8_pic_state(VADriverContextP ctx,
pic_param->pic_fields.bits.segmentation_enabled << 8 |
0 << 7 | /* segmentation id streamin disabled */
0 << 6 | /* segmentation id streamout disabled */
- pic_param->pic_fields.bits.key_frame << 5 |
+ (pic_param->pic_fields.bits.key_frame == 0 ? 1 : 0) << 5 | /* 0 indicate an intra frame in VP8 stream/spec($9.1)*/
pic_param->pic_fields.bits.filter_type << 4 |
(pic_param->pic_fields.bits.version == 3) << 1 | /* full pixel mode for version 3 */
!!pic_param->pic_fields.bits.version << 0); /* version 0: 6 tap */
@@ -2964,7 +2964,7 @@ gen8_mfd_vp8_bsd_object(VADriverContextP ctx,
{
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
int i, log2num;
- unsigned int offset = slice_param->slice_data_offset;
+ unsigned int offset = slice_param->slice_data_offset + ((slice_param->macroblock_offset + 7 ) >> 3);
assert(slice_param->num_of_partitions >= 2);
assert(slice_param->num_of_partitions <= 9);
@@ -2974,7 +2974,8 @@ gen8_mfd_vp8_bsd_object(VADriverContextP ctx,
BEGIN_BCS_BATCH(batch, 22);
OUT_BCS_BATCH(batch, MFD_VP8_BSD_OBJECT | (22 - 2));
OUT_BCS_BATCH(batch,
- pic_param->bool_coder_ctx.count << 16 | /* Partition 0 CPBAC Entropy Count */
+ // XXX, when bool_coder_ctx.count (remaining bits in value) is 0, 0 is also expected for CPBAC Entropy Count?
+ ((8-pic_param->bool_coder_ctx.count)%8) << 16 | /* Partition 0 CPBAC Entropy Count */
pic_param->bool_coder_ctx.range << 8 | /* Partition 0 Count Entropy Range */
log2num << 4 |
(slice_param->macroblock_offset & 0x7));