From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH v2 04/71] avcodec/mpegvideo, ratecontrol: Remove write-only skip_count Date: Sat, 11 May 2024 22:50:28 +0200 Message-ID: <GV1P250MB0737F13DBE048337F4E12D2F8FE02@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB074471DDEA29072B2586F0EF8FE02@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> Write-only since 6cf0cb8935f515a7b5f79d2e3cf02bd0764943bf. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/h261enc.c | 1 - libavcodec/ituh263enc.c | 1 - libavcodec/mpeg12enc.c | 1 - libavcodec/mpeg4videoenc.c | 3 --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 4 ---- libavcodec/msmpeg4enc.c | 1 - libavcodec/ratecontrol.c | 14 +++++++++----- libavcodec/ratecontrol.h | 1 - 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 438ebb63d9..20dd296711 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -253,7 +253,6 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], if ((cbp | mvd) == 0) { /* skip macroblock */ - s->skip_count++; s->mb_skip_run++; s->last_mv[0][0][0] = 0; s->last_mv[0][0][1] = 0; diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 97abfb3f45..4741ada853 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -512,7 +512,6 @@ void ff_h263_encode_mb(MpegEncContext * s, s->misc_bits++; s->last_bits++; } - s->skip_count++; return; } diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index f956dde78f..fdb1b1e4a6 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -824,7 +824,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, (s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) { s->mb_skip_run++; s->qscale -= s->dquant; - s->skip_count++; s->misc_bits++; s->last_bits++; if (s->pict_type == AV_PICTURE_TYPE_P) { diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 71dda802e2..bddc26650a 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -512,7 +512,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], /* nothing to do if this MB was skipped in the next P-frame */ if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { // FIXME avoid DCT & ... - s->skip_count++; s->mv[0][0][0] = s->mv[0][0][1] = s->mv[1][0][0] = @@ -536,7 +535,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], s->misc_bits++; s->last_bits++; } - s->skip_count++; return; } @@ -691,7 +689,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], s->misc_bits++; s->last_bits++; } - s->skip_count++; return; } diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 215df0fd5b..a8ed1b60b6 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -345,7 +345,6 @@ typedef struct MpegEncContext { int i_tex_bits; int p_tex_bits; int i_count; - int skip_count; int misc_bits; ///< cbp, mb_type int last_bits; ///< temp var used for calculating the above vars diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index e31636d787..f45a5f1b37 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2532,7 +2532,6 @@ static inline void copy_context_before_encode(MpegEncContext *d, d->i_tex_bits= s->i_tex_bits; d->p_tex_bits= s->p_tex_bits; d->i_count= s->i_count; - d->skip_count= s->skip_count; d->misc_bits= s->misc_bits; d->last_bits= 0; @@ -2561,7 +2560,6 @@ static inline void copy_context_after_encode(MpegEncContext *d, d->i_tex_bits= s->i_tex_bits; d->p_tex_bits= s->p_tex_bits; d->i_count= s->i_count; - d->skip_count= s->skip_count; d->misc_bits= s->misc_bits; d->mb_intra= s->mb_intra; @@ -2875,7 +2873,6 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->i_tex_bits=0; s->p_tex_bits=0; s->i_count=0; - s->skip_count=0; for(i=0; i<3; i++){ /* init last dc values */ @@ -3504,7 +3501,6 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src) MERGE(i_tex_bits); MERGE(p_tex_bits); MERGE(i_count); - MERGE(skip_count); MERGE(misc_bits); MERGE(encoding_error[0]); MERGE(encoding_error[1]); diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c index 119ea8f15e..c159256068 100644 --- a/libavcodec/msmpeg4enc.c +++ b/libavcodec/msmpeg4enc.c @@ -405,7 +405,6 @@ void ff_msmpeg4_encode_mb(MpegEncContext * s, put_bits(&s->pb, 1, 1); s->last_bits++; s->misc_bits++; - s->skip_count++; return; } diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 3219e1f60f..ecc157a9eb 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -39,7 +39,7 @@ void ff_write_pass1_stats(MpegEncContext *s) { snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d " - "fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d skipcount:%d hbits:%d;\n", + "fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d hbits:%d;\n", s->current_picture_ptr->display_picture_number, s->current_picture_ptr->coded_picture_number, s->pict_type, @@ -52,7 +52,7 @@ void ff_write_pass1_stats(MpegEncContext *s) s->b_code, s->mc_mb_var_sum, s->mb_var_sum, - s->i_count, s->skip_count, + s->i_count, s->header_bits); } @@ -606,13 +606,17 @@ av_cold int ff_rate_control_init(MpegEncContext *s) av_assert0(picture_number < rcc->num_entries); rce = &rcc->entry[picture_number]; - e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%"SCNd64" var:%"SCNd64" icount:%d skipcount:%d hbits:%d", + e += sscanf(p, " in:%*d out:%*d type:%d q:%f itex:%d ptex:%d " + "mv:%d misc:%d " + "fcode:%d bcode:%d " + "mc-var:%"SCNd64" var:%"SCNd64" " + "icount:%d hbits:%d", &rce->pict_type, &rce->qscale, &rce->i_tex_bits, &rce->p_tex_bits, &rce->mv_bits, &rce->misc_bits, &rce->f_code, &rce->b_code, &rce->mc_mb_var_sum, &rce->mb_var_sum, - &rce->i_count, &rce->skip_count, &rce->header_bits); - if (e != 14) { + &rce->i_count, &rce->header_bits); + if (e != 13) { av_log(s->avctx, AV_LOG_ERROR, "statistics are damaged at line %d, parser out=%d\n", i, e); diff --git a/libavcodec/ratecontrol.h b/libavcodec/ratecontrol.h index a5434f5b90..1b49889f75 100644 --- a/libavcodec/ratecontrol.h +++ b/libavcodec/ratecontrol.h @@ -50,7 +50,6 @@ typedef struct RateControlEntry{ int64_t mc_mb_var_sum; int64_t mb_var_sum; int i_count; - int skip_count; int f_code; int b_code; }RateControlEntry; -- 2.40.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".
next prev parent reply other threads:[~2024-05-11 20:52 UTC|newest] Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-11 20:23 [FFmpeg-devel] [PATCH v2 01/71] avcodec/ratecontrol: Fix double free on error Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 02/71] avcodec/ratecontrol: Pass RCContext directly in ff_rate_control_uninit() Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 03/71] avcodec/ratecontrol: Don't call ff_rate_control_uninit() ourselves Andreas Rheinhardt 2024-05-11 20:50 ` Andreas Rheinhardt [this message] 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 05/71] avcodec/ratecontrol: Avoid padding in RateControlEntry Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 06/71] avcodec/get_buffer: Remove redundant check Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 07/71] avcodec/mpegpicture: Store linesize in ScratchpadContext Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 08/71] avcodec/mpegvideo_dec: Sync linesize and uvlinesize between threads Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 09/71] avcodec/mpegvideo_dec: Factor allocating dummy frames out Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 10/71] avcodec/mpegpicture: Mark dummy frames as such Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 11/71] avcodec/mpeg12dec: Allocate dummy frames for non-I fields Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 12/71] avcodec/mpegvideo_motion: Remove dead checks for existence of reference Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 13/71] avcodec/mpegvideo_motion: Optimize check away Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 14/71] " Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 15/71] avcodec/mpegvideo_motion: Avoid constant function argument Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 16/71] avcodec/msmpeg4enc: Only calculate coded_cbp when used Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 17/71] avcodec/mpegvideo: Only allocate coded_block when needed Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 18/71] avcodec/mpegvideo: Don't reset coded_block unnecessarily Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 19/71] avcodec/mpegvideo: Only allocate cbp_table, pred_dir_table when needed Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 20/71] avcodec/mpegpicture: Always reset motion val buffer Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 21/71] avcodec/mpegpicture: Always reset mbskip_table Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 22/71] avcodec/mpegvideo: Redo aligning mb_height for VC-1 Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 23/71] avcodec/mpegvideo, mpegpicture: Add buffer pool Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 24/71] avcodec/mpegpicture: Reindent after the previous commit Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 25/71] avcodec/mpegpicture: Use RefStruct-pool API Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 26/71] avcodec/h263: Move encoder-only part out of ff_h263_update_motion_val() Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 27/71] avcodec/h263, mpeg(picture|video): Only allocate mbskip_table for MPEG-4 Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 28/71] avcodec/mpegvideo: Reindent after the previous commit Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 29/71] avcodec/h263: Move setting mbskip_table to decoder/encoders Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 30/71] avcodec/mpegvideo: Restrict resetting mbskip_table to MPEG-4 decoder Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 31/71] avcodec/mpegvideo: Shorten variable names Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 32/71] avcodec/mpegpicture: Reduce value of MAX_PLANES define Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 33/71] avcodec/mpegpicture: Cache AVFrame.data and linesize values Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 34/71] avcodec/rv30, rv34, rv40: Avoid indirection Andreas Rheinhardt 2024-05-11 20:50 ` [FFmpeg-devel] [PATCH v2 35/71] avcodec/mpegvideo: Add const where appropriate Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 36/71] avcodec/vc1_pred: Remove unused function parameter Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 37/71] avcodec/mpegpicture: Improve error messages and code Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 38/71] avcodec/mpegpicture: Split ff_alloc_picture() into check and alloc part Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 39/71] avcodec/mpegvideo_enc: Pass AVFrame*, not Picture* to alloc_picture() Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 40/71] avcodec/mpegvideo_enc: Move copying properties " Andreas Rheinhardt 2024-05-12 19:55 ` Michael Niedermayer 2024-06-08 14:03 ` [FFmpeg-devel] [PATCH v3 " Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 41/71] avcodec/mpegpicture: Rename Picture->MPVPicture Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 42/71] avcodec/vc1_mc: Don't check AVFrame INTERLACE flags Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 43/71] avcodec/mpegpicture: Split MPVPicture into WorkPicture and ordinary Pic Andreas Rheinhardt 2024-06-23 22:28 ` Michael Niedermayer 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 44/71] avcodec/error_resilience: Deduplicate cleanup code Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 45/71] avcodec/mpegvideo_enc: Factor setting length of B frame chain out Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 46/71] avcodec/mpegvideo_enc: Return early when getting length of B frame chain Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 47/71] avcodec/mpegvideo_enc: Reindentation Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 48/71] avcodec/mpeg12dec: Don't initialize inter tables for IPU Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 49/71] avcodec/mpeg12dec: Only initialize IDCT " Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 50/71] avcodec/mpeg12dec: Remove write-only assignment Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 51/71] avcodec/mpeg12dec: Set out_format only once Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 52/71] avformat/riff: Declare VCR2 to be MPEG-2 Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 53/71] avcodec/mpegvideo_dec: Add close function for mpegvideo-decoders Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 54/71] avcodec/mpegpicture: Make MPVPicture refcounted Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 55/71] avcodec/mpeg4videoenc: Avoid branch for writing stuffing Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 56/71] avcodec/mpeg4videoenc: Simplify writing startcodes Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 57/71] avcodec/mpegpicture: Use ThreadProgress instead of ThreadFrame API Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 58/71] avcodec/mpegpicture: Avoid loop and branch when setting motion_val Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 59/71] avcodec/mpegpicture: Use union for b_scratchpad and rd_scratchpad Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 60/71] avcodec/mpegpicture: Avoid MotionEstContext in ff_mpeg_framesize_alloc() Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 61/71] avcodec/mpegvideo_enc: Unify initializing PutBitContexts Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 62/71] avcodec/mpeg12enc: Simplify writing startcodes Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 63/71] avcodec/mpegvideo_dec, rv34: Simplify check for "does pic exist?" Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 64/71] avcodec/mpegvideo_dec: Don't sync encoder-only coded_picture_number Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 65/71] avcodec/mpeg12dec: Pass Mpeg1Context* in mpeg_field_start() Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 66/71] avcodec/mpeg12dec: Don't initialize inter_scantable Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 67/71] avcodec/mpegvideo: Remove pblocks Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 68/71] avcodec/mpegvideo: Use enum for msmpeg4_version Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 69/71] avcodec/ituh263enc: Remove redundant check Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 70/71] avcodec/mpegvideo_enc: Binarize reference Andreas Rheinhardt 2024-05-11 20:51 ` [FFmpeg-devel] [PATCH v2 71/71] avcodec/vc1_pred: Fix indentation Andreas Rheinhardt 2024-06-11 20:59 ` [FFmpeg-devel] [PATCH v2 01/71] avcodec/ratecontrol: Fix double free on error Andreas Rheinhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB0737F13DBE048337F4E12D2F8FE02@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git