summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGwenole Beauchesne <gb.devel@gmail.com>2014-04-08 06:56:03 -0600
committerXiang, Haihao <haihao.xiang@intel.com>2014-04-23 14:21:30 +0800
commit8908b464caad4eef669a9eecc56f54325ce7fdc2 (patch)
tree716b57773e0c66f6b8a260fc51009adc7c6f3938 /src
parentdc481879610fa323386a5567bd9f904346cc040c (diff)
downloadlibva-intel-driver-8908b464caad4eef669a9eecc56f54325ce7fdc2.tar.gz
libva-intel-driver-8908b464caad4eef669a9eecc56f54325ce7fdc2.tar.bz2
libva-intel-driver-8908b464caad4eef669a9eecc56f54325ce7fdc2.zip
vp8: fix loop filter for bitexact reconstruction.
Each loop filter delta update value shall be encoded within 7 bits, including the sign bit and 6-bit magnitude in 2's complement. So, don't propagate the sign bit while packing the filter level values. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> (cherry picked from commit 36ccd9c3e47766edc70ecbdf82acc89ed67e26c4)
Diffstat (limited to 'src')
-rw-r--r--src/gen8_mfd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c
index 743fd74..72b2640 100644
--- a/src/gen8_mfd.c
+++ b/src/gen8_mfd.c
@@ -2938,16 +2938,16 @@ gen8_mfd_vp8_pic_state(VADriverContextP ctx,
}
OUT_BCS_BATCH(batch,
- pic_param->loop_filter_deltas_ref_frame[3] << 24 |
- pic_param->loop_filter_deltas_ref_frame[2] << 16 |
- pic_param->loop_filter_deltas_ref_frame[1] << 8 |
- pic_param->loop_filter_deltas_ref_frame[0] << 0);
+ (pic_param->loop_filter_deltas_ref_frame[3] & 0x7f) << 24 |
+ (pic_param->loop_filter_deltas_ref_frame[2] & 0x7f) << 16 |
+ (pic_param->loop_filter_deltas_ref_frame[1] & 0x7f) << 8 |
+ (pic_param->loop_filter_deltas_ref_frame[0] & 0x7f) << 0);
OUT_BCS_BATCH(batch,
- pic_param->loop_filter_deltas_mode[3] << 24 |
- pic_param->loop_filter_deltas_mode[2] << 16 |
- pic_param->loop_filter_deltas_mode[1] << 8 |
- pic_param->loop_filter_deltas_mode[0] << 0);
+ (pic_param->loop_filter_deltas_mode[3] & 0x7f) << 24 |
+ (pic_param->loop_filter_deltas_mode[2] & 0x7f) << 16 |
+ (pic_param->loop_filter_deltas_mode[1] & 0x7f) << 8 |
+ (pic_param->loop_filter_deltas_mode[0] & 0x7f) << 0);
/* segmentation id stream base address, DW35-DW37 */
OUT_BCS_BATCH(batch, 0);