diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2018-01-11 13:13:36 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2018-01-12 08:17:16 +0800 |
commit | d6e67fc4e17cd75fcc064c9a4d0bef6851e68157 (patch) | |
tree | ce669bf28adba258ea3dcedd3033666bd2d085ab | |
parent | 2d316ed2d221fbd9322253abd8ac4d81923b0142 (diff) | |
download | libva-intel-driver-d6e67fc4e17cd75fcc064c9a4d0bef6851e68157.tar.gz |
ENC/jpeg: fix regression with Small optimization
This fixes 6c1b9b345982babde748518de1834e2af8bcf321:
Small optimization while removing warning
The higher 16 bit of dword_qm[j] (j = 0, 1, ..., 31) is
65535 / (raster_qm[i + 1]) (i = 0, 2, 4, ..., 62)
This fixes https://github.com/01org/intel-vaapi-driver/issues/319
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r-- | src/gen8_mfc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c index 82a1c4bc..542719a4 100644 --- a/src/gen8_mfc.c +++ b/src/gen8_mfc.c @@ -2840,8 +2840,8 @@ get_reciprocal_dword_qm(unsigned char *raster_qm, uint32_t *dword_qm) short hdw, ldw; for (i = 0, j = 0; i < 64; i += 2, j++) { - hdw = 65535 / (raster_qm[i]); - ldw = 65535 / (raster_qm[i + 1]); + ldw = 65535 / (raster_qm[i]); + hdw = 65535 / (raster_qm[i + 1]); dword_qm[j] = (hdw << 16) | ldw; } } |