aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-13 14:43:58 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-17 02:54:52 +0100
commita595717d214c892df05a955c935dd172924af47b (patch)
treece168438361a3056427295b0b838ca3fe30ebd97
parent9f906f3114d788c5047ed5c5d2d8a7bc73bed012 (diff)
downloadffmpeg-a595717d214c892df05a955c935dd172924af47b.tar.gz
avcodec/mpegvideo_enc: Remove some impossible branches
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mpegvideo_enc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4adb95eca7..8865e38293 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -885,15 +885,16 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp);
ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp);
- if (CONFIG_H261_ENCODER && s->out_format == FMT_H261)
+ if (CONFIG_H261_ENCODER && s->out_format == FMT_H261) {
ff_h261_encode_init(s);
- if (CONFIG_H263_ENCODER && s->out_format == FMT_H263)
- ff_h263_encode_init(s);
- if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
- ff_msmpeg4_encode_init(s);
- if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
- && s->out_format == FMT_MPEG1)
+ } else if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
+ && s->out_format == FMT_MPEG1) {
ff_mpeg1_encode_init(s);
+ } else if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) {
+ ff_h263_encode_init(s);
+ if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
+ ff_msmpeg4_encode_init(s);
+ }
/* init q matrix */
for (i = 0; i < 64; i++) {
@@ -3695,7 +3696,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
ff_convert_matrix(s, s->q_chroma_intra_matrix, s->q_chroma_intra_matrix16,
s->chroma_intra_matrix, s->intra_quant_bias, 8, 8, 1);
s->qscale= 8;
- }
+
if(s->codec_id == AV_CODEC_ID_AMV){
static const uint8_t y[32]={13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13};
static const uint8_t c[32]={14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14};
@@ -3715,8 +3716,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s->chroma_intra_matrix, s->intra_quant_bias, 8, 8, 1);
s->qscale= 8;
}
-
- if (s->out_format == FMT_SPEEDHQ) {
+ } else if (s->out_format == FMT_SPEEDHQ) {
s->y_dc_scale_table=
s->c_dc_scale_table= ff_mpeg2_dc_scale_table[3];
}