diff mbox

[FFmpeg-devel] avcodec/libaomenc: correct range for cpu-used

Message ID 14d5966c-4681-b779-4564-67801ea7a4de@gmail.com
State Accepted
Commit 076b19660e7c9466d2d78ff9ae66b97ff2b6aa1e
Headers show

Commit Message

Gyan Aug. 5, 2018, 6:09 a.m. UTC
Don't know if micro bump is needed.
From 4078eb3627999632234eb84cb132ddc4c7c96583 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@gyani.pro>
Date: Sun, 5 Aug 2018 11:33:45 +0530
Subject: [PATCH] avcodec/libaomenc: correct range for cpu-used

Valid range is [0,8] as stated in aom.git:aom/aomcx.h

Fixes #7343
---
 libavcodec/libaomenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carl Eugen Hoyos Aug. 5, 2018, 8:19 a.m. UTC | #1
> Am 05.08.2018 um 08:09 schrieb Gyan Doshi <gyandoshi@gmail.com>:
> 
> Don't know if micro bump is needed.

You may (should) always bump micro when the behaviour changes, if this counts as a change is up to you (the options you remove didn’t work before afaiu).

Carl Eugen
Gyan Aug. 5, 2018, 8:42 a.m. UTC | #2
On 05-08-2018 01:49 PM, Carl Eugen Hoyos wrote:
> 
> 
> 
>> Am 05.08.2018 um 08:09 schrieb Gyan Doshi <gyandoshi@gmail.com>:
>>
>> Don't know if micro bump is needed.
> 
> You may (should) always bump micro when the behaviour changes, if this counts as a change is up to you (the options you remove didn’t work before afaiu).

At present, with an invalid value, aom uses the default value of 0 and 
prints that warning. Also, the encoder is still experimental, so don't 
think a bump is required.

Will push soon, if nothing else.

Thanks,
Gyan
Gyan Aug. 6, 2018, 4:51 a.m. UTC | #3
On 05-08-2018 02:12 PM, Gyan Doshi wrote:
> 
> Will push soon, if nothing else.

Pushed as 076b19660e7c9466d2d78ff9ae66b97ff2b6aa1e

Gyan
diff mbox

Patch

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 0b75dc139c..9431179886 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -731,7 +731,7 @@  static av_cold int av1_init(AVCodecContext *avctx)
 #define OFFSET(x) offsetof(AOMContext, x)
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
-    { "cpu-used",        "Quality/Speed ratio modifier",           OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1}, -8, 8, VE},
+    { "cpu-used",        "Quality/Speed ratio modifier",           OFFSET(cpu_used),        AV_OPT_TYPE_INT, {.i64 = 1}, 0, 8, VE},
     { "auto-alt-ref",    "Enable use of alternate reference "
                          "frames (2-pass only)",                   OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1},      -1,      2,       VE},
     { "lag-in-frames",   "Number of frames to look ahead at for "