vl: use preferred format for deinterlacing
authorChristian König <christian.koenig@amd.com>
Wed, 16 Dec 2015 13:19:41 +0000 (14:19 +0100)
committerChristian König <christian.koenig@amd.com>
Tue, 12 Jan 2016 12:28:42 +0000 (13:28 +0100)
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/auxiliary/vl/vl_deint_filter.c

index f919867cc021d16dbd9a5c13a3760ce348d105d5..9e782e531bfaface18bc228c45aed3ba3b5c6594 100644 (file)
@@ -255,7 +255,13 @@ vl_deint_filter_init(struct vl_deint_filter *filter, struct pipe_context *pipe,
 
    /* TODO: handle other than 4:2:0 subsampling */
    memset(&templ, 0, sizeof(templ));
-   templ.buffer_format = PIPE_FORMAT_YV12;
+   templ.buffer_format = pipe->screen->get_video_param
+   (
+      pipe->screen,
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
+      PIPE_VIDEO_CAP_PREFERED_FORMAT
+   );
    templ.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
    templ.width = video_width;
    templ.height = video_height;