[Libva] [PATCH][LIBVA-INTEL-DRIVER] VPP: Combine the CSC/Scaling together to optimize the performance
Zhao Yakui
yakui.zhao at intel.com
Tue Jun 30 12:11:29 PDT 2015
Currently it is divided into two steps when the video format is invovled.
In such case it is not efficient.
Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
src/i965_post_processing.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index f78d7c9..e2c6fb6 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -5947,6 +5947,29 @@ i965_proc_picture(VADriverContextP ctx,
dst_rect.height = obj_surface->orig_height;
}
+ if (IS_GEN7(i965->intel.device_info) ||
+ IS_GEN8(i965->intel.device_info) ||
+ IS_GEN9(i965->intel.device_info)) {
+ unsigned int saved_filter_flag;
+ struct i965_post_processing_context *i965pp_context = i965->pp_context;
+
+ saved_filter_flag = i965pp_context->filter_flags;
+ i965pp_context->filter_flags = VA_FILTER_SCALING_HQ;
+
+ dst_surface.base = (struct object_base *)obj_surface;
+ dst_surface.type = I965_SURFACE_TYPE_SURFACE;
+ i965_image_processing(ctx, &src_surface, &src_rect, &dst_surface, &dst_rect);
+
+ i965pp_context->filter_flags = saved_filter_flag;
+
+ if (num_tmp_surfaces)
+ i965_DestroySurfaces(ctx,
+ tmp_surfaces,
+ num_tmp_surfaces);
+
+ return VA_STATUS_SUCCESS;
+ }
+
int csc_needed = 0;
if (obj_surface->fourcc && obj_surface->fourcc != VA_FOURCC_NV12){
csc_needed = 1;
--
1.8.2.1
More information about the Libva
mailing list