[vlc-devel] [PATCH v1 23/33] video_chroma: switch filters to push mode
Steve Lhomme
robux4 at ycbcr.xyz
Fri Sep 25 16:46:59 CEST 2020
---
modules/arm_neon/chroma_yuv.c | 72 +++++++++++++-------------
modules/arm_neon/yuv_rgb.c | 20 ++++----
modules/hw/d3d11/d3d11_surface.c | 18 +++----
modules/hw/d3d9/dxa9.c | 12 ++---
modules/video_chroma/grey_yuv.c | 11 ++--
modules/video_chroma/i420_nv12.c | 24 ++++-----
modules/video_chroma/i420_rgb.c | 53 ++++++++------------
modules/video_chroma/i420_yuy2.c | 35 ++++++-------
modules/video_chroma/i422_i420.c | 16 +++---
modules/video_chroma/i422_yuy2.c | 31 +++++-------
modules/video_chroma/omxdl.c | 86 ++++++++++++++++----------------
modules/video_chroma/yuvp.c | 6 +--
modules/video_chroma/yuy2_i420.c | 15 +++---
modules/video_chroma/yuy2_i422.c | 17 +++----
14 files changed, 192 insertions(+), 224 deletions(-)
diff --git a/modules/arm_neon/chroma_yuv.c b/modules/arm_neon/chroma_yuv.c
index 53fe0f86f51..78b690e841c 100644
--- a/modules/arm_neon/chroma_yuv.c
+++ b/modules/arm_neon/chroma_yuv.c
@@ -63,7 +63,7 @@ static void I420_YUYV (filter_t *filter, picture_t *src, picture_t *dst)
i420_yuyv_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I420_YUYV)
+VIDEO_FILTER_WRAPPER2 (I420_YUYV)
static void I420_YVYU (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -72,7 +72,7 @@ static void I420_YVYU (filter_t *filter, picture_t *src, picture_t *dst)
i420_yuyv_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I420_YVYU)
+VIDEO_FILTER_WRAPPER2 (I420_YVYU)
static void I420_UYVY (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -81,7 +81,7 @@ static void I420_UYVY (filter_t *filter, picture_t *src, picture_t *dst)
i420_uyvy_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I420_UYVY)
+VIDEO_FILTER_WRAPPER2 (I420_UYVY)
static void I420_VYUY (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -90,7 +90,7 @@ static void I420_VYUY (filter_t *filter, picture_t *src, picture_t *dst)
i420_uyvy_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I420_VYUY)
+VIDEO_FILTER_WRAPPER2 (I420_VYUY)
/* Semiplanar NV12/21/16/24 to planar I420/YV12/I422/I444 */
@@ -118,7 +118,7 @@ static void name (filter_t *filter, picture_t *src, \
filter->fmt_in.video.i_width / h_subsamp, \
filter->fmt_in.video.i_height / v_subsamp); \
} \
-VIDEO_FILTER_WRAPPER (name) \
+VIDEO_FILTER_WRAPPER2 (name) \
#define SEMIPLANAR_FILTERS_SWAP(name, h_subsamp, v_subsamp) \
static void name (filter_t *filter, picture_t *src, \
@@ -131,7 +131,7 @@ static void name (filter_t *filter, picture_t *src, \
filter->fmt_in.video.i_width / h_subsamp, \
filter->fmt_in.video.i_height / v_subsamp); \
} \
-VIDEO_FILTER_WRAPPER (name) \
+VIDEO_FILTER_WRAPPER2 (name) \
SEMIPLANAR_FILTERS (Semiplanar_Planar_420, 2, 2)
SEMIPLANAR_FILTERS_SWAP (Semiplanar_Planar_420_Swap, 2, 2)
@@ -147,7 +147,7 @@ static void I422_YUYV (filter_t *filter, picture_t *src, picture_t *dst)
i422_yuyv_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I422_YUYV)
+VIDEO_FILTER_WRAPPER2 (I422_YUYV)
static void I422_YVYU (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -156,7 +156,7 @@ static void I422_YVYU (filter_t *filter, picture_t *src, picture_t *dst)
i422_yuyv_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I422_YVYU)
+VIDEO_FILTER_WRAPPER2 (I422_YVYU)
static void I422_UYVY (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -165,7 +165,7 @@ static void I422_UYVY (filter_t *filter, picture_t *src, picture_t *dst)
i422_uyvy_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I422_UYVY)
+VIDEO_FILTER_WRAPPER2 (I422_UYVY)
static void I422_VYUY (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -174,7 +174,7 @@ static void I422_VYUY (filter_t *filter, picture_t *src, picture_t *dst)
i422_uyvy_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (I422_VYUY)
+VIDEO_FILTER_WRAPPER2 (I422_VYUY)
/* Packed YUV422 to planar YUV422 */
@@ -185,7 +185,7 @@ static void YUYV_I422 (filter_t *filter, picture_t *src, picture_t *dst)
yuyv_i422_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (YUYV_I422)
+VIDEO_FILTER_WRAPPER2 (YUYV_I422)
static void YVYU_I422 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -194,7 +194,7 @@ static void YVYU_I422 (filter_t *filter, picture_t *src, picture_t *dst)
yuyv_i422_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (YVYU_I422)
+VIDEO_FILTER_WRAPPER2 (YVYU_I422)
static void UYVY_I422 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -203,7 +203,7 @@ static void UYVY_I422 (filter_t *filter, picture_t *src, picture_t *dst)
uyvy_i422_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (UYVY_I422)
+VIDEO_FILTER_WRAPPER2 (UYVY_I422)
static void VYUY_I422 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -212,7 +212,7 @@ static void VYUY_I422 (filter_t *filter, picture_t *src, picture_t *dst)
uyvy_i422_neon (&out, &in, filter->fmt_in.video.i_width,
filter->fmt_in.video.i_height);
}
-VIDEO_FILTER_WRAPPER (VYUY_I422)
+VIDEO_FILTER_WRAPPER2 (VYUY_I422)
static int Open (vlc_object_t *obj)
{
@@ -231,16 +231,16 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_YUYV:
- filter->pf_video_filter = I420_YUYV_Filter;
+ filter->pf_video_filter_into = I420_YUYV_Filter;
break;
case VLC_CODEC_UYVY:
- filter->pf_video_filter = I420_UYVY_Filter;
+ filter->pf_video_filter_into = I420_UYVY_Filter;
break;
case VLC_CODEC_YVYU:
- filter->pf_video_filter = I420_YVYU_Filter;
+ filter->pf_video_filter_into = I420_YVYU_Filter;
break;
case VLC_CODEC_VYUY:
- filter->pf_video_filter = I420_VYUY_Filter;
+ filter->pf_video_filter_into = I420_VYUY_Filter;
break;
default:
return VLC_EGENERIC;
@@ -251,16 +251,16 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_YUYV:
- filter->pf_video_filter = I420_YVYU_Filter;
+ filter->pf_video_filter_into = I420_YVYU_Filter;
break;
case VLC_CODEC_UYVY:
- filter->pf_video_filter = I420_VYUY_Filter;
+ filter->pf_video_filter_into = I420_VYUY_Filter;
break;
case VLC_CODEC_YVYU:
- filter->pf_video_filter = I420_YUYV_Filter;
+ filter->pf_video_filter_into = I420_YUYV_Filter;
break;
case VLC_CODEC_VYUY:
- filter->pf_video_filter = I420_UYVY_Filter;
+ filter->pf_video_filter_into = I420_UYVY_Filter;
break;
default:
return VLC_EGENERIC;
@@ -271,16 +271,16 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_YUYV:
- filter->pf_video_filter = I422_YUYV_Filter;
+ filter->pf_video_filter_into = I422_YUYV_Filter;
break;
case VLC_CODEC_UYVY:
- filter->pf_video_filter = I422_UYVY_Filter;
+ filter->pf_video_filter_into = I422_UYVY_Filter;
break;
case VLC_CODEC_YVYU:
- filter->pf_video_filter = I422_YVYU_Filter;
+ filter->pf_video_filter_into = I422_YVYU_Filter;
break;
case VLC_CODEC_VYUY:
- filter->pf_video_filter = I422_VYUY_Filter;
+ filter->pf_video_filter_into = I422_VYUY_Filter;
break;
default:
return VLC_EGENERIC;
@@ -292,10 +292,10 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = Semiplanar_Planar_420_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_420_Filter;
break;
case VLC_CODEC_YV12:
- filter->pf_video_filter = Semiplanar_Planar_420_Swap_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_420_Swap_Filter;
break;
default:
return VLC_EGENERIC;
@@ -306,10 +306,10 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = Semiplanar_Planar_420_Swap_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_420_Swap_Filter;
break;
case VLC_CODEC_YV12:
- filter->pf_video_filter = Semiplanar_Planar_420_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_420_Filter;
break;
default:
return VLC_EGENERIC;
@@ -320,7 +320,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = Semiplanar_Planar_422_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_422_Filter;
break;
default:
return VLC_EGENERIC;
@@ -331,7 +331,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I444:
- filter->pf_video_filter = Semiplanar_Planar_444_Filter;
+ filter->pf_video_filter_into = Semiplanar_Planar_444_Filter;
break;
default:
return VLC_EGENERIC;
@@ -343,7 +343,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = YUYV_I422_Filter;
+ filter->pf_video_filter_into = YUYV_I422_Filter;
break;
default:
return VLC_EGENERIC;
@@ -353,7 +353,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = UYVY_I422_Filter;
+ filter->pf_video_filter_into = UYVY_I422_Filter;
break;
default:
return VLC_EGENERIC;
@@ -363,7 +363,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = YVYU_I422_Filter;
+ filter->pf_video_filter_into = YVYU_I422_Filter;
break;
default:
return VLC_EGENERIC;
@@ -374,7 +374,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = VYUY_I422_Filter;
+ filter->pf_video_filter_into = VYUY_I422_Filter;
break;
default:
return VLC_EGENERIC;
diff --git a/modules/arm_neon/yuv_rgb.c b/modules/arm_neon/yuv_rgb.c
index 84b5328d768..2d4acb00dd9 100644
--- a/modules/arm_neon/yuv_rgb.c
+++ b/modules/arm_neon/yuv_rgb.c
@@ -125,11 +125,11 @@ static void NV12_RGBA (filter_t *filter, picture_t *src, picture_t *dst)
nv12_rgb_neon (&out, &in, filter->fmt_in.video.i_visible_width, filter->fmt_in.video.i_visible_height);
}
-VIDEO_FILTER_WRAPPER (I420_RGBA)
-VIDEO_FILTER_WRAPPER (I420_RV16)
-VIDEO_FILTER_WRAPPER (YV12_RGBA)
-VIDEO_FILTER_WRAPPER (NV21_RGBA)
-VIDEO_FILTER_WRAPPER (NV12_RGBA)
+VIDEO_FILTER_WRAPPER2 (I420_RGBA)
+VIDEO_FILTER_WRAPPER2 (I420_RV16)
+VIDEO_FILTER_WRAPPER2 (YV12_RGBA)
+VIDEO_FILTER_WRAPPER2 (NV21_RGBA)
+VIDEO_FILTER_WRAPPER2 (NV12_RGBA)
static int Open (vlc_object_t *obj)
{
@@ -150,7 +150,7 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_in.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = I420_RV16_Filter;
+ filter->pf_video_filter_into = I420_RV16_Filter;
break;
default:
return VLC_EGENERIC;
@@ -166,16 +166,16 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_in.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = I420_RGBA_Filter;
+ filter->pf_video_filter_into = I420_RGBA_Filter;
break;
case VLC_CODEC_YV12:
- filter->pf_video_filter = YV12_RGBA_Filter;
+ filter->pf_video_filter_into = YV12_RGBA_Filter;
break;
case VLC_CODEC_NV21:
- filter->pf_video_filter = NV21_RGBA_Filter;
+ filter->pf_video_filter_into = NV21_RGBA_Filter;
break;
case VLC_CODEC_NV12:
- filter->pf_video_filter = NV12_RGBA_Filter;
+ filter->pf_video_filter_into = NV12_RGBA_Filter;
break;
default:
return VLC_EGENERIC;
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 541095bc9b6..f8af28a33a1 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -587,9 +587,9 @@ static void NV12_D3D11(filter_t *p_filter, picture_t *src, picture_t *dst)
dst->i_planes = 0;
}
-VIDEO_FILTER_WRAPPER (D3D11_NV12)
-VIDEO_FILTER_WRAPPER (D3D11_YUY2)
-VIDEO_FILTER_WRAPPER (D3D11_RGBA)
+VIDEO_FILTER_WRAPPER2 (D3D11_NV12)
+VIDEO_FILTER_WRAPPER2 (D3D11_YUY2)
+VIDEO_FILTER_WRAPPER2 (D3D11_RGBA)
static picture_t *AllocateCPUtoGPUTexture(filter_t *p_filter, filter_sys_t *p_sys)
{
@@ -679,34 +679,34 @@ int D3D11OpenConverter( vlc_object_t *obj )
case VLC_CODEC_YV12:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_YUY2_Filter;
+ p_filter->pf_video_filter_into = D3D11_YUY2_Filter;
break;
case VLC_CODEC_I420_10L:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_10B )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_YUY2_Filter;
+ p_filter->pf_video_filter_into = D3D11_YUY2_Filter;
pixel_bytes = 2;
break;
case VLC_CODEC_NV12:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_NV12_Filter;
+ p_filter->pf_video_filter_into = D3D11_NV12_Filter;
break;
case VLC_CODEC_P010:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_10B )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_NV12_Filter;
+ p_filter->pf_video_filter_into = D3D11_NV12_Filter;
pixel_bytes = 2;
break;
case VLC_CODEC_RGBA:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_RGBA )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_RGBA_Filter;
+ p_filter->pf_video_filter_into = D3D11_RGBA_Filter;
break;
case VLC_CODEC_BGRA:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D11_OPAQUE_BGRA )
return VLC_EGENERIC;
- p_filter->pf_video_filter = D3D11_RGBA_Filter;
+ p_filter->pf_video_filter_into = D3D11_RGBA_Filter;
break;
default:
return VLC_EGENERIC;
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index e33406a9942..fec17111e97 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -361,8 +361,8 @@ done:
return NULL;
}
-VIDEO_FILTER_WRAPPER (DXA9_YV12)
-VIDEO_FILTER_WRAPPER (DXA9_NV12)
+VIDEO_FILTER_WRAPPER2 (DXA9_YV12)
+VIDEO_FILTER_WRAPPER2 (DXA9_NV12)
static picture_t *YV12_D3D9_Filter( filter_t *p_filter, picture_t *p_pic )
{
@@ -396,23 +396,23 @@ int D3D9OpenConverter( vlc_object_t *obj )
case VLC_CODEC_YV12:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D9_OPAQUE )
return VLC_EGENERIC;
- p_filter->pf_video_filter = DXA9_YV12_Filter;
+ p_filter->pf_video_filter_into = DXA9_YV12_Filter;
break;
case VLC_CODEC_I420_10L:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D9_OPAQUE_10B )
return VLC_EGENERIC;
- p_filter->pf_video_filter = DXA9_YV12_Filter;
+ p_filter->pf_video_filter_into = DXA9_YV12_Filter;
pixel_bytes = 2;
break;
case VLC_CODEC_NV12:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D9_OPAQUE )
return VLC_EGENERIC;
- p_filter->pf_video_filter = DXA9_NV12_Filter;
+ p_filter->pf_video_filter_into = DXA9_NV12_Filter;
break;
case VLC_CODEC_P010:
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_D3D9_OPAQUE_10B )
return VLC_EGENERIC;
- p_filter->pf_video_filter = DXA9_NV12_Filter;
+ p_filter->pf_video_filter_into = DXA9_NV12_Filter;
pixel_bytes = 2;
break;
default:
diff --git a/modules/video_chroma/grey_yuv.c b/modules/video_chroma/grey_yuv.c
index 9796118241a..b3bdae92b2c 100644
--- a/modules/video_chroma/grey_yuv.c
+++ b/modules/video_chroma/grey_yuv.c
@@ -44,8 +44,8 @@ static int Activate ( vlc_object_t * );
static void GREY_I420( filter_t *, picture_t *, picture_t * );
static void GREY_YUY2( filter_t *, picture_t *, picture_t * );
-static picture_t *GREY_I420_Filter( filter_t *, picture_t * );
-static picture_t *GREY_YUY2_Filter( filter_t *, picture_t * );
+VIDEO_FILTER_WRAPPER2( GREY_I420 )
+VIDEO_FILTER_WRAPPER2( GREY_YUY2 )
/*****************************************************************************
* Module descriptor.
@@ -82,10 +82,10 @@ static int Activate( vlc_object_t *p_this )
switch( p_filter->fmt_out.video.i_chroma )
{
case VLC_CODEC_I420:
- p_filter->pf_video_filter = GREY_I420_Filter;
+ p_filter->pf_video_filter_into = GREY_I420_Filter;
break;
case VLC_CODEC_YUYV:
- p_filter->pf_video_filter = GREY_YUY2_Filter;
+ p_filter->pf_video_filter_into = GREY_YUY2_Filter;
break;
default:
return -1;
@@ -99,9 +99,6 @@ static int Activate( vlc_object_t *p_this )
return 0;
}
-VIDEO_FILTER_WRAPPER( GREY_I420 )
-VIDEO_FILTER_WRAPPER( GREY_YUY2 )
-
/* Following functions are local */
/*****************************************************************************
diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index 53e1364adfc..b0e599f9d1a 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -128,12 +128,12 @@ static void P010_I42010B( filter_t *p_filter, picture_t *p_src,
}
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I420_NV12 )
-VIDEO_FILTER_WRAPPER( YV12_NV12 )
-VIDEO_FILTER_WRAPPER( NV12_I420 )
-VIDEO_FILTER_WRAPPER( NV12_YV12 )
-VIDEO_FILTER_WRAPPER( I42010B_P010 )
-VIDEO_FILTER_WRAPPER( P010_I42010B )
+VIDEO_FILTER_WRAPPER2( I420_NV12 )
+VIDEO_FILTER_WRAPPER2( YV12_NV12 )
+VIDEO_FILTER_WRAPPER2( NV12_I420 )
+VIDEO_FILTER_WRAPPER2( NV12_YV12 )
+VIDEO_FILTER_WRAPPER2( I42010B_P010 )
+VIDEO_FILTER_WRAPPER2( P010_I42010B )
/*****************************************************************************
* Create: allocate a chroma function
@@ -168,23 +168,23 @@ static int Create( vlc_object_t *p_this )
case VLC_CODEC_J420:
if( outfcc != VLC_CODEC_NV12 )
return -1;
- p_filter->pf_video_filter = I420_NV12_Filter;
+ p_filter->pf_video_filter_into = I420_NV12_Filter;
break;
case VLC_CODEC_YV12:
if( outfcc != VLC_CODEC_NV12 )
return -1;
- p_filter->pf_video_filter = YV12_NV12_Filter;
+ p_filter->pf_video_filter_into = YV12_NV12_Filter;
break;
case VLC_CODEC_NV12:
switch( outfcc )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
- p_filter->pf_video_filter = NV12_I420_Filter;
+ p_filter->pf_video_filter_into = NV12_I420_Filter;
break;
case VLC_CODEC_YV12:
- p_filter->pf_video_filter = NV12_YV12_Filter;
+ p_filter->pf_video_filter_into = NV12_YV12_Filter;
break;
default:
return -1;
@@ -195,14 +195,14 @@ static int Create( vlc_object_t *p_this )
if( outfcc != VLC_CODEC_P010 )
return -1;
pixel_bytes = 2;
- p_filter->pf_video_filter = I42010B_P010_Filter;
+ p_filter->pf_video_filter_into = I42010B_P010_Filter;
break;
case VLC_CODEC_P010:
if( outfcc != VLC_CODEC_I420_10L )
return -1;
pixel_bytes = 2;
- p_filter->pf_video_filter = P010_I42010B_Filter;
+ p_filter->pf_video_filter_into = P010_I42010B_Filter;
break;
default:
diff --git a/modules/video_chroma/i420_rgb.c b/modules/video_chroma/i420_rgb.c
index 24cc3247319..79ea309ba5a 100644
--- a/modules/video_chroma/i420_rgb.c
+++ b/modules/video_chroma/i420_rgb.c
@@ -38,19 +38,21 @@
#include "i420_rgb.h"
#ifdef PLAIN
# include "i420_rgb_c.h"
-static picture_t *I420_RGB8_Filter( filter_t *, picture_t * );
-static picture_t *I420_RGB16_Filter( filter_t *, picture_t * );
-static picture_t *I420_RGB32_Filter( filter_t *, picture_t * );
-
static void SetYUV( filter_t *, const video_format_t * );
static void Set8bppPalette( filter_t *, uint8_t * );
+#endif
+
+#ifndef PLAIN
+VIDEO_FILTER_WRAPPER2( I420_R5G5B5 )
+VIDEO_FILTER_WRAPPER2( I420_R5G6B5 )
+VIDEO_FILTER_WRAPPER2( I420_A8R8G8B8 )
+VIDEO_FILTER_WRAPPER2( I420_R8G8B8A8 )
+VIDEO_FILTER_WRAPPER2( I420_B8G8R8A8 )
+VIDEO_FILTER_WRAPPER2( I420_A8B8G8R8 )
#else
-static picture_t *I420_R5G5B5_Filter( filter_t *, picture_t * );
-static picture_t *I420_R5G6B5_Filter( filter_t *, picture_t * );
-static picture_t *I420_A8R8G8B8_Filter( filter_t *, picture_t * );
-static picture_t *I420_R8G8B8A8_Filter( filter_t *, picture_t * );
-static picture_t *I420_B8G8R8A8_Filter( filter_t *, picture_t * );
-static picture_t *I420_A8B8G8R8_Filter( filter_t *, picture_t * );
+VIDEO_FILTER_WRAPPER2( I420_RGB8 )
+VIDEO_FILTER_WRAPPER2( I420_RGB16 )
+VIDEO_FILTER_WRAPPER2( I420_RGB32 )
#endif
/*****************************************************************************
@@ -128,7 +130,7 @@ static int Activate( vlc_object_t *p_this )
{
/* R5G5B6 pixel format */
msg_Dbg(p_this, "RGB pixel format is R5G5B5");
- p_filter->pf_video_filter = I420_R5G5B5_Filter;
+ p_filter->pf_video_filter_into = I420_R5G5B5_Filter;
}
else if( ( p_filter->fmt_out.video.i_rmask == 0xf800
&& p_filter->fmt_out.video.i_gmask == 0x07e0
@@ -136,7 +138,7 @@ static int Activate( vlc_object_t *p_this )
{
/* R5G6B5 pixel format */
msg_Dbg(p_this, "RGB pixel format is R5G6B5");
- p_filter->pf_video_filter = I420_R5G6B5_Filter;
+ p_filter->pf_video_filter_into = I420_R5G6B5_Filter;
}
else
return VLC_EGENERIC;
@@ -149,7 +151,7 @@ static int Activate( vlc_object_t *p_this )
{
/* A8R8G8B8 pixel format */
msg_Dbg(p_this, "RGB pixel format is A8R8G8B8");
- p_filter->pf_video_filter = I420_A8R8G8B8_Filter;
+ p_filter->pf_video_filter_into = I420_A8R8G8B8_Filter;
}
else if( p_filter->fmt_out.video.i_rmask == 0xff000000
&& p_filter->fmt_out.video.i_gmask == 0x00ff0000
@@ -157,7 +159,7 @@ static int Activate( vlc_object_t *p_this )
{
/* R8G8B8A8 pixel format */
msg_Dbg(p_this, "RGB pixel format is R8G8B8A8");
- p_filter->pf_video_filter = I420_R8G8B8A8_Filter;
+ p_filter->pf_video_filter_into = I420_R8G8B8A8_Filter;
}
else if( p_filter->fmt_out.video.i_rmask == 0x0000ff00
&& p_filter->fmt_out.video.i_gmask == 0x00ff0000
@@ -165,7 +167,7 @@ static int Activate( vlc_object_t *p_this )
{
/* B8G8R8A8 pixel format */
msg_Dbg(p_this, "RGB pixel format is B8G8R8A8");
- p_filter->pf_video_filter = I420_B8G8R8A8_Filter;
+ p_filter->pf_video_filter_into = I420_B8G8R8A8_Filter;
}
else if( p_filter->fmt_out.video.i_rmask == 0x000000ff
&& p_filter->fmt_out.video.i_gmask == 0x0000ff00
@@ -173,21 +175,21 @@ static int Activate( vlc_object_t *p_this )
{
/* A8B8G8R8 pixel format */
msg_Dbg(p_this, "RGB pixel format is A8B8G8R8");
- p_filter->pf_video_filter = I420_A8B8G8R8_Filter;
+ p_filter->pf_video_filter_into = I420_A8B8G8R8_Filter;
}
else
return VLC_EGENERIC;
break;
#else
case VLC_CODEC_RGB8:
- p_filter->pf_video_filter = I420_RGB8_Filter;
+ p_filter->pf_video_filter_into = I420_RGB8_Filter;
break;
case VLC_CODEC_RGB15:
case VLC_CODEC_RGB16:
- p_filter->pf_video_filter = I420_RGB16_Filter;
+ p_filter->pf_video_filter_into = I420_RGB16_Filter;
break;
case VLC_CODEC_RGB32:
- p_filter->pf_video_filter = I420_RGB32_Filter;
+ p_filter->pf_video_filter_into = I420_RGB32_Filter;
break;
#endif
default:
@@ -290,18 +292,7 @@ static void Deactivate( vlc_object_t *p_this )
free( p_sys );
}
-#ifndef PLAIN
-VIDEO_FILTER_WRAPPER( I420_R5G5B5 )
-VIDEO_FILTER_WRAPPER( I420_R5G6B5 )
-VIDEO_FILTER_WRAPPER( I420_A8R8G8B8 )
-VIDEO_FILTER_WRAPPER( I420_R8G8B8A8 )
-VIDEO_FILTER_WRAPPER( I420_B8G8R8A8 )
-VIDEO_FILTER_WRAPPER( I420_A8B8G8R8 )
-#else
-VIDEO_FILTER_WRAPPER( I420_RGB8 )
-VIDEO_FILTER_WRAPPER( I420_RGB16 )
-VIDEO_FILTER_WRAPPER( I420_RGB32 )
-
+#ifdef PLAIN
/*****************************************************************************
* SetYUV: compute tables and set function pointers
*****************************************************************************/
diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c
index 966204f517d..5c7a4426e00 100644
--- a/modules/video_chroma/i420_yuy2.c
+++ b/modules/video_chroma/i420_yuy2.c
@@ -65,16 +65,21 @@ static int Activate ( vlc_object_t * );
static void I420_YUY2 ( filter_t *, picture_t *, picture_t * );
static void I420_YVYU ( filter_t *, picture_t *, picture_t * );
static void I420_UYVY ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_YUY2_Filter ( filter_t *, picture_t * );
-static picture_t *I420_YVYU_Filter ( filter_t *, picture_t * );
-static picture_t *I420_UYVY_Filter ( filter_t *, picture_t * );
#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
static void I420_IUYV ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_IUYV_Filter ( filter_t *, picture_t * );
#endif
#if defined (MODULE_NAME_IS_i420_yuy2)
static void I420_Y211 ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_Y211_Filter ( filter_t *, picture_t * );
+#endif
+
+VIDEO_FILTER_WRAPPER2( I420_YUY2 )
+VIDEO_FILTER_WRAPPER2( I420_YVYU )
+VIDEO_FILTER_WRAPPER2( I420_UYVY )
+#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
+VIDEO_FILTER_WRAPPER2( I420_IUYV )
+#endif
+#if defined (MODULE_NAME_IS_i420_yuy2)
+VIDEO_FILTER_WRAPPER2( I420_Y211 )
#endif
/*****************************************************************************
@@ -131,25 +136,25 @@ static int Activate( vlc_object_t *p_this )
switch( p_filter->fmt_out.video.i_chroma )
{
case VLC_CODEC_YUYV:
- p_filter->pf_video_filter = I420_YUY2_Filter;
+ p_filter->pf_video_filter_into = I420_YUY2_Filter;
break;
case VLC_CODEC_YVYU:
- p_filter->pf_video_filter = I420_YVYU_Filter;
+ p_filter->pf_video_filter_into = I420_YVYU_Filter;
break;
case VLC_CODEC_UYVY:
- p_filter->pf_video_filter = I420_UYVY_Filter;
+ p_filter->pf_video_filter_into = I420_UYVY_Filter;
break;
#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
case VLC_FOURCC('I','U','Y','V'):
- p_filter->pf_video_filter = I420_IUYV_Filter;
+ p_filter->pf_video_filter_into = I420_IUYV_Filter;
break;
#endif
#if defined (MODULE_NAME_IS_i420_yuy2)
case VLC_CODEC_Y211:
- p_filter->pf_video_filter = I420_Y211_Filter;
+ p_filter->pf_video_filter_into = I420_Y211_Filter;
break;
#endif
@@ -177,16 +182,6 @@ static inline unsigned long long read_cycles(void)
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I420_YUY2 )
-VIDEO_FILTER_WRAPPER( I420_YVYU )
-VIDEO_FILTER_WRAPPER( I420_UYVY )
-#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
-VIDEO_FILTER_WRAPPER( I420_IUYV )
-#endif
-#if defined (MODULE_NAME_IS_i420_yuy2)
-VIDEO_FILTER_WRAPPER( I420_Y211 )
-#endif
-
/*****************************************************************************
* I420_YUY2: planar YUV 4:2:0 to packed YUYV 4:2:2
*****************************************************************************/
diff --git a/modules/video_chroma/i422_i420.c b/modules/video_chroma/i422_i420.c
index e61ffce8f07..7a87ad16b40 100644
--- a/modules/video_chroma/i422_i420.c
+++ b/modules/video_chroma/i422_i420.c
@@ -45,9 +45,10 @@ static int Activate ( vlc_object_t * );
static void I422_I420( filter_t *, picture_t *, picture_t * );
static void I422_YV12( filter_t *, picture_t *, picture_t * );
static void I422_YUVA( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_I420_Filter( filter_t *, picture_t * );
-static picture_t *I422_YV12_Filter( filter_t *, picture_t * );
-static picture_t *I422_YUVA_Filter( filter_t *, picture_t * );
+
+VIDEO_FILTER_WRAPPER2( I422_I420 )
+VIDEO_FILTER_WRAPPER2( I422_YV12 )
+VIDEO_FILTER_WRAPPER2( I422_YUVA )
/*****************************************************************************
* Module descriptor
@@ -86,15 +87,15 @@ static int Activate( vlc_object_t *p_this )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
- p_filter->pf_video_filter = I422_I420_Filter;
+ p_filter->pf_video_filter_into = I422_I420_Filter;
break;
case VLC_CODEC_YV12:
- p_filter->pf_video_filter = I422_YV12_Filter;
+ p_filter->pf_video_filter_into = I422_YV12_Filter;
break;
case VLC_CODEC_YUV420A:
- p_filter->pf_video_filter = I422_YUVA_Filter;
+ p_filter->pf_video_filter_into = I422_YUVA_Filter;
break;
default:
@@ -109,9 +110,6 @@ static int Activate( vlc_object_t *p_this )
}
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I422_I420 )
-VIDEO_FILTER_WRAPPER( I422_YV12 )
-VIDEO_FILTER_WRAPPER( I422_YUVA )
/*****************************************************************************
* I422_I420: planar YUV 4:2:2 to planar I420 4:2:0 Y:U:V
diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c
index 880be2cff7b..db95d3d7387 100644
--- a/modules/video_chroma/i422_yuy2.c
+++ b/modules/video_chroma/i422_yuy2.c
@@ -53,13 +53,16 @@ static void I422_YUY2 ( filter_t *, picture_t *, picture_t * );
static void I422_YVYU ( filter_t *, picture_t *, picture_t * );
static void I422_UYVY ( filter_t *, picture_t *, picture_t * );
static void I422_IUYV ( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_YUY2_Filter ( filter_t *, picture_t * );
-static picture_t *I422_YVYU_Filter ( filter_t *, picture_t * );
-static picture_t *I422_UYVY_Filter ( filter_t *, picture_t * );
-static picture_t *I422_IUYV_Filter ( filter_t *, picture_t * );
#if defined (MODULE_NAME_IS_i422_yuy2)
static void I422_Y211 ( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_Y211_Filter ( filter_t *, picture_t * );
+#endif
+
+VIDEO_FILTER_WRAPPER2( I422_YUY2 )
+VIDEO_FILTER_WRAPPER2( I422_YVYU )
+VIDEO_FILTER_WRAPPER2( I422_UYVY )
+VIDEO_FILTER_WRAPPER2( I422_IUYV )
+#if defined (MODULE_NAME_IS_i422_yuy2)
+VIDEO_FILTER_WRAPPER2( I422_Y211 )
#endif
/*****************************************************************************
@@ -113,24 +116,24 @@ static int Activate( vlc_object_t *p_this )
switch( p_filter->fmt_out.video.i_chroma )
{
case VLC_CODEC_YUYV:
- p_filter->pf_video_filter = I422_YUY2_Filter;
+ p_filter->pf_video_filter_into = I422_YUY2_Filter;
break;
case VLC_CODEC_YVYU:
- p_filter->pf_video_filter = I422_YVYU_Filter;
+ p_filter->pf_video_filter_into = I422_YVYU_Filter;
break;
case VLC_CODEC_UYVY:
- p_filter->pf_video_filter = I422_UYVY_Filter;
+ p_filter->pf_video_filter_into = I422_UYVY_Filter;
break;
case VLC_FOURCC('I','U','Y','V'):
- p_filter->pf_video_filter = I422_IUYV_Filter;
+ p_filter->pf_video_filter_into = I422_IUYV_Filter;
break;
#if defined (MODULE_NAME_IS_i422_yuy2)
case VLC_CODEC_Y211:
- p_filter->pf_video_filter = I422_Y211_Filter;
+ p_filter->pf_video_filter_into = I422_Y211_Filter;
break;
#endif
@@ -147,14 +150,6 @@ static int Activate( vlc_object_t *p_this )
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I422_YUY2 )
-VIDEO_FILTER_WRAPPER( I422_YVYU )
-VIDEO_FILTER_WRAPPER( I422_UYVY )
-VIDEO_FILTER_WRAPPER( I422_IUYV )
-#if defined (MODULE_NAME_IS_i422_yuy2)
-VIDEO_FILTER_WRAPPER( I422_Y211 )
-#endif
-
/*****************************************************************************
* I422_YUY2: planar YUV 4:2:2 to packed YUY2 4:2:2
*****************************************************************************/
diff --git a/modules/video_chroma/omxdl.c b/modules/video_chroma/omxdl.c
index 292fe950eab..9a2ef7b7bb2 100644
--- a/modules/video_chroma/omxdl.c
+++ b/modules/video_chroma/omxdl.c
@@ -54,7 +54,7 @@ static void I420_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbCr420ToBGR565_U8_U16_P3C3R (in, instep, out, outstep, size);
}
-VIDEO_FILTER_WRAPPER (I420_RV16)
+VIDEO_FILTER_WRAPPER2 (I420_RV16)
/*** Conversions from YV12 ***/
static void YV12_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
@@ -67,7 +67,7 @@ static void YV12_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbCr420ToBGR565_U8_U16_P3C3R (in, instep, out, outstep, size);
}
-VIDEO_FILTER_WRAPPER (YV12_RV16)
+VIDEO_FILTER_WRAPPER2 (YV12_RV16)
/*** Conversions from I422 ***/
static void I422_I420 (filter_t *filter, picture_t *src, picture_t *dst)
@@ -81,7 +81,7 @@ static void I422_I420 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbCr422ToYCbCr420Rotate_U8_P3R (
in, instep, out, outstep, size, OMX_IP_DISABLE);
}
-VIDEO_FILTER_WRAPPER (I422_I420)
+VIDEO_FILTER_WRAPPER2 (I422_I420)
static void I422_YV12 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -94,7 +94,7 @@ static void I422_YV12 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbCr422ToYCbCr420Rotate_U8_P3R (
in, instep, out, outstep, size, OMX_IP_DISABLE);
}
-VIDEO_FILTER_WRAPPER (I422_YV12)
+VIDEO_FILTER_WRAPPER2 (I422_YV12)
/*** Conversions from I444 ***/
static void I444_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
@@ -110,7 +110,7 @@ static void I444_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbCr444ToBGR565_U8_U16_P3C3R (in, instep, out, outstep, size);
}
-VIDEO_FILTER_WRAPPER (I444_RV16)
+VIDEO_FILTER_WRAPPER2 (I444_RV16)
/*** Conversions from YUY2 ***/
static void YUYV_RV24 (filter_t *filter, picture_t *src, picture_t *dst)
@@ -123,7 +123,7 @@ static void YUYV_RV24 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbYCr422ToBGR888_U8_C2C3R (in, instep, out, outstep, size);
}
-VIDEO_FILTER_WRAPPER (YUYV_RV24)
+VIDEO_FILTER_WRAPPER2 (YUYV_RV24)
static void YUYV_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -135,7 +135,7 @@ static void YUYV_RV16 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_YCbYCr422ToBGR565_U8_U16_C2C3R (in, instep, out, outstep, size);
}
-VIDEO_FILTER_WRAPPER (YUYV_RV16)
+VIDEO_FILTER_WRAPPER2 (YUYV_RV16)
/*** Conversions from UYVY ***/
static void UYVY_I420 (filter_t *filter, picture_t *src, picture_t *dst)
@@ -149,7 +149,7 @@ static void UYVY_I420 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_CbYCrY422ToYCbCr420Rotate_U8_C2P3R (
in, instep, out, outstep, size, OMX_IP_DISABLE);
}
-VIDEO_FILTER_WRAPPER (UYVY_I420)
+VIDEO_FILTER_WRAPPER2 (UYVY_I420)
static void UYVY_YV12 (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -162,7 +162,7 @@ static void UYVY_YV12 (filter_t *filter, picture_t *src, picture_t *dst)
omxIPCS_CbYCrY422ToYCbCr420Rotate_U8_C2P3R (
in, instep, out, outstep, size, OMX_IP_DISABLE);
}
-VIDEO_FILTER_WRAPPER (UYVY_YV12)
+VIDEO_FILTER_WRAPPER2 (UYVY_YV12)
/*** Helpers ***/
static int FixRV24 (video_format_t *fmt)
@@ -265,7 +265,7 @@ static int Open (vlc_object_t *obj)
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = I420_RV16_Filter;
+ filter->pf_video_filter_into = I420_RV16_Filter;
return VLC_SUCCESS;
}
break;
@@ -276,7 +276,7 @@ static int Open (vlc_object_t *obj)
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = YV12_RV16_Filter;
+ filter->pf_video_filter_into = YV12_RV16_Filter;
return VLC_SUCCESS;
}
break;
@@ -285,10 +285,10 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = I422_I420_Filter;
+ filter->pf_video_filter_into = I422_I420_Filter;
return VLC_SUCCESS;
case VLC_CODEC_YV12:
- filter->pf_video_filter = I422_YV12_Filter;
+ filter->pf_video_filter_into = I422_YV12_Filter;
return VLC_SUCCESS;
}
break;
@@ -299,7 +299,7 @@ static int Open (vlc_object_t *obj)
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = I444_RV16_Filter;
+ filter->pf_video_filter_into = I444_RV16_Filter;
return VLC_SUCCESS;
}
return VLC_EGENERIC;
@@ -310,12 +310,12 @@ static int Open (vlc_object_t *obj)
case VLC_CODEC_RGB24:
if (FixRV24 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = YUYV_RV24_Filter;
+ filter->pf_video_filter_into = YUYV_RV24_Filter;
return VLC_SUCCESS;
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = YUYV_RV16_Filter;
+ filter->pf_video_filter_into = YUYV_RV16_Filter;
return VLC_SUCCESS;
}
return VLC_EGENERIC;
@@ -324,10 +324,10 @@ static int Open (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = UYVY_I420_Filter;
+ filter->pf_video_filter_into = UYVY_I420_Filter;
return VLC_SUCCESS;
case VLC_CODEC_YV12:
- filter->pf_video_filter = UYVY_YV12_Filter;
+ filter->pf_video_filter_into = UYVY_YV12_Filter;
return VLC_SUCCESS;
}
return VLC_EGENERIC;
@@ -358,7 +358,7 @@ static void I420_I420_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (I420_I420_Scale)
+VIDEO_FILTER_WRAPPER2 (I420_I420_Scale)
static void I420_YV12_Scale (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -373,7 +373,7 @@ static void I420_YV12_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (I420_YV12_Scale)
+VIDEO_FILTER_WRAPPER2 (I420_YV12_Scale)
static void I420_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -388,7 +388,7 @@ static void I420_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
CNV, OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (I420_RGB_Scale)
+VIDEO_FILTER_WRAPPER2 (I420_RGB_Scale)
/*** Scaling from YV12 ***/
static void YV12_I420_Scale (filter_t *filter, picture_t *src, picture_t *dst)
@@ -404,7 +404,7 @@ static void YV12_I420_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (YV12_I420_Scale)
+VIDEO_FILTER_WRAPPER2 (YV12_I420_Scale)
static void YV12_YV12_Scale (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -419,7 +419,7 @@ static void YV12_YV12_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (YV12_YV12_Scale)
+VIDEO_FILTER_WRAPPER2 (YV12_YV12_Scale)
static void YV12_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -434,7 +434,7 @@ static void YV12_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
CNV, OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (YV12_RGB_Scale)
+VIDEO_FILTER_WRAPPER2 (YV12_RGB_Scale)
/*** Scaling from I422 ***/
static void I422_I422_Scale (filter_t *filter, picture_t *src, picture_t *dst)
@@ -450,7 +450,7 @@ static void I422_I422_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (I422_I422_Scale)
+VIDEO_FILTER_WRAPPER2 (I422_I422_Scale)
static void I422_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
{
@@ -465,7 +465,7 @@ static void I422_RGB_Scale (filter_t *filter, picture_t *src, picture_t *dst)
in, instep, insize, out, outstep, outsize,
CNV, OMX_IP_NEAREST, OMX_IP_DISABLE, XRR_MAX, YRR_MAX);
}
-VIDEO_FILTER_WRAPPER (I422_RGB_Scale)
+VIDEO_FILTER_WRAPPER2 (I422_RGB_Scale)
/*** Scaling initialization ***/
static int OpenScaler (vlc_object_t *obj)
@@ -484,33 +484,33 @@ static int OpenScaler (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = I420_I420_Scale_Filter;
+ filter->pf_video_filter_into = I420_I420_Scale_Filter;
return VLC_SUCCESS;
case VLC_CODEC_YV12:
- filter->pf_video_filter = I420_YV12_Scale_Filter;
+ filter->pf_video_filter_into = I420_YV12_Scale_Filter;
return VLC_SUCCESS;
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
return VLC_EGENERIC;
- filter->pf_video_filter = I420_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I420_RGB_Scale_Filter;
*conv = OMX_IP_BGR565;
return VLC_SUCCESS;
case VLC_CODEC_RGB15:
if (FixRV15 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I420_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I420_RGB_Scale_Filter;
*conv = OMX_IP_BGR555;
return VLC_SUCCESS;
case VLC_CODEC_RGB12:
if (FixRV12 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I420_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I420_RGB_Scale_Filter;
*conv = OMX_IP_BGR444;
return VLC_SUCCESS;
case VLC_CODEC_RGB24:
if (FixRV24 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I420_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I420_RGB_Scale_Filter;
*conv = OMX_IP_BGR888;
return VLC_SUCCESS;
}
@@ -520,33 +520,33 @@ static int OpenScaler (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I420:
- filter->pf_video_filter = YV12_I420_Scale_Filter;
+ filter->pf_video_filter_into = YV12_I420_Scale_Filter;
return VLC_SUCCESS;
case VLC_CODEC_YV12:
- filter->pf_video_filter = YV12_YV12_Scale_Filter;
+ filter->pf_video_filter_into = YV12_YV12_Scale_Filter;
return VLC_SUCCESS;
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = YV12_RGB_Scale_Filter;
+ filter->pf_video_filter_into = YV12_RGB_Scale_Filter;
*conv = OMX_IP_BGR565;
return VLC_SUCCESS;
case VLC_CODEC_RGB15:
if (FixRV15 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = YV12_RGB_Scale_Filter;
+ filter->pf_video_filter_into = YV12_RGB_Scale_Filter;
*conv = OMX_IP_BGR555;
return VLC_SUCCESS;
case VLC_CODEC_RGB12:
if (FixRV12 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = YV12_RGB_Scale_Filter;
+ filter->pf_video_filter_into = YV12_RGB_Scale_Filter;
*conv = OMX_IP_BGR444;
return VLC_SUCCESS;
case VLC_CODEC_RGB24:
if (FixRV24 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = YV12_RGB_Scale_Filter;
+ filter->pf_video_filter_into = YV12_RGB_Scale_Filter;
*conv = OMX_IP_BGR888;
return VLC_SUCCESS;
}
@@ -556,30 +556,30 @@ static int OpenScaler (vlc_object_t *obj)
switch (filter->fmt_out.video.i_chroma)
{
case VLC_CODEC_I422:
- filter->pf_video_filter = I422_I422_Scale_Filter;
+ filter->pf_video_filter_into = I422_I422_Scale_Filter;
return VLC_SUCCESS;
case VLC_CODEC_RGB16:
if (FixRV16 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I422_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I422_RGB_Scale_Filter;
*conv = OMX_IP_BGR565;
return VLC_SUCCESS;
case VLC_CODEC_RGB15:
if (FixRV15 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I422_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I422_RGB_Scale_Filter;
*conv = OMX_IP_BGR555;
return VLC_SUCCESS;
case VLC_CODEC_RGB12:
if (FixRV12 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I422_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I422_RGB_Scale_Filter;
*conv = OMX_IP_BGR444;
return VLC_SUCCESS;
case VLC_CODEC_RGB24:
if (FixRV24 (&filter->fmt_out.video))
break;
- filter->pf_video_filter = I422_RGB_Scale_Filter;
+ filter->pf_video_filter_into = I422_RGB_Scale_Filter;
*conv = OMX_IP_BGR888;
return VLC_SUCCESS;
}
diff --git a/modules/video_chroma/yuvp.c b/modules/video_chroma/yuvp.c
index b2eba4fda7b..84c1c623617 100644
--- a/modules/video_chroma/yuvp.c
+++ b/modules/video_chroma/yuvp.c
@@ -52,9 +52,9 @@ vlc_module_end ()
/****************************************************************************
* Local prototypes
****************************************************************************/
-static picture_t *Convert_Filter( filter_t *, picture_t * );
static void Convert( filter_t *, picture_t *, picture_t * );
static void Yuv2Rgb( uint8_t *r, uint8_t *g, uint8_t *b, int y1, int u1, int v1 );
+VIDEO_FILTER_WRAPPER2( Convert )
/*****************************************************************************
* Open: probe the filter and return score
@@ -77,7 +77,7 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- p_filter->pf_video_filter = Convert_Filter;
+ p_filter->pf_video_filter_into = Convert_Filter;
msg_Dbg( p_filter, "YUVP to %4.4s converter",
(const char*)&p_filter->fmt_out.video.i_chroma );
@@ -96,8 +96,6 @@ static void Close( vlc_object_t *p_this )
/****************************************************************************
* Filter: the whole thing
****************************************************************************/
-VIDEO_FILTER_WRAPPER( Convert )
-
static void Convert( filter_t *p_filter, picture_t *p_source,
picture_t *p_dest )
{
diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c
index 93f3caaac2a..2ef349aafd2 100644
--- a/modules/video_chroma/yuy2_i420.c
+++ b/modules/video_chroma/yuy2_i420.c
@@ -45,9 +45,9 @@ static void YUY2_I420 ( filter_t *, picture_t *, picture_t * );
static void YVYU_I420 ( filter_t *, picture_t *, picture_t * );
static void UYVY_I420 ( filter_t *, picture_t *, picture_t * );
-static picture_t *YUY2_I420_Filter ( filter_t *, picture_t * );
-static picture_t *YVYU_I420_Filter ( filter_t *, picture_t * );
-static picture_t *UYVY_I420_Filter ( filter_t *, picture_t * );
+VIDEO_FILTER_WRAPPER2( YUY2_I420 )
+VIDEO_FILTER_WRAPPER2( YVYU_I420 )
+VIDEO_FILTER_WRAPPER2( UYVY_I420 )
/*****************************************************************************
* Module descriptor
@@ -84,15 +84,15 @@ static int Activate( vlc_object_t *p_this )
switch( p_filter->fmt_in.video.i_chroma )
{
case VLC_CODEC_YUYV:
- p_filter->pf_video_filter = YUY2_I420_Filter;
+ p_filter->pf_video_filter_into = YUY2_I420_Filter;
break;
case VLC_CODEC_YVYU:
- p_filter->pf_video_filter = YVYU_I420_Filter;
+ p_filter->pf_video_filter_into = YVYU_I420_Filter;
break;
case VLC_CODEC_UYVY:
- p_filter->pf_video_filter = UYVY_I420_Filter;
+ p_filter->pf_video_filter_into = UYVY_I420_Filter;
break;
default:
@@ -107,9 +107,6 @@ static int Activate( vlc_object_t *p_this )
}
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( YUY2_I420 )
-VIDEO_FILTER_WRAPPER( YVYU_I420 )
-VIDEO_FILTER_WRAPPER( UYVY_I420 )
/*****************************************************************************
* YUY2_I420: packed YUY2 4:2:2 to planar YUV 4:2:0
diff --git a/modules/video_chroma/yuy2_i422.c b/modules/video_chroma/yuy2_i422.c
index e1c54b31625..623ee262f62 100644
--- a/modules/video_chroma/yuy2_i422.c
+++ b/modules/video_chroma/yuy2_i422.c
@@ -44,9 +44,10 @@ static int Activate ( vlc_object_t * );
static void YUY2_I422 ( filter_t *, picture_t *, picture_t * );
static void YVYU_I422 ( filter_t *, picture_t *, picture_t * );
static void UYVY_I422 ( filter_t *, picture_t *, picture_t * );
-static picture_t *YUY2_I422_Filter ( filter_t *, picture_t * );
-static picture_t *YVYU_I422_Filter ( filter_t *, picture_t * );
-static picture_t *UYVY_I422_Filter ( filter_t *, picture_t * );
+
+VIDEO_FILTER_WRAPPER2( YUY2_I422 )
+VIDEO_FILTER_WRAPPER2( YVYU_I422 )
+VIDEO_FILTER_WRAPPER2( UYVY_I422 )
/*****************************************************************************
* Module descriptor
@@ -83,15 +84,15 @@ static int Activate( vlc_object_t *p_this )
switch( p_filter->fmt_in.video.i_chroma )
{
case VLC_CODEC_YUYV:
- p_filter->pf_video_filter = YUY2_I422_Filter;
+ p_filter->pf_video_filter_into = YUY2_I422_Filter;
break;
case VLC_CODEC_YVYU:
- p_filter->pf_video_filter = YVYU_I422_Filter;
+ p_filter->pf_video_filter_into = YVYU_I422_Filter;
break;
case VLC_CODEC_UYVY:
- p_filter->pf_video_filter = UYVY_I422_Filter;
+ p_filter->pf_video_filter_into = UYVY_I422_Filter;
break;
default:
@@ -107,10 +108,6 @@ static int Activate( vlc_object_t *p_this )
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( YUY2_I422 )
-VIDEO_FILTER_WRAPPER( YVYU_I422 )
-VIDEO_FILTER_WRAPPER( UYVY_I422 )
-
/*****************************************************************************
* YUY2_I422: packed YUY2 4:2:2 to planar YUV 4:2:2
*****************************************************************************/
--
2.26.2
More information about the vlc-devel
mailing list