aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-09-16 12:35:55 +0200
committerPaul B Mahol <onemda@gmail.com>2016-09-16 12:35:55 +0200
commit5b509fafb07abe7f344fe33de64fa386289e965e (patch)
tree640c9617a303c8978c07b33eaccdc4d54ee103a1
parent51000b994514e64a6c5039e179f20c9e24f87c45 (diff)
downloadffmpeg-5b509fafb07abe7f344fe33de64fa386289e965e.tar.gz
avfilter/vf_lut2: also export video input bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--doc/filters.texi6
-rw-r--r--libavfilter/vf_lut2.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index ff0ac50997..c7a015b2ed 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -9352,6 +9352,12 @@ The first input value for the pixel component.
@item y
The second input value for the pixel component.
+
+@item bdx
+The first input video bit depth.
+
+@item bdy
+The second input video bit depth.
@end table
All expressions default to "x".
diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c
index 550edecd03..85b10531b6 100644
--- a/libavfilter/vf_lut2.c
+++ b/libavfilter/vf_lut2.c
@@ -35,6 +35,8 @@ static const char *const var_names[] = {
"h", ///< height of the input video
"x", ///< input value for the pixel from input #1
"y", ///< input value for the pixel from input #2
+ "bdx", ///< input #1 video bitdepth
+ "bdy", ///< input #2 video bitdepth
NULL
};
@@ -43,6 +45,8 @@ enum var_name {
VAR_H,
VAR_X,
VAR_Y,
+ VAR_BITDEPTHX,
+ VAR_BITDEPTHY,
VAR_VARS_NB
};
@@ -127,6 +131,7 @@ static int config_inputx(AVFilterLink *inlink)
s->var_values[VAR_W] = inlink->w;
s->var_values[VAR_H] = inlink->h;
s->depthx = desc->comp[0].depth;
+ s->var_values[VAR_BITDEPTHX] = s->depthx;
return 0;
}
@@ -138,6 +143,7 @@ static int config_inputy(AVFilterLink *inlink)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
s->depthy = desc->comp[0].depth;
+ s->var_values[VAR_BITDEPTHY] = s->depthy;
return 0;
}