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 20E6745931 for ; Thu, 27 Apr 2023 14:28:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA58B68C006; Thu, 27 Apr 2023 17:26:31 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B21B868BF89 for ; Thu, 27 Apr 2023 17:26:11 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 3A6D8240591 for ; Thu, 27 Apr 2023 16:26:08 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id cFAg5btuv3ZK for ; Thu, 27 Apr 2023 16:26:07 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 651D62405F9 for ; Thu, 27 Apr 2023 16:26:05 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 33F143A0586 for ; Thu, 27 Apr 2023 16:26:05 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 27 Apr 2023 16:25:45 +0200 Message-Id: <20230427142601.2613-5-anton@khirnov.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427142601.2613-1-anton@khirnov.net> References: <20230427142601.2613-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/21] fftools/ffmpeg: move OutputStream.packets_encoded to Encoder 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: It is no longer used outside of ffmpeg_enc. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_enc.c | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c4b77ab2c8..116087354d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -665,8 +665,6 @@ typedef struct OutputStream { // number of frames/samples sent to the encoder uint64_t frames_encoded; uint64_t samples_encoded; - // number of packets received from the encoder - uint64_t packets_encoded; /* packet quality factor */ int quality; diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index c368097cd0..5707199ac5 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -59,6 +59,9 @@ struct Encoder { // combined size of all the packets received from the encoder uint64_t data_size; + + // number of packets received from the encoder + uint64_t packets_encoded; }; static uint64_t dup_warning = 1000; @@ -619,7 +622,7 @@ static void update_video_stats(OutputStream *ost, const AVPacket *pkt, int write } } - frame_number = ost->packets_encoded; + frame_number = e->packets_encoded; if (vstats_version <= 1) { fprintf(vstats_file, "frame= %5"PRId64" q= %2.1f ", frame_number, ost->quality / (float)FF_QP2LAMBDA); @@ -708,7 +711,7 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame) update_video_stats(ost, pkt, !!vstats_filename); if (ost->enc_stats_post.io) enc_stats_write(ost, &ost->enc_stats_post, NULL, pkt, - ost->packets_encoded); + e->packets_encoded); if (debug_ts) { av_log(ost, AV_LOG_INFO, "encoder -> type:%s " @@ -742,7 +745,7 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame) e->data_size += pkt->size; - ost->packets_encoded++; + e->packets_encoded++; of_output_packet(of, pkt, ost, 0); } -- 2.39.2 _______________________________________________ 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".