1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-02 06:23:23 +02:00

x86/hevc: get rid off packusdw for ssse3 compatibility

cherry picked from commit df8ebe304df453f26c28ff8f11d607f49b90a4c2

Fixes out of array access
Fixes: asan_stack-oob_1046454_9_asan_stack-oob_15a9e7c_170_WP_MAIN10_B_Toshiba_3.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Mickaël Raulet 2014-08-25 10:03:49 +02:00 committed by Michael Niedermayer
parent df8394c693
commit 4ba6371a83

View File

@ -1203,11 +1203,12 @@ cglobal hevc_put_hevc_uni_w%1_%2, 6, 6, 7, dst, dststride, src, srcstride, heigh
paddd m0, m3
paddd m1, m3
%endif
packusdw m0, m1
packssdw m0, m1
%if %2 == 8
packuswb m0, m0
%else
pminsw m0, [max_pixels_%2]
pmaxsw m0, [zero]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
@ -1274,11 +1275,12 @@ cglobal hevc_put_hevc_bi_w%1_%2, 5, 7, 10, dst, dststride, src, srcstride, src2,
psrad m0, m5
psrad m1, m5
%endif
packusdw m0, m1
packssdw m0, m1
%if %2 == 8
packuswb m0, m0
%else
pminsw m0, [max_pixels_%2]
pmaxsw m0, [zero]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride