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 0DAF242B3E for ; Mon, 25 Apr 2022 22:55:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 780A568029F; Tue, 26 Apr 2022 01:55:06 +0300 (EEST) Received: from degawa.com (unknown [174.127.109.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3DD5168029F for ; Tue, 26 Apr 2022 01:54:59 +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: References:In-Reply-To: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:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=as2VOkHrXTSRx6uuvhFMYK6ECAmLi1ZhYUwATKMYvqw=; b=HPKE3sVZfDbY1M+WScYV0lHpPJ cWN+tEu85El8gcj9TYfjVS0I0HIn/gt2nyBbC0G2/OW1ySJhXIt8oDGvILZLS7PyDEAw7fmvhT/75 QwPSfHN9ASbN+XTZvnlCgq2lxliL8AK8h9K2sxfjrfWUAz+X3FY7MZNYNE5g1aaLctE3SEdwbUQ8a FkpAydwbsrNK1b/Sbugen7OYmFneYxgx3Ij7m6ZBZEW0JPFNULMEzHkNZ//oHH0L7E4WYkKdB1C6J bogQLcQMuJBWEffLjLWZDSeojgYF4NX6RqHh3g+asn316FczI1I+1pVPTc68vZq7Y4XnKUfGdWky+ mtpiCFiA==; Received: from 108-216-168-194.lightspeed.mmphtn.sbcglobal.net ([108.216.168.194]:55132 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 1nj7be-0006z6-2A; Mon, 25 Apr 2022 16:54:57 -0600 From: Christopher Degawa To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Apr 2022 17:54:38 -0500 Message-Id: <20220425225438.434800-1-ccom@randomderp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220425223719.432161-1-ccom@randomderp.com> References: <20220425223719.432161-1-ccom@randomderp.com> 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 v2] 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 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: 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 2e3d96ce37..088b9bab02 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -404,6 +404,16 @@ 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: + // Actually means auto, or default. + headerPtr->pic_type = EB_AV1_INVALID_PICTURE; + break; + } + svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr); return 0; -- 2.35.1 _______________________________________________ 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".