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 01AB74288F for ; Tue, 5 Apr 2022 13:55:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 530A568B181; Tue, 5 Apr 2022 16:55:23 +0300 (EEST) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F20906881B1 for ; Tue, 5 Apr 2022 16:55:16 +0300 (EEST) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 5DFFA1060349 for ; Tue, 5 Apr 2022 13:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1649166916; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=VrDgdlQYX2y14UoxAJSb2XMhc8JpMNYuCRf6SqIu7Cw=; b=x4OR4QCLtARBTwGXaADkSrujpDTHSeD+YTDolpQDnhrYnkx9ilPnGdghyXNwlt26 y24cwrRxkfW3DMLFRxTe7PAsArd+wjsZgxrEi5VG8udvr/HwVJmtlvvwzxmVXG7SdQm Wzfp8Jp37AlZ4yXKtvonegrPIrrN0nVjdcEVKGQxtKmiJgHw2QcIl+I4ZF5wS/91hG7 0olQfZbljSMfm4Etx3OKMJEiIKc1LjUFHIMxNpX/Wu81W7sKgRY3ZIlGkAAMp1FmPzU OLf9k+ybKd0d523lXqkCpm/2HLBdz7cXRyz2OLgES6ZWNLEqFBbVN6oJ5YsWX76uNU6 hJqZLpIMog== Date: Tue, 5 Apr 2022 15:55:16 +0200 (CEST) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: <20220405121539.1773869-1-danilchap@google.com> References: <20220324172524.1191986-1-danilchap@google.com> <164915298959.21047.64072881760748019@lain.red.khirnov.net> <20220405121539.1773869-1-danilchap@google.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: return quantizer parameter for an encoded frame 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: 5 Apr 2022, 14:15 by danilchap-at-google.com@ffmpeg.org: > --- > libavcodec/libvpxenc.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c > index dff1d06b0e..0705863450 100644 > --- a/libavcodec/libvpxenc.c > +++ b/libavcodec/libvpxenc.c > @@ -1250,6 +1250,8 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, > int ret = ff_get_encode_buffer(avctx, pkt, cx_frame->sz, 0); > uint8_t *side_data; > int pict_type; > + int quality; > + VPxContext *ctx = avctx->priv_data; > > if (ret < 0) > return ret; > @@ -1264,7 +1266,12 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, > pict_type = AV_PICTURE_TYPE_P; > } > > - ff_side_data_set_encoder_stats(pkt, 0, cx_frame->sse + 1, > + ret = vpx_codec_control(&ctx->encoder, VP8E_GET_LAST_QUANTIZER_64, &quality); > + if (ret != VPX_CODEC_OK) { > + quality = 0; > + } > Fix the coding style. _______________________________________________ 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".