Skip to content

Commit

Permalink
fix vp8 decode issue intel#190, change the first partition size
Browse files Browse the repository at this point in the history
correct first partition_size,macroblock offset is 8 aligned

Signed-off-by: XinfengZhang <carl.zhang@intel.com>
  • Loading branch information
XinfengZhang committed Aug 22, 2018
1 parent 5799e32 commit 233964f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions media_driver/linux/common/codec/ddi/media_ddi_decode_vp8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ VAStatus DdiDecodeVP8::ParseSliceParams(
picParams->uiFirstMbByteOffset = slcParam->slice_data_offset + ((slcParam->macroblock_offset + 8) >> 3);

memcpy_s(picParams->uiPartitionSize, sizeof(picParams->uiPartitionSize), slcParam->partition_size, sizeof(picParams->uiPartitionSize));

//partition 0 size in command buffer includes the one byte in bool decoder if remaining bits of bool decoder is not zero.
picParams->uiPartitionSize[0] += (slcParam->macroblock_offset & 0x7) ? 1 : 0;
//partition 0 size in command buffer includes the one byte in bool decoder if remaining bits of bool decoder is zero.
picParams->uiPartitionSize[0] -= (slcParam->macroblock_offset & 0x7) ? 0 : 1;

return VA_STATUS_SUCCESS;
}
Expand Down

0 comments on commit 233964f

Please sign in to comment.