mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn
ff_scene_sad_get_fn() does not return functions that use MMX at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8b7a3c6f10
commit
c59b082e20
|
@ -294,7 +294,6 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *frame)
|
||||||
count += select->width[plane] * select->height[plane];
|
count += select->width[plane] * select->height[plane];
|
||||||
}
|
}
|
||||||
|
|
||||||
emms_c();
|
|
||||||
mafd = (double)sad / count / (1ULL << (select->bitdepth - 8));
|
mafd = (double)sad / count / (1ULL << (select->bitdepth - 8));
|
||||||
diff = fabs(mafd - select->prev_mafd);
|
diff = fabs(mafd - select->prev_mafd);
|
||||||
ret = av_clipf(FFMIN(mafd, diff) / 100., 0, 1);
|
ret = av_clipf(FFMIN(mafd, diff) / 100., 0, 1);
|
||||||
|
|
|
@ -76,7 +76,6 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *crnt, AVFrame *next
|
||||||
|
|
||||||
ff_dlog(ctx, "get_scene_score() process\n");
|
ff_dlog(ctx, "get_scene_score() process\n");
|
||||||
s->sad(crnt->data[0], crnt->linesize[0], next->data[0], next->linesize[0], crnt->width, crnt->height, &sad);
|
s->sad(crnt->data[0], crnt->linesize[0], next->data[0], next->linesize[0], crnt->width, crnt->height, &sad);
|
||||||
emms_c();
|
|
||||||
mafd = (double)sad * 100.0 / (crnt->width * crnt->height) / (1 << s->bitdepth);
|
mafd = (double)sad * 100.0 / (crnt->width * crnt->height) / (1 << s->bitdepth);
|
||||||
diff = fabs(mafd - s->prev_mafd);
|
diff = fabs(mafd - s->prev_mafd);
|
||||||
ret = av_clipf(FFMIN(mafd, diff), 0, 100.0);
|
ret = av_clipf(FFMIN(mafd, diff), 0, 100.0);
|
||||||
|
|
|
@ -131,7 +131,6 @@ static int is_frozen(FreezeDetectContext *s, AVFrame *reference, AVFrame *frame)
|
||||||
count += s->width[plane] * s->height[plane];
|
count += s->width[plane] * s->height[plane];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emms_c();
|
|
||||||
mafd = (double)sad / count / (1ULL << s->bitdepth);
|
mafd = (double)sad / count / (1ULL << s->bitdepth);
|
||||||
return (mafd <= s->noise);
|
return (mafd <= s->noise);
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,7 +825,6 @@ static int detect_scene_change(AVFilterContext *ctx)
|
||||||
double ret = 0, mafd, diff;
|
double ret = 0, mafd, diff;
|
||||||
uint64_t sad;
|
uint64_t sad;
|
||||||
mi_ctx->sad(p1, linesize1, p2, linesize2, input->w, input->h, &sad);
|
mi_ctx->sad(p1, linesize1, p2, linesize2, input->w, input->h, &sad);
|
||||||
emms_c();
|
|
||||||
mafd = (double) sad * 100.0 / (input->h * input->w) / (1 << mi_ctx->bitdepth);
|
mafd = (double) sad * 100.0 / (input->h * input->w) / (1 << mi_ctx->bitdepth);
|
||||||
diff = fabs(mafd - mi_ctx->prev_mafd);
|
diff = fabs(mafd - mi_ctx->prev_mafd);
|
||||||
ret = av_clipf(FFMIN(mafd, diff), 0, 100.0);
|
ret = av_clipf(FFMIN(mafd, diff), 0, 100.0);
|
||||||
|
|
|
@ -126,7 +126,6 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *frame)
|
||||||
count += s->width[plane] * s->height[plane];
|
count += s->width[plane] * s->height[plane];
|
||||||
}
|
}
|
||||||
|
|
||||||
emms_c();
|
|
||||||
mafd = (double)sad * 100. / count / (1ULL << s->bitdepth);
|
mafd = (double)sad * 100. / count / (1ULL << s->bitdepth);
|
||||||
diff = fabs(mafd - s->prev_mafd);
|
diff = fabs(mafd - s->prev_mafd);
|
||||||
ret = av_clipf(FFMIN(mafd, diff), 0, 100.);
|
ret = av_clipf(FFMIN(mafd, diff), 0, 100.);
|
||||||
|
|
Loading…
Reference in New Issue