diff mbox

[FFmpeg-devel] libvpxenc: allow aq-mode 4 (equator360)

Message ID 20170414014450.176531-1-jzern@google.com
State Accepted
Headers show

Commit Message

James Zern April 14, 2017, 1:44 a.m. UTC
this was added in 1.6.0

Signed-off-by: James Zern <jzern@google.com>
---
 doc/encoders.texi      | 2 +-
 libavcodec/libvpxenc.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

James Zern April 20, 2017, 6:42 p.m. UTC | #1
On Thu, Apr 13, 2017 at 6:44 PM, James Zern <jzern@google.com> wrote:
> this was added in 1.6.0
>
> Signed-off-by: James Zern <jzern@google.com>
> ---
>  doc/encoders.texi      | 2 +-
>  libavcodec/libvpxenc.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>

I'll submit this soon if there aren't any comments.
Ronald S. Bultje April 20, 2017, 8:42 p.m. UTC | #2
Hi,

On Thu, Apr 20, 2017 at 2:42 PM, James Zern <jzern-at-google.com@ffmpeg.org>
wrote:

> On Thu, Apr 13, 2017 at 6:44 PM, James Zern <jzern@google.com> wrote:
> > this was added in 1.6.0
> >
> > Signed-off-by: James Zern <jzern@google.com>
> > ---
> >  doc/encoders.texi      | 2 +-
> >  libavcodec/libvpxenc.c | 3 ++-
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> >
>
> I'll submit this soon if there aren't any comments.


Looks good.

(I'm guessing it doesn't need an ABI version check because it's
automatically clipped internally if you specify aq-mode=4 to an earlier
version of the library?)

Ronald
James Zern April 20, 2017, 10:06 p.m. UTC | #3
On Thu, Apr 20, 2017 at 1:42 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Thu, Apr 20, 2017 at 2:42 PM, James Zern <jzern-at-google.com@ffmpeg.org>
> wrote:
>
>> On Thu, Apr 13, 2017 at 6:44 PM, James Zern <jzern@google.com> wrote:
>> > this was added in 1.6.0
>> >
>> > Signed-off-by: James Zern <jzern@google.com>
>> > ---
>> >  doc/encoders.texi      | 2 +-
>> >  libavcodec/libvpxenc.c | 3 ++-
>> >  2 files changed, 3 insertions(+), 2 deletions(-)
>> >
>>
>> I'll submit this soon if there aren't any comments.
>
>
> Looks good.
>
> (I'm guessing it doesn't need an ABI version check because it's
> automatically clipped internally if you specify aq-mode=4 to an earlier
> version of the library?)
>

Older libs will fail as it will exceed the range check. I debated an
abi check, but that only pushes the range failure up to this level if
we constrain the range.
James Zern April 29, 2017, 1 a.m. UTC | #4
On Thu, Apr 20, 2017 at 3:06 PM, James Zern <jzern@google.com> wrote:
> On Thu, Apr 20, 2017 at 1:42 PM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
>> Hi,
>>
>> On Thu, Apr 20, 2017 at 2:42 PM, James Zern <jzern-at-google.com@ffmpeg.org>
>> wrote:
>>
>>> On Thu, Apr 13, 2017 at 6:44 PM, James Zern <jzern@google.com> wrote:
>>> > this was added in 1.6.0
>>> >
>>> > Signed-off-by: James Zern <jzern@google.com>
>>> > ---
>>> >  doc/encoders.texi      | 2 +-
>>> >  libavcodec/libvpxenc.c | 3 ++-
>>> >  2 files changed, 3 insertions(+), 2 deletions(-)
>>> >
>>>
>>> I'll submit this soon if there aren't any comments.
>>
>>
>> Looks good.
>>
>> (I'm guessing it doesn't need an ABI version check because it's
>> automatically clipped internally if you specify aq-mode=4 to an earlier
>> version of the library?)
>>
>
> Older libs will fail as it will exceed the range check. I debated an
> abi check, but that only pushes the range failure up to this level if
> we constrain the range.

Pushed with an abi check since control failures are non-fatal as
opposed to the range check in libvpxenc.
diff mbox

Patch

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 594c612b5a..f8f187664c 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1666,7 +1666,7 @@  option to 2.
 Enable frame parallel decodability features.
 @item aq-mode
 Set adaptive quantization mode (0: off (default), 1: variance 2: complexity, 3:
-cyclic refresh).
+cyclic refresh, 4: equator360).
 @item colorspace @emph{color-space}
 Set input color space. The VP9 bitstream supports signaling the following
 colorspaces:
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index b8e8d3a87b..4ae0918c69 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1142,11 +1142,12 @@  static const AVOption vp9_options[] = {
     { "tile-columns",    "Number of tile columns to use, log2",         OFFSET(tile_columns),    AV_OPT_TYPE_INT, {.i64 = -1}, -1, 6, VE},
     { "tile-rows",       "Number of tile rows to use, log2",            OFFSET(tile_rows),       AV_OPT_TYPE_INT, {.i64 = -1}, -1, 2, VE},
     { "frame-parallel",  "Enable frame parallel decodability features", OFFSET(frame_parallel),  AV_OPT_TYPE_BOOL,{.i64 = -1}, -1, 1, VE},
-    { "aq-mode",         "adaptive quantization mode",                  OFFSET(aq_mode),         AV_OPT_TYPE_INT, {.i64 = -1}, -1, 3, VE, "aq_mode"},
+    { "aq-mode",         "adaptive quantization mode",                  OFFSET(aq_mode),         AV_OPT_TYPE_INT, {.i64 = -1}, -1, 4, VE, "aq_mode"},
     { "none",            "Aq not used",         0, AV_OPT_TYPE_CONST, {.i64 = 0}, 0, 0, VE, "aq_mode" },
     { "variance",        "Variance based Aq",   0, AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 0, VE, "aq_mode" },
     { "complexity",      "Complexity based Aq", 0, AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 0, VE, "aq_mode" },
     { "cyclic",          "Cyclic Refresh Aq",   0, AV_OPT_TYPE_CONST, {.i64 = 3}, 0, 0, VE, "aq_mode" },
+    { "equator360",      "360 video Aq",        0, AV_OPT_TYPE_CONST, {.i64 = 4}, 0, 0, VE, "aq_mode" },
 #if VPX_ENCODER_ABI_VERSION >= 12
     {"level", "Specify level", OFFSET(level), AV_OPT_TYPE_FLOAT, {.dbl=-1}, -1, 6.2, VE},
 #endif