avcodec/ratecontrol: Move emms_c() to the only callsite needing it

Namely to one of the three callsites in snowenc.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-02-08 21:48:56 +01:00
parent 059654a73b
commit 0a629df0a8
2 changed files with 1 additions and 2 deletions
-2
View File
@@ -26,7 +26,6 @@
*/
#include "libavutil/attributes.h"
#include "libavutil/emms.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
@@ -924,7 +923,6 @@ float ff_rate_estimate_qscale(MPVMainEncContext *const m, int dry_run)
double rate_factor;
int64_t var;
const int pict_type = s->c.pict_type;
emms_c();
get_qminmax(&qmin, &qmax, m, pict_type);
+1
View File
@@ -1700,6 +1700,7 @@ static int ratecontrol_1pass(SnowEncContext *enc, AVFrame *pict)
coef_sum+= abs(buf[x+y*stride]) * qdiv >> 16;
}
}
emms_c();
/* ugly, ratecontrol just takes a sqrt again */
av_assert0(coef_sum < INT_MAX);