Shut up warnings added by -Wundef

Change-Id: I9c7ef4a75c37aa0e10df75e165e3066614c955ef
This commit is contained in:
Daniel Kang 2012-08-13 16:50:03 -07:00
parent 8fb9f083f2
commit fd084b2489
10 changed files with 20 additions and 54 deletions

View 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); d63_predictor(ypred_ptr, y_stride, 16, yabove_row, yleft_col);
} }
break; break;
#if CONIFG_I8X8
case I8X8_PRED: case I8X8_PRED:
#endif
case B_PRED: case B_PRED:
case NEARESTMV: case NEARESTMV:
case NEARMV: case NEARMV:

View File

@ -11,59 +11,20 @@
#define RTCD_C #define RTCD_C
#include "vpx_rtcd.h" #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, /* No-op version that performs no synchronization. vpx_rtcd() is idempotent,
* so as long as your platform provides atomic loads/stores of pointers * so as long as your platform provides atomic loads/stores of pointers
* no synchronization is strictly necessary. * no synchronization is strictly necessary.
*/ */
static void once(void (*func)(void)) static void once(void (*func)(void)) {
{
static int done; static int done;
if(!done) if(!done) {
{
func(); func();
done = 1; done = 1;
} }
} }
#endif
void vpx_rtcd() {
void vpx_rtcd()
{
once(setup_rtcd_internal); once(setup_rtcd_internal);
} }

View File

@ -9,6 +9,8 @@
*/ */
#include "vpx_config.h"
#if CONFIG_DEBUG #if CONFIG_DEBUG
#include <assert.h> #include <assert.h>
#endif #endif

View File

@ -68,7 +68,7 @@ void vp8_recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
fclose(yuv_file); fclose(yuv_file);
} }
#endif #endif
// #define WRITE_RECON_BUFFER 1 #define WRITE_RECON_BUFFER 0
#if WRITE_RECON_BUFFER #if WRITE_RECON_BUFFER
void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) { void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {

View File

@ -12,6 +12,8 @@
#ifndef __INC_DCT_H #ifndef __INC_DCT_H
#define __INC_DCT_H #define __INC_DCT_H
#include "vpx_config.h"
#define prototype_fdct(sym) void (sym)(short *input, short *output, int pitch) #define prototype_fdct(sym) void (sym)(short *input, short *output, int pitch)
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64

View File

@ -32,7 +32,7 @@
#include "vpx_ports/vpx_timer.h" #include "vpx_ports/vpx_timer.h"
#include "vp8/common/pred_common.h" #include "vp8/common/pred_common.h"
// #define DBG_PRNT_SEGMAP 1 #define DBG_PRNT_SEGMAP 0
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
#define RTCD(x) &cpi->common.rtcd.x #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); sum_intra_stats(cpi, x);
vp8_tokenize_mb(cpi, &x->e_mbd, t, 0); vp8_tokenize_mb(cpi, &x->e_mbd, t, 0);
} }
#if CONFIG_NEWBESTREFMVvp8_tokenize_mb #if CONFIG_NEWBESTREFMV
else else
vp8_tokenize_mb(cpi, &x->e_mbd, t, 1); vp8_tokenize_mb(cpi, &x->e_mbd, t, 1);
#endif #endif

View File

@ -30,7 +30,7 @@
#include "vp8/common/quant_common.h" #include "vp8/common/quant_common.h"
#include "encodemv.h" #include "encodemv.h"
// #define OUTPUT_FPF 1 #define OUTPUT_FPF 0
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
#define IF_RTCD(x) (x) #define IF_RTCD(x) (x)

View File

@ -2605,7 +2605,7 @@ void write_yuv_frame_to_file(YV12_BUFFER_CONFIG *frame) {
} }
#endif #endif
// #define WRITE_RECON_BUFFER 1 #define WRITE_RECON_BUFFER 0
#if WRITE_RECON_BUFFER #if WRITE_RECON_BUFFER
void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) { void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {

View File

@ -12,6 +12,8 @@
#ifndef VARIANCE_H #ifndef VARIANCE_H
#define VARIANCE_H #define VARIANCE_H
#include "vpx_config.h"
#define prototype_sad(sym)\ #define prototype_sad(sym)\
unsigned int (sym)\ unsigned int (sym)\
(\ (\

View File

@ -22,6 +22,7 @@
*/ */
#ifndef VP8CX_H #ifndef VP8CX_H
#define VP8CX_H #define VP8CX_H
#include "vpx_config.h"
#include "vpx_codec_impl_top.h" #include "vpx_codec_impl_top.h"
/*!\name Algorithm interface for VP8 /*!\name Algorithm interface for VP8