mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 02:04:41 +08:00
frontends/va: Enable 3-plane YUV formats as postproc output
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
This commit is contained in:
parent
6c83f3c3bb
commit
12fff8005a
@ -131,39 +131,14 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
|
||||
context->target = surf->buffer;
|
||||
context->mjpeg.sampling_factor = 0;
|
||||
|
||||
if (context->templat.entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE)
|
||||
context->needs_begin_frame = true;
|
||||
|
||||
if (!context->decoder) {
|
||||
|
||||
/* VPP */
|
||||
if (context->templat.profile == PIPE_VIDEO_PROFILE_UNKNOWN &&
|
||||
context->target->buffer_format != PIPE_FORMAT_B8G8R8A8_UNORM &&
|
||||
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_B10G10R10A2_UNORM &&
|
||||
context->target->buffer_format != PIPE_FORMAT_R10G10B10A2_UNORM &&
|
||||
context->target->buffer_format != PIPE_FORMAT_B10G10R10X2_UNORM &&
|
||||
context->target->buffer_format != PIPE_FORMAT_R10G10B10X2_UNORM &&
|
||||
context->target->buffer_format != PIPE_FORMAT_NV12 &&
|
||||
context->target->buffer_format != PIPE_FORMAT_P010 &&
|
||||
context->target->buffer_format != PIPE_FORMAT_P016) {
|
||||
mtx_unlock(&drv->mutex);
|
||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
if (drv->pipe->screen->get_video_param(drv->pipe->screen,
|
||||
PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_PROCESSING,
|
||||
PIPE_VIDEO_CAP_SUPPORTED)) {
|
||||
context->needs_begin_frame = true;
|
||||
}
|
||||
|
||||
mtx_unlock(&drv->mutex);
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE)
|
||||
context->needs_begin_frame = true;
|
||||
|
||||
/* meta data and seis are per picture basis, it needs to be
|
||||
* cleared before rendering the picture. */
|
||||
if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
|
||||
|
@ -660,12 +660,14 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
||||
!drv->vscreen->pscreen->get_param(drv->vscreen->pscreen, PIPE_CAP_COMPUTE))
|
||||
return VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
|
||||
|
||||
/* Subsampled formats not supported */
|
||||
if (util_format_is_subsampled_422(context->target->buffer_format))
|
||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
|
||||
vlVaSetProcParameters(drv, src_surface, dst_surface, param);
|
||||
|
||||
/* Try other post proc implementations */
|
||||
if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
|
||||
context->target->buffer_format != PIPE_FORMAT_P010 &&
|
||||
context->target->buffer_format != PIPE_FORMAT_P016)
|
||||
if (!util_format_is_yuv(context->target->buffer_format))
|
||||
ret = vlVaPostProcCompositor(drv, context, src_region, dst_region,
|
||||
src, context->target, deinterlace);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user