Commit 4ba6371a authored by Mickaël Raulet's avatar Mickaël Raulet Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent df8394c6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment