From patchwork Thu Jul 2 17:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zern X-Patchwork-Id: 20785 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id A53E644A91D for ; Thu, 2 Jul 2020 20:28:38 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7D4B26891E2; Thu, 2 Jul 2020 20:28:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C79B6891E2 for ; Thu, 2 Jul 2020 20:28:32 +0300 (EEST) Received: by mail-pg1-f202.google.com with SMTP id v24so21159305pgl.5 for ; Thu, 02 Jul 2020 10:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to; bh=yl/mp7gJYa29DSHHa2UTxR6lrRp+606JotM9Px5gKuI=; b=k43y6O7MOLV/iFeDySb6910/iW4/3HyVyhuHZqOqJKbvPftLReSiEudTkvT8Rm8DFr WOjCi6MC/B84uT5FWvzQS+9H2we6kJDona14yiZynIuOcAonJ9SBkGpLv+b0lqNRVjIa pX/vbGZoFb+Je5n43HI3uFQ6mq21DdPpTnK1WUUQasxMehFbufQSJBUsnq+tZNf68kd9 8Jo2sUSPxKIeXgyKa2kHZww10hnL0VHhgQbetgxV4YZeeGJdKkwS2SDvjn6tNLT3nD0G uDIfqgePXMizZknzF6GjikSny6FUoEdq64KTToIcEkq/ylAt/gHSZjOuDmUcPKj82fW3 8xsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to; bh=yl/mp7gJYa29DSHHa2UTxR6lrRp+606JotM9Px5gKuI=; b=C6BRBdXkzyhEUbOcrIhg+NywImCU6NvhuBUtkVWSJF9sDtj2pK+Cv7h7b1iREbM24N jJL6JMNwsCe1fVoHzuMXEGfE5OAcx4bVjwBwwA18y4RDOH/c/dsgh7nWkd707UUS7djK VoksXQeA5Ti03a8YSW79KEktpriS+ZBvC8xNMsrEsDSi91MxsmfDPANbAENrdnedKonk z4KgUDnPm85bnVvnXgr+5Wkzn/nx42f0DYPBNYE4J+e/yOgYjcd2pTZfBH1uaTVVOH6V +9onKCoLLSantTZbp3U+37HNy7MiN6oPXyjjBhItv2SqSySrtof62rQonqY+77ZopxT8 6CoQ== X-Gm-Message-State: AOAM531afsvOhyPZ7hBsUGlQUQCqvnipm9Sx7lZgLlhA+/GL70mnfbQG 1djeE84feZbuoWQps5T7v0K36Jly/nRm6XVBL4Z5scRqz+zcEEcytvOlzwPTtsM7C1I7fBe75px C1WRjBhDBKHnuIn/XI7tWJBETxwDqeI8cl/wKgt0KJZ/js9cmc8q9m6JWvNbG X-Google-Smtp-Source: ABdhPJwdvw+Nc50dTpd5WH5PdC6FhLqbpqiN0shVehBfqs+PRyGArP6zGogiBQFRRTq9+df7FFRXg7FHvg== X-Received: by 2002:aa7:91d3:: with SMTP id z19mr18627590pfa.119.1593710909963; Thu, 02 Jul 2020 10:28:29 -0700 (PDT) Date: Thu, 2 Jul 2020 10:28:28 -0700 In-Reply-To: Message-Id: <20200702172828.3857431-1-jzern@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.27.0.212.ge8ba1cc988-goog From: James Zern To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avcodec/libaomenc: fix build w/libaom v1.0.0 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" broken since: aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools Signed-off-by: James Zern --- doc/encoders.texi | 20 ++++++++++---------- libavcodec/libaomenc.c | 4 ++++ 2 files changed, 14 insertions(+), 10 deletions(-) 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)