summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-08-31 10:07:34 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-08-31 10:07:34 +0200
commitea1061e147d33e33281570631cab7fdc1195e065 (patch)
tree37f230dc47db940baf2a88b98091b6dc4e0e0750 /libavfilter
parent80a12be10f39d5ce0c9e95f49d6b2ecb5750b334 (diff)
parentb1abd2aaf91be249f24cb74db9c205d9e4ca9da6 (diff)
Merge commit 'b1abd2aaf91be249f24cb74db9c205d9e4ca9da6'
* commit 'b1abd2aaf91be249f24cb74db9c205d9e4ca9da6': vf_scale: Add an option to pass the scaler params Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_scale.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 89a80ee2aa..a1a19bb63f 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -86,6 +86,7 @@ typedef struct ScaleContext {
int w, h;
char *size_str;
unsigned int flags; ///sws flags
+ double param[2]; // sws params
int hsub, vsub; ///< chroma subsampling
int slice_y; ///< top of current output slice
@@ -371,6 +372,8 @@ static int config_props(AVFilterLink *outlink)
av_opt_set_int(*s, "dsth", outlink->h >> !!i, 0);
av_opt_set_int(*s, "dst_format", outfmt, 0);
av_opt_set_int(*s, "sws_flags", scale->flags, 0);
+ av_opt_set_int(*s, "param0", scale->param[0], 0);
+ av_opt_set_int(*s, "param1", scale->param[1], 0);
if (scale->opts) {
AVDictionaryEntry *e = NULL;
@@ -640,6 +643,8 @@ static const AVOption scale_options[] = {
{ "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, "force_oar" },
{ "decrease", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, FLAGS, "force_oar" },
{ "increase", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2 }, 0, 0, FLAGS, "force_oar" },
+ { "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 },
{ NULL }
};