static const VAImageFormat formats[] =
{
{VA_FOURCC('N','V','1','2')},
+ {VA_FOURCC('P','0','1','0')},
+ {VA_FOURCC('P','0','1','6')},
{VA_FOURCC('I','4','2','0')},
{VA_FOURCC('Y','V','1','2')},
{VA_FOURCC('Y','U','Y','V')},
img->data_size = w * h * 3 / 2;
break;
+ case VA_FOURCC('P','0','1','0'):
+ case VA_FOURCC('P','0','1','6'):
+ img->num_planes = 2;
+ img->pitches[0] = w * 2;
+ img->offsets[0] = 0;
+ img->pitches[1] = w * 2;
+ img->offsets[1] = w * h * 2;
+ img->data_size = w * h * 3;
+ break;
+
case VA_FOURCC('I','4','2','0'):
case VA_FOURCC('Y','V','1','2'):
img->num_planes = 3;
context->target->buffer_format != PIPE_FORMAT_R8G8B8A8_UNORM &&
context->target->buffer_format != PIPE_FORMAT_B8G8R8X8_UNORM &&
context->target->buffer_format != PIPE_FORMAT_R8G8B8X8_UNORM &&
- context->target->buffer_format != PIPE_FORMAT_NV12)
+ context->target->buffer_format != PIPE_FORMAT_NV12 &&
+ context->target->buffer_format != PIPE_FORMAT_P016)
return VA_STATUS_ERROR_UNIMPLEMENTED;
return VA_STATUS_SUCCESS;
src_region = vlVaRegionDefault(param->surface_region, src_surface->buffer, &def_src_region);
dst_region = vlVaRegionDefault(param->output_region, context->target, &def_dst_region);
- if (context->target->buffer_format != PIPE_FORMAT_NV12)
+ if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
+ context->target->buffer_format != PIPE_FORMAT_P016)
return vlVaPostProcCompositor(drv, context, src_region, dst_region,
src, context->target, deinterlace);
else
#define VL_VA_DRIVER(ctx) ((vlVaDriver *)ctx->pDriverData)
#define VL_VA_PSCREEN(ctx) (VL_VA_DRIVER(ctx)->vscreen->pscreen)
-#define VL_VA_MAX_IMAGE_FORMATS 9
+#define VL_VA_MAX_IMAGE_FORMATS 11
#define VL_VA_ENC_GOP_COEFF 16
static inline enum pipe_video_chroma_format
switch(format) {
case VA_FOURCC('N','V','1','2'):
return PIPE_FORMAT_NV12;
+ case VA_FOURCC('P','0','1','0'):
+ case VA_FOURCC('P','0','1','6'):
+ return PIPE_FORMAT_P016;
case VA_FOURCC('I','4','2','0'):
return PIPE_FORMAT_IYUV;
case VA_FOURCC('Y','V','1','2'):
switch (p_format) {
case PIPE_FORMAT_NV12:
return VA_FOURCC('N','V','1','2');
+ case PIPE_FORMAT_P016:
+ return VA_FOURCC('P','0','1','6');
case PIPE_FORMAT_IYUV:
return VA_FOURCC('I','4','2','0');
case PIPE_FORMAT_YV12: