From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 261CA4A753 for ; Fri, 5 Apr 2024 17:16:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2BA3968D198; Fri, 5 Apr 2024 20:16:23 +0300 (EEST) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 33F8068CC49 for ; Fri, 5 Apr 2024 20:16:17 +0300 (EEST) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5ce6b5e3c4eso1547537a12.2 for ; Fri, 05 Apr 2024 10:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712337374; x=1712942174; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=LvbRdNljpLFU6/mYp+Xslt70LpF8QzowUP1PFeDdH0A=; b=ffvIWTFvxfeG9c0zeoGKzuN3FUgHdsbpCLZJYgSMbHBZDkKvhDj1s5conynLlHqEsP Yzc9pztym9lonGcrvQx311eg39H7MO/2nFAPQ3EQku21/Nuuv4tjHpt8t8b5gPUho2RD KXvr3RezIYfUBzxAVXPtDgKmF9RKG/FVYWG+fIIhdC1pkEiE99U8u7ptFsL4nA2wHCEh IhfY7CxEzoTfa2zrONHrcnYJo7G6FeXqFdJWcwjH8aZ6SGf7/n65w9fvK68tS4uJvkme EtEKnZJHBMA4jyOKw8r8NZRNwsPB+3mQ3NP8NzJVGGS0LF506MRgp163148OoSDvthLx f53g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712337374; x=1712942174; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LvbRdNljpLFU6/mYp+Xslt70LpF8QzowUP1PFeDdH0A=; b=qTTjF0DjDhap89yd8LzKHNM8m6xl6YdjZApp9DS2hGNViL7nJS9yJGCa2vf7NdbEYy GzC2D9n8EyQeIn08yNRuCCgP4Fl6jGLKZwYPxQ+AA1WKhVwATPPl1PN2pCeTB7uo8WJG 9HY7hSwbQoEbw/8nxWlXvYOWRCjK/hRIr91gZsQc0bd6dQXE2ueFkMSSWB45h+mHgLGn MM6yYFiFjPQCNKCXTxj9RsR5/LlldFnB/dc0/LJEvRuljt9ZbUo8mz5cLwYO/fcoNqka Jkoq+IGrsq8SVcwbWDoj3UOelI+ensNFvJBqHMmzJyzuQ1HObCulA5hagdFpY2VjL/Ye aG3A== X-Gm-Message-State: AOJu0YzCvv7xj/dPJQ+vQy5EYMtVJk+acFXIBVcZU00EMS24ARyhFxC+ xiZhteqKA/Zx1c7pqWdLysHBVMpeVNdGO40eze+D9qBIlTUYgBhxV19UEZ54 X-Google-Smtp-Source: AGHT+IFmUl4j5yOcL60nrzAa1iyxNkOaDxRhVMntd682sYdiAFTxTuKeKk5KwEELwSwBY00V64wIVQ== X-Received: by 2002:a17:90a:eb0d:b0:2a2:c559:b157 with SMTP id j13-20020a17090aeb0d00b002a2c559b157mr1966057pjz.8.1712337374337; Fri, 05 Apr 2024 10:16:14 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id y8-20020a17090a474800b002a0544b81d6sm1731713pjg.35.2024.04.05.10.16.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 10:16:13 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Apr 2024 14:16:21 -0300 Message-ID: <20240405171621.4320-1-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/libaomenc: bump the minimum required version to 2.0.0 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: v2.0.0 is already four years old and available on stable distro releases. With this we stop setting codec capabilities during static data initialization. Signed-off-by: James Almer --- configure | 2 +- libavcodec/libaomenc.c | 42 ------------------------------------------ 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/configure b/configure index 493fe3cffd..f511fbae49 100755 --- a/configure +++ b/configure @@ -6834,7 +6834,7 @@ enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gn enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; } enabled ladspa && require_headers "ladspa.h dlfcn.h" enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext -enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version +enabled libaom && require_pkg_config libaom "aom >= 2.0.0" aom/aom_codec.h aom_codec_version enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new || { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } || die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index d660afab4e..d2bdb622e0 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -155,27 +155,14 @@ static const char *const ctlidstr[] = { [AV1E_SET_TILE_COLUMNS] = "AV1E_SET_TILE_COLUMNS", [AV1E_SET_TILE_ROWS] = "AV1E_SET_TILE_ROWS", [AV1E_SET_ENABLE_RESTORATION] = "AV1E_SET_ENABLE_RESTORATION", -#ifdef AOM_CTRL_AV1E_SET_ROW_MT [AV1E_SET_ROW_MT] = "AV1E_SET_ROW_MT", -#endif -#ifdef AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL [AV1E_SET_DENOISE_NOISE_LEVEL] = "AV1E_SET_DENOISE_NOISE_LEVEL", -#endif -#ifdef AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE [AV1E_SET_DENOISE_BLOCK_SIZE] = "AV1E_SET_DENOISE_BLOCK_SIZE", -#endif -#ifdef AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES [AV1E_SET_MAX_REFERENCE_FRAMES] = "AV1E_SET_MAX_REFERENCE_FRAMES", -#endif -#ifdef AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION [AV1E_SET_ENABLE_GLOBAL_MOTION] = "AV1E_SET_ENABLE_GLOBAL_MOTION", -#endif -#ifdef AOM_CTRL_AV1E_SET_ENABLE_INTRABC [AV1E_SET_ENABLE_INTRABC] = "AV1E_SET_ENABLE_INTRABC", -#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", @@ -204,13 +191,10 @@ static const char *const ctlidstr[] = { [AV1E_SET_REDUCED_REFERENCE_SET] = "AV1E_SET_REDUCED_REFERENCE_SET", [AV1E_SET_ENABLE_SMOOTH_INTERINTRA] = "AV1E_SET_ENABLE_SMOOTH_INTERINTRA", [AV1E_SET_ENABLE_REF_FRAME_MVS] = "AV1E_SET_ENABLE_REF_FRAME_MVS", -#endif #ifdef AOM_CTRL_AV1E_GET_NUM_OPERATING_POINTS [AV1E_GET_NUM_OPERATING_POINTS] = "AV1E_GET_NUM_OPERATING_POINTS", #endif -#ifdef AOM_CTRL_AV1E_GET_SEQ_LEVEL_IDX [AV1E_GET_SEQ_LEVEL_IDX] = "AV1E_GET_SEQ_LEVEL_IDX", -#endif #ifdef AOM_CTRL_AV1E_GET_TARGET_SEQ_LEVEL_IDX [AV1E_GET_TARGET_SEQ_LEVEL_IDX] = "AV1E_GET_TARGET_SEQ_LEVEL_IDX", #endif @@ -691,12 +675,9 @@ static av_cold int aom_init(AVCodecContext *avctx, AOMContext *ctx = avctx->priv_data; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); struct aom_codec_enc_cfg enccfg = { 0 }; -#ifdef AOM_FRAME_IS_INTRAONLY aom_codec_flags_t flags = (avctx->flags & AV_CODEC_FLAG_PSNR) ? AOM_CODEC_USE_PSNR : 0; -#else aom_codec_flags_t flags = 0; -#endif AVCPBProperties *cpb_props; int res; aom_img_fmt_t img_fmt; @@ -886,7 +867,6 @@ 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) @@ -943,7 +923,6 @@ static av_cold int aom_init(AVCodecContext *avctx, codecctl_int(avctx, AV1E_SET_ENABLE_ONESIDED_COMP, ctx->enable_onesided_comp); if (ctx->enable_smooth_interintra >= 0) codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTERINTRA, ctx->enable_smooth_interintra); -#endif codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh); if (ctx->crf >= 0) @@ -972,31 +951,19 @@ static av_cold int aom_init(AVCodecContext *avctx, codecctl_int(avctx, AV1E_SET_TILE_ROWS, ctx->tile_rows_log2); } -#ifdef AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL if (ctx->denoise_noise_level >= 0) codecctl_int(avctx, AV1E_SET_DENOISE_NOISE_LEVEL, ctx->denoise_noise_level); -#endif -#ifdef AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE if (ctx->denoise_block_size >= 0) codecctl_int(avctx, AV1E_SET_DENOISE_BLOCK_SIZE, ctx->denoise_block_size); -#endif -#ifdef AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION if (ctx->enable_global_motion >= 0) codecctl_int(avctx, AV1E_SET_ENABLE_GLOBAL_MOTION, ctx->enable_global_motion); -#endif -#ifdef AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES if (avctx->refs >= 3) { codecctl_int(avctx, AV1E_SET_MAX_REFERENCE_FRAMES, avctx->refs); } -#endif -#ifdef AOM_CTRL_AV1E_SET_ROW_MT if (ctx->row_mt >= 0) codecctl_int(avctx, AV1E_SET_ROW_MT, ctx->row_mt); -#endif -#ifdef AOM_CTRL_AV1E_SET_ENABLE_INTRABC if (ctx->enable_intrabc >= 0) codecctl_int(avctx, AV1E_SET_ENABLE_INTRABC, ctx->enable_intrabc); -#endif #if AOM_ENCODER_ABI_VERSION >= 23 { @@ -1065,7 +1032,6 @@ static inline void cx_pktcpy(AOMContext *ctx, dst->flags = src->data.frame.flags; dst->sz = src->data.frame.sz; dst->buf = src->data.frame.buf; -#ifdef AOM_FRAME_IS_INTRAONLY dst->frame_number = ++ctx->frame_number; dst->have_sse = ctx->have_sse; if (ctx->have_sse) { @@ -1074,7 +1040,6 @@ static inline void cx_pktcpy(AOMContext *ctx, memcpy(dst->sse, ctx->sse, sizeof(dst->sse)); ctx->have_sse = 0; } -#endif } /** @@ -1101,7 +1066,6 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, if (!!(cx_frame->flags & AOM_FRAME_IS_KEY)) { pkt->flags |= AV_PKT_FLAG_KEY; -#ifdef AOM_FRAME_IS_INTRAONLY pict_type = AV_PICTURE_TYPE_I; } else if (cx_frame->flags & AOM_FRAME_IS_INTRAONLY) { pict_type = AV_PICTURE_TYPE_I; @@ -1118,7 +1082,6 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, avctx->error[i] += cx_frame->sse[i + 1]; } cx_frame->have_sse = 0; -#endif } if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { @@ -1221,7 +1184,6 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out) stats->sz += pkt->data.twopass_stats.sz; break; } -#ifdef AOM_FRAME_IS_INTRAONLY case AOM_CODEC_PSNR_PKT: { av_assert0(!ctx->have_sse); @@ -1232,7 +1194,6 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out) ctx->have_sse = 1; break; } -#endif case AOM_CODEC_CUSTOM_PKT: // ignore unsupported/unrecognized packet types break; @@ -1448,9 +1409,6 @@ static av_cold void av1_init_static(FFCodec *codec) else codec->p.pix_fmts = supports_monochrome ? av1_pix_fmts_with_gray : av1_pix_fmts; - - if (aom_codec_version_major() < 2) - codec->p.capabilities |= AV_CODEC_CAP_EXPERIMENTAL; } static av_cold int av1_init(AVCodecContext *avctx) -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".