diff mbox series

[FFmpeg-devel,1/6] vaapi_encode_h265: Remove confusing and redundant tile options

Message ID 20200728225025.1830283-1-sw@jkqxz.net
State Accepted
Commit e80fe329435d08f13a4b506c1af06359a31267f9
Headers show
Series [FFmpeg-devel,1/6] vaapi_encode_h265: Remove confusing and redundant tile options
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Mark Thompson July 28, 2020, 10:50 p.m. UTC
The tile_rows/cols options currently do a confusingly different thing to
the options of the same name on other encoders like libvpx and libaom.
There is no backward-compatibility reason to implement the log2 behaviour
as there was for libaom, so just get rid of them entirely.
---
 doc/encoders.texi              | 8 --------
 libavcodec/vaapi_encode_h265.c | 4 ----
 2 files changed, 12 deletions(-)

Comments

Fu, Linjie July 29, 2020, 6:08 a.m. UTC | #1
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Mark Thompson
> Sent: Wednesday, July 29, 2020 06:50
> To: ffmpeg-devel@ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH 1/6] vaapi_encode_h265: Remove
> confusing and redundant tile options
> 
> The tile_rows/cols options currently do a confusingly different thing to
> the options of the same name on other encoders like libvpx and libaom.
> There is no backward-compatibility reason to implement the log2 behaviour
> as there was for libaom, so just get rid of them entirely.

Ok, previously I'm following the implementation in librav1e [1] which uses a non-log2
value as the input of "tile-rows" and "tile-columns".
(Do we need to make it consistent as well?)

[1] https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/librav1e.c#L567

- Linjie
Mark Thompson July 30, 2020, 10:22 p.m. UTC | #2
On 29/07/2020 07:08, Fu, Linjie wrote:
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Mark Thompson
>> Sent: Wednesday, July 29, 2020 06:50
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: [FFmpeg-devel] [PATCH 1/6] vaapi_encode_h265: Remove
>> confusing and redundant tile options
>>
>> The tile_rows/cols options currently do a confusingly different thing to
>> the options of the same name on other encoders like libvpx and libaom.
>> There is no backward-compatibility reason to implement the log2 behaviour
>> as there was for libaom, so just get rid of them entirely.
> 
> Ok, previously I'm following the implementation in librav1e [1] which uses a non-log2
> value as the input of "tile-rows" and "tile-columns".
> (Do we need to make it consistent as well?)
> 
> [1] https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/librav1e.c#L567

Yeah, that seems bad.  I sent a patch to fix it.

Thanks,

- Mark
diff mbox series

Patch

diff --git a/doc/encoders.texi b/doc/encoders.texi
index ed8ef63784..c837e9455a 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3206,14 +3206,6 @@  Set the number of tiles to encode the input video with, as rows x columns.
 Larger numbers allow greater parallelism in both encoding and decoding, but
 may decrease coding efficiency.
 
-@item tile_rows
-Selects how many rows of tiles to encode with. For example, 4 tile rows would
-be requested by setting the tile_rows option to 4.
-
-@item tile_cols
-Selects how many columns of tiles to encode with. For example, 5 tile columns
-would be requested by setting the tile_cols option to 5.
-
 @end table
 
 @item mjpeg_vaapi
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index f6008778df..511218f659 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -1291,10 +1291,6 @@  static const AVOption vaapi_encode_h265_options[] = {
 
     { "tiles", "Tile rows x cols",
       OFFSET(trows), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, FLAGS },
-    { "tile_rows", "Number of rows for tile encoding",
-      OFFSET(trows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
-    { "tile_cols", "Number of cols for tile encoding",
-      OFFSET(tcols), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
 
     { NULL },
 };