From patchwork Wed Nov 8 04:55:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 44574 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:f392:b0:181:818d:5e7f with SMTP id qr18csp144614pzb; Tue, 7 Nov 2023 20:56:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrtcrZBzLMOGt0kaN0S1xeYeib1qciOICCriBkarlQbNo7VJFi896JVVmMCyk5saZc0NTj X-Received: by 2002:a17:907:da5:b0:9bd:c592:e0ce with SMTP id go37-20020a1709070da500b009bdc592e0cemr459189ejc.51.1699419366089; Tue, 07 Nov 2023 20:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699419366; cv=none; d=google.com; s=arc-20160816; b=bGPd4aAJGaQmuFA2v6Xf5LMaG/pPnxg4FTY9vbJBnF9D+h42K11rRBAIwGzTrsVV5S rFyC20yGILuSJkZ1Y2jvqFCvFx82V5dRF1Y4XlrG4a3BioPlWzSGmhahNn6pZ3EfC/lk 3jZuaFb32mcJelwdsXBxCiCuXOGhmyZB18ml/LWtDJKjGKFK2/5Ysf2jMzlhN9J5OvcZ RFWH4Osfi43tCnV/2xB17FMoNBnRDc0ntMsWwo5fgMrG3ne4mDZ0H3qsdzcwp3ef+KMQ hZ6UiwUWZS30534qqU/L3Xg6GrtYis2KHz+6QEBwQ9ltSgnhDdH9Xvxv0Het/kNxNX1b e63w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=Kd81KNPM7IPR2KUhDbai6Oslc38uHb7nC2u0Exp14Ac=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=i4XZJrnZOBdHTQhoDNfRiuaJiGgVKOD+YhXAdsJ/NQWCtTKbw7/loNkUmolcccpXzW jjdAboA55YznuPHpvDpWqzpiL2wQuhMz0Qd1Dyo6Tjc5DNjKUUoz9fdcs+vQghgIllbf uhvhDfOTz4p9CVzMoRYn0cy9SGahC6Qa/wR3x3pwdC+3wxFf3z+ce9aACIQixoR1Lvma lznEXbmG5LciYtcz0lldeenC+pVf8GWgahdw8h3axvDuC9npc21rsNDnHtvD/xnovk8i lSH3wUZivWfb9AWzjXY/0D6sU+/tDfCf8DfH0KgjAWeLD5wiLHJt87zJZDnU1ddn2hAK v3Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gx21-20020a1709068a5500b009e281c868e3si1104759ejc.263.2023.11.07.20.56.05; Tue, 07 Nov 2023 20:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1E0368CB18; Wed, 8 Nov 2023 06:56:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7FF6368CAFF for ; Wed, 8 Nov 2023 06:55:53 +0200 (EET) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4SQCTL3PMXz9sSS for ; Wed, 8 Nov 2023 05:55:50 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Wed, 8 Nov 2023 10:25:34 +0530 Message-Id: <20231108045534.1529-1-ffmpeg@gyani.pro> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: add version guard for external param 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5ZPPCh4HIDt+ Setting of external param 'force_key_frames' was added in 7bcc1b4eb8. It is available since v1.1.0 but ffmpeg allows linking against v0.9.0. --- libavcodec/libsvtav1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 8d2c7f3be4..862192945b 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -250,6 +250,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, if (avctx->gop_size > 1) param->intra_period_length = avctx->gop_size - 1; +#if SVT_AV1_CHECK_VERSION(1, 1, 0) // In order for SVT-AV1 to force keyframes by setting pic_type to // EB_AV1_KEY_PICTURE on any frame, force_key_frames has to be set. Note // that this does not force all frames to be keyframes (it only forces a @@ -260,6 +261,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, // to be updated to set force_key_frames accordingly. if (avctx->gop_size == 1) param->force_key_frames = 1; +#endif if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param->frame_rate_numerator = avctx->framerate.num;