From 529f2d2e584aa819d17e13bb27f538df1ca6c3e1 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 8 Jul 2024 14:55:45 +0200 Subject: [PATCH 11/30] avcodec/mpeg12dec: Remove write-only assignments This decoder unquantizes while parsing blocks and does not use dct_unquantize_mpeg1_intra (which uses *_dc_scale) at all. repeat_field was unused since e0a3d744a0d5a9a25fb85c9bba17e3b07d3ba29b. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 262e213a61..48b35ed794 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -72,7 +72,6 @@ enum Mpeg2ClosedCaptionsFormat { typedef struct Mpeg1Context { MpegEncContext mpeg_enc_ctx; - int repeat_field; /* true if we must repeat the field */ AVPanScan pan_scan; /* some temporary storage for the panscan */ enum AVStereo3DType stereo3d_type; int has_stereo3d; @@ -781,7 +780,6 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) ff_mpeg12_init_vlcs(); s2->chroma_format = 1; - s->repeat_field = 0; avctx->color_range = AVCOL_RANGE_MPEG; return 0; } @@ -1050,8 +1048,6 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, av_log(avctx, AV_LOG_DEBUG, "vbv_delay %d, ref %d type:%d\n", vbv_delay, ref, s->pict_type); - s->y_dc_scale = 8; - s->c_dc_scale = 8; return 0; } -- 2.45.2