img->pitches[0] = stride > 0 ? stride : w * 4;
assert(img->pitches[0] >= (w * 4));
break;
+
+ case VA_FOURCC('P','0','1','0'):
+ case VA_FOURCC('P','0','1','6'):
case VA_FOURCC('N','V','1','2'):
if (surf->buffer->interlaced) {
struct pipe_video_buffer *new_buffer;
return VA_STATUS_ERROR_OPERATION_FAILED;
}
+
if (format != surf->buffer->buffer_format) {
/* support NV12 to YV12 and IYUV conversion now only */
if ((format == PIPE_FORMAT_YV12 &&
- surf->buffer->buffer_format == PIPE_FORMAT_NV12) ||
- (format == PIPE_FORMAT_IYUV &&
- surf->buffer->buffer_format == PIPE_FORMAT_NV12))
+ surf->buffer->buffer_format == PIPE_FORMAT_NV12) ||
+ (format == PIPE_FORMAT_IYUV &&
+ surf->buffer->buffer_format == PIPE_FORMAT_NV12))
convert = true;
+ else if (format == PIPE_FORMAT_NV12 &&
+ (surf->buffer->buffer_format == PIPE_FORMAT_P010 ||
+ surf->buffer->buffer_format == PIPE_FORMAT_P016)) {
+ mtx_unlock(&drv->mutex);
+ return VA_STATUS_ERROR_OPERATION_FAILED;
+ }
else {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
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_P010 &&
context->target->buffer_format != PIPE_FORMAT_P016)
return VA_STATUS_ERROR_UNIMPLEMENTED;
dst_region = vlVaRegionDefault(param->output_region, dst_surface, &def_dst_region);
if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
+ context->target->buffer_format != PIPE_FORMAT_P010 &&
context->target->buffer_format != PIPE_FORMAT_P016)
return vlVaPostProcCompositor(drv, context, src_region, dst_region,
src, context->target, deinterlace);
memset(&templat, 0, sizeof(templat));
- templat.buffer_format = pscreen->get_video_param(
- pscreen,
- PIPE_VIDEO_PROFILE_UNKNOWN,
- PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
- PIPE_VIDEO_CAP_PREFERED_FORMAT
- );
- templat.interlaced = pscreen->get_video_param(
- pscreen,
- PIPE_VIDEO_PROFILE_UNKNOWN,
- PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
- PIPE_VIDEO_CAP_PREFERS_INTERLACED
- );
+ if (format == VA_RT_FORMAT_YUV420_10BPP)
+ {
+ templat.buffer_format = PIPE_FORMAT_P010;
+ templat.interlaced = false;
+ }
+ else
+ {
+ templat.buffer_format = pscreen->get_video_param(
+ pscreen,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERED_FORMAT
+ );
+ templat.interlaced = pscreen->get_video_param(
+ pscreen,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERS_INTERLACED
+ );
+ }
+
+
if (expected_fourcc) {
enum pipe_format expected_format = VaFourccToPipeFormat(expected_fourcc);