]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_lut2: also export video input bit depth
authorPaul B Mahol <onemda@gmail.com>
Fri, 16 Sep 2016 10:35:55 +0000 (12:35 +0200)
committerPaul B Mahol <onemda@gmail.com>
Fri, 16 Sep 2016 10:35:55 +0000 (12:35 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
doc/filters.texi
libavfilter/vf_lut2.c

index ff0ac509972f526b10778194428285b5fb1ee7a7..c7a015b2ed12a9f0820a3775866bf72f6d003793 100644 (file)
@@ -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".
index 550edecd036a3875315a84410e80bc4b68375b57..85b10531b6c791aba971350cb96556be94e6ec58 100644 (file)
@@ -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;
 }