Module: Mesa
Branch: main
Commit: 2cb4c6aef0bb7a4d2156d39c1605acef38f19e3e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cb4c6aef0bb7a4d2156d39c1605acef38f19e3e

Author: David Rosca <[email protected]>
Date:   Sat Jul 15 16:30:04 2023 +0200

frontends/va: Don't use EFC with scaling or filtering enabled

Reviewed-by: Leo Liu <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24170>

---

 src/gallium/frontends/va/postproc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/frontends/va/postproc.c 
b/src/gallium/frontends/va/postproc.c
index ccb290f2d37..a0f595a3c83 100644
--- a/src/gallium/frontends/va/postproc.c
+++ b/src/gallium/frontends/va/postproc.c
@@ -421,7 +421,13 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver 
*drv, vlVaContext *contex
 
    pscreen = drv->vscreen->pscreen;
 
-   if (can_convert_with_efc(src_surface, dst_surface) &&
+   src_region = vlVaRegionDefault(param->surface_region, src_surface, 
&def_src_region);
+   dst_region = vlVaRegionDefault(param->output_region, dst_surface, 
&def_dst_region);
+
+   if (!param->num_filters &&
+       src_region->width == dst_region->width &&
+       src_region->height == dst_region->height &&
+       can_convert_with_efc(src_surface, dst_surface) &&
        pscreen->get_video_param(pscreen,
                                 PIPE_VIDEO_PROFILE_UNKNOWN,
                                 PIPE_VIDEO_ENTRYPOINT_ENCODE,
@@ -505,9 +511,6 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver 
*drv, vlVaContext *contex
       }
    }
 
-   src_region = vlVaRegionDefault(param->surface_region, src_surface, 
&def_src_region);
-   dst_region = vlVaRegionDefault(param->output_region, dst_surface, 
&def_dst_region);
-
    /* If the driver supports video engine post proc, attempt to do that
     * if it fails, fallback to the other existing implementations below
     */

Reply via email to