diff --git a/modules/isa/arm/Makefile.am b/modules/isa/arm/Makefile.am index bb2929bf82..b2d1ec695c 100644 --- a/modules/isa/arm/Makefile.am +++ b/modules/isa/arm/Makefile.am @@ -12,8 +12,6 @@ endif libchroma_yuv_neon_plugin_la_SOURCES = \ isa/arm/neon/deinterleave_chroma.S \ - isa/arm/neon/i420_yuyv.S \ - isa/arm/neon/i422_yuyv.S \ isa/arm/neon/yuyv_i422.S \ isa/arm/neon/chroma_yuv.c isa/arm/neon/chroma_neon.h libchroma_yuv_neon_plugin_LIBTOOLFLAGS = --tag=CC diff --git a/modules/isa/arm/neon/chroma_neon.h b/modules/isa/arm/neon/chroma_neon.h index ca33747b80..1a4444dba6 100644 --- a/modules/isa/arm/neon/chroma_neon.h +++ b/modules/isa/arm/neon/chroma_neon.h @@ -45,26 +45,6 @@ struct yuv_pack size_t pitch; }; -/* I420 to YUYV conversion. */ -void i420_yuyv_neon (struct yuv_pack *const out, - const struct yuv_planes *const in, - int width, int height); - -/* I420 to UYVY conversion. */ -void i420_uyvy_neon (struct yuv_pack *const out, - const struct yuv_planes *const in, - int width, int height); - -/* I422 to YUYV conversion. */ -void i422_yuyv_neon (struct yuv_pack *const out, - const struct yuv_planes *const in, - int width, int height); - -/* I422 to UYVY conversion. */ -void i422_uyvy_neon (struct yuv_pack *const out, - const struct yuv_planes *const in, - int width, int height); - /* YUYV to I422 conversion. */ void yuyv_i422_neon (struct yuv_planes *const out, const struct yuv_pack *const in, diff --git a/modules/isa/arm/neon/chroma_yuv.c b/modules/isa/arm/neon/chroma_yuv.c index b2e744b45e..6a3fda95df 100644 --- a/modules/isa/arm/neon/chroma_yuv.c +++ b/modules/isa/arm/neon/chroma_yuv.c @@ -36,19 +36,12 @@ static void ProbeChroma(vlc_chroma_conv_vec *vec) { #define PACKED_CHROMAS VLC_CODEC_YUYV, VLC_CODEC_UYVY, VLC_CODEC_YVYU, VLC_CODEC_VYUY - vlc_chroma_conv_add_in_outlist(vec, 0.75, VLC_CODEC_I420, PACKED_CHROMAS); - vlc_chroma_conv_add_in_outlist(vec, 0.75, VLC_CODEC_YV12, PACKED_CHROMAS); - vlc_chroma_conv_add_in_outlist(vec, 0.75, VLC_CODEC_I422, PACKED_CHROMAS); - vlc_chroma_conv_add_in_outlist(vec, 0.75, VLC_CODEC_NV12, VLC_CODEC_I420, VLC_CODEC_YV12); vlc_chroma_conv_add_in_outlist(vec, 0.75, VLC_CODEC_NV21, VLC_CODEC_I420, VLC_CODEC_YV12); vlc_chroma_conv_add(vec, 0.75, VLC_CODEC_NV24, VLC_CODEC_I444, false); - - vlc_chroma_conv_add_out_inlist(vec, 0.75, VLC_CODEC_I422, VLC_CODEC_NV16, - PACKED_CHROMAS); } vlc_module_begin () set_description (N_("ARM NEON video chroma conversions")) @@ -75,44 +68,6 @@ vlc_module_end () #define DEFINE_UV_PACK(pack, pict) \ struct yuv_pack pack = { (pict)->U_PIXELS, (pict)->U_PITCH } -/* Planar YUV420 to packed YUV422 */ -static void I420_YUYV (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES(in, src); - i420_yuyv_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I420_YUYV) - -static void I420_YVYU (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES_SWAP(in, src); - i420_yuyv_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I420_YVYU) - -static void I420_UYVY (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES(in, src); - i420_uyvy_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I420_UYVY) - -static void I420_VYUY (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES_SWAP(in, src); - i420_uyvy_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I420_VYUY) - - /* Semiplanar NV12/21/16/24 to planar I420/YV12/I422/I444 */ static void copy_y_plane(filter_t *filter, picture_t *src, picture_t *dst) { @@ -159,44 +114,6 @@ SEMIPLANAR_FILTERS (Semiplanar_Planar_422, 2, 1) SEMIPLANAR_FILTERS (Semiplanar_Planar_444, 1, 1) -/* Planar YUV422 to packed YUV422 */ -static void I422_YUYV (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES(in, src); - i422_yuyv_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I422_YUYV) - -static void I422_YVYU (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES_SWAP(in, src); - i422_yuyv_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I422_YVYU) - -static void I422_UYVY (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES(in, src); - i422_uyvy_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I422_UYVY) - -static void I422_VYUY (filter_t *filter, picture_t *src, picture_t *dst) -{ - DEFINE_PACK(out, dst); - DEFINE_PLANES_SWAP(in, src); - i422_uyvy_neon (&out, &in, filter->fmt_in.video.i_width, - filter->fmt_in.video.i_height); -} -VIDEO_FILTER_WRAPPER (I422_VYUY) - - /* Packed YUV422 to planar YUV422 */ static void YUYV_I422 (filter_t *filter, picture_t *src, picture_t *dst) { @@ -244,67 +161,6 @@ static int Open (filter_t *filter) switch (filter->fmt_in.video.i_chroma) { - /* Planar to packed */ - case VLC_CODEC_I420: - switch (filter->fmt_out.video.i_chroma) - { - case VLC_CODEC_YUYV: - filter->ops = &I420_YUYV_ops; - break; - case VLC_CODEC_UYVY: - filter->ops = &I420_UYVY_ops; - break; - case VLC_CODEC_YVYU: - filter->ops = &I420_YVYU_ops; - break; - case VLC_CODEC_VYUY: - filter->ops = &I420_VYUY_ops; - break; - default: - return VLC_EGENERIC; - } - break; - - case VLC_CODEC_YV12: - switch (filter->fmt_out.video.i_chroma) - { - case VLC_CODEC_YUYV: - filter->ops = &I420_YVYU_ops; - break; - case VLC_CODEC_UYVY: - filter->ops = &I420_VYUY_ops; - break; - case VLC_CODEC_YVYU: - filter->ops = &I420_YUYV_ops; - break; - case VLC_CODEC_VYUY: - filter->ops = &I420_UYVY_ops; - break; - default: - return VLC_EGENERIC; - } - break; - - case VLC_CODEC_I422: - switch (filter->fmt_out.video.i_chroma) - { - case VLC_CODEC_YUYV: - filter->ops = &I422_YUYV_ops; - break; - case VLC_CODEC_UYVY: - filter->ops = &I422_UYVY_ops; - break; - case VLC_CODEC_YVYU: - filter->ops = &I422_YVYU_ops; - break; - case VLC_CODEC_VYUY: - filter->ops = &I422_VYUY_ops; - break; - default: - return VLC_EGENERIC; - } - break; - /* Semiplanar to planar */ case VLC_CODEC_NV12: switch (filter->fmt_out.video.i_chroma) diff --git a/modules/isa/arm/neon/i420_yuyv.S b/modules/isa/arm/neon/i420_yuyv.S deleted file mode 100644 index 0957bbf126..0000000000 --- a/modules/isa/arm/neon/i420_yuyv.S +++ /dev/null @@ -1,120 +0,0 @@ - @***************************************************************************** - @ i420_yuyv.S : ARM NEONv1 I420 to YUYV chroma conversion - @***************************************************************************** - @ Copyright (C) 2009-2011 Rémi Denis-Courmont - @ - @ This program is free software; you can redistribute it and/or modify - @ it under the terms of the GNU Lesser General Public License as published by - @ the Free Software Foundation; either version 2.1 of the License, or - @ (at your option) any later version. - @ - @ This program is distributed in the hope that it will be useful, - @ but WITHOUT ANY WARRANTY; without even the implied warranty of - @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - @ GNU Lesser General Public License for more details. - @ - @ You should have received a copy of the GNU Lesser General Public License - @ along with this program; if not, write to the Free Software Foundation, - @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - @****************************************************************************/ - -#include "../asm.S" - - .syntax unified -#if HAVE_AS_FPU_DIRECTIVE - .fpu neon -#endif - .text - -#define O1 r0 -#define O2 r1 -#define WIDTH r2 -#define HEIGHT r3 -#define Y1 r4 -#define Y2 r5 -#define U r6 -#define V r7 -#define YPITCH r8 -#define OPAD r10 -#define YPAD r11 -#define COUNT ip -#define OPITCH lr - - .align 2 -function i420_yuyv_neon - push {r4-r8,r10-r11,lr} - ldmia r0, {O1, OPITCH} - ldmia r1, {Y1, U, V, YPITCH} - cmp HEIGHT, #0 - sub OPAD, OPITCH, WIDTH, lsl #1 - sub YPAD, YPITCH, WIDTH -1: - it gt - movsgt COUNT, WIDTH - add O2, O1, OPITCH - add Y2, Y1, YPITCH - it le - pople {r4-r8,r10-r11,pc} -2: - pld [U, #64] - vld1.u8 {d2}, [U,:64]! - pld [V, #64] - vld1.u8 {d3}, [V,:64]! - pld [Y1, #64] - vzip.u8 d2, d3 - subs COUNT, COUNT, #16 - vld1.u8 {q0}, [Y1,:128]! - pld [Y2, #64] - vmov q3, q1 - vzip.u8 q0, q1 - vld1.u8 {q2}, [Y2,:128]! - vzip.u8 q2, q3 - vst1.u8 {q0-q1}, [O1,:128]! - vst1.u8 {q2-q3}, [O2,:128]! - bgt 2b - - subs HEIGHT, #2 - add O1, O2, OPAD - add Y1, Y2, YPAD - add U, U, YPAD, lsr #1 - add V, V, YPAD, lsr #1 - b 1b - -function i420_uyvy_neon - push {r4-r8,r10-r11,lr} - ldmia r0, {O1, OPITCH} - ldmia r1, {Y1, U, V, YPITCH} - cmp HEIGHT, #0 - sub OPAD, OPITCH, WIDTH, lsl #1 - sub YPAD, YPITCH, WIDTH -1: - it gt - movsgt COUNT, WIDTH - add O2, O1, OPITCH - add Y2, Y1, YPITCH - it le - pople {r4-r8,r10-r11,pc} -2: - pld [U, #64] - vld1.u8 {d0}, [U,:64]! - pld [V, #64] - vld1.u8 {d1}, [V,:64]! - pld [Y1, #64] - vzip.u8 d0, d1 - subs COUNT, COUNT, #16 - vld1.u8 {q1}, [Y1,:128]! - pld [Y2, #64] - vmov q2, q0 - vzip.u8 q0, q1 - vld1.u8 {q3}, [Y2,:128]! - vzip.u8 q2, q3 - vst1.u8 {q0-q1}, [O1,:128]! - vst1.u8 {q2-q3}, [O2,:128]! - bgt 2b - - subs HEIGHT, #2 - add O1, O2, OPAD - add Y1, Y2, YPAD - add U, U, YPAD, lsr #1 - add V, V, YPAD, lsr #1 - b 1b diff --git a/modules/isa/arm/neon/i422_yuyv.S b/modules/isa/arm/neon/i422_yuyv.S deleted file mode 100644 index a8f31fb507..0000000000 --- a/modules/isa/arm/neon/i422_yuyv.S +++ /dev/null @@ -1,101 +0,0 @@ - @***************************************************************************** - @ i422_yuyv.S : ARM NEONv1 I422 to YUYV chroma conversion - @***************************************************************************** - @ Copyright (C) 2011 Rémi Denis-Courmont - @ - @ This program is free software; you can redistribute it and/or modify - @ it under the terms of the GNU Lesser General Public License as published by - @ the Free Software Foundation; either version 2.1 of the License, or - @ (at your option) any later version. - @ - @ This program is distributed in the hope that it will be useful, - @ but WITHOUT ANY WARRANTY; without even the implied warranty of - @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - @ GNU Lesser General Public License for more details. - @ - @ You should have received a copy of the GNU Lesser General Public License - @ along with this program; if not, write to the Free Software Foundation, - @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - @****************************************************************************/ - -#include "../asm.S" - - .syntax unified -#if HAVE_AS_FPU_DIRECTIVE - .fpu neon -#endif - .text - -#define O r0 -#define OPAD r1 -#define WIDTH r2 -#define HEIGHT r3 -#define Y r4 -#define U r5 -#define V r6 -#define COUNT ip -#define YPAD lr - - .align 2 -function i422_yuyv_neon - push {r4-r6,lr} - ldmia r1, {Y, U, V, YPAD} - ldmia r0, {O, OPAD} - cmp HEIGHT, #0 - sub OPAD, OPAD, WIDTH, lsl #1 - sub YPAD, YPAD, WIDTH -1: - ite gt - movsgt COUNT, WIDTH - pople {r4-r6,pc} -2: - pld [U, #64] - vld1.u8 {d2}, [U,:64]! - pld [V, #64] - vld1.u8 {d3}, [V,:64]! - pld [Y, #64] - vzip.u8 d2, d3 - subs COUNT, COUNT, #16 - vld1.u8 {q0}, [Y,:128]! - vzip.u8 q0, q1 - @ TODO: unroll (1 cycle stall) - vst1.u8 {q0-q1}, [O,:128]! - bgt 2b - - subs HEIGHT, #1 - add U, U, YPAD, lsr #1 - add V, V, YPAD, lsr #1 - add Y, Y, YPAD - add O, O, OPAD - b 1b - -function i422_uyvy_neon - push {r4-r6,lr} - ldmia r1, {Y, U, V, YPAD} - ldmia r0, {O, OPAD} - cmp HEIGHT, #0 - sub OPAD, OPAD, WIDTH, lsl #1 - sub YPAD, YPAD, WIDTH -1: - ite gt - movsgt COUNT, WIDTH - pople {r4-r6,pc} -2: - pld [U, #64] - vld1.u8 {d0}, [U,:64]! - pld [V, #64] - vld1.u8 {d1}, [V,:64]! - pld [Y, #64] - vzip.u8 d0, d1 - subs COUNT, COUNT, #16 - vld1.u8 {q1}, [Y,:128]! - vzip.u8 q0, q1 - vst1.u8 {q0-q1}, [O,:128]! - bgt 2b - - subs HEIGHT, #1 - add U, U, YPAD, lsr #1 - add V, V, YPAD, lsr #1 - add Y, Y, YPAD - add O, O, OPAD - b 1b