diff mbox series

[FFmpeg-devel] avcodec/libaomenc: fix build w/libaom v1.0.0

Message ID 20200702172828.3857431-1-jzern@google.com
State Accepted
Commit d294716c22c827d889dde235a8e9fcd4dd6466c9
Headers show
Series [FFmpeg-devel] avcodec/libaomenc: fix build w/libaom v1.0.0 | expand

Checks

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

Commit Message

James Zern July 2, 2020, 5:28 p.m. UTC
broken since:
aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools

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

Comments

James Zern July 6, 2020, 5:50 p.m. UTC | #1
James,

On Thu, Jul 2, 2020 at 10:28 AM James Zern <jzern@google.com> wrote:
>
> broken since:
> aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools
>
> Signed-off-by: James Zern <jzern@google.com>
> ---
>  doc/encoders.texi      | 20 ++++++++++----------
>  libavcodec/libaomenc.c |  4 ++++
>  2 files changed, 14 insertions(+), 10 deletions(-)
>

I think this addresses the comments from the first patch. I'll submit
this in the next day or so if there aren't any more comments.

> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index beaa72eeaf..5406d20c00 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -1599,34 +1599,34 @@ Enable the use of global motion for block prediction. Default is true.
>  Enable block copy mode for intra block prediction. This mode is
>  useful for screen content. Default is true.
>
> -@item enable-rect-partitions (@emph{boolean})
> +@item enable-rect-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable rectangular partitions. Default is true.
>
> -@item enable-1to4-partitions (@emph{boolean})
> +@item enable-1to4-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable 1:4/4:1 partitions. Default is true.
>
> -@item enable-ab-partitions (@emph{boolean})
> +@item enable-ab-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable AB shape partitions. Default is true.
>
> -@item enable-angle-delta (@emph{boolean})
> +@item enable-angle-delta (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable angle delta intra prediction. Default is true.
>
> -@item enable-cfl-intra (@emph{boolean})
> +@item enable-cfl-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable chroma predicted from luma intra prediction. Default is true.
>
> -@item enable-filter-intra (@emph{boolean})
> +@item enable-filter-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable filter intra predictor. Default is true.
>
> -@item enable-intra-edge-filter (@emph{boolean})
> +@item enable-intra-edge-filter (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable intra edge filter. Default is true.
>
> -@item enable-smooth-intra (@emph{boolean})
> +@item enable-smooth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable smooth intra prediction mode. Default is true.
>
> -@item enable-paeth-intra (@emph{boolean})
> +@item enable-paeth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable paeth predictor in intra prediction. Default is true.
>
> -@item enable-palette (@emph{boolean})
> +@item enable-palette (@emph{boolean}) (Requires libaom >= v2.0.0)
>  Enable palette prediction mode. Default is true.
>
>  @end table
> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index cb6558476c..2ecb3de3a7 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -145,6 +145,7 @@ static const char *const ctlidstr[] = {
>  #endif
>      [AV1E_SET_ENABLE_CDEF]      = "AV1E_SET_ENABLE_CDEF",
>      [AOME_SET_TUNING]           = "AOME_SET_TUNING",
> +#if AOM_ENCODER_ABI_VERSION >= 22
>      [AV1E_SET_ENABLE_1TO4_PARTITIONS] = "AV1E_SET_ENABLE_1TO4_PARTITIONS",
>      [AV1E_SET_ENABLE_AB_PARTITIONS]   = "AV1E_SET_ENABLE_AB_PARTITIONS",
>      [AV1E_SET_ENABLE_RECT_PARTITIONS] = "AV1E_SET_ENABLE_RECT_PARTITIONS",
> @@ -155,6 +156,7 @@ static const char *const ctlidstr[] = {
>      [AV1E_SET_ENABLE_PAETH_INTRA]       = "AV1E_SET_ENABLE_PAETH_INTRA",
>      [AV1E_SET_ENABLE_SMOOTH_INTRA]      = "AV1E_SET_ENABLE_SMOOTH_INTRA",
>      [AV1E_SET_ENABLE_PALETTE]           = "AV1E_SET_ENABLE_PALETTE",
> +#endif
>  };
>
>  static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
> @@ -718,6 +720,7 @@ static av_cold int aom_init(AVCodecContext *avctx,
>          codecctl_int(avctx, AV1E_SET_ENABLE_CDEF, ctx->enable_cdef);
>      if (ctx->enable_restoration >= 0)
>          codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, ctx->enable_restoration);
> +#if AOM_ENCODER_ABI_VERSION >= 22
>      if (ctx->enable_rect_partitions >= 0)
>          codecctl_int(avctx, AV1E_SET_ENABLE_RECT_PARTITIONS, ctx->enable_rect_partitions);
>      if (ctx->enable_1to4_partitions >= 0)
> @@ -738,6 +741,7 @@ static av_cold int aom_init(AVCodecContext *avctx,
>          codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTRA, ctx->enable_smooth_intra);
>      if (ctx->enable_palette >= 0)
>          codecctl_int(avctx, AV1E_SET_ENABLE_PALETTE, ctx->enable_palette);
> +#endif
>
>      codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
>      if (ctx->crf >= 0)
> --
> 2.27.0.212.ge8ba1cc988-goog
>
James Zern July 8, 2020, 5:18 p.m. UTC | #2
On Mon, Jul 6, 2020 at 10:50 AM James Zern <jzern@google.com> wrote:
>
> James,
>
> On Thu, Jul 2, 2020 at 10:28 AM James Zern <jzern@google.com> wrote:
> >
> > broken since:
> > aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools
> >
> > Signed-off-by: James Zern <jzern@google.com>
> > ---
> >  doc/encoders.texi      | 20 ++++++++++----------
> >  libavcodec/libaomenc.c |  4 ++++
> >  2 files changed, 14 insertions(+), 10 deletions(-)
> >
>
> I think this addresses the comments from the first patch. I'll submit
> this in the next day or so if there aren't any more comments.
>

pushed
diff mbox series

Patch

diff --git a/doc/encoders.texi b/doc/encoders.texi
index beaa72eeaf..5406d20c00 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1599,34 +1599,34 @@  Enable the use of global motion for block prediction. Default is true.
 Enable block copy mode for intra block prediction. This mode is
 useful for screen content. Default is true.
 
-@item enable-rect-partitions (@emph{boolean})
+@item enable-rect-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable rectangular partitions. Default is true.
 
-@item enable-1to4-partitions (@emph{boolean})
+@item enable-1to4-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable 1:4/4:1 partitions. Default is true.
 
-@item enable-ab-partitions (@emph{boolean})
+@item enable-ab-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable AB shape partitions. Default is true.
 
-@item enable-angle-delta (@emph{boolean})
+@item enable-angle-delta (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable angle delta intra prediction. Default is true.
 
-@item enable-cfl-intra (@emph{boolean})
+@item enable-cfl-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable chroma predicted from luma intra prediction. Default is true.
 
-@item enable-filter-intra (@emph{boolean})
+@item enable-filter-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable filter intra predictor. Default is true.
 
-@item enable-intra-edge-filter (@emph{boolean})
+@item enable-intra-edge-filter (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable intra edge filter. Default is true.
 
-@item enable-smooth-intra (@emph{boolean})
+@item enable-smooth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable smooth intra prediction mode. Default is true.
 
-@item enable-paeth-intra (@emph{boolean})
+@item enable-paeth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable paeth predictor in intra prediction. Default is true.
 
-@item enable-palette (@emph{boolean})
+@item enable-palette (@emph{boolean}) (Requires libaom >= v2.0.0)
 Enable palette prediction mode. Default is true.
 
 @end table
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index cb6558476c..2ecb3de3a7 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -145,6 +145,7 @@  static const char *const ctlidstr[] = {
 #endif
     [AV1E_SET_ENABLE_CDEF]      = "AV1E_SET_ENABLE_CDEF",
     [AOME_SET_TUNING]           = "AOME_SET_TUNING",
+#if AOM_ENCODER_ABI_VERSION >= 22
     [AV1E_SET_ENABLE_1TO4_PARTITIONS] = "AV1E_SET_ENABLE_1TO4_PARTITIONS",
     [AV1E_SET_ENABLE_AB_PARTITIONS]   = "AV1E_SET_ENABLE_AB_PARTITIONS",
     [AV1E_SET_ENABLE_RECT_PARTITIONS] = "AV1E_SET_ENABLE_RECT_PARTITIONS",
@@ -155,6 +156,7 @@  static const char *const ctlidstr[] = {
     [AV1E_SET_ENABLE_PAETH_INTRA]       = "AV1E_SET_ENABLE_PAETH_INTRA",
     [AV1E_SET_ENABLE_SMOOTH_INTRA]      = "AV1E_SET_ENABLE_SMOOTH_INTRA",
     [AV1E_SET_ENABLE_PALETTE]           = "AV1E_SET_ENABLE_PALETTE",
+#endif
 };
 
 static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
@@ -718,6 +720,7 @@  static av_cold int aom_init(AVCodecContext *avctx,
         codecctl_int(avctx, AV1E_SET_ENABLE_CDEF, ctx->enable_cdef);
     if (ctx->enable_restoration >= 0)
         codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, ctx->enable_restoration);
+#if AOM_ENCODER_ABI_VERSION >= 22
     if (ctx->enable_rect_partitions >= 0)
         codecctl_int(avctx, AV1E_SET_ENABLE_RECT_PARTITIONS, ctx->enable_rect_partitions);
     if (ctx->enable_1to4_partitions >= 0)
@@ -738,6 +741,7 @@  static av_cold int aom_init(AVCodecContext *avctx,
         codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTRA, ctx->enable_smooth_intra);
     if (ctx->enable_palette >= 0)
         codecctl_int(avctx, AV1E_SET_ENABLE_PALETTE, ctx->enable_palette);
+#endif
 
     codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
     if (ctx->crf >= 0)