]> git.sesse.net Git - ffmpeg/commitdiff
vaapi_encode_h265: Fix ordering of tile dimensions
authorMark Thompson <sw@jkqxz.net>
Tue, 28 Jul 2020 22:50:21 +0000 (23:50 +0100)
committerMark Thompson <sw@jkqxz.net>
Sat, 1 Aug 2020 16:39:13 +0000 (17:39 +0100)
Dimensions are normally specified as width x height, and this will match
the same option to libaom-av1.

Remove the indirection through the private context at the same time.

doc/encoders.texi
libavcodec/vaapi_encode.h
libavcodec/vaapi_encode_h265.c

index 78b3be960527f1256cae7379f03602349a8bada9..de0472e2258cec6b16455d1332c851417267a119 100644 (file)
@@ -3264,7 +3264,7 @@ messages).
 @end table
 
 @item tiles
-Set the number of tiles to encode the input video with, as rows x columns.
+Set the number of tiles to encode the input video with, as columns x rows.
 Larger numbers allow greater parallelism in both encoding and decoding, but
 may decrease coding efficiency.
 
index 6487a9960493bfa00bec88f8f071064fc41b380f..2d71eb0199f8dd2638d8e5a558df8eb6a784f16c 100644 (file)
@@ -307,8 +307,8 @@ typedef struct VAAPIEncodeContext {
     int slice_size;
 
     // Tile encoding.
-    int tile_rows;
     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.
index 511218f659555128804e9e85e96b3f85e6da44ad..04bd2bef1de0f3c55cfe62ce9e7aff4fb56dcc83 100644 (file)
@@ -63,9 +63,6 @@ typedef struct VAAPIEncodeH265Context {
     int level;
     int sei;
 
-    int trows;
-    int tcols;
-
     // Derived settings.
     int fixed_qp_idr;
     int fixed_qp_p;
@@ -1208,11 +1205,6 @@ static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx)
     if (priv->qp > 0)
         ctx->explicit_qp = priv->qp;
 
-    if (priv->trows && priv->tcols) {
-        ctx->tile_rows = priv->trows;
-        ctx->tile_cols = priv->tcols;
-    }
-
     return ff_vaapi_encode_init(avctx);
 }
 
@@ -1289,8 +1281,9 @@ static const AVOption vaapi_encode_h265_options[] = {
       { .i64 = SEI_MASTERING_DISPLAY | SEI_CONTENT_LIGHT_LEVEL },
       INT_MIN, INT_MAX, FLAGS, "sei" },
 
-    { "tiles", "Tile rows x cols",
-      OFFSET(trows), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, FLAGS },
+    { "tiles", "Tile columns x rows",
+      OFFSET(common.tile_cols), AV_OPT_TYPE_IMAGE_SIZE,
+      { .str = NULL }, 0, 0, FLAGS },
 
     { NULL },
 };