OSDN Git Service

HEVC10bit ENC: work around gpu hang when p010->nv12
[android-x86/hardware-intel-common-vaapi.git] / src / i965_drv_video.h
index 47e27d0..77e32d8 100644 (file)
@@ -73,6 +73,8 @@
 #define ENCODER_HIGH_QUALITY      ENCODER_DEFAULT_QUALITY
 #define ENCODER_LOW_QUALITY       2
 
+#define I965_MAX_NUM_ROI_REGIONS                     8
+
 #define ENCODER_LP_QUALITY_RANGE  8
 
 struct i965_surface
@@ -143,15 +145,9 @@ struct decode_state
 struct encode_state
 {
     struct codec_state_base base;
-    struct buffer_store *seq_param;
-    struct buffer_store *pic_param;
-    struct buffer_store *pic_control;
     struct buffer_store *iq_matrix;
     struct buffer_store *q_matrix;
-    struct buffer_store **slice_params;
     struct buffer_store *huffman_table;
-    int max_slice_params;
-    int num_slice_params;
 
     /* for ext */
     struct buffer_store *seq_param_ext;
@@ -295,6 +291,9 @@ struct object_surface
     uint32_t user_disable_tiling : 1;
     uint32_t user_h_stride_set   : 1;
     uint32_t user_v_stride_set   : 1;
+    /* we need clear right and bottom border for NV12.
+     * to avoid encode run to run issue*/
+    uint32_t border_cleared      : 1;
 
     VAGenericID wrapper_surface;
 
@@ -405,6 +404,7 @@ struct hw_codec_info
     unsigned int has_h264_mvc_encoding:1;
     unsigned int has_hevc_decoding:1;
     unsigned int has_hevc_encoding:1;
+    unsigned int has_hevc10_encoding:1;
     unsigned int has_hevc10_decoding:1;
     unsigned int has_vp9_decoding:1;
     unsigned int has_vpp_p010:1;
@@ -553,6 +553,8 @@ extern VAStatus i965_CreateSurfaces(VADriverContextP ctx,
                     int format,
                     int num_surfaces,
                     VASurfaceID *surfaces);
+extern VAStatus i965_SyncSurface(VADriverContextP ctx,
+                    VASurfaceID render_target);
 
 #define I965_SURFACE_MEM_NATIVE             0
 #define I965_SURFACE_MEM_GEM_FLINK          1