History

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.

Andreas Rheinhardt committed 2 years ago

Commit db8546d1 parent 34744751 file · +0 −4Browse files

Unified · Split

libavcodec/mpeg12dec.c+0−4
@@ -72,7 +72,6 @@ enum Mpeg2ClosedCaptionsFormat { · 71 unmodified lines
72 72
73typedef struct Mpeg1Context {73typedef struct Mpeg1Context {
74 MpegEncContext mpeg_enc_ctx;74 MpegEncContext mpeg_enc_ctx;
75 int repeat_field; /* true if we must repeat the field */
76 AVPanScan pan_scan; /* some temporary storage for the panscan */75 AVPanScan pan_scan; /* some temporary storage for the panscan */
77 enum AVStereo3DType stereo3d_type;76 enum AVStereo3DType stereo3d_type;
78 int has_stereo3d;77 int has_stereo3d;
@@ -781,7 +780,6 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) · 702 unmodified lines
781 ff_mpeg12_init_vlcs();780 ff_mpeg12_init_vlcs();
782 781
783 s2->chroma_format = 1;782 s2->chroma_format = 1;
784 s->repeat_field = 0;
785 avctx->color_range = AVCOL_RANGE_MPEG;783 avctx->color_range = AVCOL_RANGE_MPEG;
786 return 0;784 return 0;
787}785}
@@ -1050,8 +1048,6 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, · 262 unmodified lines
1050 av_log(avctx, AV_LOG_DEBUG,1048 av_log(avctx, AV_LOG_DEBUG,
1051 "vbv_delay %d, ref %d type:%d\n", vbv_delay, ref, s->pict_type);1049 "vbv_delay %d, ref %d type:%d\n", vbv_delay, ref, s->pict_type);
1052 1050
1053 s->y_dc_scale = 8;
1054 s->c_dc_scale = 8;
1055 return 0;1051 return 0;
1056}1052}
1057 1053

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t