[FFmpeg-cvslog] avfilter/vf_eq: Support contrast from -1000 to 1000

Michael Niedermayer git at videolan.org
Thu Jul 16 19:03:37 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Jul 15 15:38:59 2015 +0200| [c4dfb76fa7e4d51fd4ca686a63499245c0687a84] | committer: Michael Niedermayer

avfilter/vf_eq: Support contrast from -1000 to 1000

Fixes "-vf eq=0.05,eq=20"

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c4dfb76fa7e4d51fd4ca686a63499245c0687a84
---

 libavfilter/vf_eq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
index f8b8160..1519d3d 100644
--- a/libavfilter/vf_eq.c
+++ b/libavfilter/vf_eq.c
@@ -98,7 +98,7 @@ static void check_values(EQParameters *param, EQContext *eq)
 {
     if (param->contrast == 1.0 && param->brightness == 0.0 && param->gamma == 1.0)
         param->adjust = NULL;
-    else if (param->gamma == 1.0)
+    else if (param->gamma == 1.0 && fabs(param->contrast) < 7.9)
         param->adjust = eq->process;
     else
         param->adjust = apply_lut;
@@ -106,7 +106,7 @@ static void check_values(EQParameters *param, EQContext *eq)
 
 static void set_contrast(EQContext *eq)
 {
-    eq->contrast = av_clipf(av_expr_eval(eq->contrast_pexpr, eq->var_values, eq), -2.0, 2.0);
+    eq->contrast = av_clipf(av_expr_eval(eq->contrast_pexpr, eq->var_values, eq), -1000.0, 1000.0);
     eq->param[0].contrast = eq->contrast;
     eq->param[0].lut_clean = 0;
     check_values(&eq->param[0], eq);



More information about the ffmpeg-cvslog mailing list