hardware/intel/intel-driver
Revisión | 996f6d4ef03fbe4447a8f8ef26f86e49964c1d01 (tree) |
---|---|
Tiempo | 2015-04-29 16:57:50 |
Autor | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
HEVC/dec: Fix weight/offset in HCP_WEIGHTOFFSET
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
@@ -649,8 +649,8 @@ gen9_hcpd_weightoffset_state_1(struct intel_batchbuffer *batch, | ||
649 | 649 | for (i = 0; i < 16; i++) { |
650 | 650 | if (i < MIN((num_ref_minus1 + 1), 15)) { |
651 | 651 | OUT_BCS_BATCH(batch, |
652 | - luma_offset[i] << 8 | | |
653 | - delta_luma_weight[i]); | |
652 | + (luma_offset[i] & 0xff) << 8 | | |
653 | + (delta_luma_weight[i] & 0xff)); | |
654 | 654 | } else { |
655 | 655 | OUT_BCS_BATCH(batch, 0); |
656 | 656 | } |
@@ -658,10 +658,10 @@ gen9_hcpd_weightoffset_state_1(struct intel_batchbuffer *batch, | ||
658 | 658 | for (i = 0; i < 16; i++) { |
659 | 659 | if (i < MIN((num_ref_minus1 + 1), 15)) { |
660 | 660 | OUT_BCS_BATCH(batch, |
661 | - chroma_offset[i][1] << 24 | | |
662 | - delta_chroma_weight[i][1] << 16 | | |
663 | - chroma_offset[i][0] << 8 | | |
664 | - delta_chroma_weight[i][0]); | |
661 | + (chroma_offset[i][1] & 0xff) << 24 | | |
662 | + (delta_chroma_weight[i][1] & 0xff) << 16 | | |
663 | + (chroma_offset[i][0] & 0xff) << 8 | | |
664 | + (delta_chroma_weight[i][0] & 0xff)); | |
665 | 665 | } else { |
666 | 666 | OUT_BCS_BATCH(batch, 0); |
667 | 667 | } |