Commit c64c6981 authored by Rémi Denis-Courmont's avatar 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).
parent 059d52fb
...@@ -766,64 +766,6 @@ static void OutputClose(vlc_object_t *obj) ...@@ -766,64 +766,6 @@ static void OutputClose(vlc_object_t *obj)
free(sys); 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[] = { static const int algo_values[] = {
-1, -1,
VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL, VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL,
...@@ -855,7 +797,4 @@ vlc_module_begin() ...@@ -855,7 +797,4 @@ vlc_module_begin()
N_("Noise reduction level"), N_("Noise reduction level"), true) N_("Noise reduction level"), N_("Noise reduction level"), true)
add_integer_with_range("vdpau-scaling", 0, 0, 9, add_integer_with_range("vdpau-scaling", 0, 0, 9,
N_("Scaling quality"), N_("High quality scaling level"), true) N_("Scaling quality"), N_("High quality scaling level"), true)
add_submodule()
set_callbacks(YCbCrOpen, YCbCrClose)
vlc_module_end() vlc_module_end()
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