frontends/va: Alloc interlaced surface for interlaced pics
authorDavid Rosca <nowrep@gmail.com>
Fri, 28 Jul 2023 07:25:00 +0000 (09:25 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Aug 2023 21:58:27 +0000 (21:58 +0000)
commit578e10e1571b40c86f3348f2f36e080f34d1a4ed
tree74d6caab5d22ffb7b88e8eb67aa87931236c82f4
parentd7b9da2673a8aef49f83dc043aae6ff4fcb212a3
frontends/va: Alloc interlaced surface for interlaced pics

When decoding interlaced pics, the output surface should
also be allocated as interlaced to make the deinterlace
postproc filter work correctly.

This makes deinterlacing work for drivers that supports, but
not prefers, interlaced surfaces.

Use extra buffer instead of reallocating as non-interlaced
when exporting interlaced surfaces.

v2: Avoid reallocating in vlVaExportSurfaceHandle

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24361>
src/gallium/frontends/va/picture.c
src/gallium/frontends/va/surface.c
src/gallium/frontends/va/va_private.h