]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_colorlevels: no need to use double for coeff
authorPaul B Mahol <onemda@gmail.com>
Tue, 2 Feb 2021 15:14:48 +0000 (16:14 +0100)
committerPaul B Mahol <onemda@gmail.com>
Tue, 2 Feb 2021 16:53:29 +0000 (17:53 +0100)
libavfilter/vf_colorlevels.c

index b4d81061330dc4fe552424bee77e88b065a6d8ba..f1eeb68c54e9f1e52bce01f304e496825255acee 100644 (file)
@@ -111,7 +111,7 @@ typedef struct ThreadData {
     int dst_linesize;
     int src_linesize;
 
-    double coeff;
+    float coeff;
     uint8_t offset;
 
     int h;
@@ -135,7 +135,7 @@ typedef struct ThreadData {
                                                                 \
     int imin = td->imin;                                        \
     int omin = td->omin;                                        \
-    double coeff = td->coeff;
+    float coeff = td->coeff;
 
 static int colorlevel_slice_8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 {
@@ -198,7 +198,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
             int imax = lrint(r->in_max  * UINT8_MAX);
             int omin = lrint(r->out_min * UINT8_MAX);
             int omax = lrint(r->out_max * UINT8_MAX);
-            double coeff;
+            float coeff;
             ThreadData td;
 
             if (imin < 0) {
@@ -250,7 +250,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
             int imax = lrint(r->in_max  * UINT16_MAX);
             int omin = lrint(r->out_min * UINT16_MAX);
             int omax = lrint(r->out_max * UINT16_MAX);
-            double coeff;
+            float coeff;
             ThreadData td;
 
             if (imin < 0) {