]> git.sesse.net Git - ffmpeg/blobdiff - libpostproc/postprocess.c
Make RTSP use the generic http authentication code
[ffmpeg] / libpostproc / postprocess.c
index a41f28bc66b6494e2a51c91d861762429c928dcb..04c1fa8bd32001f821820675429e72d8dd7cefe8 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @file postprocess.c
+ * @file libpostproc/postprocess.c
  * postprocessing.
  */
 
@@ -80,7 +80,7 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
 #include <stdlib.h>
 #include <string.h>
 //#undef HAVE_MMX2
-//#define HAVE_3DNOW
+//#define HAVE_AMD3DNOW
 //#undef HAVE_MMX
 //#undef ARCH_X86
 //#define DEBUG_BRIGHTNESS
@@ -92,6 +92,17 @@ unsigned postproc_version(void)
     return LIBPOSTPROC_VERSION_INT;
 }
 
+const char *postproc_configuration(void)
+{
+    return FFMPEG_CONFIGURATION;
+}
+
+const char *postproc_license(void)
+{
+#define LICENSE_PREFIX "libpostproc license: "
+    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
+}
+
 #if HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif
@@ -554,7 +565,7 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride,
 
 //Note: we have C, MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one
 //Plain C versions
-#if !(HAVE_MMX || HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)
+#if !(HAVE_MMX || HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
 #define COMPILE_C
 #endif
 
@@ -564,15 +575,15 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride,
 
 #if ARCH_X86
 
-#if (HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
+#if (HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
 #define COMPILE_MMX
 #endif
 
-#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT)
+#if HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT
 #define COMPILE_MMX2
 #endif
 
-#if (HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
+#if (HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT
 #define COMPILE_3DNOW
 #endif
 #endif /* ARCH_X86 */
@@ -581,8 +592,8 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride,
 #define HAVE_MMX 0
 #undef HAVE_MMX2
 #define HAVE_MMX2 0
-#undef HAVE_3DNOW
-#define HAVE_3DNOW 0
+#undef HAVE_AMD3DNOW
+#define HAVE_AMD3DNOW 0
 #undef HAVE_ALTIVEC
 #define HAVE_ALTIVEC 0
 
@@ -625,10 +636,10 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride,
 #undef RENAME
 #undef HAVE_MMX
 #undef HAVE_MMX2
-#undef HAVE_3DNOW
+#undef HAVE_AMD3DNOW
 #define HAVE_MMX 1
 #define HAVE_MMX2 0
-#define HAVE_3DNOW 1
+#define HAVE_AMD3DNOW 1
 #define RENAME(a) a ## _3DNow
 #include "postprocess_template.c"
 #endif
@@ -645,7 +656,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[]
     // Using ifs here as they are faster than function pointers although the
     // difference would not be measurable here but it is much better because
     // someone might exchange the CPU whithout restarting MPlayer ;)
-#ifdef RUNTIME_CPUDETECT
+#if CONFIG_RUNTIME_CPUDETECT
 #if ARCH_X86
     // ordered per speed fastest first
     if(c->cpuCaps & PP_CPU_CAPS_MMX2)
@@ -664,10 +675,10 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[]
 #endif
             postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
 #endif
-#else //RUNTIME_CPUDETECT
+#else //CONFIG_RUNTIME_CPUDETECT
 #if   HAVE_MMX2
             postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
-#elif HAVE_3DNOW
+#elif HAVE_AMD3DNOW
             postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
 #elif HAVE_MMX
             postProcess_MMX(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
@@ -676,7 +687,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[]
 #else
             postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
 #endif
-#endif //!RUNTIME_CPUDETECT
+#endif //!CONFIG_RUNTIME_CPUDETECT
 }
 
 //static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
@@ -951,7 +962,7 @@ static const AVClass av_codec_context_class = { "Postproc", context_to_name, NUL
 
 pp_context *pp_get_context(int width, int height, int cpuCaps){
     PPContext *c= av_malloc(sizeof(PPContext));
-    int stride= (width+15)&(~15);    //assumed / will realloc if needed
+    int stride= FFALIGN(width, 16);  //assumed / will realloc if needed
     int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
 
     memset(c, 0, sizeof(PPContext));