summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Jakobi <liquid.acid@gmx.net>2012-12-30 12:44:28 +0100
committerXiang, Haihao <haihao.xiang@intel.com>2013-01-04 10:43:28 +0800
commitf12a4968b481d1064a11280cd728125e1191d9b2 (patch)
tree9ca70de3961efa85b154b8b51ee0a61d812eee4a
parent23fd8e305fae88a24fef877bb3d1b9599bbca69a (diff)
downloadvaapi-intel-driver-f12a4968b481d1064a11280cd728125e1191d9b2.tar.gz
vaapi-intel-driver-f12a4968b481d1064a11280cd728125e1191d9b2.tar.bz2
vaapi-intel-driver-f12a4968b481d1064a11280cd728125e1191d9b2.zip
naive fix in avc_get_first_mb_bit_offset_with_epb
Bugzilla:://bugs.freedesktop.org/show_bug.cgi?id=58875 Signed-off-by: Tobias Jakobi <liquid.acid@gmx.net>
-rw-r--r--src/i965_decoder_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i965_decoder_utils.c b/src/i965_decoder_utils.c
index 6326796..98e931a 100644
--- a/src/i965_decoder_utils.c
+++ b/src/i965_decoder_utils.c
@@ -196,7 +196,7 @@ avc_get_first_mb_bit_offset_with_epb(
{
unsigned int in_slice_data_bit_offset = slice_param->slice_data_bit_offset;
unsigned int out_slice_data_bit_offset;
- unsigned int i, j, buf_size, data_size, header_size;
+ unsigned int i, j, n, buf_size, data_size, header_size;
uint8_t *buf;
int ret;
@@ -213,11 +213,11 @@ avc_get_first_mb_bit_offset_with_epb(
);
assert(ret == 0);
- for (i = 2, j = 2; i < buf_size && j < header_size; i++, j++) {
+ for (i = 2, j = 2, n = 0; i < buf_size && j < header_size; i++, j++) {
if (buf[i] == 0x03 && buf[i - 1] == 0x00 && buf[i - 2] == 0x00)
- i += 2, j++;
+ i += 2, j++, n++;
}
- out_slice_data_bit_offset = in_slice_data_bit_offset % 8 + i * 8;
+ out_slice_data_bit_offset = in_slice_data_bit_offset + n * 8;
if (mode_flag == ENTROPY_CABAC)
out_slice_data_bit_offset = ALIGN(out_slice_data_bit_offset, 0x8);