]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vaapi_encode.h
avfilter/avfilter: Remove compatibility code for old filter options
[ffmpeg] / libavcodec / vaapi_encode.h
index 85d2a8f616f1a0c9f7e00b2a17d9df9706906931..b41604a883292c82416d071590259b29921a49b5 100644 (file)
@@ -43,9 +43,13 @@ enum {
     MAX_PICTURE_REFERENCES = 2,
     MAX_REORDER_DELAY      = 16,
     MAX_PARAM_BUFFER_SIZE  = 1024,
+    // A.4.1: table A.6 allows at most 22 tile rows for any level.
+    MAX_TILE_ROWS          = 22,
+    // A.4.1: table A.6 allows at most 20 tile columns for any level.
+    MAX_TILE_COLS          = 20,
 };
 
-extern const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[];
+extern const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[];
 
 enum {
     PICTURE_TYPE_IDR = 0,
@@ -60,7 +64,6 @@ typedef struct VAAPIEncodeSlice {
     int             row_size;
     int             block_start;
     int             block_size;
-    void           *priv_data;
     void           *codec_slice_params;
 } VAAPIEncodeSlice;
 
@@ -302,6 +305,18 @@ typedef struct VAAPIEncodeContext {
     int nb_slices;
     int slice_size;
 
+    // Tile encoding.
+    int tile_cols;
+    int tile_rows;
+    // Tile width of the i-th column.
+    int col_width[MAX_TILE_COLS];
+    // Tile height of i-th row.
+    int row_height[MAX_TILE_ROWS];
+    // Location of the i-th tile column boundary.
+    int col_bd[MAX_TILE_COLS + 1];
+    // Location of the i-th tile row boundary.
+    int row_bd[MAX_TILE_ROWS + 1];
+
     // Frame type decision.
     int gop_size;
     int closed_gop;