[vlc-commits] vdpau_chroma: remove copy-to-CPU plugin
Rémi Denis-Courmont
git at videolan.org
Thu Apr 23 20:45:49 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 23 21:45:03 2015 +0300| [c64c698124f4e2604a503cb753f104f18796c361] | committer: Rémi Denis-Courmont
vdpau_chroma: remove copy-to-CPU plugin
The decoder can now detect and avoid this case. Retaining the
conversion is counter-productive (especially for transcode).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c64c698124f4e2604a503cb753f104f18796c361
---
modules/hw/vdpau/chroma.c | 61 ---------------------------------------------
1 file changed, 61 deletions(-)
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 7a394f5..4164c22 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -766,64 +766,6 @@ static void OutputClose(vlc_object_t *obj)
free(sys);
}
-static picture_t *VideoExport_Filter(filter_t *filter, picture_t *src)
-{
- if (unlikely(src->context == NULL))
- {
- msg_Err(filter, "corrupt VDPAU video surface %p", src);
- picture_Release(src);
- return NULL;
- }
-
- picture_t *dst = filter_NewPicture(filter);
- if (dst == NULL)
- return NULL;
-
- return VideoExport(filter, src, dst);
-}
-
-static int YCbCrOpen(vlc_object_t *obj)
-{
- filter_t *filter = (filter_t *)obj;
- if (filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_420
- && filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_422
- && filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_444)
- return VLC_EGENERIC;
-
- if (filter->fmt_in.video.i_visible_width
- != filter->fmt_out.video.i_visible_width
- || filter->fmt_in.video.i_visible_height
- != filter->fmt_out.video.i_visible_height
- || filter->fmt_in.video.i_x_offset != filter->fmt_out.video.i_x_offset
- || filter->fmt_in.video.i_y_offset != filter->fmt_out.video.i_y_offset
- || (filter->fmt_in.video.i_sar_num * filter->fmt_out.video.i_sar_den
- != filter->fmt_in.video.i_sar_den * filter->fmt_out.video.i_sar_num))
- return VLC_EGENERIC;
-
- filter_sys_t *sys = malloc(sizeof (*sys));
- if (unlikely(sys == NULL))
- return VLC_ENOMEM;
-
- if (!vlc_fourcc_to_vdp_ycc(filter->fmt_out.video.i_chroma,
- &sys->chroma, &sys->format))
- {
- free(sys);
- return VLC_EGENERIC;
- }
-
- filter->pf_video_filter = VideoExport_Filter;
- filter->p_sys = sys;
- return VLC_SUCCESS;
-}
-
-static void YCbCrClose(vlc_object_t *obj)
-{
- filter_t *filter = (filter_t *)obj;
- filter_sys_t *sys = filter->p_sys;
-
- free(sys);
-}
-
static const int algo_values[] = {
-1,
VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL,
@@ -855,7 +797,4 @@ vlc_module_begin()
N_("Noise reduction level"), N_("Noise reduction level"), true)
add_integer_with_range("vdpau-scaling", 0, 0, 9,
N_("Scaling quality"), N_("High quality scaling level"), true)
-
- add_submodule()
- set_callbacks(YCbCrOpen, YCbCrClose)
vlc_module_end()
More information about the vlc-commits
mailing list