[FFmpeg-cvslog] Merge commit 'e9bb77fb1012cba1951a82136df7071f71bce8fb'
James Almer
git at videolan.org
Sat Oct 21 18:42:53 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Oct 21 12:39:41 2017 -0300| [11f5ffd330053b5b4aee3830ada4e8820d5c17ac] | committer: James Almer
Merge commit 'e9bb77fb1012cba1951a82136df7071f71bce8fb'
* commit 'e9bb77fb1012cba1951a82136df7071f71bce8fb':
x86: h264: Simplify DEQUANT macro with cpuflags
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11f5ffd330053b5b4aee3830ada4e8820d5c17ac
---
libavcodec/x86/h264_idct.asm | 52 ++++++++++++++++++++++++--------------------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index ea91e1ac4d..8804638091 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -995,7 +995,30 @@ REP_RET
SWAP %1, %4, %3
%endmacro
-%macro DEQUANT_MMX 3
+%macro DEQUANT 1-3
+%if cpuflag(sse2)
+ movd xmm4, t3d
+ movq xmm5, [pw_1]
+ pshufd xmm4, xmm4, 0
+ movq2dq xmm0, m0
+ movq2dq xmm1, m1
+ movq2dq xmm2, m2
+ movq2dq xmm3, m3
+ punpcklwd xmm0, xmm5
+ punpcklwd xmm1, xmm5
+ punpcklwd xmm2, xmm5
+ punpcklwd xmm3, xmm5
+ pmaddwd xmm0, xmm4
+ pmaddwd xmm1, xmm4
+ pmaddwd xmm2, xmm4
+ pmaddwd xmm3, xmm4
+ psrad xmm0, %1
+ psrad xmm1, %1
+ psrad xmm2, %1
+ psrad xmm3, %1
+ packssdw xmm0, xmm1
+ packssdw xmm2, xmm3
+%else
mova m7, [pw_1]
mova m4, %1
punpcklwd %1, m7
@@ -1015,6 +1038,7 @@ REP_RET
psrad m5, %3
packssdw %1, m4
packssdw %2, m5
+%endif
%endmacro
%macro STORE_WORDS 5-9
@@ -1053,35 +1077,15 @@ REP_RET
%macro DEQUANT_STORE 1
%if cpuflag(sse2)
- movd xmm4, t3d
- movq xmm5, [pw_1]
- pshufd xmm4, xmm4, 0
- movq2dq xmm0, m0
- movq2dq xmm1, m1
- movq2dq xmm2, m2
- movq2dq xmm3, m3
- punpcklwd xmm0, xmm5
- punpcklwd xmm1, xmm5
- punpcklwd xmm2, xmm5
- punpcklwd xmm3, xmm5
- pmaddwd xmm0, xmm4
- pmaddwd xmm1, xmm4
- pmaddwd xmm2, xmm4
- pmaddwd xmm3, xmm4
- psrad xmm0, %1
- psrad xmm1, %1
- psrad xmm2, %1
- psrad xmm3, %1
- packssdw xmm0, xmm1
- packssdw xmm2, xmm3
+ DEQUANT %1
STORE_WORDS xmm0, 0, 1, 4, 5, 2, 3, 6, 7
STORE_WORDS xmm2, 8, 9, 12, 13, 10, 11, 14, 15
%else
- DEQUANT_MMX m0, m1, %1
+ DEQUANT m0, m1, %1
STORE_WORDS m0, 0, 1, 4, 5
STORE_WORDS m1, 2, 3, 6, 7
- DEQUANT_MMX m2, m3, %1
+ DEQUANT m2, m3, %1
STORE_WORDS m2, 8, 9, 12, 13
STORE_WORDS m3, 10, 11, 14, 15
%endif
======================================================================
More information about the ffmpeg-cvslog
mailing list