]> granicus.if.org Git - libvpx/commitdiff
Shut up warnings added by -Wundef
authorDaniel Kang <ddkang@google.com>
Mon, 13 Aug 2012 23:50:03 +0000 (16:50 -0700)
committerDaniel Kang <ddkang@google.com>
Tue, 14 Aug 2012 16:33:22 +0000 (09:33 -0700)
Change-Id: I9c7ef4a75c37aa0e10df75e165e3066614c955ef

vp8/common/reconintra.c
vp8/common/rtcd.c
vp8/common/treecoder.c
vp8/decoder/onyxd_if.c
vp8/encoder/dct.h
vp8/encoder/encodeframe.c
vp8/encoder/firstpass.c
vp8/encoder/onyx_if.c
vp8/encoder/variance.h
vpx/vp8cx.h

index 1795a71aadebf42f7d66c8bf123816956d50ccea..8cbbcf2b6d2d308d8a3917f06fa820e1bd370df0 100644 (file)
@@ -319,9 +319,7 @@ void vp8_build_intra_predictors_mby_internal(MACROBLOCKD *xd,
       d63_predictor(ypred_ptr, y_stride, 16,  yabove_row, yleft_col);
     }
     break;
-#if CONIFG_I8X8
     case I8X8_PRED:
-#endif
     case B_PRED:
     case NEARESTMV:
     case NEARMV:
index 4980f48ad95d60edbe55cf1333133b7a50494788..a7bb92ce4bbfce8d314b27c859cb757121e68f40 100644 (file)
 #define RTCD_C
 #include "vpx_rtcd.h"
 
-#if CONFIG_MULTITHREAD && HAVE_PTHREAD_H
-#include <pthread.h>
-static void once(void (*func)(void))
-{
-    static pthread_once_t lock = PTHREAD_ONCE_INIT;
-    pthread_once(&lock, func);
-}
-
-
-#elif CONFIG_MULTITHREAD && defined(_WIN32)
-#include <windows.h>
-static void once(void (*func)(void))
-{
-    /* Using a static initializer here rather than InitializeCriticalSection()
-     * since there's no race-free context in which to execute it. Protecting
-     * it with an atomic op like InterlockedCompareExchangePointer introduces
-     * an x86 dependency, and InitOnceExecuteOnce requires Vista.
-     */
-    static CRITICAL_SECTION lock = {(void *)-1, -1, 0, 0, 0, 0};
-    static int done;
-
-    EnterCriticalSection(&lock);
-
-    if (!done)
-    {
-        func();
-        done = 1;
-    }
-
-    LeaveCriticalSection(&lock);
-}
-
-
-#else
 /* No-op version that performs no synchronization. vpx_rtcd() is idempotent,
  * so as long as your platform provides atomic loads/stores of pointers
  * no synchronization is strictly necessary.
  */
 
-static void once(void (*func)(void))
-{
-    static int done;
+static void once(void (*func)(void)) {
+  static int done;
 
-    if(!done)
-    {
-        func();
-        done = 1;
-    }
+  if(!done) {
+    func();
+    done = 1;
+  }
 }
-#endif
-
 
-void vpx_rtcd()
-{
-    once(setup_rtcd_internal);
+void vpx_rtcd() {
+  once(setup_rtcd_internal);
 }
index 0bb8a0d19cfa6701ccaf861bb58e834dfb2228a2..5c182d4dd0262a8730700ac96e954c12d0819706 100644 (file)
@@ -9,6 +9,8 @@
  */
 
 
+#include "vpx_config.h"
+
 #if CONFIG_DEBUG
 #include <assert.h>
 #endif
index f9195b6263a09bc019ba50daed3badd72aec23f6..63499a8f7e68b9d2c379efa914f4803e12e05584 100644 (file)
@@ -68,7 +68,7 @@ void vp8_recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
   fclose(yuv_file);
 }
 #endif
-// #define WRITE_RECON_BUFFER 1
+#define WRITE_RECON_BUFFER 0
 #if WRITE_RECON_BUFFER
 void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
 
index 2d7b61754585200d552a53872595571db3243db3..8d8a842ffe4716956941538d41b597adc0aac5e4 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef __INC_DCT_H
 #define __INC_DCT_H
 
+#include "vpx_config.h"
+
 #define prototype_fdct(sym) void (sym)(short *input, short *output, int pitch)
 
 #if ARCH_X86 || ARCH_X86_64
index 8778335a02a99485457c56bb4df85f0a500ffa07..d3e0e4535d00ec3041810463f1547bc6b774aca5 100644 (file)
@@ -32,7 +32,7 @@
 #include "vpx_ports/vpx_timer.h"
 #include "vp8/common/pred_common.h"
 
-// #define DBG_PRNT_SEGMAP 1
+#define DBG_PRNT_SEGMAP 0
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define RTCD(x)     &cpi->common.rtcd.x
@@ -1462,7 +1462,7 @@ void vp8cx_encode_intra_macro_block(VP8_COMP *cpi,
     sum_intra_stats(cpi, x);
     vp8_tokenize_mb(cpi, &x->e_mbd, t, 0);
   }
-#if CONFIG_NEWBESTREFMVvp8_tokenize_mb
+#if CONFIG_NEWBESTREFMV
   else
     vp8_tokenize_mb(cpi, &x->e_mbd, t, 1);
 #endif
index fdc85a95d8db0ff428279696a2ab4b4a1d718d6e..c1504f2ecec70f4e0430a0c2f619e1ec6ad15362 100644 (file)
@@ -30,7 +30,7 @@
 #include "vp8/common/quant_common.h"
 #include "encodemv.h"
 
-// #define OUTPUT_FPF 1
+#define OUTPUT_FPF 0
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define IF_RTCD(x) (x)
index 46e0689b2d1dc45e193eb2648765af0985925760..bcbc857666d293ce0b88867237c04df688011fb0 100644 (file)
@@ -2605,7 +2605,7 @@ void write_yuv_frame_to_file(YV12_BUFFER_CONFIG *frame) {
 }
 #endif
 
-// #define WRITE_RECON_BUFFER 1
+#define WRITE_RECON_BUFFER 0
 #if WRITE_RECON_BUFFER
 void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
 
index 0bfd93c2c5f643b7a8b17c775ef68997095e9746..73a0a6b99fdcd3b26239fa3c331e892af45190e5 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef VARIANCE_H
 #define VARIANCE_H
 
+#include "vpx_config.h"
+
 #define prototype_sad(sym)\
   unsigned int (sym)\
   (\
index 504b6d7b9ecca1deb52ceba5773670e74c1caa8b..6a0eaa2860cca9000a2c859d3d2c0990085a2d4f 100644 (file)
@@ -22,6 +22,7 @@
  */
 #ifndef VP8CX_H
 #define VP8CX_H
+#include "vpx_config.h"
 #include "vpx_codec_impl_top.h"
 
 /*!\name Algorithm interface for VP8