It was intended for debugging only and has been superseded by the standalone tool for testing sliced scaling.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -148,8 +148,6 @@ typedef struct ScaleContext { · 147 unmodified lines | ||
| 148 | 148 | int force_original_aspect_ratio; |
| 149 | 149 | int force_divisible_by; |
| 150 | 150 | |
| 151 | − int nb_slices; | |
| 152 | − | |
| 153 | 151 | int eval_mode; ///< expression evaluation mode |
| 154 | 152 | |
| 155 | 153 | } ScaleContext; |
| @@ -802,17 +800,6 @@ scale: · 646 unmodified lines | ||
| 802 | 800 | ret = scale_slice(scale, out, in, scale->isws[0], 0, (link->h+1)/2, 2, 0); |
| 803 | 801 | if (ret >= 0) |
| 804 | 802 | ret = scale_slice(scale, out, in, scale->isws[1], 0, link->h /2, 2, 1); |
| 805 | − } else if (scale->nb_slices) { | |
| 806 | − int i, slice_h, slice_start, slice_end = 0; | |
| 807 | − const int nb_slices = FFMIN(scale->nb_slices, link->h); | |
| 808 | − for (i = 0; i < nb_slices; i++) { | |
| 809 | − slice_start = slice_end; | |
| 810 | − slice_end = (link->h * (i+1)) / nb_slices; | |
| 811 | − slice_h = slice_end - slice_start; | |
| 812 | − ret = scale_slice(scale, out, in, scale->sws, slice_start, slice_h, 1, 0); | |
| 813 | − if (ret < 0) | |
| 814 | − break; | |
| 815 | − } | |
| 816 | 803 | } else { |
| 817 | 804 | ret = scale_slice(scale, out, in, scale->sws, 0, link->h, 1, 0); |
| 818 | 805 | } |
| @@ -944,7 +931,6 @@ static const AVOption scale_options[] = { · 125 unmodified lines | ||
| 944 | 931 | { "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 }, |
| 945 | 932 | { "param0", "Scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS }, |
| 946 | 933 | { "param1", "Scaler param 1", OFFSET(param[1]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS }, |
| 947 | − { "nb_slices", "set the number of slices (debug purpose only)", OFFSET(nb_slices), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, | |
| 948 | 934 | { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_INIT}, 0, EVAL_MODE_NB-1, FLAGS, "eval" }, |
| 949 | 935 | { "init", "eval expressions once during initialization", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT}, .flags = FLAGS, .unit = "eval" }, |
| 950 | 936 | { "frame", "eval expressions during initialization and per-frame", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" }, |