[FFmpeg-devel] [PATCH 1/4] lavc/x86/hevc_add_res: Fix overflow in ADD_RES_MMX_4_8

Anton Khirnov anton at khirnov.net
Thu Mar 26 15:45:20 EET 2020


Quoting Linjie Fu (2020-03-05 08:47:37)
> Fix overflow for coeff -32768 in function ADD_RES_MMX_4_8 with no
> performance drop.
> 
> ./checkasm --test=hevc_add_res --bench
> 
> Mainline:
>   - hevc_add_res.add_residual [OK]
>     hevc_add_res_4x4_8_mmxext: 15.5
> 
> Add overflow test case:
>   - hevc_add_res.add_residual [FAILED]
> 
> After:
>   - hevc_add_res.add_residual [OK]
>     hevc_add_res_4x4_8_mmxext: 15.0
> 
> Signed-off-by: Xu Guangxin <guangxin.xu at intel.com>
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
>  libavcodec/x86/hevc_add_res.asm | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)

Looks ok and even more readable.
Thank you, queueing.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list