[FFmpeg-devel,09/11] avcodec/blockdsp: roll-up x86asm preprocessor loop

Submitted by James Darnley on Nov. 9, 2017, 11:58 a.m.

Details

Message ID 20171109115837.32618-10-jdarnley@obe.tv
State New
Headers show

Commit Message

James Darnley Nov. 9, 2017, 11:58 a.m.
From: James Darnley <james.darnley@gmail.com>

---
 libavcodec/x86/blockdsp.asm | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/x86/blockdsp.asm b/libavcodec/x86/blockdsp.asm
index 9d203df8f5..9d0e8a3242 100644
--- a/libavcodec/x86/blockdsp.asm
+++ b/libavcodec/x86/blockdsp.asm
@@ -38,22 +38,19 @@  cglobal clear_block, 1, 1, %1, blocks
 %assign %%i 0
 %rep %2
     mova  [blocksq+mmsize*(0+%%i)], m0
-    mova  [blocksq+mmsize*(1+%%i)], m0
-    mova  [blocksq+mmsize*(2+%%i)], m0
-    mova  [blocksq+mmsize*(3+%%i)], m0
-%assign %%i %%i+4
+%assign %%i %%i+1
 %endrep
     RET
 %endmacro
 
 INIT_MMX mmx
 %define ZERO pxor
-CLEAR_BLOCK 0, 4
+CLEAR_BLOCK 0, 16
 INIT_XMM sse
 %define ZERO xorps
-CLEAR_BLOCK 1, 2
+CLEAR_BLOCK 1, 8
 INIT_YMM avx
-CLEAR_BLOCK 1, 1
+CLEAR_BLOCK 1, 4
 
 ;-----------------------------------------
 ; void ff_clear_blocks(int16_t *blocks);