[Libva] [libva-intel-driver PATCH 1/4] HEVC/dec: Fix weight/offset in HCP_WEIGHTOFFSET
Xiang, Haihao
haihao.xiang at intel.com
Wed Apr 22 00:33:48 PDT 2015
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
src/gen9_mfd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gen9_mfd.c b/src/gen9_mfd.c
index 68e3ffc..28c788f 100644
--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -649,8 +649,8 @@ gen9_hcpd_weightoffset_state_1(struct intel_batchbuffer *batch,
for (i = 0; i < 16; i++) {
if (i < MIN((num_ref_minus1 + 1), 15)) {
OUT_BCS_BATCH(batch,
- luma_offset[i] << 8 |
- delta_luma_weight[i]);
+ (luma_offset[i] & 0xff) << 8 |
+ (delta_luma_weight[i] & 0xff));
} else {
OUT_BCS_BATCH(batch, 0);
}
@@ -658,10 +658,10 @@ gen9_hcpd_weightoffset_state_1(struct intel_batchbuffer *batch,
for (i = 0; i < 16; i++) {
if (i < MIN((num_ref_minus1 + 1), 15)) {
OUT_BCS_BATCH(batch,
- chroma_offset[i][1] << 24 |
- delta_chroma_weight[i][1] << 16 |
- chroma_offset[i][0] << 8 |
- delta_chroma_weight[i][0]);
+ (chroma_offset[i][1] & 0xff) << 24 |
+ (delta_chroma_weight[i][1] & 0xff) << 16 |
+ (chroma_offset[i][0] & 0xff) << 8 |
+ (delta_chroma_weight[i][0] & 0xff));
} else {
OUT_BCS_BATCH(batch, 0);
}
--
1.9.1
More information about the Libva
mailing list