]> git.sesse.net Git - ffmpeg/blobdiff - libpostproc/postprocess_internal.h
Merge commit 'bb6c67bb36b136de10256f0999128df4a42f9ffc'
[ffmpeg] / libpostproc / postprocess_internal.h
index 33c5f6932bf7a673761bfcffaf547190aa965462..b1b8f0c6331d08ef23e9842c971065677a369374 100644 (file)
@@ -20,7 +20,7 @@
 
 /**
  * @file
- * internal api header.
+ * internal API header.
  */
 
 #ifndef POSTPROC_POSTPROCESS_INTERNAL_H
@@ -28,6 +28,7 @@
 
 #include <string.h>
 #include "libavutil/avutil.h"
+#include "libavutil/intmath.h"
 #include "libavutil/log.h"
 #include "postprocess.h"
 
@@ -53,7 +54,7 @@
 #define H_X1_FILTER     0x2000                  // 8192
 #define H_A_DEBLOCK     0x4000
 
-/// select between full y range (255-0) or standart one (234-16)
+/// select between full y range (255-0) or standard one (234-16)
 #define FULL_Y_RANGE    0x8000                  // 32768
 
 //Deinterlacing Filters
 //filters on
 //#define COMPILE_TIME_MODE 0x77
 
-static inline int CLIP(int a){
-    if(a&256) return ((a)>>31)^(-1);
-    else      return a;
-}
+#define CLIP av_clip_uint8
+
 /**
- * Postprocessng filter.
+ * Postprocessing filter.
  */
 struct PPFilter{
     const char *shortName;
@@ -92,15 +91,15 @@ struct PPFilter{
 };
 
 /**
- * Postprocessng mode.
+ * Postprocessing mode.
  */
 typedef struct PPMode{
-    int lumMode;                    ///< acivates filters for luminance
-    int chromMode;                  ///< acivates filters for chrominance
+    int lumMode;                    ///< activates filters for luminance
+    int chromMode;                  ///< activates filters for chrominance
     int error;                      ///< non zero on error
 
-    int minAllowedY;                ///< for brigtness correction
-    int maxAllowedY;                ///< for brihtness correction
+    int minAllowedY;                ///< for brightness correction
+    int maxAllowedY;                ///< for brightness correction
     float maxClippedThreshold;      ///< amount of "black" you are willing to lose to get a brightness-corrected picture
 
     int maxTmpNoise[3];             ///< for Temporal Noise Reducing filter (Maximal sum of abs differences)