]> git.sesse.net Git - ffmpeg/commit
lavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8
authorLinjie Fu <linjie.fu@intel.com>
Thu, 5 Mar 2020 07:48:09 +0000 (15:48 +0800)
committerAnton Khirnov <anton@khirnov.net>
Fri, 27 Mar 2020 09:57:40 +0000 (10:57 +0100)
commit8b8492452d53293b2ac8c842877fadf7925fc950
tree51ad477ae083df79665e2727cdf6ac64f9356f68
parente9abef437f0a348c017d4ac8b23a122881c1dc87
lavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8

Fix overflow for coeff -32768 in function ADD_RES_SSE_16_32_8 with no
performance drop.(SSE2/AVX/AVX2)

./checkasm --test=hevc_add_res --bench

Mainline:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_32x32_8_sse2: 127.5
    hevc_add_res_32x32_8_avx: 127.0
    hevc_add_res_32x32_8_avx2: 86.5

Add overflow test case:
  - hevc_add_res.add_residual [FAILED]

After:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_32x32_8_sse2: 126.8
    hevc_add_res_32x32_8_avx: 128.3
    hevc_add_res_32x32_8_avx2: 86.8

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/x86/hevc_add_res.asm