From patchwork Mon Oct 26 21:01:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bohan Li X-Patchwork-Id: 23237 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 00DBB44AD46 for ; Mon, 26 Oct 2020 23:02:16 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C96DD688141; Mon, 26 Oct 2020 23:02:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 63061680B4C for ; Mon, 26 Oct 2020 23:02:09 +0200 (EET) Received: by mail-yb1-f201.google.com with SMTP id a12so12432004ybc.20 for ; Mon, 26 Oct 2020 14:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=CEqoUXHPvQFg/tpbjCsBLflfA/QFni3d+DL8Ye4yfdM=; b=mgoxyaTG5lTOriDU+lGEf0cf8w1oLQKsJXdXoiqH+Lu88BQkzKK5yYRwSLQPL5Vhbk 38RXPRCEcgS3QLvzaWacrjcJdehvP8/yBlRsytA14o/TpW17Ewbi8fipSXOJH2SRDKtK /D3woOuj3s2nme2hRjOvq5z+aRk/ZgK/G7dPPF7XOzvoA7JukZXV9U6T2GJrw1Bmx+Gx MuCg/9rMuDGuGfrFE5TLNq0ZVly7OOc9wa3USrjrSz1m30cffrh0BMiGdnX9LTyoagkb 77UEtXC0MdVRTLQxy+q5ROUxN8RinvYPUGtRtCrVbvgyllueiBNa6tzm+aaQVC3BmUqd NX9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=CEqoUXHPvQFg/tpbjCsBLflfA/QFni3d+DL8Ye4yfdM=; b=s5Y9I79nwvpOaI6JlhlZoPyO6u4KTXS8rpwLT3CnVKppF+SAyG9k3Eej3lHNdEJjQl tFWjKHxm+38SLhFCXGiDlx8vuRokUbVQhYsEgAzhaeELqBysWNUVRI9sUjIiPcRZr3ID pWn8zGJulhEoSV6OeYAmO4q0LZMY++xed7XESQ3ePrUuEo6SyUehbU3fgwETrLChYigS 2MvJB2Z9wMT4zRPGxv4tOQq39R9X9AS1j+bAsCrdktTs7Vn8dNMGvCTtE6IUQ/ZdAmYv s+0S80kV1IFeeMe04wRgtFSuVDDiiS50Gz29ARNVsSQ/NrZLr0nFd2rnxYvesVWp2vDr 3ivQ== X-Gm-Message-State: AOAM532L6TCw32SivfWhRV7XSbXSWd+hjuQRCTGR+1/Kz/7iWD7T4YwY iBrD/pVpQQBPWQC189hDg8B68TpMi92V2ql2mkmggpsGaTYaAbpWIu4KifvP9iKOWtlFWrCtynA DiuZOA7++GaLoNkYH87Q5rwceJtKBF7Kd1CE72PHo+wVO0NRjz3vmpEh6oAj3qTZ8rw== X-Google-Smtp-Source: ABdhPJzvvfBwo3uwG203qbSTLgMNNu+fibdmOE6lQ21cbWUUkNxj6487F6X86sixWA1E/5Y2ZPO1JRFiEp+G X-Received: from bohanli.mtv.corp.google.com ([2620:0:1000:2511:1ea0:b8ff:fe73:500c]) (user=bohanli job=sendgmr) by 2002:a25:2f57:: with SMTP id v84mr26459992ybv.34.1603746127582; Mon, 26 Oct 2020 14:02:07 -0700 (PDT) Date: Mon, 26 Oct 2020 14:01:32 -0700 Message-Id: <20201026210132.4027342-1-bohanli@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog From: Bohan Li To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] Add enable_keyframe_filtering option for libaom-av1 encoder. 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 Cc: Bohan Li Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Bohan Li --- libavcodec/libaomenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 2b0581b15a..a5d9843ae2 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -124,6 +124,7 @@ typedef struct AOMEncoderContext { int enable_diff_wtd_comp; int enable_dist_wtd_comp; int enable_dual_filter; + int enable_keyframe_filtering; } AOMContext; static const char *const ctlidstr[] = { @@ -192,6 +193,7 @@ 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", + [AV1E_SET_ENABLE_KEYFRAME_FILTERING] = "AV1E_SET_ENABLE_KEYFRAME_FILTRING" #endif }; @@ -812,6 +814,8 @@ 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); + if (ctx->enable_keyframe_filtering >= 0) + codecctl_int(avctx, AV1E_SET_ENABLE_KEYFRAME_FILTERING, ctx->enable_keyframe_filtering); #endif codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh); @@ -1261,6 +1265,7 @@ static const AVOption options[] = { { "enable-masked-comp", "Enable masked compound", OFFSET(enable_masked_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-interintra-comp", "Enable interintra compound", OFFSET(enable_interintra_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-smooth-interintra", "Enable smooth interintra mode", OFFSET(enable_smooth_interintra), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, + { "enable-keyframe-filtering", "Enable keyframe filtering type", OFFSET(enable_keyframe_filtering), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 3, VE}, { NULL }, };