Commit 2200cf1a authored by James Almer's avatar James Almer

x86/vf_v360: make remap{1,2}_8bit_line_avx2 work on x86_32

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent cb8c3530
...@@ -285,7 +285,7 @@ void ff_v360_init(V360Context *s, int depth) ...@@ -285,7 +285,7 @@ void ff_v360_init(V360Context *s, int depth)
break; break;
} }
if (ARCH_X86_64) if (ARCH_X86)
ff_v360_init_x86(s, depth); ff_v360_init_x86(s, depth);
} }
......
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;****************************************************************************** ;******************************************************************************
%if HAVE_AVX2_EXTERNAL && ARCH_X86_64
%include "libavutil/x86/x86util.asm" %include "libavutil/x86/x86util.asm"
%if HAVE_AVX2_EXTERNAL
SECTION_RODATA SECTION_RODATA
pb_mask: db 0,4,8,12,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 pb_mask: db 0,4,8,12,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
...@@ -62,8 +63,11 @@ cglobal remap1_8bit_line, 6, 7, 6, dst, width, src, in_linesize, u, v, x ...@@ -62,8 +63,11 @@ cglobal remap1_8bit_line, 6, 7, 6, dst, width, src, in_linesize, u, v, x
INIT_YMM avx2 INIT_YMM avx2
cglobal remap2_8bit_line, 7, 8, 8, dst, width, src, in_linesize, u, v, ker, x cglobal remap2_8bit_line, 7, 8, 8, dst, width, src, in_linesize, u, v, ker, x
movsxdifnidn widthq, widthd movsxdifnidn widthq, widthd
xor xq, xq
movd xm0, in_linesized movd xm0, in_linesized
%if ARCH_X86_32
DEFINE_ARGS dst, width, src, x, u, v, ker
%endif
xor xq, xq
pcmpeqw m7, m7 pcmpeqw m7, m7
vpbroadcastd m0, xm0 vpbroadcastd m0, xm0
vpbroadcastd m6, [pd_255] vpbroadcastd m6, [pd_255]
...@@ -92,6 +96,8 @@ cglobal remap2_8bit_line, 7, 8, 8, dst, width, src, in_linesize, u, v, ker, x ...@@ -92,6 +96,8 @@ cglobal remap2_8bit_line, 7, 8, 8, dst, width, src, in_linesize, u, v, ker, x
jl .loop jl .loop
RET RET
%if ARCH_X86_64
INIT_YMM avx2 INIT_YMM avx2
cglobal remap4_8bit_line, 7, 9, 11, dst, width, src, in_linesize, u, v, ker, x, y cglobal remap4_8bit_line, 7, 9, 11, dst, width, src, in_linesize, u, v, ker, x, y
movsxdifnidn widthq, widthd movsxdifnidn widthq, widthd
...@@ -140,3 +146,4 @@ cglobal remap4_8bit_line, 7, 9, 11, dst, width, src, in_linesize, u, v, ker, x, ...@@ -140,3 +146,4 @@ cglobal remap4_8bit_line, 7, 9, 11, dst, width, src, in_linesize, u, v, ker, x,
RET RET
%endif %endif
%endif
...@@ -34,7 +34,6 @@ void ff_remap4_8bit_line_avx2(uint8_t *dst, int width, const uint8_t *src, ptrdi ...@@ -34,7 +34,6 @@ void ff_remap4_8bit_line_avx2(uint8_t *dst, int width, const uint8_t *src, ptrdi
av_cold void ff_v360_init_x86(V360Context *s, int depth) av_cold void ff_v360_init_x86(V360Context *s, int depth)
{ {
#if ARCH_X86_64
int cpu_flags = av_get_cpu_flags(); int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_AVX2_FAST(cpu_flags) && s->interp == NEAREST && depth <= 8) if (EXTERNAL_AVX2_FAST(cpu_flags) && s->interp == NEAREST && depth <= 8)
...@@ -43,6 +42,7 @@ av_cold void ff_v360_init_x86(V360Context *s, int depth) ...@@ -43,6 +42,7 @@ av_cold void ff_v360_init_x86(V360Context *s, int depth)
if (EXTERNAL_AVX2_FAST(cpu_flags) && s->interp == BILINEAR && depth <= 8) if (EXTERNAL_AVX2_FAST(cpu_flags) && s->interp == BILINEAR && depth <= 8)
s->remap_line = ff_remap2_8bit_line_avx2; s->remap_line = ff_remap2_8bit_line_avx2;
#if ARCH_X86_64
if (EXTERNAL_AVX2_FAST(cpu_flags) && (s->interp == BICUBIC || if (EXTERNAL_AVX2_FAST(cpu_flags) && (s->interp == BICUBIC ||
s->interp == LANCZOS) && depth <= 8) s->interp == LANCZOS) && depth <= 8)
s->remap_line = ff_remap4_8bit_line_avx2; s->remap_line = ff_remap4_8bit_line_avx2;
......
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