return va_status;
}
-static VAStatus
-gen75_vpp_gpe(VADriverContextP ctx,
- struct intel_video_process_context* proc_ctx)
-{
- VAStatus va_status = VA_STATUS_SUCCESS;
-
- if(proc_ctx->vpp_gpe_ctx == NULL){
- proc_ctx->vpp_gpe_ctx = vpp_gpe_context_init(ctx);
- }
-
- proc_ctx->vpp_gpe_ctx->pipeline_param = proc_ctx->pipeline_param;
- proc_ctx->vpp_gpe_ctx->surface_pipeline_input_object = proc_ctx->surface_pipeline_input_object;
- proc_ctx->vpp_gpe_ctx->surface_output_object = proc_ctx->surface_render_output_object;
-
- va_status = vpp_gpe_process_picture(ctx, proc_ctx->vpp_gpe_ctx);
-
- return va_status;
-}
-
VAStatus
gen75_proc_picture(VADriverContextP ctx,
VAProfile profile,
if (filter->type == VAProcFilterNoiseReduction ||
filter->type == VAProcFilterDeinterlacing ||
filter->type == VAProcFilterSkinToneEnhancement ||
+ filter->type == VAProcFilterSharpening ||
filter->type == VAProcFilterColorBalance){
gen75_vpp_vebox(ctx, proc_ctx);
- }else if(filter->type == VAProcFilterSharpening){
- if (proc_ctx->surface_pipeline_input_object->fourcc != VA_FOURCC_NV12 ||
- proc_ctx->surface_render_output_object->fourcc != VA_FOURCC_NV12) {
- status = VA_STATUS_ERROR_UNIMPLEMENTED;
- goto error;
- }
-
- gen75_vpp_gpe(ctx, proc_ctx);
}
}else if (pipeline_param->num_filters >= 2) {
unsigned int i = 0;
proc_ctx->vpp_vebox_ctx = NULL;
}
- if(proc_ctx->vpp_gpe_ctx){
- vpp_gpe_context_destroy(ctx,proc_ctx->vpp_gpe_ctx);
- proc_ctx->vpp_gpe_ctx = NULL;
- }
-
free(proc_ctx);
}
proc_context->base.run = gen75_proc_picture;
proc_context->vpp_vebox_ctx = NULL;
- proc_context->vpp_gpe_ctx = NULL;
proc_context->vpp_fmt_cvt_ctx = NULL;
proc_context->driver_context = ctx;
#include <va/va_vpp.h>
#include "i965_drv_video.h"
#include "gen75_vpp_vebox.h"
-#include "gen75_vpp_gpe.h"
struct intel_video_process_context
{
struct intel_vebox_context *vpp_vebox_ctx;
struct hw_context *vpp_fmt_cvt_ctx;
- struct vpp_gpe_context *vpp_gpe_ctx;
VAProcPipelineParameterBuffer* pipeline_param;
return va_status;
}
+static VAStatus
+vpp_sharpness_filtering(VADriverContextP ctx,
+ struct intel_vebox_context *proc_ctx)
+{
+ VAStatus va_status = VA_STATUS_SUCCESS;
+
+ if(proc_ctx->vpp_gpe_ctx == NULL){
+ proc_ctx->vpp_gpe_ctx = vpp_gpe_context_init(ctx);
+ }
+
+ proc_ctx->vpp_gpe_ctx->pipeline_param = proc_ctx->pipeline_param;
+ proc_ctx->vpp_gpe_ctx->surface_pipeline_input_object = proc_ctx->frame_store[FRAME_IN_CURRENT].obj_surface;
+ proc_ctx->vpp_gpe_ctx->surface_output_object = proc_ctx->frame_store[FRAME_OUT_CURRENT].obj_surface;
+
+ va_status = vpp_gpe_process_picture(ctx, proc_ctx->vpp_gpe_ctx);
+
+ return va_status;
+}
+
void hsw_veb_dndi_table(VADriverContextP ctx, struct intel_vebox_context *proc_ctx)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
proc_ctx->filters_mask |= VPP_IECP_STD_STE;
proc_ctx->filter_iecp_std = filter;
break;
+ case VAProcFilterSharpening:
+ proc_ctx->filters_mask |= VPP_SHARP;
+ break;
default:
WARN_ONCE("unsupported filter (type: %d)\n", filter->type);
return VA_STATUS_ERROR_UNSUPPORTED_FILTER;
if (status != VA_STATUS_SUCCESS)
return status;
- if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
+ if (proc_ctx->filters_mask & VPP_SHARP_MASK) {
+ vpp_sharpness_filtering(ctx, proc_ctx);
+ } else if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
assert(proc_ctx->is_second_field);
/* directly copy the saved frame in the second call */
} else {
{
int i;
+ if(proc_ctx->vpp_gpe_ctx){
+ vpp_gpe_context_destroy(ctx,proc_ctx->vpp_gpe_ctx);
+ proc_ctx->vpp_gpe_ctx = NULL;
+ }
+
if(proc_ctx->surface_input_vebox != VA_INVALID_ID){
i965_DestroySurfaces(ctx, &proc_ctx->surface_input_vebox, 1);
proc_ctx->surface_input_vebox = VA_INVALID_ID;
proc_context->surface_output_scaled_object = NULL;
proc_context->filters_mask = 0;
proc_context->format_convert_flags = 0;
+ proc_context->vpp_gpe_ctx = NULL;
return proc_context;
}
if (status != VA_STATUS_SUCCESS)
return status;
- if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
+ if (proc_ctx->filters_mask & VPP_SHARP_MASK) {
+ vpp_sharpness_filtering(ctx, proc_ctx);
+ } else if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
assert(proc_ctx->is_second_field);
/* directly copy the saved frame in the second call */
} else {
if (status != VA_STATUS_SUCCESS)
return status;
- if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
+ if (proc_ctx->filters_mask & VPP_SHARP_MASK) {
+ vpp_sharpness_filtering(ctx, proc_ctx);
+ } else if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
assert(proc_ctx->is_second_field);
/* directly copy the saved frame in the second call */
} else {
#include "i965_drv_video.h"
#include "i965_post_processing.h"
+#include "gen75_vpp_gpe.h"
#define INPUT_SURFACE 0
#define OUTPUT_SURFACE 1
#define VPP_IECP_AOI 0x00002000
#define VPP_IECP_CSC_TRANSFORM 0x00004000
#define VPP_IECP_MASK 0x0000ff00
+#define VPP_SHARP 0x00010000
+#define VPP_SHARP_MASK 0x000f0000
#define MAX_FILTER_SUM 8
#define PRE_FORMAT_CONVERT 0x01
unsigned int is_di_adv_enabled : 1;
unsigned int is_first_frame : 1;
unsigned int is_second_field : 1;
+
+ struct vpp_gpe_context *vpp_gpe_ctx;
};
VAStatus gen75_vebox_process_picture(VADriverContextP ctx,