[FFmpeg-cvslog] lavfi/vf_scale: remove the nb_slices option
Anton Khirnov
git at videolan.org
Sun Aug 29 19:50:08 EEST 2021
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jul 6 10:17:06 2021 +0200| [ca32d0462cd9a2d161be036fc45dc429013d0840] | committer: Anton Khirnov
lavfi/vf_scale: remove the nb_slices option
It was intended for debugging only and has been superseded by the
standalone tool for testing sliced scaling.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca32d0462cd9a2d161be036fc45dc429013d0840
---
libavfilter/vf_scale.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 7ca833bbb1..909080b829 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -148,8 +148,6 @@ typedef struct ScaleContext {
int force_original_aspect_ratio;
int force_divisible_by;
- int nb_slices;
-
int eval_mode; ///< expression evaluation mode
} ScaleContext;
@@ -802,17 +800,6 @@ scale:
ret = scale_slice(scale, out, in, scale->isws[0], 0, (link->h+1)/2, 2, 0);
if (ret >= 0)
ret = scale_slice(scale, out, in, scale->isws[1], 0, link->h /2, 2, 1);
- } else if (scale->nb_slices) {
- int i, slice_h, slice_start, slice_end = 0;
- const int nb_slices = FFMIN(scale->nb_slices, link->h);
- for (i = 0; i < nb_slices; i++) {
- slice_start = slice_end;
- slice_end = (link->h * (i+1)) / nb_slices;
- slice_h = slice_end - slice_start;
- ret = scale_slice(scale, out, in, scale->sws, slice_start, slice_h, 1, 0);
- if (ret < 0)
- break;
- }
} else {
ret = scale_slice(scale, out, in, scale->sws, 0, link->h, 1, 0);
}
@@ -944,7 +931,6 @@ static const AVOption scale_options[] = {
{ "force_divisible_by", "enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1}, 1, 256, FLAGS },
{ "param0", "Scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS },
{ "param1", "Scaler param 1", OFFSET(param[1]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS },
- { "nb_slices", "set the number of slices (debug purpose only)", OFFSET(nb_slices), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "eval", "specify when to evaluate expressions", OFFSET(eval_mode), AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_INIT}, 0, EVAL_MODE_NB-1, FLAGS, "eval" },
{ "init", "eval expressions once during initialization", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT}, .flags = FLAGS, .unit = "eval" },
{ "frame", "eval expressions during initialization and per-frame", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
More information about the ffmpeg-cvslog
mailing list