]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/common.h
remove unneeded local variable
[ffmpeg] / libavutil / common.h
index 5b830d06458d71e95960b3eb38ff323903ef64ce..696b03e78b80d6d75ab840455a43d67441851e6f 100644 (file)
@@ -225,6 +225,20 @@ static inline av_const int16_t av_clip_int16(int a)
     else                    return a;
 }
 
+/**
+ * clip a float value into the amin-amax range
+ * @param a value to clip
+ * @param amin minimum value of the clip range
+ * @param amax maximum value of the clip range
+ * @return clipped value
+ */
+static inline av_const float av_clipf(float a, float amin, float amax)
+{
+    if      (a < amin) return amin;
+    else if (a > amax) return amax;
+    else               return a;
+}
+
 /* math */
 int64_t av_const ff_gcd(int64_t a, int64_t b);
 
@@ -378,7 +392,7 @@ tend= AV_READ_TIME();\
     }else\
         tskip_count++;\
     if(((tcount+tskip_count)&(tcount+tskip_count-1))==0){\
-        av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n",\
+        av_log(NULL, AV_LOG_ERROR, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n",\
                tsum*10/tcount, id, tcount, tskip_count);\
     }\
 }