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

Fix overflow for coeff -32768 in function ADD_RES_SSE_8_8 with
no performance drop.

./checkasm --test=hevc_add_res --bench

Mainline:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_8x8_8_sse2: 15.5

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

After:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_8x8_8_sse2: 15.5

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