aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMickaƫl Raulet <mraulet@insa-rennes.fr>2015-02-05 19:20:41 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-02-06 17:38:47 +0100
commitbcb09251152551bb4328b8724b692b0c4f274487 (patch)
tree53be94b873d30f26b2a8cdea9b1f9a8c128d91ac /libavcodec
parent5eedd36df1089aa0605ddb4c751b310b62f08ac4 (diff)
downloadffmpeg-bcb09251152551bb4328b8724b692b0c4f274487.tar.gz
x86/hevc: use CLIPW macro when possible
Conflicts: libavcodec/x86/hevc_mc.asm Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/hevc_mc.asm12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm
index efb4d1f856..e8a5032f16 100644
--- a/libavcodec/x86/hevc_mc.asm
+++ b/libavcodec/x86/hevc_mc.asm
@@ -665,11 +665,9 @@ QPEL_TABLE 10, 8, w, avx2
%if %2 == 8
packuswb %3, %4
%else
- pminsw %3, [max_pixels_%2]
- pmaxsw %3, [zero]
+ CLIPW %3, [zero], [max_pixels_%2]
%if (%1 > 8 && notcpuflag(avx)) || %1 > 16
- pminsw %4, [max_pixels_%2]
- pmaxsw %4, [zero]
+ CLIPW %4, [zero], [max_pixels_%2]
%endif
%endif
%endmacro
@@ -1467,8 +1465,7 @@ cglobal hevc_put_hevc_uni_w%1_%2, 6, 6, 7, dst, dststride, src, srcstride, heigh
%if %2 == 8
packuswb m0, m0
%else
- pminsw m0, [max_pixels_%2]
- pmaxsw m0, [zero]
+ CLIPW m0, [zero], [max_pixels_%2]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
@@ -1539,8 +1536,7 @@ cglobal hevc_put_hevc_bi_w%1_%2, 5, 7, 10, dst, dststride, src, srcstride, src2,
%if %2 == 8
packuswb m0, m0
%else
- pminsw m0, [max_pixels_%2]
- pmaxsw m0, [zero]
+ CLIPW m0, [zero], [max_pixels_%2]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride