From bd481ac6c10f864c7ee9989a01ca6f445a568f77 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 27 Feb 2026 06:51:59 +0100 Subject: [PATCH] avcodec/mpegvideo_enc: Remove redundant emms_c It is unnecessary since d91b1559e0f61b7ee486c46854013d6c9ddb3e84 (before that the sad_cmp[0] call in get_intra_count() may have clobbered the floating point state without cleaning it up itself). Also remove some commented out emms_c from places where the floating point state is guaranteed not to have been clobbered by us. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 46c8863a14..aad78eed4a 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1531,7 +1531,6 @@ static int estimate_best_b_count(MPVMainEncContext *const m) if (!pkt) return AVERROR(ENOMEM); - //emms_c(); p_lambda = m->last_lambda_for[AV_PICTURE_TYPE_P]; //p_lambda * FFABS(s->c.avctx->b_quant_factor) + s->c.avctx->b_quant_offset; b_lambda = m->last_lambda_for[AV_PICTURE_TYPE_B]; @@ -1750,8 +1749,6 @@ static int set_bframe_chain_length(MPVMainEncContext *const m) } } - emms_c(); - for (int i = b_frames - 1; i >= 0; i--) { int type = m->input_picture[i]->f->pict_type; if (type && type != AV_PICTURE_TYPE_B) @@ -1975,7 +1972,6 @@ int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, } s->c.pict_type = s->new_pic->pict_type; - //emms_c(); frame_start(m); vbv_retry: ret = encode_picture(m, pkt);