summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2017-09-15 14:19:34 -0400
committerLeo Liu <[email protected]>2017-09-25 09:42:13 -0400
commit001358a97cce456d948bb57842ca099a73c10b06 (patch)
tree566a4b813e37cad97959029ee8253870388977f5 /src/gallium
parentabd05a6cc45142929f1857450c8ae977b0584b17 (diff)
vl/compositor: add a new function for YUV deint
It will replace previous deint function with abilities of scaling and field deinterlacing Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c30
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.h12
2 files changed, 42 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index 49707471f47..37a784742db 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -1182,6 +1182,36 @@ vl_compositor_set_layer_rotation(struct vl_compositor_state *s,
}
void
+vl_compositor_yuv_deint_full(struct vl_compositor_state *s,
+ struct vl_compositor *c,
+ struct pipe_video_buffer *src,
+ struct pipe_video_buffer *dst,
+ struct u_rect *src_rect,
+ struct u_rect *dst_rect,
+ enum vl_compositor_deinterlace deinterlace)
+{
+ struct pipe_surface **dst_surfaces;
+
+ dst_surfaces = dst->get_surfaces(dst);
+ vl_compositor_clear_layers(s);
+
+ set_yuv_layer(s, c, 0, src, src_rect, NULL, true);
+ vl_compositor_set_layer_dst_area(s, 0, dst_rect);
+ vl_compositor_render(s, c, dst_surfaces[0], NULL, false);
+
+ if (dst_rect) {
+ dst_rect->x1 /= 2;
+ dst_rect->y1 /= 2;
+ }
+
+ set_yuv_layer(s, c, 0, src, src_rect, NULL, false);
+ vl_compositor_set_layer_dst_area(s, 0, dst_rect);
+ vl_compositor_render(s, c, dst_surfaces[1], NULL, false);
+
+ s->pipe->flush(s->pipe, NULL, 0);
+}
+
+void
vl_compositor_render(struct vl_compositor_state *s,
struct vl_compositor *c,
struct pipe_surface *dst_surface,
diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h
index 09183285449..2fb5a3c53eb 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.h
+++ b/src/gallium/auxiliary/vl/vl_compositor.h
@@ -246,6 +246,18 @@ vl_compositor_set_layer_rotation(struct vl_compositor_state *state,
unsigned layer,
enum vl_compositor_rotation rotate);
+/**
+ * deinterlace yuv buffer with full abilities
+ */
+void
+vl_compositor_yuv_deint_full(struct vl_compositor_state *state,
+ struct vl_compositor *compositor,
+ struct pipe_video_buffer *src,
+ struct pipe_video_buffer *dst,
+ struct u_rect *src_rect,
+ struct u_rect *dst_rect,
+ enum vl_compositor_deinterlace deinterlace);
+
/*@}*/
/**