OSDN Git Service

implement intensity compensation for VC-1 decoding
[android-x86/hardware-intel-common-vaapi.git] / src / gen75_vpp_gpe.h
index 5232214..613c996 100644 (file)
 
 #define MAX_SURF_IN_SUM 5
 
-enum VPP_GPE_TYPE{
-   VPP_GPE_SHARPENING,
-   VPP_GPE_BLENDING,
-   VPP_GPE_SCENE_CHANGE_DETECTION,
-   VPP_GPE_FILTER_SUM,
+enum VPP_GPE_TYPE {
+    VPP_GPE_SHARPENING,
+    VPP_GPE_BLENDING,
+    VPP_GPE_SCENE_CHANGE_DETECTION,
+    VPP_GPE_FILTER_SUM,
 };
 
-typedef struct _KernelParameterBase{
-   unsigned short pic_width;
-   unsigned short pic_height;
-}KernelParameterBase;
-
-typedef struct _KernelParameterSharpening{
-   KernelParameterBase base;
-}KernelParameterSharpening;
-
-typedef struct _ThreadParameterBase{
-  unsigned int pic_width;
-  unsigned int pic_height;
-  unsigned int v_pos;
-  unsigned int h_pos;
-}ThreadParameterBase;
-
-typedef struct _ThreadParameterSharpenig{
-   ThreadParameterBase base;
-   unsigned int l_amount;
-   unsigned int d_amount;
-}ThreadParameterSharpening;
-
-struct vpp_gpe_context{
+typedef struct _KernelParameterBase {
+    unsigned short pic_width;
+    unsigned short pic_height;
+} KernelParameterBase;
+
+typedef struct _KernelParameterSharpening {
+    KernelParameterBase base;
+} KernelParameterSharpening;
+
+typedef struct _ThreadParameterBase {
+    unsigned int pic_width;
+    unsigned int pic_height;
+    unsigned int v_pos;
+    unsigned int h_pos;
+} ThreadParameterBase;
+
+typedef struct _ThreadParameterSharpenig {
+    ThreadParameterBase base;
+    unsigned int l_amount;
+    unsigned int d_amount;
+} ThreadParameterSharpening;
+
+struct vpp_gpe_context {
     struct intel_batchbuffer *batch;
     struct i965_gpe_context gpe_ctx;
     struct i965_buffer_surface vpp_batchbuffer;
@@ -76,10 +76,11 @@ struct vpp_gpe_context{
     enum VPP_GPE_TYPE filter_type;
     unsigned int sub_shader_index;
     unsigned int sub_shader_sum;
-  
-    unsigned char * kernel_param;  
+
+    unsigned char * kernel_param;
     unsigned int kernel_param_size;
-    unsigned char * thread_param;  
+
+    unsigned char * thread_param;
     unsigned int thread_param_size;
     unsigned int thread_num;
 
@@ -91,46 +92,30 @@ struct vpp_gpe_context{
     unsigned  int forward_surf_sum;
     unsigned  int backward_surf_sum;
 
-    unsigned int x_step;
-    unsigned int y_step;
-  
     unsigned int in_frame_w;
     unsigned int in_frame_h;
     unsigned int is_first_frame;
 
-    void (*vpp_surface2_setup)(VADriverContextP ctx,
-                               struct i965_gpe_context *gpe_context,
-                               struct object_surface *obj_surface,
-                               unsigned long binding_table_offset,
-                               unsigned long surface_state_offset);
-       
-    void (*vpp_media_rw_surface_setup)(VADriverContextP ctx,
-                                       struct i965_gpe_context *gpe_context,
-                                       struct object_surface *obj_surface,
-                                       unsigned long binding_table_offset,
-                                       unsigned long surface_state_offset);
-       
-    void (*vpp_buffer_surface_setup)(VADriverContextP ctx,
-                                    struct i965_gpe_context *gpe_context,
-                                    struct i965_buffer_surface *buffer_surface,
-                                    unsigned long binding_table_offset,
-                                    unsigned long surface_state_offset);
-
-   void (*vpp_media_chroma_surface_setup)(VADriverContextP ctx,
-                                         struct i965_gpe_context *gpe_context,
-                                         struct object_surface *obj_surface,
-                                         unsigned long binding_table_offset,
-                                         unsigned long surface_state_offset);
+    void (*gpe_context_init)(VADriverContextP ctx,
+                             struct i965_gpe_context *gpe_context);
+
+    void (*gpe_context_destroy)(struct i965_gpe_context *gpe_context);
+
+    void (*gpe_load_kernels)(VADriverContextP ctx,
+                             struct i965_gpe_context *gpe_context,
+                             struct i965_kernel *kernel_list,
+                             unsigned int num_kernels);
+
 };
 
 struct vpp_gpe_context *
-gen75_gpe_context_init(VADriverContextP ctx); 
+vpp_gpe_context_init(VADriverContextP ctx);
 
-void 
-gen75_gpe_context_destroy(VADriverContextP ctx, 
-                          struct vpp_gpe_context* vpp_context);
+void
+vpp_gpe_context_destroy(VADriverContextP ctx,
+                        struct vpp_gpe_context* vpp_context);
 
 VAStatus
-gen75_gpe_process_picture(VADriverContextP ctx, 
-                    struct vpp_gpe_context * vpp_context); 
+vpp_gpe_process_picture(VADriverContextP ctx,
+                        struct vpp_gpe_context * vpp_context);
 #endif