mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 02:10:17 +01:00
frontends/va: Use compositor blit with different number of planes
This fixes Y8_U8_V8_444_UNORM -> NV12 conversion for example.
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
(cherry picked from commit 217d70fc38)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32261>
This commit is contained in:
parent
ca6cccfe24
commit
b3cb911eff
2 changed files with 8 additions and 3 deletions
|
|
@ -84,7 +84,7 @@
|
|||
"description": "frontends/va: Use compositor blit with different number of planes",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -347,7 +347,10 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
|
|||
struct u_rect dst_rect;
|
||||
bool scale = false;
|
||||
bool grab = false;
|
||||
unsigned i;
|
||||
unsigned i, src_num_planes, dst_num_planes;
|
||||
|
||||
src_num_planes = util_format_get_num_planes(src->buffer_format);
|
||||
dst_num_planes = util_format_get_num_planes(dst->buffer_format);
|
||||
|
||||
if ((src->buffer_format == PIPE_FORMAT_B8G8R8X8_UNORM ||
|
||||
src->buffer_format == PIPE_FORMAT_B8G8R8A8_UNORM ||
|
||||
|
|
@ -408,7 +411,9 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
|
|||
if (src->buffer_format == PIPE_FORMAT_YUYV ||
|
||||
src->buffer_format == PIPE_FORMAT_UYVY ||
|
||||
src->buffer_format == PIPE_FORMAT_YV12 ||
|
||||
src->buffer_format == PIPE_FORMAT_IYUV) {
|
||||
src->buffer_format == PIPE_FORMAT_IYUV ||
|
||||
(src->interlaced == dst->interlaced &&
|
||||
src_num_planes != dst_num_planes)) {
|
||||
vl_compositor_yuv_deint_full(&drv->cstate, &drv->compositor,
|
||||
src, dst, &src_rect, &dst_rect,
|
||||
VL_COMPOSITOR_NONE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue