Make the picture_structure enum spec complient.
Also remove it from the compositor.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
void
vl_compositor_render(struct vl_compositor *c,
- enum pipe_mpeg12_picture_type picture_type,
struct pipe_surface *dst_surface,
struct pipe_video_rect *dst_area,
struct pipe_video_rect *dst_clip)
*/
void
vl_compositor_render(struct vl_compositor *compositor,
- enum pipe_mpeg12_picture_type picture_type,
struct pipe_surface *dst_surface,
struct pipe_video_rect *dst_area,
struct pipe_video_rect *dst_clip);
unsigned x, y, w, h;
};
-enum pipe_mpeg12_picture_type
+/*
+ * see table 6-14 in the spec
+ */
+enum pipe_mpeg12_picture_structure
{
- PIPE_MPEG12_PICTURE_TYPE_FIELD_TOP,
- PIPE_MPEG12_PICTURE_TYPE_FIELD_BOTTOM,
- PIPE_MPEG12_PICTURE_TYPE_FRAME
+ PIPE_MPEG12_PICTURE_STRUCTURE_RESERVED = 0x00,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP = 0x01,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_BOTTOM = 0x02,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FRAME = 0x03
};
/*
vl_compositor_clear_layers(&vmixer->compositor);
vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer, NULL, NULL);
- vl_compositor_render(&vmixer->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME,
- dst->surface, NULL, NULL);
+ vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL);
return VDP_STATUS_OK;
}
vl_compositor_clear_layers(&pq->compositor);
vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, NULL, NULL);
- vl_compositor_render(&pq->compositor, PIPE_MPEG12_PICTURE_TYPE_FRAME,
- drawable_surface, NULL, NULL);
+ vl_compositor_render(&pq->compositor, drawable_surface, NULL, NULL);
pq->device->context->pipe->screen->flush_frontbuffer
(
#include "xvmc_private.h"
-static enum pipe_mpeg12_picture_type PictureToPipe(int xvmc_pic)
-{
- switch (xvmc_pic) {
- case XVMC_TOP_FIELD:
- return PIPE_MPEG12_PICTURE_TYPE_FIELD_TOP;
- case XVMC_BOTTOM_FIELD:
- return PIPE_MPEG12_PICTURE_TYPE_FIELD_BOTTOM;
- case XVMC_FRAME_PICTURE:
- return PIPE_MPEG12_PICTURE_TYPE_FRAME;
- default:
- assert(0);
- }
-
- XVMC_MSG(XVMC_ERR, "[XvMC] Unrecognized picture type 0x%08X.\n", xvmc_pic);
-
- return -1;
-}
-
static void
MacroBlocksToPipe(XvMCContextPrivate *context,
XvMCSurfacePrivate *surface,
// Workaround for r600g, there seems to be a bug in the fence refcounting code
pipe->screen->fence_reference(pipe->screen, &surface_priv->fence, NULL);
- vl_compositor_render(compositor, PictureToPipe(flags), context_priv->drawable_surface, &dst_rect, NULL);
+ vl_compositor_render(compositor, context_priv->drawable_surface, &dst_rect, NULL);
pipe->flush(pipe, &surface_priv->fence);