hardware/intel/intel-driver
Revision | 4bda4667fd635df5bd27ce01353a3b6d6bf85508 (tree) |
---|---|
Time | 2015-07-23 13:44:20 |
Author | Zhao Yakui <yakui.zhao@inte...> |
Commiter | Xiang, Haihao |
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>
@@ -5947,6 +5947,33 @@ i965_proc_picture(VADriverContextP ctx, | ||
5947 | 5947 | dst_rect.height = obj_surface->orig_height; |
5948 | 5948 | } |
5949 | 5949 | |
5950 | + if (IS_GEN7(i965->intel.device_info) || | |
5951 | + IS_GEN8(i965->intel.device_info) || | |
5952 | + IS_GEN9(i965->intel.device_info)) { | |
5953 | + unsigned int saved_filter_flag; | |
5954 | + struct i965_post_processing_context *i965pp_context = i965->pp_context; | |
5955 | + | |
5956 | + i965_vpp_clear_surface(ctx, &proc_context->pp_context, | |
5957 | + obj_surface, | |
5958 | + pipeline_param->output_background_color); | |
5959 | + | |
5960 | + saved_filter_flag = i965pp_context->filter_flags; | |
5961 | + i965pp_context->filter_flags = VA_FILTER_SCALING_HQ; | |
5962 | + | |
5963 | + dst_surface.base = (struct object_base *)obj_surface; | |
5964 | + dst_surface.type = I965_SURFACE_TYPE_SURFACE; | |
5965 | + i965_image_processing(ctx, &src_surface, &src_rect, &dst_surface, &dst_rect); | |
5966 | + | |
5967 | + i965pp_context->filter_flags = saved_filter_flag; | |
5968 | + | |
5969 | + if (num_tmp_surfaces) | |
5970 | + i965_DestroySurfaces(ctx, | |
5971 | + tmp_surfaces, | |
5972 | + num_tmp_surfaces); | |
5973 | + | |
5974 | + return VA_STATUS_SUCCESS; | |
5975 | + } | |
5976 | + | |
5950 | 5977 | int csc_needed = 0; |
5951 | 5978 | if (obj_surface->fourcc && obj_surface->fourcc != VA_FOURCC_NV12){ |
5952 | 5979 | csc_needed = 1; |