mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-08-12 13:23:48 +00:00
avcodec/x86/vc1dsp_loopfilter: Avoid imul
Multipliying a GPR by 0x01010101 splats a byte to a dword; the intention was to avoid vector shuffles lateron, yet this is not true because the byte splat necessitates a byte->word conversion lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -89,9 +89,10 @@ SECTION .text
|
||||
pxor m5, m5
|
||||
movd m3, r2d
|
||||
%if %1 > 4
|
||||
punpcklbw m3, m3
|
||||
SPLATW m3, m3
|
||||
%else
|
||||
pshufw m3, m3, 0
|
||||
%endif
|
||||
punpcklbw m3, m5
|
||||
pcmpgtw m3, m4 ; if (a0 < pq)
|
||||
pand m6, m3
|
||||
|
||||
@@ -217,7 +218,6 @@ SECTION .text
|
||||
lea r3, [4*r1]
|
||||
sub r4, r3
|
||||
lea r3, [r1+2*r1]
|
||||
imul r2, 0x01010101
|
||||
%endmacro
|
||||
|
||||
%macro START_H_FILTER 1
|
||||
@@ -225,7 +225,6 @@ SECTION .text
|
||||
%if %1 > 4
|
||||
lea r4, [r0+4*r1]
|
||||
%endif
|
||||
imul r2, 0x01010101
|
||||
%endmacro
|
||||
|
||||
INIT_XMM sse2
|
||||
|
||||
Reference in New Issue
Block a user