summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2015-07-15 17:16:41 -0400
committerXiang, Haihao <haihao.xiang@intel.com>2015-07-23 12:44:20 +0800
commit4bda4667fd635df5bd27ce01353a3b6d6bf85508 (patch)
tree093ff51a7a6fba6d802782f154315ebe2e256283
parent12b3d9ef379e6159e30c2aafc040f1137cd4141a (diff)
VPP: Combine the CSC/Scaling together to optimize the performance
Currently it is divided into two steps when the video format is invovled. In such case it is not efficient. V1->V2: Follow Haihao's comment to call back the missing operation of handle background color Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
-rwxr-xr-xsrc/i965_post_processing.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index f78d7c9..6cb6681 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -5947,6 +5947,33 @@ 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;
+
+ i965_vpp_clear_surface(ctx, &proc_context->pp_context,
+ obj_surface,
+ pipeline_param->output_background_color);
+
+ 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;