From patchwork Mon Apr 25 22:37:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Degawa X-Patchwork-Id: 35437 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp2106790pzh; Mon, 25 Apr 2022 15:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfJQPuwDRTKE4l0b/Ht9JV2rHJXMW69B5FuBGcqAmp1gNkZpwkdfsUL7Uao+o5IWxalnvf X-Received: by 2002:aa7:c6d0:0:b0:425:e9f3:10a8 with SMTP id b16-20020aa7c6d0000000b00425e9f310a8mr7178051eds.41.1650926271290; Mon, 25 Apr 2022 15:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650926271; cv=none; d=google.com; s=arc-20160816; b=BAe7FnogF3moudx8J92dXcP6kGxhVTiQwXTAJa3fROROb/BC8ObUIqLLA5oJ+kHqk/ vbmxMf8fpsGUDu+3geIDAeoayAku4RTXkRhjOee3wNkFNQdB5CHSjRXXpbQrYKibGTmy mDpHO8+6GFMttaxYgbaeXswNpYf+nWy8LrbH3Kmdp/PQsii6Y2nwR9u0Ki9qnbTg8z+h Inm5ebJw6nxyOEivHaaCKIrjXr5E14aWXmJDTOSqxGy7xlebZJT36eHAVZ90Wigr78NG y0dqhi62j1KQW4EmzyHXeLUi1AdL7pFZT85VgKjmxTv1OpKUNMe/BySWftUsg1ka3Z/A jdcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=akKJWaZNVtilTqqI7RFhFpt5/IX8gNAJlzqpPkF3klA=; b=dNl/kuO9WcQJZ7GoVHWfVxvvN+UzYaI25f4rNUQN5l706KZRvjWc6FLn2FDqsoN9v4 UqS9RufjDMpQzm4VT/fuPdPIreIwfTgQnoGAsYu+0jNLUKe0cgq52dYNgwAulvPZzJp4 OibzD6AHN6j/V3F5YPdM3nNMBiZVU4JGkiGRzHSnz0tYN5/vaHQZOWAM/f7PmzOhv7Sq 7F+8VSHiqW+FVxyqw+W7xt7NH0brsenP9v7eOXmVwJcrfvXNoz9GSjZT4f6a2NRqvFQ0 Bf66z6NPEsyCgkWckMEBoDtBVFFUsuK85WicgjPzmD0wTw/grz3k1pQ2n8jFrM6oznPe GExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b=1FGMRTlE; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=randomderp.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f1-20020a056402150100b00425d52c0609si5757992edw.123.2022.04.25.15.37.50; Mon, 25 Apr 2022 15:37:51 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b=1FGMRTlE; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=randomderp.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C1DA868B28B; Tue, 26 Apr 2022 01:37:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from degawa.com (unknown [174.127.109.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8A3CB68005B for ; Tue, 26 Apr 2022 01:37:40 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomderp.com; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=C6oNS6REz+jTmdP9rHAV6OLvxP2pMIGbwVs+8z24keM=; b=1FGMRTlE3bZWGKROm+9NoJqN4Z hUmLHmWxJ43UQzPCbXW2ahIsRMa/sqwqdAF0Yk+D6A4DNWwfDSu3cl2FbmVKQ6vjLJKE8t3i3wAUT YCRzp1JFW1rZsZS1+S8LpXBfmjPegLREunU/yPeltbN97zfuuJnfs8VTS3p94MGnu6dRlJk8pGYjw TVVOiMhLYpm1KRzkM6dnIpTbS5iu62MvKYAoIDD+YMq6oQKcVcZyuUlDgFPzawE9UjAJ49ZGPLYhm 6uzat16fDCASQKCvaNCEfmaXSMdQ78dQUsOhNJdgOFjJw39WkumE+66YRA94HniBbbwExvIvN2wjM 5MZ7aOuw==; Received: from 108-216-168-194.lightspeed.mmphtn.sbcglobal.net ([108.216.168.194]:55130 helo=localhost.localdomain) by slmp-550-1.slc.westdc.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nj7Kr-0000lB-0l; Mon, 25 Apr 2022 16:37:36 -0600 From: Christopher Degawa To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Apr 2022 17:37:19 -0500 Message-Id: <20220425223719.432161-1-ccom@randomderp.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - slmp-550-1.slc.westdc.net X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - randomderp.com X-Get-Message-Sender-Via: slmp-550-1.slc.westdc.net: authenticated_id: ccom/from_h X-Authenticated-Sender: slmp-550-1.slc.westdc.net: ccom@randomderp.com X-Source: X-Source-Args: X-Source-Dir: Subject: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: pass pict_type to library 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 Cc: Christopher Degawa Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: f6fQ4YUxo0eF match the behavior of SvtAv1EncApp to ensure pic_type is always set before passing it to the library. The other options for pic_type aren't currently used inside the library, so they aren't introduced in this patch. Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 2e3d96ce37..eafb762a7d 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -404,6 +404,11 @@ static int eb_send_frame(AVCodecContext *avctx, const AVFrame *frame) headerPtr->p_app_private = NULL; headerPtr->pts = frame->pts; + switch (frame->pict_type) { + case AV_PICTURE_TYPE_I: headerPtr->pic_type = EB_AV1_KEY_PICTURE; break; + default: headerPtr->pic_type = EB_AV1_INVALID_PICTURE; break; // Actually means auto, or default. + } + svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr); return 0;