[FFmpeg-cvslog] r16590 - in trunk: cmdutils.c configure doc/faq.texi ffmpeg.c ffplay.c ffserver.c libavcodec/aac.c libavcodec/aactab.c libavcodec/aactab.h libavcodec/adpcm.c libavcodec/alpha/dsputil_alpha_asm.S li...
aurel
subversion
Wed Jan 14 00:44:16 CET 2009
Author: aurel
Date: Wed Jan 14 00:44:16 2009
New Revision: 16590
Log:
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.
Modified:
trunk/cmdutils.c
trunk/configure
trunk/doc/faq.texi
trunk/ffmpeg.c
trunk/ffplay.c
trunk/ffserver.c
trunk/libavcodec/aac.c
trunk/libavcodec/aactab.c
trunk/libavcodec/aactab.h
trunk/libavcodec/adpcm.c
trunk/libavcodec/alpha/dsputil_alpha_asm.S
trunk/libavcodec/alpha/motion_est_mvi_asm.S
trunk/libavcodec/arm/asm.S
trunk/libavcodec/arm/dsputil_arm.c
trunk/libavcodec/arm/dsputil_arm_s.S
trunk/libavcodec/arm/dsputil_vfp.S
trunk/libavcodec/arm/float_arm_vfp.c
trunk/libavcodec/arm/mathops.h
trunk/libavcodec/arm/mpegvideo_arm.c
trunk/libavcodec/asv1.c
trunk/libavcodec/bfin/mathops.h
trunk/libavcodec/bitstream.h
trunk/libavcodec/cabac.h
trunk/libavcodec/cljr.c
trunk/libavcodec/cscd.c
trunk/libavcodec/dct-test.c
trunk/libavcodec/dnxhdenc.c
trunk/libavcodec/dsputil.c
trunk/libavcodec/dsputil.h
trunk/libavcodec/dv.c
trunk/libavcodec/error_resilience.c
trunk/libavcodec/fft.c
trunk/libavcodec/ffv1.c
trunk/libavcodec/flacenc.c
trunk/libavcodec/g726.c
trunk/libavcodec/h263.c
trunk/libavcodec/h263dec.c
trunk/libavcodec/h264.c
trunk/libavcodec/h264_parser.c
trunk/libavcodec/huffyuv.c
trunk/libavcodec/imgconvert.c
trunk/libavcodec/imgresample.c
trunk/libavcodec/lcldec.c
trunk/libavcodec/lclenc.c
trunk/libavcodec/libamr.c
trunk/libavcodec/libdirac.h
trunk/libavcodec/libfaad.c
trunk/libavcodec/libschroedinger.h
trunk/libavcodec/libxvidff.c
trunk/libavcodec/mathops.h
trunk/libavcodec/mpc.c
trunk/libavcodec/mpc.h
trunk/libavcodec/mpc7.c
trunk/libavcodec/mpc8.c
trunk/libavcodec/mpeg12.c
trunk/libavcodec/mpegaudiodec.c
trunk/libavcodec/mpegvideo.c
trunk/libavcodec/mpegvideo_common.h
trunk/libavcodec/msmpeg4.c
trunk/libavcodec/options.c
trunk/libavcodec/pcm.c
trunk/libavcodec/pnmenc.c
trunk/libavcodec/ppc/dsputil_ppc.c
trunk/libavcodec/ppc/dsputil_ppc.h
trunk/libavcodec/ppc/gcc_fixes.h
trunk/libavcodec/ppc/idct_altivec.c
trunk/libavcodec/ppc/mathops.h
trunk/libavcodec/ppc/util_altivec.h
trunk/libavcodec/qdm2.c
trunk/libavcodec/ratecontrol.c
trunk/libavcodec/rectangle.h
trunk/libavcodec/rv10.c
trunk/libavcodec/simple_idct.c
trunk/libavcodec/snow.c
trunk/libavcodec/snow.h
trunk/libavcodec/sonic.c
trunk/libavcodec/svq1enc.c
trunk/libavcodec/svq3.c
trunk/libavcodec/tiff.c
trunk/libavcodec/tiffenc.c
trunk/libavcodec/utils.c
trunk/libavcodec/vcr1.c
trunk/libavcodec/vp3.c
trunk/libavcodec/x86/cpuid.c
trunk/libavcodec/x86/dsputil_mmx.c
trunk/libavcodec/x86/dsputil_mmx.h
trunk/libavcodec/x86/dsputilenc_mmx.c
trunk/libavcodec/x86/fft_sse.c
trunk/libavcodec/x86/h264_i386.h
trunk/libavcodec/x86/h264dsp_mmx.c
trunk/libavcodec/x86/idct_sse2_xvid.c
trunk/libavcodec/x86/mpegvideo_mmx.c
trunk/libavcodec/x86/mpegvideo_mmx_template.c
trunk/libavcodec/x86/snowdsp_mmx.c
trunk/libavdevice/audio.c
trunk/libavdevice/beosaudio.cpp
trunk/libavdevice/bktr.c
trunk/libavdevice/v4l2.c
trunk/libavformat/aiff.c
trunk/libavformat/allformats.c
trunk/libavformat/amr.c
trunk/libavformat/asf-enc.c
trunk/libavformat/au.c
trunk/libavformat/avienc.c
trunk/libavformat/aviobuf.c
trunk/libavformat/daud.c
trunk/libavformat/dv.c
trunk/libavformat/dvenc.c
trunk/libavformat/ffmdec.c
trunk/libavformat/file.c
trunk/libavformat/flvenc.c
trunk/libavformat/framehook.c
trunk/libavformat/img2.c
trunk/libavformat/libnut.c
trunk/libavformat/matroskadec.c
trunk/libavformat/mmf.c
trunk/libavformat/mov.c
trunk/libavformat/movenc.c
trunk/libavformat/mp3.c
trunk/libavformat/mpegenc.c
trunk/libavformat/network.h
trunk/libavformat/nutdec.c
trunk/libavformat/nutenc.c
trunk/libavformat/os_support.c
trunk/libavformat/os_support.h
trunk/libavformat/raw.c
trunk/libavformat/riff.c
trunk/libavformat/rtpproto.c
trunk/libavformat/rtsp.c
trunk/libavformat/sdp.c
trunk/libavformat/swfenc.c
trunk/libavformat/tcp.c
trunk/libavformat/udp.c
trunk/libavformat/utils.c
trunk/libavformat/wav.c
trunk/libavformat/westwood.c
trunk/libavformat/yuv4mpeg.c
trunk/libavutil/adler32.c
trunk/libavutil/aes.c
trunk/libavutil/arm/bswap.h
trunk/libavutil/bswap.h
trunk/libavutil/common.h
trunk/libavutil/crc.c
trunk/libavutil/des.c
trunk/libavutil/internal.h
trunk/libavutil/intreadwrite.h
trunk/libavutil/md5.c
trunk/libavutil/mem.c
trunk/libavutil/mem.h
trunk/libavutil/sha1.c
trunk/libavutil/x86/bswap.h
trunk/libavutil/x86_cpu.h
trunk/libpostproc/postprocess.c
trunk/libpostproc/postprocess_template.c
Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/cmdutils.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,19 +30,19 @@
#include "config.h"
#include "libavformat/avformat.h"
-#ifdef CONFIG_AVFILTER
+#if CONFIG_AVFILTER
#include "libavfilter/avfilter.h"
#endif
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
-#ifdef CONFIG_POSTPROC
+#if CONFIG_POSTPROC
#include "libpostproc/postprocess.h"
#endif
#include "libavutil/avstring.h"
#include "libavcodec/opt.h"
#include "cmdutils.h"
#include "version.h"
-#ifdef CONFIG_NETWORK
+#if CONFIG_NETWORK
#include "libavformat/network.h"
#endif
@@ -255,7 +255,7 @@ void print_error(const char *filename, i
case AVERROR(ENOENT):
fprintf(stderr, "%s: no such file or directory\n", filename);
break;
-#ifdef CONFIG_NETWORK
+#if CONFIG_NETWORK
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
break;
@@ -279,13 +279,13 @@ static void print_all_lib_versions(FILE*
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent);
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
-#ifdef CONFIG_AVFILTER
+#if CONFIG_AVFILTER
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
#endif
-#ifdef CONFIG_SWSCALE
+#if CONFIG_SWSCALE
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent);
#endif
-#ifdef CONFIG_POSTPROC
+#if CONFIG_POSTPROC
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
#endif
}
@@ -311,7 +311,7 @@ void show_version(void) {
void show_license(void)
{
-#ifdef CONFIG_NONFREE
+#if CONFIG_NONFREE
printf(
"This version of %s has nonfree parts compiled in.\n"
"Therefore it is not legally redistributable.\n",
Modified: trunk/configure
==============================================================================
--- trunk/configure Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/configure Wed Jan 14 00:44:16 2009 (r16590)
@@ -430,6 +430,7 @@ print_config(){
echo "#define ENABLE_${ucname} 1" >> $header
echo "${pfx}${ucname}=yes" >> $makefile
else
+ echo "#define ${pfx}${ucname} 0" >> $header
echo "#define ENABLE_${ucname} 0" >> $header
fi
done
Modified: trunk/doc/faq.texi
==============================================================================
--- trunk/doc/faq.texi Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/doc/faq.texi Wed Jan 14 00:44:16 2009 (r16590)
@@ -426,7 +426,7 @@ you need the debug information, used the
@section I do not like the LGPL, can I contribute code under the GPL instead?
Yes, as long as the code is optional and can easily and cleanly be placed
-under #ifdef CONFIG_GPL without breaking anything. So for example a new codec
+under #if CONFIG_GPL without breaking anything. So for example a new codec
or filter would be OK under GPL while a bug fix to LGPL code would not.
@section I want to compile xyz.c alone but my compiler produced many errors.
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/ffmpeg.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -41,23 +41,23 @@
#include "libavutil/avstring.h"
#include "libavformat/os_support.h"
-#ifdef HAVE_SYS_RESOURCE_H
+#if HAVE_SYS_RESOURCE_H
#include <sys/types.h>
#include <sys/resource.h>
-#elif defined(HAVE_GETPROCESSTIMES)
+#elif HAVE_GETPROCESSTIMES
#include <windows.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
-#elif defined(HAVE_CONIO_H)
+#elif HAVE_CONIO_H
#include <conio.h>
#endif
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
@@ -295,7 +295,7 @@ typedef struct AVInputFile {
int nb_streams; /* nb streams we are aware of */
} AVInputFile;
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
/* init terminal so that we can grab keys */
static struct termios oldtty;
@@ -303,7 +303,7 @@ static struct termios oldtty;
static void term_exit(void)
{
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
tcsetattr (0, TCSANOW, &oldtty);
#endif
}
@@ -319,7 +319,7 @@ sigterm_handler(int sig)
static void term_init(void)
{
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
struct termios tty;
tcgetattr (0, &tty);
@@ -344,7 +344,7 @@ static void term_init(void)
register a function to be called at normal program termination
*/
atexit(term_exit);
-#ifdef CONFIG_BEOS_NETSERVER
+#if CONFIG_BEOS_NETSERVER
fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
#endif
}
@@ -352,10 +352,10 @@ static void term_init(void)
/* read a key without blocking */
static int read_key(void)
{
-#if defined(HAVE_TERMIOS_H)
+#if HAVE_TERMIOS_H
int n = 1;
unsigned char ch;
-#ifndef CONFIG_BEOS_NETSERVER
+#if !CONFIG_BEOS_NETSERVER
struct timeval tv;
fd_set rfds;
@@ -372,7 +372,7 @@ static int read_key(void)
return n;
}
-#elif defined(HAVE_CONIO_H)
+#elif HAVE_CONIO_H
if(kbhit())
return(getch());
#endif
@@ -427,7 +427,7 @@ static int av_exit(int ret)
av_free(video_standard);
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
void powerpc_display_perf_report(void);
powerpc_display_perf_report();
#endif /* CONFIG_POWERPC_PERF */
@@ -2553,7 +2553,7 @@ static void opt_top_field_first(const ch
static int opt_thread_count(const char *opt, const char *arg)
{
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
-#if !defined(HAVE_THREADS)
+#if !HAVE_THREADS
if (verbose >= 0)
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
@@ -2626,7 +2626,7 @@ static void opt_video_tag(const char *ar
video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
}
-#ifdef CONFIG_VHOOK
+#if CONFIG_VHOOK
static void add_frame_hooker(const char *arg)
{
int argc = 0;
@@ -3416,12 +3416,12 @@ static void opt_pass(const char *pass_st
static int64_t getutime(void)
{
-#ifdef HAVE_GETRUSAGE
+#if HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
-#elif defined(HAVE_GETPROCESSTIMES)
+#elif HAVE_GETPROCESSTIMES
HANDLE proc;
FILETIME c, e, k, u;
proc = GetCurrentProcess();
@@ -3828,7 +3828,7 @@ static const OptionDef options[] = {
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
-#ifdef CONFIG_VHOOK
+#if CONFIG_VHOOK
{ "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
#endif
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/ffplay.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -2019,7 +2019,7 @@ static int decode_thread(void *arg)
else
av_read_play(ic);
}
-#if defined(CONFIG_RTSP_DEMUXER) || defined(CONFIG_MMSH_PROTOCOL)
+#if CONFIG_RTSP_DEMUXER || CONFIG_MMSH_PROTOCOL
if (is->paused &&
(!strcmp(ic->iformat->name, "rtsp") ||
(ic->pb && !strcmp(url_fileno(ic->pb)->prot->name, "mmsh")))) {
@@ -2467,7 +2467,7 @@ static int opt_vismv(const char *opt, co
static int opt_thread_count(const char *opt, const char *arg)
{
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
-#if !defined(HAVE_THREADS)
+#if !HAVE_THREADS
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
return 0;
@@ -2579,7 +2579,7 @@ int main(int argc, char **argv)
}
if (!display_disable) {
-#ifdef HAVE_SDL_VIDEO_SIZE
+#if HAVE_SDL_VIDEO_SIZE
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
fs_screen_width = vi->current_w;
fs_screen_height = vi->current_h;
Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/ffserver.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#define _XOPEN_SOURCE 600
#include "config.h"
-#ifndef HAVE_CLOSESOCKET
+#if !HAVE_CLOSESOCKET
#define closesocket close
#endif
#include <string.h>
@@ -41,7 +41,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#ifdef HAVE_POLL_H
+#if HAVE_POLL_H
#include <poll.h>
#endif
#include <errno.h>
@@ -50,7 +50,7 @@
#include <time.h>
#include <sys/wait.h>
#include <signal.h>
-#ifdef HAVE_DLFCN_H
+#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
@@ -3709,7 +3709,7 @@ static enum CodecID opt_video_codec(cons
/* simplistic plugin support */
-#ifdef HAVE_DLOPEN
+#if HAVE_DLOPEN
static void load_module(const char *filename)
{
void *dll;
@@ -4394,7 +4394,7 @@ static int parse_ffconfig(const char *fi
}
} else if (!strcasecmp(cmd, "LoadModule")) {
get_arg(arg, sizeof(arg), &p);
-#ifdef HAVE_DLOPEN
+#if HAVE_DLOPEN
load_module(arg);
#else
fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n",
Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/aac.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -435,7 +435,7 @@ static av_cold int aac_decode_init(AVCod
ac->sf_offset = 60;
}
-#ifndef CONFIG_HARDCODED_TABLES
+#if !CONFIG_HARDCODED_TABLES
for (i = 0; i < 428; i++)
ff_aac_pow2sf_tab[i] = pow(2, (i - 200)/4.);
#endif /* CONFIG_HARDCODED_TABLES */
Modified: trunk/libavcodec/aactab.c
==============================================================================
--- trunk/libavcodec/aactab.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/aactab.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -899,7 +899,7 @@ const float * const ff_aac_codebook_vect
codebook_vector8, codebook_vector10,
};
-#ifdef CONFIG_HARDCODED_TABLES
+#if CONFIG_HARDCODED_TABLES
/**
* Table of pow(2, (i - 200)/4.) used for different purposes depending on the
Modified: trunk/libavcodec/aactab.h
==============================================================================
--- trunk/libavcodec/aactab.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/aactab.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -65,7 +65,7 @@ extern const uint16_t ff_aac_spectral_s
extern const float *ff_aac_codebook_vectors[];
-#ifdef CONFIG_HARDCODED_TABLES
+#if CONFIG_HARDCODED_TABLES
extern const float ff_aac_pow2sf_tab[316];
#else
extern float ff_aac_pow2sf_tab[316];
Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/adpcm.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -153,7 +153,7 @@ typedef struct ADPCMContext {
/* XXX: implement encoding */
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static int adpcm_encode_init(AVCodecContext *avctx)
{
if (avctx->channels > 2)
@@ -1589,7 +1589,7 @@ static int adpcm_decode_frame(AVCodecCon
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
#define ADPCM_ENCODER(id,name,long_name_) \
AVCodec name ## _encoder = { \
#name, \
@@ -1607,7 +1607,7 @@ AVCodec name ## _encoder = {
#define ADPCM_ENCODER(id,name,long_name_)
#endif
-#ifdef CONFIG_DECODERS
+#if CONFIG_DECODERS
#define ADPCM_DECODER(id,name,long_name_) \
AVCodec name ## _decoder = { \
#name, \
Modified: trunk/libavcodec/alpha/dsputil_alpha_asm.S
==============================================================================
--- trunk/libavcodec/alpha/dsputil_alpha_asm.S Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/alpha/dsputil_alpha_asm.S Wed Jan 14 00:44:16 2009 (r16590)
@@ -53,7 +53,7 @@ put_pixels_axp_asm:
.frame sp, 0, ra
.prologue 0
-#ifdef CONFIG_GPROF
+#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
@@ -150,7 +150,7 @@ put_pixels_clamped_mvi_asm:
.frame sp, 0, ra
.prologue 0
-#ifdef CONFIG_GPROF
+#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
@@ -205,7 +205,7 @@ add_pixels_clamped_mvi_asm:
.frame sp, 0, ra
.prologue 0
-#ifdef CONFIG_GPROF
+#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
Modified: trunk/libavcodec/alpha/motion_est_mvi_asm.S
==============================================================================
--- trunk/libavcodec/alpha/motion_est_mvi_asm.S Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/alpha/motion_est_mvi_asm.S Wed Jan 14 00:44:16 2009 (r16590)
@@ -55,7 +55,7 @@ pix_abs16x16_mvi_asm:
.frame sp, 0, ra, 0
.prologue 0
-#ifdef CONFIG_GPROF
+#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
Modified: trunk/libavcodec/arm/asm.S
==============================================================================
--- trunk/libavcodec/arm/asm.S Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/asm.S Wed Jan 14 00:44:16 2009 (r16590)
@@ -38,7 +38,7 @@
.endm
.macro movrel rd, val
-#if defined(HAVE_ARMV6T2) && !defined(CONFIG_SHARED)
+#if HAVE_ARMV6T2 && !CONFIG_SHARED
movw \rd, #:lower16:\val
movt \rd, #:upper16:\val
#else
Modified: trunk/libavcodec/arm/dsputil_arm.c
==============================================================================
--- trunk/libavcodec/arm/dsputil_arm.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/dsputil_arm.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -20,7 +20,7 @@
*/
#include "libavcodec/dsputil.h"
-#ifdef HAVE_IPP
+#if HAVE_IPP
#include <ipp.h>
#endif
@@ -93,7 +93,7 @@ static void simple_idct_ARM_add(uint8_t
ff_add_pixels_clamped(block, dest, line_size);
}
-#ifdef HAVE_IPP
+#if HAVE_IPP
static void simple_idct_ipp(DCTELEM *block)
{
ippiDCT8x8Inv_Video_16s_C1I(block);
@@ -108,7 +108,7 @@ void add_pixels_clamped_iwmmxt(const DCT
static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
{
ippiDCT8x8Inv_Video_16s_C1I(block);
-#ifdef HAVE_IWMMXT
+#if HAVE_IWMMXT
add_pixels_clamped_iwmmxt(block, dest, line_size);
#else
ff_add_pixels_clamped_ARM(block, dest, line_size);
@@ -130,13 +130,13 @@ void dsputil_init_arm(DSPContext* c, AVC
if (avctx->lowres == 0) {
if(idct_algo == FF_IDCT_AUTO){
-#if defined(HAVE_IPP)
+#if HAVE_IPP
idct_algo = FF_IDCT_IPP;
-#elif defined(HAVE_NEON)
+#elif HAVE_NEON
idct_algo = FF_IDCT_SIMPLENEON;
-#elif defined(HAVE_ARMV6)
+#elif HAVE_ARMV6
idct_algo = FF_IDCT_SIMPLEARMV6;
-#elif defined(HAVE_ARMV5TE)
+#elif HAVE_ARMV5TE
idct_algo = FF_IDCT_SIMPLEARMV5TE;
#else
idct_algo = FF_IDCT_ARM;
@@ -153,28 +153,28 @@ void dsputil_init_arm(DSPContext* c, AVC
c->idct_add= simple_idct_ARM_add;
c->idct = simple_idct_ARM;
c->idct_permutation_type= FF_NO_IDCT_PERM;
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
c->idct_put= ff_simple_idct_put_armv6;
c->idct_add= ff_simple_idct_add_armv6;
c->idct = ff_simple_idct_armv6;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
#endif
-#ifdef HAVE_ARMV5TE
+#if HAVE_ARMV5TE
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
c->idct_put= simple_idct_put_armv5te;
c->idct_add= simple_idct_add_armv5te;
c->idct = simple_idct_armv5te;
c->idct_permutation_type = FF_NO_IDCT_PERM;
#endif
-#ifdef HAVE_IPP
+#if HAVE_IPP
} else if (idct_algo==FF_IDCT_IPP){
c->idct_put= simple_idct_ipp_put;
c->idct_add= simple_idct_ipp_add;
c->idct = simple_idct_ipp;
c->idct_permutation_type= FF_NO_IDCT_PERM;
#endif
-#ifdef HAVE_NEON
+#if HAVE_NEON
} else if (idct_algo==FF_IDCT_SIMPLENEON){
c->idct_put= ff_simple_idct_put_neon;
c->idct_add= ff_simple_idct_add_neon;
@@ -201,17 +201,17 @@ void dsputil_init_arm(DSPContext* c, AVC
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm;
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;
-#ifdef HAVE_ARMV5TE
+#if HAVE_ARMV5TE
c->prefetch = ff_prefetch_arm;
#endif
-#ifdef HAVE_IWMMXT
+#if HAVE_IWMMXT
dsputil_init_iwmmxt(c, avctx);
#endif
-#ifdef HAVE_ARMVFP
+#if HAVE_ARMVFP
ff_float_init_arm_vfp(c, avctx);
#endif
-#ifdef HAVE_NEON
+#if HAVE_NEON
ff_dsputil_init_neon(c, avctx);
#endif
}
Modified: trunk/libavcodec/arm/dsputil_arm_s.S
==============================================================================
--- trunk/libavcodec/arm/dsputil_arm_s.S Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/dsputil_arm_s.S Wed Jan 14 00:44:16 2009 (r16590)
@@ -24,12 +24,12 @@
preserve8
-#ifndef HAVE_PLD
+#if !HAVE_PLD
.macro pld reg
.endm
#endif
-#ifdef HAVE_ARMV5TE
+#if HAVE_ARMV5TE
function ff_prefetch_arm, export=1
subs r2, r2, #1
pld [r0]
Modified: trunk/libavcodec/arm/dsputil_vfp.S
==============================================================================
--- trunk/libavcodec/arm/dsputil_vfp.S Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/dsputil_vfp.S Wed Jan 14 00:44:16 2009 (r16590)
@@ -133,7 +133,7 @@ function ff_vector_fmul_reverse_vfp, exp
bx lr
.endfunc
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
/**
* ARM VFP optimized float to int16 conversion.
* Assume that len is a positive number and is multiple of 8, destination
Modified: trunk/libavcodec/arm/float_arm_vfp.c
==============================================================================
--- trunk/libavcodec/arm/float_arm_vfp.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/float_arm_vfp.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -29,7 +29,7 @@ void ff_float_init_arm_vfp(DSPContext* c
{
c->vector_fmul = ff_vector_fmul_vfp;
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
c->float_to_int16 = ff_float_to_int16_vfp;
#endif
}
Modified: trunk/libavcodec/arm/mathops.h
==============================================================================
--- trunk/libavcodec/arm/mathops.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/mathops.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -38,7 +38,7 @@ static inline av_const int MULL(int a, i
}
#define MULH MULH
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
static inline av_const int MULH(int a, int b)
{
int r;
@@ -73,7 +73,7 @@ static inline av_const int64_t MAC64(int
#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
#define MLS64(d, a, b) MAC64(d, -(a), b)
-#if defined(HAVE_ARMV5TE)
+#if HAVE_ARMV5TE
/* signed 16x16 -> 32 multiply add accumulate */
# define MAC16(rt, ra, rb) \
Modified: trunk/libavcodec/arm/mpegvideo_arm.c
==============================================================================
--- trunk/libavcodec/arm/mpegvideo_arm.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/arm/mpegvideo_arm.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -31,10 +31,10 @@ void MPV_common_init_arm(MpegEncContext
* allow optimized functions for armv5te unless
* a better iwmmxt function exists
*/
-#ifdef HAVE_ARMV5TE
+#if HAVE_ARMV5TE
MPV_common_init_armv5te(s);
#endif
-#ifdef HAVE_IWMMXT
+#if HAVE_IWMMXT
MPV_common_init_iwmmxt(s);
#endif
}
Modified: trunk/libavcodec/asv1.c
==============================================================================
--- trunk/libavcodec/asv1.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/asv1.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -465,7 +465,7 @@ for(i=0; i<s->avctx->extradata_size; i++
return (get_bits_count(&a->gb)+31)/32*4;
}
-#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
+#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
ASV1Context * const a = avctx->priv_data;
AVFrame *pict = data;
@@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *
return size*4;
}
-#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
+#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
static av_cold void common_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
@@ -569,7 +569,7 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
-#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
+#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
int i;
@@ -593,7 +593,7 @@ static av_cold int encode_init(AVCodecCo
return 0;
}
-#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
+#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
static av_cold int decode_end(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
@@ -631,7 +631,7 @@ AVCodec asv2_decoder = {
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
};
-#ifdef CONFIG_ASV1_ENCODER
+#if CONFIG_ASV1_ENCODER
AVCodec asv1_encoder = {
"asv1",
CODEC_TYPE_VIDEO,
@@ -645,7 +645,7 @@ AVCodec asv1_encoder = {
};
#endif
-#ifdef CONFIG_ASV2_ENCODER
+#if CONFIG_ASV2_ENCODER
AVCodec asv2_encoder = {
"asv2",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/bfin/mathops.h
==============================================================================
--- trunk/libavcodec/bfin/mathops.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/bfin/mathops.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#ifndef AVCODEC_BFIN_MATHOPS_H
#define AVCODEC_BFIN_MATHOPS_H
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define MULH(X,Y) ({ int xxo; \
__asm__ ( \
"a1 = %2.L * %1.L (FU);\n\t" \
Modified: trunk/libavcodec/bitstream.h
==============================================================================
--- trunk/libavcodec/bitstream.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/bitstream.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -41,7 +41,7 @@
//#define ALT_BITSTREAM_WRITER
//#define ALIGNED_BITSTREAM_WRITER
#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER)
-# ifdef ARCH_ARM
+# if ARCH_ARM
# define A32_BITSTREAM_READER
# else
# define ALT_BITSTREAM_READER
@@ -52,7 +52,7 @@
extern const uint8_t ff_reverse[256];
-#if defined(ARCH_X86)
+#if ARCH_X86
// avoid +32 for shift optimization (gcc should do that ...)
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
__asm__ ("sarl %1, %0\n\t"
@@ -196,7 +196,7 @@ static inline void put_bits(PutBitContex
#ifdef BITSTREAM_WRITER_LE
bit_buf |= value << (32 - bit_left);
if (n >= bit_left) {
-#ifndef HAVE_FAST_UNALIGNED
+#if !HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf ;
s->buf_ptr[1] = bit_buf >> 8;
@@ -217,7 +217,7 @@ static inline void put_bits(PutBitContex
} else {
bit_buf<<=bit_left;
bit_buf |= value >> (n - bit_left);
-#ifndef HAVE_FAST_UNALIGNED
+#if !HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf >> 24;
s->buf_ptr[1] = bit_buf >> 16;
@@ -243,7 +243,7 @@ static inline void put_bits(PutBitContex
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
{
# ifdef ALIGNED_BITSTREAM_WRITER
-# if defined(ARCH_X86)
+# if ARCH_X86
__asm__ volatile(
"movl %0, %%ecx \n\t"
"xorl %%eax, %%eax \n\t"
@@ -274,7 +274,7 @@ static inline void put_bits(PutBitContex
s->index= index;
# endif
# else //ALIGNED_BITSTREAM_WRITER
-# if defined(ARCH_X86)
+# if ARCH_X86
__asm__ volatile(
"movl $7, %%ecx \n\t"
"andl %0, %%ecx \n\t"
@@ -550,7 +550,7 @@ static inline void skip_bits_long(GetBit
name##_bit_count-= 32;\
}\
-#if defined(ARCH_X86)
+#if ARCH_X86
# define SKIP_CACHE(name, gb, num)\
__asm__(\
"shldl %2, %1, %0 \n\t"\
Modified: trunk/libavcodec/cabac.h
==============================================================================
--- trunk/libavcodec/cabac.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/cabac.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -270,7 +270,7 @@ static void refill(CABACContext *c){
c->bytestream+= CABAC_BITS/8;
}
-#if ! ( defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) )
+#if ! ( ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) )
static void refill2(CABACContext *c){
int i, x;
@@ -372,7 +372,7 @@ static av_always_inline int get_cabac_in
//FIXME gcc generates duplicate load/stores for c->low and c->range
#define LOW "0"
#define RANGE "4"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
#define BYTESTART "16"
#define BYTE "24"
#define BYTEEND "32"
@@ -381,7 +381,7 @@ static av_always_inline int get_cabac_in
#define BYTE "16"
#define BYTEEND "20"
#endif
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
int bit;
#ifndef BRANCHLESS_CABAC_DECODER
@@ -467,7 +467,7 @@ static av_always_inline int get_cabac_in
#else /* BRANCHLESS_CABAC_DECODER */
-#if defined HAVE_FAST_CMOV
+#if HAVE_FAST_CMOV
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
"mov "tmp" , %%ecx \n\t"\
"shl $17 , "tmp" \n\t"\
@@ -537,7 +537,7 @@ static av_always_inline int get_cabac_in
);
bit&=1;
#endif /* BRANCHLESS_CABAC_DECODER */
-#else /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
+#else /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */
int s = *state;
int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
int bit, lps_mask av_unused;
@@ -576,7 +576,7 @@ static av_always_inline int get_cabac_in
if(!(c->low & CABAC_MASK))
refill2(c);
#endif /* BRANCHLESS_CABAC_DECODER */
-#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
+#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */
return bit;
}
@@ -637,7 +637,7 @@ static int av_unused get_cabac_bypass(CA
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
+#if ARCH_X86 && !(defined(PIC) && defined(__GNUC__))
__asm__ volatile(
"movl "RANGE "(%1), %%ebx \n\t"
"movl "LOW "(%1), %%eax \n\t"
Modified: trunk/libavcodec/cljr.c
==============================================================================
--- trunk/libavcodec/cljr.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/cljr.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,6 +30,7 @@
/* Disable the encoder. */
#undef CONFIG_CLJR_ENCODER
+#define CONFIG_CLJR_ENCODER 0
typedef struct CLJRContext{
AVCodecContext *avctx;
@@ -84,7 +85,7 @@ static int decode_frame(AVCodecContext *
return buf_size;
}
-#ifdef CONFIG_CLJR_ENCODER
+#if CONFIG_CLJR_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
CLJRContext * const a = avctx->priv_data;
AVFrame *pict = data;
@@ -124,7 +125,7 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
-#ifdef CONFIG_CLJR_ENCODER
+#if CONFIG_CLJR_ENCODER
static av_cold int encode_init(AVCodecContext *avctx){
common_init(avctx);
@@ -146,7 +147,7 @@ AVCodec cljr_decoder = {
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
};
-#ifdef CONFIG_CLJR_ENCODER
+#if CONFIG_CLJR_ENCODER
AVCodec cljr_encoder = {
"cljr",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/cscd.c
==============================================================================
--- trunk/libavcodec/cscd.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/cscd.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -23,7 +23,7 @@
#include "avcodec.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
#include "libavutil/lzo.h"
@@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *
break;
}
case 1: { // zlib compression
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
unsigned long dlen = c->decomp_size;
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK)
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
Modified: trunk/libavcodec/dct-test.c
==============================================================================
--- trunk/libavcodec/dct-test.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/dct-test.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -97,14 +97,14 @@ struct algo algos[] = {
{"INT", 1, j_rev_dct, idct, MMX_PERM},
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
-#ifdef HAVE_MMX
+#if HAVE_MMX
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, FF_MM_MMX},
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT},
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2},
#endif
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX},
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT},
#endif
@@ -114,25 +114,25 @@ struct algo algos[] = {
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2},
#endif
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, FF_MM_ALTIVEC},
#endif
-#ifdef ARCH_BFIN
+#if ARCH_BFIN
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM},
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM},
#endif
-#ifdef ARCH_ARM
+#if ARCH_ARM
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM },
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM },
-#ifdef HAVE_ARMV5TE
+#if HAVE_ARMV5TE
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM },
#endif
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
{"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, idct, MMX_PERM },
#endif
-#ifdef HAVE_NEON
+#if HAVE_NEON
{"SIMPLE-NEON", 1, ff_simple_idct_neon, idct, PARTTRANS_PERM },
#endif
#endif /* ARCH_ARM */
@@ -186,7 +186,7 @@ static DCTELEM block_org[64] __attribute
static inline void mmx_emms(void)
{
-#ifdef HAVE_MMX
+#if HAVE_MMX
if (cpu_flags & FF_MM_MMX)
__asm__ volatile ("emms\n\t");
#endif
Modified: trunk/libavcodec/dnxhdenc.c
==============================================================================
--- trunk/libavcodec/dnxhdenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/dnxhdenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -177,7 +177,7 @@ static int dnxhd_encode_init(AVCodecCont
dsputil_init(&ctx->m.dsp, avctx);
ff_dct_common_init(&ctx->m);
-#ifdef HAVE_MMX
+#if HAVE_MMX
ff_dnxhd_init_mmx(ctx);
#endif
if (!ctx->m.dct_quantize)
Modified: trunk/libavcodec/dsputil.c
==============================================================================
--- trunk/libavcodec/dsputil.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/dsputil.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -169,7 +169,7 @@ void ff_init_scantable(uint8_t *permutat
int j;
j = src_scantable[i];
st->permutated[i] = permutation[j];
-#ifdef ARCH_PPC
+#if ARCH_PPC
st->inverse[j] = i;
#endif
}
@@ -340,7 +340,7 @@ static int sse16_c(void *v, uint8_t *pix
}
-#ifdef CONFIG_SNOW_ENCODER //dwt is in snow.c
+#if CONFIG_SNOW_ENCODER //dwt is in snow.c
static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){
int s, i, j;
const int dec_count= w==8 ? 3 : 4;
@@ -2711,7 +2711,7 @@ static void wmv2_mspel8_h_lowpass(uint8_
}
}
-#ifdef CONFIG_CAVS_DECODER
+#if CONFIG_CAVS_DECODER
/* AVS specific */
void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx);
@@ -2729,7 +2729,7 @@ void ff_avg_cavs_qpel16_mc00_c(uint8_t *
}
#endif /* CONFIG_CAVS_DECODER */
-#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
+#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
/* VC-1 specific */
void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx);
@@ -2743,11 +2743,11 @@ void ff_intrax8dsp_init(DSPContext* c, A
/* H264 specific */
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
-#if defined(CONFIG_RV30_DECODER)
+#if CONFIG_RV30_DECODER
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
#endif /* CONFIG_RV30_DECODER */
-#if defined(CONFIG_RV40_DECODER)
+#if CONFIG_RV40_DECODER
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
put_pixels16_xy2_c(dst, src, stride, 16);
}
@@ -3467,7 +3467,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_fu
case FF_CMP_NSSE:
cmp[i]= c->nsse[i];
break;
-#ifdef CONFIG_SNOW_ENCODER
+#if CONFIG_SNOW_ENCODER
case FF_CMP_W53:
cmp[i]= c->w53[i];
break;
@@ -3518,7 +3518,7 @@ static void add_bytes_l2_c(uint8_t *dst,
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
long i;
-#ifndef HAVE_FAST_UNALIGNED
+#if !HAVE_FAST_UNALIGNED
if((long)src2 & (sizeof(long)-1)){
for(i=0; i+7<w; i+=8){
dst[i+0] = src1[i+0]-src2[i+0];
@@ -3686,7 +3686,7 @@ static int dct_sad8x8_c(/*MpegEncContext
return s->dsp.sum_abs_dctelem(temp);
}
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
#define DCT8_1D {\
const int s07 = SRC(0) + SRC(7);\
const int s16 = SRC(1) + SRC(6);\
@@ -3992,7 +3992,7 @@ static int ssd_int8_vs_int16_c(const int
WRAPPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
WRAPPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
WRAPPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
WRAPPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
#endif
WRAPPER8_16_SQ(dct_max8x8_c, dct_max16_c)
@@ -4249,7 +4249,7 @@ int ff_check_alignment(void){
if((long)&aligned & 15){
if(!did_fail){
-#if defined(HAVE_MMX) || defined(HAVE_ALTIVEC)
+#if HAVE_MMX || HAVE_ALTIVEC
av_log(NULL, AV_LOG_ERROR,
"Compiler did not align stack variables. Libavcodec has been miscompiled\n"
"and may be very slow or crash. This is not a bug in libavcodec,\n"
@@ -4269,7 +4269,7 @@ void dsputil_init(DSPContext* c, AVCodec
ff_check_alignment();
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
if(avctx->dct_algo==FF_DCT_FASTINT) {
c->fdct = fdct_ifast;
c->fdct248 = fdct_ifast248;
@@ -4487,22 +4487,22 @@ void dsputil_init(DSPContext* c, AVCodec
c->draw_edges = draw_edges_c;
-#ifdef CONFIG_CAVS_DECODER
+#if CONFIG_CAVS_DECODER
ff_cavsdsp_init(c,avctx);
#endif
-#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
+#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
ff_vc1dsp_init(c,avctx);
#endif
-#if defined(CONFIG_WMV2_DECODER) || defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
+#if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
ff_intrax8dsp_init(c,avctx);
#endif
-#if defined(CONFIG_H264_ENCODER)
+#if CONFIG_H264_ENCODER
ff_h264dspenc_init(c,avctx);
#endif
-#if defined(CONFIG_RV30_DECODER)
+#if CONFIG_RV30_DECODER
ff_rv30dsp_init(c,avctx);
#endif
-#if defined(CONFIG_RV40_DECODER)
+#if CONFIG_RV40_DECODER
ff_rv40dsp_init(c,avctx);
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c;
c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c;
@@ -4527,7 +4527,7 @@ void dsputil_init(DSPContext* c, AVCodec
c->hadamard8_diff[4]= hadamard8_intra16_c;
SET_CMP_FUNC(dct_sad)
SET_CMP_FUNC(dct_max)
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
SET_CMP_FUNC(dct264_sad)
#endif
c->sad[0]= pix_abs16_c;
@@ -4544,7 +4544,7 @@ void dsputil_init(DSPContext* c, AVCodec
c->vsse[4]= vsse_intra16_c;
c->nsse[0]= nsse16_c;
c->nsse[1]= nsse8_c;
-#ifdef CONFIG_SNOW_ENCODER
+#if CONFIG_SNOW_ENCODER
c->w53[0]= w53_16_c;
c->w53[1]= w53_8_c;
c->w97[0]= w97_16_c;
@@ -4558,7 +4558,7 @@ void dsputil_init(DSPContext* c, AVCodec
c->diff_bytes= diff_bytes_c;
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
c->bswap_buf= bswap_buf;
-#ifdef CONFIG_PNG_DECODER
+#if CONFIG_PNG_DECODER
c->add_png_paeth_prediction= ff_add_png_paeth_prediction;
#endif
@@ -4587,19 +4587,19 @@ void dsputil_init(DSPContext* c, AVCodec
c->try_8x8basis= try_8x8basis_c;
c->add_8x8basis= add_8x8basis_c;
-#ifdef CONFIG_SNOW_DECODER
+#if CONFIG_SNOW_DECODER
c->vertical_compose97i = ff_snow_vertical_compose97i;
c->horizontal_compose97i = ff_snow_horizontal_compose97i;
c->inner_add_yblock = ff_snow_inner_add_yblock;
#endif
-#ifdef CONFIG_VORBIS_DECODER
+#if CONFIG_VORBIS_DECODER
c->vorbis_inverse_coupling = vorbis_inverse_coupling;
#endif
-#ifdef CONFIG_AC3_DECODER
+#if CONFIG_AC3_DECODER
c->ac3_downmix = ff_ac3_downmix_c;
#endif
-#ifdef CONFIG_FLAC_ENCODER
+#if CONFIG_FLAC_ENCODER
c->flac_compute_autocorr = ff_flac_compute_autocorr;
#endif
c->vector_fmul = vector_fmul_c;
Modified: trunk/libavcodec/dsputil.h
==============================================================================
--- trunk/libavcodec/dsputil.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/dsputil.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -174,7 +174,7 @@ typedef struct ScanTable{
const uint8_t *scantable;
uint8_t permutated[64];
uint8_t raster_end[64];
-#ifdef ARCH_PPC
+#if ARCH_PPC
/** Used by dct_quantize_altivec to find last-non-zero */
DECLARE_ALIGNED(16, uint8_t, inverse[64]);
#endif
@@ -584,7 +584,7 @@ void dsputil_init_vis(DSPContext* c, AVC
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
-#if defined(HAVE_MMX)
+#if HAVE_MMX
#undef emms_c
@@ -608,23 +608,23 @@ static inline void emms(void)
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
-#elif defined(ARCH_ARM)
+#elif ARCH_ARM
extern int mm_flags;
-#ifdef HAVE_NEON
+#if HAVE_NEON
# define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
# define STRIDE_ALIGN 16
#endif
-#elif defined(ARCH_PPC)
+#elif ARCH_PPC
extern int mm_flags;
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
#define STRIDE_ALIGN 16
-#elif defined(HAVE_MMI)
+#elif HAVE_MMI
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
#define STRIDE_ALIGN 16
Modified: trunk/libavcodec/dv.c
==============================================================================
--- trunk/libavcodec/dv.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/dv.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -1123,7 +1123,7 @@ static int dv_encode_video_segment(AVCod
return 0;
}
-#ifdef CONFIG_DVVIDEO_DECODER
+#if CONFIG_DVVIDEO_DECODER
/* NOTE: exactly one frame must be given (120000 bytes for NTSC,
144000 bytes for PAL - or twice those for 50Mbps) */
static int dvvideo_decode_frame(AVCodecContext *avctx,
@@ -1240,7 +1240,7 @@ static inline int dv_write_pack(enum dv_
return 5;
}
-#ifdef CONFIG_DVVIDEO_ENCODER
+#if CONFIG_DVVIDEO_ENCODER
static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
{
int chan, i, j, k;
@@ -1328,7 +1328,7 @@ static int dvvideo_close(AVCodecContext
}
-#ifdef CONFIG_DVVIDEO_ENCODER
+#if CONFIG_DVVIDEO_ENCODER
AVCodec dvvideo_encoder = {
"dvvideo",
CODEC_TYPE_VIDEO,
@@ -1341,7 +1341,7 @@ AVCodec dvvideo_encoder = {
};
#endif // CONFIG_DVVIDEO_ENCODER
-#ifdef CONFIG_DVVIDEO_DECODER
+#if CONFIG_DVVIDEO_DECODER
AVCodec dvvideo_decoder = {
"dvvideo",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/error_resilience.c
==============================================================================
--- trunk/libavcodec/error_resilience.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/error_resilience.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -563,7 +563,7 @@ static int is_intra_more_likely(MpegEncC
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
//prevent dsp.sad() check, that requires access to the image
if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
#endif
@@ -935,7 +935,7 @@ void ff_er_frame_end(MpegEncContext *s){
}else
guess_mv(s);
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
/* the filters below are not XvMC compatible, skip them */
if(s->avctx->xvmc_acceleration) goto ec_clean;
#endif
@@ -1024,7 +1024,7 @@ void ff_er_frame_end(MpegEncContext *s){
v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0);
}
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
ec_clean:
#endif
/* clean a few tables */
Modified: trunk/libavcodec/fft.c
==============================================================================
--- trunk/libavcodec/fft.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/fft.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -91,7 +91,7 @@ int ff_fft_init(FFTContext *s, int nbits
s->imdct_half = ff_imdct_half_c;
s->exptab1 = NULL;
-#if defined HAVE_MMX && defined HAVE_YASM
+#if HAVE_MMX && HAVE_YASM
has_vectors = mm_support();
if (has_vectors & FF_MM_SSE) {
/* SSE for P3/P4/K8 */
@@ -110,7 +110,7 @@ int ff_fft_init(FFTContext *s, int nbits
s->imdct_half = ff_imdct_half_3dn;
s->fft_calc = ff_fft_calc_3dn;
}
-#elif defined HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
+#elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
has_vectors = mm_support();
if (has_vectors & FF_MM_ALTIVEC) {
s->fft_calc = ff_fft_calc_altivec;
@@ -336,7 +336,7 @@ static void fft8(FFTComplex *z)
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf);
}
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
static void fft16(FFTComplex *z)
{
FFTSample t1, t2, t3, t4, t5, t6;
@@ -358,7 +358,7 @@ DECL_FFT(64,32,16)
DECL_FFT(128,64,32)
DECL_FFT(256,128,64)
DECL_FFT(512,256,128)
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
#define pass pass_big
#endif
DECL_FFT(1024,512,256)
Modified: trunk/libavcodec/ffv1.c
==============================================================================
--- trunk/libavcodec/ffv1.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ffv1.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -350,7 +350,7 @@ static inline int get_vlc_symbol(GetBitC
return ret;
}
-#ifdef CONFIG_FFV1_ENCODER
+#if CONFIG_FFV1_ENCODER
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
PlaneContext * const p= &s->plane[plane_index];
RangeCoder * const c= &s->c;
@@ -543,7 +543,7 @@ static av_cold int common_init(AVCodecCo
return 0;
}
-#ifdef CONFIG_FFV1_ENCODER
+#if CONFIG_FFV1_ENCODER
static av_cold int encode_init(AVCodecContext *avctx)
{
FFV1Context *s = avctx->priv_data;
@@ -632,7 +632,7 @@ static void clear_state(FFV1Context *f){
}
}
-#ifdef CONFIG_FFV1_ENCODER
+#if CONFIG_FFV1_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
FFV1Context *f = avctx->priv_data;
RangeCoder * const c= &f->c;
@@ -1025,7 +1025,7 @@ AVCodec ffv1_decoder = {
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
};
-#ifdef CONFIG_FFV1_ENCODER
+#if CONFIG_FFV1_ENCODER
AVCodec ffv1_encoder = {
"ffv1",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/flacenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -775,7 +775,7 @@ static void encode_residual_lpc(int32_t
for(i=0; i<order; i++) {
res[i] = smp[i];
}
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
for(i=order; i<n; i+=2) {
int j;
int s = smp[i];
Modified: trunk/libavcodec/g726.c
==============================================================================
--- trunk/libavcodec/g726.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/g726.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -285,7 +285,7 @@ static av_cold int g726_reset(G726Contex
return 0;
}
-#ifdef CONFIG_ADPCM_G726_ENCODER
+#if CONFIG_ADPCM_G726_ENCODER
static int16_t g726_encode(G726Context* c, int16_t sig)
{
uint8_t i;
@@ -342,7 +342,7 @@ static av_cold int g726_close(AVCodecCon
return 0;
}
-#ifdef CONFIG_ADPCM_G726_ENCODER
+#if CONFIG_ADPCM_G726_ENCODER
static int g726_encode_frame(AVCodecContext *avctx,
uint8_t *dst, int buf_size, void *data)
{
@@ -381,7 +381,7 @@ static int g726_decode_frame(AVCodecCont
return buf_size;
}
-#ifdef CONFIG_ADPCM_G726_ENCODER
+#if CONFIG_ADPCM_G726_ENCODER
AVCodec adpcm_g726_encoder = {
"g726",
CODEC_TYPE_AUDIO,
Modified: trunk/libavcodec/h263.c
==============================================================================
--- trunk/libavcodec/h263.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/h263.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -54,7 +54,7 @@
#define H263_MBTYPE_B_VLC_BITS 6
#define CBPC_B_VLC_BITS 3
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void h263_encode_block(MpegEncContext * s, DCTELEM * block,
int n);
static void h263p_encode_umotion(MpegEncContext * s, int val);
@@ -72,7 +72,7 @@ static int h263_decode_block(MpegEncCont
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra, int rvlc);
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr);
static void mpeg4_encode_visual_object_header(MpegEncContext * s);
static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number);
@@ -80,7 +80,7 @@ static void mpeg4_encode_vol_header(Mpeg
static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb);
static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *dir_ptr, int encoding);
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static uint8_t uni_DCtab_lum_len[512];
static uint8_t uni_DCtab_chrom_len[512];
static uint16_t uni_DCtab_lum_bits[512];
@@ -155,7 +155,7 @@ static void show_pict_info(MpegEncContex
);
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void aspect_to_info(MpegEncContext * s, AVRational aspect){
int i;
@@ -736,7 +736,7 @@ void ff_h263_update_motion_val(MpegEncCo
}
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){
int l, bit_size, code;
@@ -1549,7 +1549,7 @@ void ff_h263_loop_filter(MpegEncContext
}
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr)
{
int x, y, wrap, a, c, pred_dc, scale;
@@ -1741,7 +1741,7 @@ int16_t *h263_pred_motion(MpegEncContext
return *mot_val;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
{
int range, l, bit_size, sign, code, bits;
@@ -2652,7 +2652,7 @@ void mpeg4_pred_ac(MpegEncContext * s, D
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
/**
* encodes the dc value.
@@ -3049,7 +3049,7 @@ static inline void memsetw(short *tab, i
tab[i] = val;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
void ff_mpeg4_init_partitions(MpegEncContext *s)
{
@@ -3106,7 +3106,7 @@ int ff_mpeg4_get_video_packet_prefix_len
}
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s)
{
@@ -4563,7 +4563,7 @@ static int h263_decode_block(MpegEncCont
} else if (s->mb_intra) {
/* DC coef */
if(s->codec_id == CODEC_ID_RV10){
-#ifdef CONFIG_RV10_DECODER
+#if CONFIG_RV10_DECODER
if (s->rv10_version == 3 && s->pict_type == FF_I_TYPE) {
int component, diff;
component = (n <= 3 ? 0 : n - 4 + 1);
Modified: trunk/libavcodec/h263dec.c
==============================================================================
--- trunk/libavcodec/h263dec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/h263dec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -545,7 +545,7 @@ retry:
}
#endif
-#if defined(HAVE_MMX)
+#if HAVE_MMX
if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build && avctx->idct_algo == FF_IDCT_AUTO && (mm_flags & FF_MM_MMX)){
avctx->idct_algo= FF_IDCT_XVIDMMX;
avctx->coded_width= 0; // force reinit
Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/h264.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -36,7 +36,7 @@
#include "vdpau_internal.h"
#include "cabac.h"
-#ifdef ARCH_X86
+#if ARCH_X86
#include "x86/h264_i386.h"
#endif
@@ -1380,8 +1380,8 @@ static const uint8_t *decode_nal(H264Con
printf("%2X ", src[i]);
#endif
-#ifdef HAVE_FAST_UNALIGNED
-# ifdef HAVE_FAST_64BIT
+#if HAVE_FAST_UNALIGNED
+# if HAVE_FAST_64BIT
# define RS 7
for(i=0; i+1<length; i+=9){
if(!((~*(uint64_t*)(src+i) & (*(uint64_t*)(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL))
@@ -5224,7 +5224,7 @@ static av_always_inline void decode_caba
uint8_t *last_coeff_ctx_base;
uint8_t *abs_level_m1_ctx_base;
-#ifndef ARCH_X86
+#if !ARCH_X86
#define CABAC_ON_STACK
#endif
#ifdef CABAC_ON_STACK
@@ -5285,7 +5285,7 @@ static av_always_inline void decode_caba
index[coeff_count++] = last;\
}
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
} else {
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
@@ -5360,7 +5360,7 @@ static av_always_inline void decode_caba
}
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
static void decode_cabac_residual_dc( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 1);
}
@@ -5371,7 +5371,7 @@ static void decode_cabac_residual_nondc(
#endif
static void decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, cat == 0 || cat == 3);
#else
if( cat == 0 || cat == 3 ) decode_cabac_residual_dc(h, block, cat, n, scantable, qmul, max_coeff);
@@ -6572,7 +6572,7 @@ static void filter_mb( H264Context *h, i
filter_mb_mbaff_edgecv( h, &img_cr[0], uvlinesize, bS, rqp );
}
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
for( dir = 0; dir < 2; dir++ )
filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, dir ? 0 : first_vertical_edge_done, dir);
#else
@@ -8023,7 +8023,7 @@ AVCodec h264_decoder = {
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
};
-#ifdef CONFIG_H264_VDPAU_DECODER
+#if CONFIG_H264_VDPAU_DECODER
AVCodec h264_vdpau_decoder = {
"h264_vdpau",
CODEC_TYPE_VIDEO,
@@ -8039,6 +8039,6 @@ AVCodec h264_vdpau_decoder = {
};
#endif
-#ifdef CONFIG_SVQ3_DECODER
+#if CONFIG_SVQ3_DECODER
#include "svq3.c"
#endif
Modified: trunk/libavcodec/h264_parser.c
==============================================================================
--- trunk/libavcodec/h264_parser.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/h264_parser.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -44,11 +44,11 @@ int ff_h264_find_frame_end(H264Context *
for(i=0; i<buf_size; i++){
if(state==7){
-#ifdef HAVE_FAST_UNALIGNED
+#if HAVE_FAST_UNALIGNED
/* we check i<buf_size instead of i+3/7 because its simpler
* and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end
*/
-# ifdef HAVE_FAST_64BIT
+# if HAVE_FAST_64BIT
while(i<buf_size && !((~*(uint64_t*)(buf+i) & (*(uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL))
i+=8;
# else
Modified: trunk/libavcodec/huffyuv.c
==============================================================================
--- trunk/libavcodec/huffyuv.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/huffyuv.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -261,7 +261,7 @@ static int generate_bits_table(uint32_t
return 0;
}
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
typedef struct {
uint64_t val;
int name;
@@ -317,7 +317,7 @@ static void generate_len_table(uint8_t *
if(i==size) break;
}
}
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
static void generate_joint_tables(HYuvContext *s){
uint16_t symbols[1<<VLC_BITS];
@@ -477,7 +477,7 @@ static int common_init(AVCodecContext *a
return 0;
}
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
static av_cold int decode_init(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
@@ -573,9 +573,9 @@ s->bgr32=1;
return 0;
}
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
int i;
int index= 0;
@@ -725,7 +725,7 @@ static av_cold int encode_init(AVCodecCo
return 0;
}
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
/* TODO instead of restarting the read when the code isn't in the first level
* of the joint table, jump into the 2nd level of the individual table. */
@@ -761,7 +761,7 @@ static void decode_gray_bitstream(HYuvCo
}
}
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
static int encode_422_bitstream(HYuvContext *s, int count){
int i;
@@ -854,7 +854,7 @@ static int encode_gray_bitstream(HYuvCon
}
return 0;
}
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
int i;
@@ -931,7 +931,7 @@ static int encode_bgr_bitstream(HYuvCont
return 0;
}
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
static void draw_slice(HYuvContext *s, int y){
int h, cy;
int offset[4];
@@ -1198,7 +1198,7 @@ static int decode_frame(AVCodecContext *
return (get_bits_count(&s->gb)+31)/32*4 + table_size;
}
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
static int common_end(HYuvContext *s){
int i;
@@ -1209,7 +1209,7 @@ static int common_end(HYuvContext *s){
return 0;
}
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER
static av_cold int decode_end(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
@@ -1224,9 +1224,9 @@ static av_cold int decode_end(AVCodecCon
return 0;
}
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
HYuvContext *s = avctx->priv_data;
AVFrame *pict = data;
@@ -1431,9 +1431,9 @@ static av_cold int encode_end(AVCodecCon
return 0;
}
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */
-#ifdef CONFIG_HUFFYUV_DECODER
+#if CONFIG_HUFFYUV_DECODER
AVCodec huffyuv_decoder = {
"huffyuv",
CODEC_TYPE_VIDEO,
@@ -1449,7 +1449,7 @@ AVCodec huffyuv_decoder = {
};
#endif
-#ifdef CONFIG_FFVHUFF_DECODER
+#if CONFIG_FFVHUFF_DECODER
AVCodec ffvhuff_decoder = {
"ffvhuff",
CODEC_TYPE_VIDEO,
@@ -1465,7 +1465,7 @@ AVCodec ffvhuff_decoder = {
};
#endif
-#ifdef CONFIG_HUFFYUV_ENCODER
+#if CONFIG_HUFFYUV_ENCODER
AVCodec huffyuv_encoder = {
"huffyuv",
CODEC_TYPE_VIDEO,
@@ -1479,7 +1479,7 @@ AVCodec huffyuv_encoder = {
};
#endif
-#ifdef CONFIG_FFVHUFF_ENCODER
+#if CONFIG_FFVHUFF_ENCODER
AVCodec ffvhuff_encoder = {
"ffvhuff",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/imgconvert.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -34,7 +34,7 @@
#include "dsputil.h"
#include "colorspace.h"
-#ifdef HAVE_MMX
+#if HAVE_MMX
#include "x86/mmx.h"
#include "x86/dsputil_mmx.h"
#endif
@@ -2089,7 +2089,7 @@ int av_picture_pad(AVPicture *dst, const
return 0;
}
-#ifndef CONFIG_SWSCALE
+#if !CONFIG_SWSCALE
static uint8_t y_ccir_to_jpeg[256];
static uint8_t y_jpeg_to_ccir[256];
static uint8_t c_ccir_to_jpeg[256];
@@ -2662,7 +2662,7 @@ int img_get_alpha_info(const AVPicture *
return ret;
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
#define DEINT_INPLACE_LINE_LUM \
movd_m2r(lum_m4[0],mm0);\
movd_m2r(lum_m3[0],mm1);\
@@ -2716,7 +2716,7 @@ static void deinterlace_line(uint8_t *ds
const uint8_t *lum,
int size)
{
-#ifndef HAVE_MMX
+#if !HAVE_MMX
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int sum;
@@ -2754,7 +2754,7 @@ static void deinterlace_line(uint8_t *ds
static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum,
int size)
{
-#ifndef HAVE_MMX
+#if !HAVE_MMX
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int sum;
Modified: trunk/libavcodec/imgresample.c
==============================================================================
--- trunk/libavcodec/imgresample.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/imgresample.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -29,7 +29,7 @@
#include "imgconvert.h"
#include "libswscale/swscale.h"
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
#include "ppc/imgresample_altivec.h"
#endif
@@ -153,7 +153,7 @@ static void v_resample(uint8_t *dst, int
}
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
#include "x86/mmx.h"
@@ -340,7 +340,7 @@ static void h_resample(uint8_t *dst, int
} else {
n = dst_width;
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4)
h_resample_fast4_mmx(dst, n,
src, src_width, src_start, src_incr, filters);
@@ -397,7 +397,7 @@ static void component_resample(ImgReSamp
}
/* apply vertical filter */
phase_y = get_phase(src_y);
-#ifdef HAVE_MMX
+#if HAVE_MMX
/* desactivated MMX because loss of precision */
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4 && 0)
v_resample4_mmx(output, owidth,
@@ -405,7 +405,7 @@ static void component_resample(ImgReSamp
&s->v_filters[phase_y][0]);
else
#endif
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
if ((mm_flags & FF_MM_ALTIVEC) && NB_TAPS == 4 && FILTER_BITS <= 6)
v_resample16_altivec(output, owidth,
s->line_buf + (ring_y - NB_TAPS + 1) * owidth,
@@ -732,7 +732,7 @@ static void dump_filter(int16_t *filter)
}
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
int mm_flags;
#endif
@@ -804,7 +804,7 @@ int main(int argc, char **argv)
}
/* mmx test */
-#ifdef HAVE_MMX
+#if HAVE_MMX
av_log(NULL, AV_LOG_INFO, "MMX test\n");
fact = 0.72;
xsize = (int)(XSIZE * fact);
Modified: trunk/libavcodec/lcldec.c
==============================================================================
--- trunk/libavcodec/lcldec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/lcldec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -45,7 +45,7 @@
#include "bitstream.h"
#include "lcl.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
@@ -65,7 +65,7 @@ typedef struct LclDecContext {
unsigned int decomp_size;
// Decompression buffer
unsigned char* decomp_buf;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
z_stream zstream;
#endif
} LclDecContext;
@@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *
unsigned char yq, y1q, uq, vq;
int uqvq;
unsigned int mthread_inlen, mthread_outlen;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
int zret; // Zlib return code
#endif
unsigned int len = buf_size;
@@ -235,7 +235,7 @@ static int decode_frame(AVCodecContext *
}
break;
case CODEC_ID_ZLIB:
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
/* Using the original dll with normal compression (-1) and RGB format
* gives a file with ZLIB fourcc, but frame is really uncompressed.
* To be sure that's true check also frame size */
@@ -524,7 +524,7 @@ static av_cold int decode_init(AVCodecCo
c->pic.data[0] = NULL;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
// Needed if zlib unused or init aborted before inflateInit
memset(&(c->zstream), 0, sizeof(z_stream));
#endif
@@ -599,7 +599,7 @@ static av_cold int decode_init(AVCodecCo
}
break;
case CODEC_ID_ZLIB:
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
switch (c->compression) {
case COMP_ZLIB_HISPEED:
av_log(avctx, AV_LOG_INFO, "High speed compression.\n");
@@ -648,7 +648,7 @@ static av_cold int decode_init(AVCodecCo
/* If needed init zlib */
if (avctx->codec_id == CODEC_ID_ZLIB) {
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
c->zstream.zalloc = Z_NULL;
c->zstream.zfree = Z_NULL;
c->zstream.opaque = Z_NULL;
@@ -679,14 +679,14 @@ static av_cold int decode_end(AVCodecCon
if (c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
inflateEnd(&(c->zstream));
#endif
return 0;
}
-#ifdef CONFIG_MSZH_DECODER
+#if CONFIG_MSZH_DECODER
AVCodec mszh_decoder = {
"mszh",
CODEC_TYPE_VIDEO,
@@ -701,7 +701,7 @@ AVCodec mszh_decoder = {
};
#endif
-#ifdef CONFIG_ZLIB_DECODER
+#if CONFIG_ZLIB_DECODER
AVCodec zlib_decoder = {
"zlib",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/lclenc.c
==============================================================================
--- trunk/libavcodec/lclenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/lclenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -45,7 +45,7 @@
#include "bitstream.h"
#include "lcl.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
@@ -70,7 +70,7 @@ typedef struct LclEncContext {
unsigned int max_comp_size;
// Compression buffer
unsigned char* comp_buf;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
z_stream zstream;
#endif
} LclEncContext;
@@ -87,7 +87,7 @@ static int encode_frame(AVCodecContext *
int i;
int zret; // Zlib return code
-#ifndef CONFIG_ZLIB
+#if !CONFIG_ZLIB
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n");
return -1;
#else
@@ -144,7 +144,7 @@ static av_cold int encode_init(AVCodecCo
LclEncContext *c = avctx->priv_data;
int zret; // Zlib return code
-#ifndef CONFIG_ZLIB
+#if !CONFIG_ZLIB
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n");
return 1;
#else
@@ -213,7 +213,7 @@ static av_cold int encode_end(AVCodecCon
av_freep(&avctx->extradata);
av_freep(&c->comp_buf);
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
deflateEnd(&(c->zstream));
#endif
Modified: trunk/libavcodec/libamr.c
==============================================================================
--- trunk/libavcodec/libamr.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/libamr.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -65,7 +65,7 @@
#include "avcodec.h"
-#ifdef CONFIG_LIBAMR_NB_FIXED
+#if CONFIG_LIBAMR_NB_FIXED
#define MMS_IO
@@ -137,7 +137,7 @@ static void amr_decode_fix_avctx(AVCodec
avctx->sample_fmt = SAMPLE_FMT_S16;
}
-#ifdef CONFIG_LIBAMR_NB_FIXED
+#if CONFIG_LIBAMR_NB_FIXED
/* fixed point version*/
/* frame size in serial bitstream file (frame type + serial stream + flags) */
#define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5)
@@ -353,7 +353,7 @@ static int amr_nb_encode_frame(AVCodecCo
}
-#elif defined(CONFIG_LIBAMR_NB) /* Float point version*/
+#elif CONFIG_LIBAMR_NB /* Float point version*/
typedef struct AMRContext {
int frameCount;
@@ -492,7 +492,7 @@ static int amr_nb_encode_frame(AVCodecCo
#endif
-#if defined(CONFIG_LIBAMR_NB) || defined(CONFIG_LIBAMR_NB_FIXED)
+#if CONFIG_LIBAMR_NB || CONFIG_LIBAMR_NB_FIXED
AVCodec libamr_nb_decoder =
{
@@ -524,7 +524,7 @@ AVCodec libamr_nb_encoder =
#endif
/* -----------AMR wideband ------------*/
-#ifdef CONFIG_LIBAMR_WB
+#if CONFIG_LIBAMR_WB
#ifdef _TYPEDEF_H
//To avoid duplicate typedefs from typedef in amr-nb
Modified: trunk/libavcodec/libdirac.h
==============================================================================
--- trunk/libavcodec/libdirac.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/libdirac.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -28,7 +28,7 @@
#include "config.h"
-#ifdef CONFIG_LIBDIRAC
+#if CONFIG_LIBDIRAC
#include "avcodec.h"
#include <libdirac_common/dirac_types.h>
Modified: trunk/libavcodec/libfaad.c
==============================================================================
--- trunk/libavcodec/libfaad.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/libfaad.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -35,12 +35,13 @@
#endif
/*
- * when CONFIG_LIBFAADBIN is defined the libfaad will be opened at runtime
+ * when CONFIG_LIBFAADBIN is true libfaad will be opened at runtime
*/
//#undef CONFIG_LIBFAADBIN
-//#define CONFIG_LIBFAADBIN
+//#define CONFIG_LIBFAADBIN 0
+//#define CONFIG_LIBFAADBIN 1
-#ifdef CONFIG_LIBFAADBIN
+#if CONFIG_LIBFAADBIN
#include <dlfcn.h>
static const char* const libfaadname = "libfaad.so";
#else
@@ -224,7 +225,7 @@ static av_cold int faac_decode_init(AVCo
FAACContext *s = avctx->priv_data;
faacDecConfigurationPtr faac_cfg;
-#ifdef CONFIG_LIBFAADBIN
+#if CONFIG_LIBFAADBIN
const char* err = 0;
s->handle = dlopen(libfaadname, RTLD_LAZY);
@@ -259,7 +260,7 @@ static av_cold int faac_decode_init(AVCo
#undef dfaac
-#ifdef CONFIG_LIBFAADBIN
+#if CONFIG_LIBFAADBIN
if (err) {
dlclose(s->handle);
av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
Modified: trunk/libavcodec/libschroedinger.h
==============================================================================
--- trunk/libavcodec/libschroedinger.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/libschroedinger.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -28,7 +28,7 @@
#include "config.h"
-#ifdef CONFIG_LIBSCHROEDINGER
+#if CONFIG_LIBSCHROEDINGER
#include <schroedinger/schrobitstream.h>
#include <schroedinger/schroframe.h>
Modified: trunk/libavcodec/libxvidff.c
==============================================================================
--- trunk/libavcodec/libxvidff.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/libxvidff.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -166,9 +166,9 @@ av_cold int ff_xvid_encode_init(AVCodecC
xvid_gbl_init.version = XVID_VERSION;
xvid_gbl_init.debug = 0;
-#ifdef ARCH_PPC
+#if ARCH_PPC
/* Xvid's PPC support is borked, use libavcodec to detect */
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
if( has_altivec() ) {
xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC;
} else
Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mathops.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -24,19 +24,19 @@
#include "libavutil/common.h"
-#ifdef ARCH_X86_32
+#if ARCH_X86_32
#include "x86/mathops.h"
-#elif defined(ARCH_ARM)
+#elif ARCH_ARM
#include "arm/mathops.h"
-#elif defined(ARCH_PPC)
+#elif ARCH_PPC
#include "ppc/mathops.h"
-#elif defined(ARCH_BFIN)
+#elif ARCH_BFIN
#include "bfin/mathops.h"
Modified: trunk/libavcodec/mpc.c
==============================================================================
--- trunk/libavcodec/mpc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,7 +30,7 @@
#include "bitstream.h"
#include "dsputil.h"
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define USE_HIGHPRECISION
#endif
#include "mpegaudio.h"
Modified: trunk/libavcodec/mpc.h
==============================================================================
--- trunk/libavcodec/mpc.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpc.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -33,7 +33,7 @@
#include "bitstream.h"
#include "dsputil.h"
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define USE_HIGHPRECISION
#endif
#include "mpegaudio.h"
Modified: trunk/libavcodec/mpc7.c
==============================================================================
--- trunk/libavcodec/mpc7.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpc7.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,7 +30,7 @@
#include "bitstream.h"
#include "dsputil.h"
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define USE_HIGHPRECISION
#endif
#include "mpegaudio.h"
Modified: trunk/libavcodec/mpc8.c
==============================================================================
--- trunk/libavcodec/mpc8.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpc8.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,7 +30,7 @@
#include "bitstream.h"
#include "dsputil.h"
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define USE_HIGHPRECISION
#endif
#include "mpegaudio.h"
Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpeg12.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -303,7 +303,7 @@ static int mpeg_decode_mb(MpegEncContext
}else
memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
s->mb_intra = 1;
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
//if 1, we memcpy blocks in xvmcvideo
if(s->avctx->xvmc_acceleration > 1){
XVMC_pack_pblocks(s,-1);//inter are always full blocks
@@ -516,7 +516,7 @@ static int mpeg_decode_mb(MpegEncContext
return -1;
}
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
//if 1, we memcpy blocks in xvmcvideo
if(s->avctx->xvmc_acceleration > 1){
XVMC_pack_pblocks(s,cbp);
@@ -1644,7 +1644,7 @@ static int mpeg_field_start(MpegEncConte
}
}
}
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
// MPV_frame_start will call this function too,
// but we need to call it on every field
if(s->avctx->xvmc_acceleration)
@@ -1735,7 +1735,7 @@ static int mpeg_decode_slice(Mpeg1Contex
}
for(;;) {
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
//If 1, we memcpy blocks in xvmcvideo.
if(s->avctx->xvmc_acceleration > 1)
XVMC_init_block(s);//set s->block
@@ -1917,7 +1917,7 @@ static int slice_end(AVCodecContext *avc
if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
return 0;
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
if(s->avctx->xvmc_acceleration)
XVMC_field_end(s);
#endif
@@ -2473,7 +2473,7 @@ AVCodec mpegvideo_decoder = {
.long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
};
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
Mpeg1Context *s;
Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpegaudiodec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -36,7 +36,7 @@
/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg
audio decoder */
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
# define USE_HIGHPRECISION
#endif
@@ -2322,7 +2322,7 @@ static void flush(AVCodecContext *avctx)
s->last_buf_size= 0;
}
-#ifdef CONFIG_MP3ADU_DECODER
+#if CONFIG_MP3ADU_DECODER
static int decode_frame_adu(AVCodecContext * avctx,
void *data, int *data_size,
const uint8_t * buf, int buf_size)
@@ -2372,7 +2372,7 @@ static int decode_frame_adu(AVCodecConte
}
#endif /* CONFIG_MP3ADU_DECODER */
-#ifdef CONFIG_MP3ON4_DECODER
+#if CONFIG_MP3ON4_DECODER
/**
* Context for MP3On4 decoder
@@ -2534,7 +2534,7 @@ static int decode_frame_mp3on4(AVCodecCo
}
#endif /* CONFIG_MP3ON4_DECODER */
-#ifdef CONFIG_MP1_DECODER
+#if CONFIG_MP1_DECODER
AVCodec mp1_decoder =
{
"mp1",
@@ -2550,7 +2550,7 @@ AVCodec mp1_decoder =
.long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
};
#endif
-#ifdef CONFIG_MP2_DECODER
+#if CONFIG_MP2_DECODER
AVCodec mp2_decoder =
{
"mp2",
@@ -2566,7 +2566,7 @@ AVCodec mp2_decoder =
.long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
};
#endif
-#ifdef CONFIG_MP3_DECODER
+#if CONFIG_MP3_DECODER
AVCodec mp3_decoder =
{
"mp3",
@@ -2582,7 +2582,7 @@ AVCodec mp3_decoder =
.long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
};
#endif
-#ifdef CONFIG_MP3ADU_DECODER
+#if CONFIG_MP3ADU_DECODER
AVCodec mp3adu_decoder =
{
"mp3adu",
@@ -2598,7 +2598,7 @@ AVCodec mp3adu_decoder =
.long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
};
#endif
-#ifdef CONFIG_MP3ON4_DECODER
+#if CONFIG_MP3ON4_DECODER
AVCodec mp3on4_decoder =
{
"mp3on4",
Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpegvideo.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -121,19 +121,19 @@ int ff_dct_common_init(MpegEncContext *s
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
-#if defined(HAVE_MMX)
+#if HAVE_MMX
MPV_common_init_mmx(s);
-#elif defined(ARCH_ALPHA)
+#elif ARCH_ALPHA
MPV_common_init_axp(s);
-#elif defined(CONFIG_MLIB)
+#elif CONFIG_MLIB
MPV_common_init_mlib(s);
-#elif defined(HAVE_MMI)
+#elif HAVE_MMI
MPV_common_init_mmi(s);
-#elif defined(ARCH_ARM)
+#elif ARCH_ARM
MPV_common_init_arm(s);
-#elif defined(HAVE_ALTIVEC)
+#elif HAVE_ALTIVEC
MPV_common_init_altivec(s);
-#elif defined(ARCH_BFIN)
+#elif ARCH_BFIN
MPV_common_init_bfin(s);
#endif
@@ -939,7 +939,7 @@ alloc:
update_noise_reduction(s);
}
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
if(s->avctx->xvmc_acceleration)
return XVMC_field_start(s, avctx);
#endif
@@ -951,7 +951,7 @@ void MPV_frame_end(MpegEncContext *s)
{
int i;
/* draw edge for correct motion prediction if outside */
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
//just to make sure that all data is rendered.
if(s->avctx->xvmc_acceleration){
XVMC_field_end(s);
@@ -1736,7 +1736,7 @@ void MPV_decode_mb_internal(MpegEncConte
{
int mb_x, mb_y;
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
-#ifdef CONFIG_XVMC
+#if CONFIG_XVMC
if(s->avctx->xvmc_acceleration){
XVMC_decode_mb(s);//xvmc uses pblocks
return;
@@ -1974,7 +1974,7 @@ skip_idct:
}
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
if(s->out_format == FMT_MPEG1) {
if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1);
else MPV_decode_mb_internal(s, block, 0, 1);
Modified: trunk/libavcodec/mpegvideo_common.h
==============================================================================
--- trunk/libavcodec/mpegvideo_common.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/mpegvideo_common.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -371,7 +371,7 @@ void mpeg_motion(MpegEncContext *s,
uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
int motion_x, int motion_y, int h)
{
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
if(s->out_format == FMT_MPEG1)
mpeg_motion_internal(s, dest_y, dest_cb, dest_cr, field_based,
bottom_field, field_select, ref_picture, pix_op,
@@ -888,7 +888,7 @@ static inline void MPV_motion(MpegEncCon
op_pixels_func (*pix_op)[4],
qpel_mc_func (*qpix_op)[16])
{
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
if(s->out_format == FMT_MPEG1)
MPV_motion_internal(s, dest_y, dest_cb, dest_cr, dir,
ref_picture, pix_op, qpix_op, 1);
Modified: trunk/libavcodec/msmpeg4.c
==============================================================================
--- trunk/libavcodec/msmpeg4.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/msmpeg4.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -62,7 +62,7 @@ static uint32_t v2_dc_chroma_table[512][
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static void init_h263_dc_for_msmpeg4(void);
static inline void msmpeg4_memsetw(short *tab, int val, int n);
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
#endif //CONFIG_ENCODERS
@@ -79,7 +79,7 @@ int frame_count = 0;
#include "msmpeg4data.h"
-#ifdef CONFIG_ENCODERS //strangely gcc includes this even if it is not references
+#if CONFIG_ENCODERS //strangely gcc includes this even if it is not referenced
static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2];
#endif //CONFIG_ENCODERS
@@ -109,7 +109,7 @@ static void common_init(MpegEncContext *
s->y_dc_scale_table= wmv1_y_dc_scale_table;
s->c_dc_scale_table= wmv1_c_dc_scale_table;
break;
-#if defined(CONFIG_WMV3_DECODER)||defined(CONFIG_VC1_DECODER)
+#if CONFIG_WMV3_DECODER || CONFIG_VC1_DECODER
case 6:
s->y_dc_scale_table= wmv3_dc_scale_table;
s->c_dc_scale_table= wmv3_dc_scale_table;
@@ -134,7 +134,7 @@ static void common_init(MpegEncContext *
}
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
/* build the table which associate a (x,y) motion vector to a vlc */
static void init_mv_table(MVTable *tab)
@@ -411,7 +411,7 @@ int ff_msmpeg4_coded_block_pred(MpegEncC
return pred;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
void ff_msmpeg4_encode_motion(MpegEncContext * s,
int mx, int my)
@@ -653,7 +653,7 @@ static inline int msmpeg4_pred_dc(MpegEn
necessitate to modify mpegvideo.c. The problem comes from the
fact they decided to store the quantized DC (which would lead
to problems if Q could vary !) */
-#if (defined(ARCH_X86)) && !defined PIC
+#if ARCH_X86 && !defined PIC
__asm__ volatile(
"movl %3, %%eax \n\t"
"shrl $1, %%eax \n\t"
@@ -673,7 +673,7 @@ static inline int msmpeg4_pred_dc(MpegEn
: "%eax", "%edx"
);
#else
- /* #elif defined (ARCH_ALPHA) */
+ /* #elif ARCH_ALPHA */
/* Divisions are extremely costly on Alpha; optimize the most
common case. But they are costly everywhere...
*/
@@ -1362,7 +1362,7 @@ static inline void msmpeg4_memsetw(short
tab[i] = val;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
{
int range, bit_size, sign, code, bits;
Modified: trunk/libavcodec/options.c
==============================================================================
--- trunk/libavcodec/options.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/options.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -267,7 +267,7 @@ static const AVOption options[]={
{"vsad", "sum of absolute vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSAD, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"vsse","sum of squared vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"nsse", "noise preserving sum of squared differences", 0, FF_OPT_TYPE_CONST, FF_CMP_NSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
-#ifdef CONFIG_SNOW_ENCODER
+#if CONFIG_SNOW_ENCODER
{"w53", "5/3 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W53, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"w97", "9/7 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W97, INT_MIN, INT_MAX, V|E, "cmp_func"},
#endif
Modified: trunk/libavcodec/pcm.c
==============================================================================
--- trunk/libavcodec/pcm.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/pcm.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -507,7 +507,7 @@ static int pcm_decode_frame(AVCodecConte
return src - buf;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
#define PCM_ENCODER(id,sample_fmt_,name,long_name_) \
AVCodec name ## _encoder = { \
#name, \
@@ -525,7 +525,7 @@ AVCodec name ## _encoder = {
#define PCM_ENCODER(id,sample_fmt_,name,long_name_)
#endif
-#ifdef CONFIG_DECODERS
+#if CONFIG_DECODERS
#define PCM_DECODER(id,sample_fmt_,name,long_name_) \
AVCodec name ## _decoder = { \
#name, \
Modified: trunk/libavcodec/pnmenc.c
==============================================================================
--- trunk/libavcodec/pnmenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/pnmenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -354,7 +354,7 @@ static int pam_probe(AVProbeData *pd)
#endif
-#ifdef CONFIG_PGM_ENCODER
+#if CONFIG_PGM_ENCODER
AVCodec pgm_encoder = {
"pgm",
CODEC_TYPE_VIDEO,
@@ -369,7 +369,7 @@ AVCodec pgm_encoder = {
};
#endif // CONFIG_PGM_ENCODER
-#ifdef CONFIG_PGMYUV_ENCODER
+#if CONFIG_PGMYUV_ENCODER
AVCodec pgmyuv_encoder = {
"pgmyuv",
CODEC_TYPE_VIDEO,
@@ -384,7 +384,7 @@ AVCodec pgmyuv_encoder = {
};
#endif // CONFIG_PGMYUV_ENCODER
-#ifdef CONFIG_PPM_ENCODER
+#if CONFIG_PPM_ENCODER
AVCodec ppm_encoder = {
"ppm",
CODEC_TYPE_VIDEO,
@@ -399,7 +399,7 @@ AVCodec ppm_encoder = {
};
#endif // CONFIG_PPM_ENCODER
-#ifdef CONFIG_PBM_ENCODER
+#if CONFIG_PBM_ENCODER
AVCodec pbm_encoder = {
"pbm",
CODEC_TYPE_VIDEO,
@@ -414,7 +414,7 @@ AVCodec pbm_encoder = {
};
#endif // CONFIG_PBM_ENCODER
-#ifdef CONFIG_PAM_ENCODER
+#if CONFIG_PAM_ENCODER
AVCodec pam_encoder = {
"pam",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/ppc/dsputil_ppc.c
==============================================================================
--- trunk/libavcodec/ppc/dsputil_ppc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/dsputil_ppc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -24,7 +24,7 @@
#include "dsputil_ppc.h"
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
#include "dsputil_altivec.h"
void fdct_altivec(int16_t *block);
@@ -48,7 +48,7 @@ int mm_flags = 0;
int mm_support(void)
{
int result = 0;
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
if (has_altivec()) {
result |= FF_MM_ALTIVEC;
}
@@ -56,7 +56,7 @@ int mm_support(void)
return result;
}
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
/* list below must match enum in dsputil_ppc.h */
static unsigned char* perfname[] = {
@@ -91,7 +91,7 @@ static unsigned char* perfname[] = {
#include <stdio.h>
#endif
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
void powerpc_display_perf_report(void)
{
int i, j;
@@ -165,7 +165,7 @@ POWERPC_PERF_STOP_COUNT(powerpc_clear_bl
/* same as above, when dcbzl clear a whole 128B cache line
i.e. the PPC970 aka G5 */
-#ifdef HAVE_DCBZL
+#if HAVE_DCBZL
void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
{
POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz128, 1);
@@ -195,7 +195,7 @@ void clear_blocks_dcbz128_ppc(DCTELEM *b
}
#endif
-#ifdef HAVE_DCBZL
+#if HAVE_DCBZL
/* check dcbz report how many bytes are set to 0 by dcbz */
/* update 24/06/2003 : replace dcbz by dcbzl to get
the intended effect (Apple "fixed" dcbz)
@@ -261,7 +261,7 @@ void dsputil_init_ppc(DSPContext* c, AVC
break;
}
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
if (has_altivec()) {
@@ -275,7 +275,7 @@ void dsputil_init_ppc(DSPContext* c, AVC
int_init_altivec(c, avctx);
c->gmc1 = gmc1_altivec;
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
if (avctx->dct_algo == FF_DCT_AUTO ||
avctx->dct_algo == FF_DCT_ALTIVEC) {
c->fdct = fdct_altivec;
@@ -291,7 +291,7 @@ void dsputil_init_ppc(DSPContext* c, AVC
}
}
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
{
int i, j;
for (i = 0 ; i < powerpc_perf_total ; i++) {
Modified: trunk/libavcodec/ppc/dsputil_ppc.h
==============================================================================
--- trunk/libavcodec/ppc/dsputil_ppc.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/dsputil_ppc.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -21,7 +21,7 @@
#ifndef AVCODEC_PPC_DSPUTIL_PPC_H
#define AVCODEC_PPC_DSPUTIL_PPC_H
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
void powerpc_display_perf_report(void);
/* the 604* have 2, the G3* have 4, the G4s have 6,
and the G5 are completely different (they MUST use
@@ -68,7 +68,7 @@ enum powerpc_data_index {
};
extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
-#ifndef HAVE_PPC64
+#if !HAVE_PPC64
#define POWERP_PMC_DATATYPE unsigned long
#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
Modified: trunk/libavcodec/ppc/gcc_fixes.h
==============================================================================
--- trunk/libavcodec/ppc/gcc_fixes.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/gcc_fixes.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -25,7 +25,7 @@
#include "config.h"
-#ifdef HAVE_ALTIVEC_H
+#if HAVE_ALTIVEC_H
#include <altivec.h>
#endif
Modified: trunk/libavcodec/ppc/idct_altivec.c
==============================================================================
--- trunk/libavcodec/ppc/idct_altivec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/idct_altivec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -161,7 +161,7 @@ void idct_put_altivec(uint8_t* dest, int
POWERPC_PERF_DECLARE(altivec_idct_put_num, 1);
vec_u8 tmp;
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
#endif
IDCT
@@ -192,7 +192,7 @@ POWERPC_PERF_DECLARE(altivec_idct_add_nu
vec_u8 perm1;
vec_u8 p0, p1, p;
-#ifdef CONFIG_POWERPC_PERF
+#if CONFIG_POWERPC_PERF
POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
#endif
Modified: trunk/libavcodec/ppc/mathops.h
==============================================================================
--- trunk/libavcodec/ppc/mathops.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/mathops.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -23,7 +23,7 @@
#ifndef AVCODEC_PPC_MATHOPS_H
#define AVCODEC_PPC_MATHOPS_H
-#if defined(ARCH_PPC_405)
+#if ARCH_PPC_405
/* signed 16x16 -> 32 multiply add accumulate */
#define MAC16(rt, ra, rb) \
__asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
Modified: trunk/libavcodec/ppc/util_altivec.h
==============================================================================
--- trunk/libavcodec/ppc/util_altivec.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ppc/util_altivec.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -28,7 +28,7 @@
#include "config.h"
-#ifdef HAVE_ALTIVEC_H
+#if HAVE_ALTIVEC_H
#include <altivec.h>
#endif
Modified: trunk/libavcodec/qdm2.c
==============================================================================
--- trunk/libavcodec/qdm2.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/qdm2.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -39,7 +39,7 @@
#include "bitstream.h"
#include "dsputil.h"
-#ifdef CONFIG_MPEGAUDIO_HP
+#if CONFIG_MPEGAUDIO_HP
#define USE_HIGHPRECISION
#endif
Modified: trunk/libavcodec/ratecontrol.c
==============================================================================
--- trunk/libavcodec/ratecontrol.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/ratecontrol.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -184,7 +184,7 @@ int ff_rate_control_init(MpegEncContext
//FIXME maybe move to end
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {
-#ifdef CONFIG_LIBXVID
+#if CONFIG_LIBXVID
return ff_xvid_rate_control_init(s);
#else
av_log(s->avctx, AV_LOG_ERROR, "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
@@ -260,7 +260,7 @@ void ff_rate_control_uninit(MpegEncConte
ff_eval_free(rcc->rc_eq_eval);
av_freep(&rcc->entry);
-#ifdef CONFIG_LIBXVID
+#if CONFIG_LIBXVID
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
ff_xvid_rate_control_uninit(s);
#endif
@@ -678,7 +678,7 @@ float ff_rate_estimate_qscale(MpegEncCon
Picture * const pic= &s->current_picture;
emms_c();
-#ifdef CONFIG_LIBXVID
+#if CONFIG_LIBXVID
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
return ff_xvid_rate_estimate_qscale(s, dry_run);
#endif
Modified: trunk/libavcodec/rectangle.h
==============================================================================
--- trunk/libavcodec/rectangle.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/rectangle.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -64,7 +64,7 @@ static av_always_inline void fill_rectan
*(uint32_t*)(p + 3*stride)= v;
}else if(w==8){
//gcc can't optimize 64bit math on x86_32
-#ifdef HAVE_FAST_64BIT
+#if HAVE_FAST_64BIT
const uint64_t v= val*0x0100000001ULL;
*(uint64_t*)(p + 0*stride)= v;
if(h==1) return;
Modified: trunk/libavcodec/rv10.c
==============================================================================
--- trunk/libavcodec/rv10.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/rv10.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -230,7 +230,7 @@ int rv_decode_dc(MpegEncContext *s, int
}
-#if defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER)
+#if CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER
/* write RV 1.0 compatible frame header */
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
{
@@ -304,7 +304,7 @@ static int get_num(GetBitContext *gb)
}
#endif
-#endif /* defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER) */
+#endif /* CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER */
/* read RV 1.0 compatible frame header */
static int rv10_decode_picture_header(MpegEncContext *s)
Modified: trunk/libavcodec/simple_idct.c
==============================================================================
--- trunk/libavcodec/simple_idct.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/simple_idct.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -59,13 +59,13 @@
static inline void idctRowCondDC (DCTELEM * row)
{
int a0, a1, a2, a3, b0, b1, b2, b3;
-#ifdef HAVE_FAST_64BIT
+#if HAVE_FAST_64BIT
uint64_t temp;
#else
uint32_t temp;
#endif
-#ifdef HAVE_FAST_64BIT
+#if HAVE_FAST_64BIT
#ifdef WORDS_BIGENDIAN
#define ROW0_MASK 0xffff000000000000LL
#else
@@ -127,7 +127,7 @@ static inline void idctRowCondDC (DCTELE
b3 = MUL16(W7, row[1]);
MAC16(b3, -W5, row[3]);
-#ifdef HAVE_FAST_64BIT
+#if HAVE_FAST_64BIT
temp = ((uint64_t*)row)[1];
#else
temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
Modified: trunk/libavcodec/snow.c
==============================================================================
--- trunk/libavcodec/snow.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/snow.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -4670,7 +4670,7 @@ AVCodec snow_decoder = {
.long_name = NULL_IF_CONFIG_SMALL("Snow"),
};
-#ifdef CONFIG_SNOW_ENCODER
+#if CONFIG_SNOW_ENCODER
AVCodec snow_encoder = {
"snow",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/snow.h
==============================================================================
--- trunk/libavcodec/snow.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/snow.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -125,7 +125,7 @@ void ff_snow_vertical_compose97i(IDWTELE
void ff_snow_horizontal_compose97i(IDWTELEM *b, int width);
void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
-#ifdef CONFIG_SNOW_ENCODER
+#if CONFIG_SNOW_ENCODER
int w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h);
#else
Modified: trunk/libavcodec/sonic.c
==============================================================================
--- trunk/libavcodec/sonic.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/sonic.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -408,7 +408,7 @@ static int predictor_calc_error(int *k,
return x;
}
-#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
+#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER
// Heavily modified Levinson-Durbin algorithm which
// copes better with quantization, and calculates the
// actual whitened result as it goes.
@@ -479,12 +479,12 @@ static void modified_levinson_durbin(int
av_free(state);
}
-#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
+#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */
static const int samplerate_table[] =
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
-#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
+#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER
static inline int code_samplerate(int samplerate)
{
switch (samplerate)
@@ -747,9 +747,9 @@ static int sonic_encode_frame(AVCodecCon
flush_put_bits(&pb);
return (put_bits_count(&pb)+7)/8;
}
-#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
+#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */
-#ifdef CONFIG_SONIC_DECODER
+#if CONFIG_SONIC_DECODER
static av_cold int sonic_decode_init(AVCodecContext *avctx)
{
SonicContext *s = avctx->priv_data;
@@ -936,7 +936,7 @@ static int sonic_decode_frame(AVCodecCon
}
#endif /* CONFIG_SONIC_DECODER */
-#ifdef CONFIG_SONIC_ENCODER
+#if CONFIG_SONIC_ENCODER
AVCodec sonic_encoder = {
"sonic",
CODEC_TYPE_AUDIO,
@@ -950,7 +950,7 @@ AVCodec sonic_encoder = {
};
#endif
-#ifdef CONFIG_SONIC_LS_ENCODER
+#if CONFIG_SONIC_LS_ENCODER
AVCodec sonic_ls_encoder = {
"sonicls",
CODEC_TYPE_AUDIO,
@@ -964,7 +964,7 @@ AVCodec sonic_ls_encoder = {
};
#endif
-#ifdef CONFIG_SONIC_DECODER
+#if CONFIG_SONIC_DECODER
AVCodec sonic_decoder = {
"sonic",
CODEC_TYPE_AUDIO,
Modified: trunk/libavcodec/svq1enc.c
==============================================================================
--- trunk/libavcodec/svq1enc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/svq1enc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -119,7 +119,7 @@ static void svq1_write_header(SVQ1Contex
#define QUALITY_THRESHOLD 100
#define THRESHOLD_MULTIPLIER 0.6
-#if defined(HAVE_ALTIVEC)
+#if HAVE_ALTIVEC
#undef vector
#endif
Modified: trunk/libavcodec/svq3.c
==============================================================================
--- trunk/libavcodec/svq3.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/svq3.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -40,7 +40,7 @@
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov
*/
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
@@ -849,7 +849,7 @@ static int svq3_decode_init(AVCodecConte
h->unknown_svq3_flag = get_bits1(&gb);
avctx->has_b_frames = !s->low_delay;
if (h->unknown_svq3_flag) {
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
unsigned watermark_width = svq3_get_ue_golomb(&gb);
unsigned watermark_height = svq3_get_ue_golomb(&gb);
int u1 = svq3_get_ue_golomb(&gb);
Modified: trunk/libavcodec/tiff.c
==============================================================================
--- trunk/libavcodec/tiff.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/tiff.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -25,7 +25,7 @@
* @author Konstantin Shishkov
*/
#include "avcodec.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
#include "lzw.h"
@@ -78,7 +78,7 @@ static int tiff_unpack_strip(TiffContext
int c, line, pixels, code;
const uint8_t *ssrc = src;
int width = s->width * s->bpp >> 3;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
uint8_t *zbuf; unsigned long outlen;
if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){
@@ -298,7 +298,7 @@ static int tiff_decode_tag(TiffContext *
break;
case TIFF_DEFLATE:
case TIFF_ADOBE_DEFLATE:
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
break;
#else
av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n");
Modified: trunk/libavcodec/tiffenc.c
==============================================================================
--- trunk/libavcodec/tiffenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/tiffenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -25,7 +25,7 @@
* @author Bartlomiej Wolowiec
*/
#include "avcodec.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
#include "bytestream.h"
@@ -151,7 +151,7 @@ static int encode_strip(TiffEncoderConte
{
switch (compr) {
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
case TIFF_DEFLATE:
case TIFF_ADOBE_DEFLATE:
{
@@ -229,7 +229,7 @@ static int encode_frame(AVCodecContext *
s->compr = TIFF_RAW;
} else if(avctx->compression_level == 2) {
s->compr = TIFF_LZW;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
} else if ((avctx->compression_level >= 3)) {
s->compr = TIFF_DEFLATE;
#endif
@@ -315,7 +315,7 @@ static int encode_frame(AVCodecContext *
}
}
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE) {
uint8_t *zbuf;
int zlen, zn;
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/utils.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -40,7 +40,7 @@
#include <stdarg.h>
#include <limits.h>
#include <float.h>
-#if !defined(HAVE_MKSTEMP)
+#if !HAVE_MKSTEMP
#include <fcntl.h>
#endif
@@ -251,7 +251,7 @@ int avcodec_default_get_buffer(AVCodecCo
//we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the
//picture size unneccessarily in some cases. The solution here is not
//pretty and better ideas are welcome!
-#ifdef HAVE_MMX
+#if HAVE_MMX
if(s->codec_id == CODEC_ID_SVQ1)
stride_align[i]= 16;
else
@@ -900,7 +900,7 @@ int av_get_bits_per_sample_format(enum S
}
}
-#if !defined(HAVE_THREADS)
+#if !HAVE_THREADS
int avcodec_thread_init(AVCodecContext *s, int thread_count){
return -1;
}
@@ -927,7 +927,7 @@ unsigned int av_xiphlacing(unsigned char
* and opened file name in **filename. */
int av_tempfile(char *prefix, char **filename) {
int fd=-1;
-#if !defined(HAVE_MKSTEMP)
+#if !HAVE_MKSTEMP
*filename = tempnam(".", prefix);
#else
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
@@ -938,7 +938,7 @@ int av_tempfile(char *prefix, char **fil
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n");
return -1;
}
-#if !defined(HAVE_MKSTEMP)
+#if !HAVE_MKSTEMP
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
#else
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
Modified: trunk/libavcodec/vcr1.c
==============================================================================
--- trunk/libavcodec/vcr1.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/vcr1.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -32,6 +32,7 @@
/* Disable the encoder. */
#undef CONFIG_VCR1_ENCODER
+#define CONFIG_VCR1_ENCODER 0
typedef struct VCR1Context{
AVCodecContext *avctx;
@@ -116,7 +117,7 @@ static int decode_frame(AVCodecContext *
return buf_size;
}
-#ifdef CONFIG_VCR1_ENCODER
+#if CONFIG_VCR1_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
VCR1Context * const a = avctx->priv_data;
AVFrame *pict = data;
@@ -156,7 +157,7 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
-#ifdef CONFIG_VCR1_ENCODER
+#if CONFIG_VCR1_ENCODER
static av_cold int encode_init(AVCodecContext *avctx){
common_init(avctx);
@@ -178,7 +179,7 @@ AVCodec vcr1_decoder = {
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
};
-#ifdef CONFIG_VCR1_ENCODER
+#if CONFIG_VCR1_ENCODER
AVCodec vcr1_encoder = {
"vcr1",
CODEC_TYPE_VIDEO,
Modified: trunk/libavcodec/vp3.c
==============================================================================
--- trunk/libavcodec/vp3.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/vp3.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -2021,7 +2021,7 @@ static int read_huffman_tree(AVCodecCont
return 0;
}
-#ifdef CONFIG_THEORA_DECODER
+#if CONFIG_THEORA_DECODER
static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
Modified: trunk/libavcodec/x86/cpuid.c
==============================================================================
--- trunk/libavcodec/x86/cpuid.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/cpuid.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -44,7 +44,7 @@ int mm_support(void)
int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
x86_reg a, c;
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
#define PUSHF "pushfq\n\t"
#define POPF "popfq\n\t"
#else
@@ -83,7 +83,7 @@ int mm_support(void)
rval |= FF_MM_MMX;
if (std_caps & (1<<25))
rval |= FF_MM_MMXEXT
-#ifdef HAVE_SSE
+#if HAVE_SSE
| FF_MM_SSE;
if (std_caps & (1<<26))
rval |= FF_MM_SSE2;
Modified: trunk/libavcodec/x86/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/x86/dsputil_mmx.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/dsputil_mmx.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -880,7 +880,7 @@ static void add_png_paeth_prediction_##c
"pabsw %%mm5, %%mm5 \n"
PAETH(mmx2, ABS3_MMX2)
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
PAETH(ssse3, ABS3_SSSE3)
#endif
@@ -1765,7 +1765,7 @@ void ff_mmxext_idct(DCTELEM *block);
/* XXX: those functions should be suppressed ASAP when all IDCTs are
converted */
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
{
ff_mmx_idct (block);
@@ -2147,7 +2147,7 @@ static void vector_fmul_add_add_sse(floa
static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float *src1,
const float *win, float add_bias, int len){
-#ifdef HAVE_6REGS
+#if HAVE_6REGS
if(add_bias == 0){
x86_reg i = -len*4;
x86_reg j = len*4-8;
@@ -2182,7 +2182,7 @@ static void vector_fmul_window_3dnow2(fl
static void vector_fmul_window_sse(float *dst, const float *src0, const float *src1,
const float *win, float add_bias, int len){
-#ifdef HAVE_6REGS
+#if HAVE_6REGS
if(add_bias == 0){
x86_reg i = -len*4;
x86_reg j = len*4-16;
@@ -2324,7 +2324,7 @@ static void float_to_int16_sse2(int16_t
);
}
-#ifdef HAVE_YASM
+#if HAVE_YASM
void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len);
void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len);
void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len);
@@ -2332,7 +2332,7 @@ void ff_x264_deblock_v_luma_sse2(uint8_t
void ff_x264_deblock_h_luma_sse2(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0);
void ff_x264_deblock_v8_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
void ff_x264_deblock_h_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta);
-#ifdef ARCH_X86_32
+#if ARCH_X86_32
static void ff_x264_deblock_v_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta)
{
ff_x264_deblock_v8_luma_intra_mmxext(pix+0, stride, alpha, beta);
@@ -2555,7 +2555,7 @@ void dsputil_init_mmx(DSPContext* c, AVC
c->idct_add= ff_simple_idct_add_mmx;
c->idct = ff_simple_idct_mmx;
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
-#ifdef CONFIG_GPL
+#if CONFIG_GPL
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
if(mm_flags & FF_MM_MMXEXT){
c->idct_put= ff_libmpeg2mmx2_idct_put;
@@ -2853,7 +2853,7 @@ void dsputil_init_mmx(DSPContext* c, AVC
H264_QPEL_FUNCS(3, 2, sse2);
H264_QPEL_FUNCS(3, 3, sse2);
}
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
if(mm_flags & FF_MM_SSSE3){
H264_QPEL_FUNCS(1, 0, ssse3);
H264_QPEL_FUNCS(1, 1, ssse3);
@@ -2876,14 +2876,14 @@ void dsputil_init_mmx(DSPContext* c, AVC
}
#endif
-#if defined(CONFIG_GPL) && defined(HAVE_YASM)
+#if CONFIG_GPL && HAVE_YASM
if( mm_flags&FF_MM_MMXEXT ){
-#ifdef ARCH_X86_32
+#if ARCH_X86_32
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext;
#endif
if( mm_flags&FF_MM_SSE2 ){
-#if defined(ARCH_X86_64) || !defined(__ICC) || __ICC > 1100
+#if ARCH_X86_64 || !defined(__ICC) || __ICC > 1100
c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2;
c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2;
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2;
@@ -2896,10 +2896,10 @@ void dsputil_init_mmx(DSPContext* c, AVC
}
#endif
-#ifdef CONFIG_SNOW_DECODER
+#if CONFIG_SNOW_DECODER
if(mm_flags & FF_MM_SSE2 & 0){
c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
-#ifdef HAVE_7REGS
+#if HAVE_7REGS
c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
#endif
c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
@@ -2907,7 +2907,7 @@ void dsputil_init_mmx(DSPContext* c, AVC
else{
if(mm_flags & FF_MM_MMXEXT){
c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
-#ifdef HAVE_7REGS
+#if HAVE_7REGS
c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
#endif
}
Modified: trunk/libavcodec/x86/dsputil_mmx.h
==============================================================================
--- trunk/libavcodec/x86/dsputil_mmx.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/dsputil_mmx.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -104,7 +104,7 @@ extern const double ff_pd_2[2];
SBUTTERFLY(t, b, c, wd, q) /* t= a2 b2 c2 d2 e2 f2 g2 h2 */\
/* c= a3 b3 c3 d3 e3 f3 g3 h3 */
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
// permutes 01234567 -> 05736421
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\
SBUTTERFLY(a,b,%%xmm8,wd,dqa)\
Modified: trunk/libavcodec/x86/dsputilenc_mmx.c
==============================================================================
--- trunk/libavcodec/x86/dsputilenc_mmx.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/dsputilenc_mmx.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -1015,7 +1015,7 @@ static void sub_hfyu_median_prediction_m
MMABS_SUM(%%xmm7, %%xmm9, %%xmm1)\
"paddusw %%xmm1, %%xmm0 \n\t"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
#define MMABS_SUM_8x8_SSE2 MMABS_SUM_8x8_NOSPILL
#else
#define MMABS_SUM_8x8_SSE2\
@@ -1180,7 +1180,7 @@ HADAMARD8_DIFF_SSE2(sse2)
#undef MMABS_SUM_8x8
#undef HSUM
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#define MMABS(a,z) MMABS_SSSE3(a,z)
#define MMABS_SUM_8x8 MMABS_SUM_8x8_NOSPILL
HADAMARD8_DIFF_SSE2(ssse3)
@@ -1245,7 +1245,7 @@ DCT_SAD_FUNC(mmx2)
DCT_SAD_FUNC(sse2)
#undef MMABS
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#define MMABS(a,z) MMABS_SSSE3(a,z)
DCT_SAD_FUNC(ssse3)
#undef MMABS
@@ -1325,7 +1325,7 @@ static int ssd_int8_vs_int16_mmx(const i
#undef SCALE_OFFSET
#undef PMULHRW
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#undef PHADDD
#define DEF(x) x ## _ssse3
#define SET_RND(x)
@@ -1417,7 +1417,7 @@ void dsputilenc_init_mmx(DSPContext* c,
c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2;
}
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
if(mm_flags & FF_MM_SSSE3){
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
c->try_8x8basis= try_8x8basis_ssse3;
Modified: trunk/libavcodec/x86/fft_sse.c
==============================================================================
--- trunk/libavcodec/x86/fft_sse.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/fft_sse.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -108,7 +108,7 @@ void ff_imdct_half_sse(MDCTContext *s, F
::"r"(-4*k), "r"(4*k),
"r"(input+n4), "r"(tcos+n8), "r"(tsin+n8)
);
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
// if we have enough regs, don't let gcc make the luts latency-bound
// but if not, latency is faster than spilling
__asm__("movlps %%xmm0, %0 \n"
Modified: trunk/libavcodec/x86/h264_i386.h
==============================================================================
--- trunk/libavcodec/x86/h264_i386.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/h264_i386.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -33,9 +33,7 @@
//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
//as that would make optimization work hard)
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && \
- defined(HAVE_EBX_AVAILABLE) && \
- !defined(BROKEN_RELOCATIONS)
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
static int decode_significance_x86(CABACContext *c, int max_coeff,
uint8_t *significant_coeff_ctx_base,
int *index){
@@ -149,7 +147,7 @@ static int decode_significance_8x8_x86(C
);
return coeff_count;
}
-#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && */
- /* defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
+#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE */
+ /* !defined(BROKEN_RELOCATIONS) */
#endif /* AVCODEC_X86_H264_I386_H */
Modified: trunk/libavcodec/x86/h264dsp_mmx.c
==============================================================================
--- trunk/libavcodec/x86/h264dsp_mmx.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/h264dsp_mmx.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -472,7 +472,7 @@ static void ff_h264_idct_add8_mmx2(uint8
}
}
-#if defined(CONFIG_GPL) && defined(HAVE_YASM)
+#if CONFIG_GPL && HAVE_YASM
static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
{
__asm__ volatile(
@@ -1488,7 +1488,7 @@ static void OPNAME ## pixels16_l2_shift5
}\
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
#define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
static av_noinline void OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\
int h=16;\
@@ -2065,7 +2065,7 @@ QPEL_H264_V_XMM(put_, PUT_OP, sse2
QPEL_H264_V_XMM(avg_, AVG_MMX2_OP, sse2)
QPEL_H264_HV_XMM(put_, PUT_OP, sse2)
QPEL_H264_HV_XMM(avg_, AVG_MMX2_OP, sse2)
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
QPEL_H264_H_XMM(put_, PUT_OP, ssse3)
QPEL_H264_H_XMM(avg_, AVG_MMX2_OP, ssse3)
QPEL_H264_HV2_XMM(put_, PUT_OP, ssse3)
@@ -2079,7 +2079,7 @@ H264_MC_4816(3dnow)
H264_MC_4816(mmx2)
H264_MC_816(H264_MC_V, sse2)
H264_MC_816(H264_MC_HV, sse2)
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
H264_MC_816(H264_MC_H, ssse3)
H264_MC_816(H264_MC_HV, ssse3)
#endif
@@ -2161,7 +2161,7 @@ static void avg_h264_chroma_mc4_3dnow(ui
#undef H264_CHROMA_MC4_TMPL
#undef H264_CHROMA_MC8_MV0
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#define AVG_OP(X)
#undef H264_CHROMA_MC8_TMPL
#undef H264_CHROMA_MC4_TMPL
Modified: trunk/libavcodec/x86/idct_sse2_xvid.c
==============================================================================
--- trunk/libavcodec/x86/idct_sse2_xvid.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/idct_sse2_xvid.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -103,7 +103,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdc
#define CLEAR_ODD(r) "pxor "r","r" \n\t"
#define PUT_ODD(dst) "pshufhw $0x1B, %%xmm2, "dst" \n\t"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
# define ROW0 "%%xmm8"
# define REG0 ROW0
@@ -371,7 +371,7 @@ inline void ff_idct_xvid_sse2(short *blo
JZ("%%esi", "1f")
"5: \n\t"
iMTX_MULT("7*16(%0)", MANGLE(iTab2), ROUND(walkenIdctRounders+5*16), PUT_ODD(ROW7))
-#ifndef ARCH_X86_64
+#if !ARCH_X86_64
iLLM_HEAD
#endif
iLLM_PASS("%0")
Modified: trunk/libavcodec/x86/mpegvideo_mmx.c
==============================================================================
--- trunk/libavcodec/x86/mpegvideo_mmx.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/mpegvideo_mmx.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -583,25 +583,30 @@ static void denoise_dct_sse2(MpegEncCon
);
}
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#define HAVE_SSSE3_BAK
#endif
#undef HAVE_SSSE3
+#define HAVE_SSSE3 0
#undef HAVE_SSE2
#undef HAVE_MMX2
+#define HAVE_SSE2 0
+#define HAVE_MMX2 0
#define RENAME(a) a ## _MMX
#define RENAMEl(a) a ## _mmx
#include "mpegvideo_mmx_template.c"
-#define HAVE_MMX2
+#undef HAVE_MMX2
+#define HAVE_MMX2 1
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _MMX2
#define RENAMEl(a) a ## _mmx2
#include "mpegvideo_mmx_template.c"
-#define HAVE_SSE2
+#undef HAVE_SSE2
+#define HAVE_SSE2 1
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _SSE2
@@ -609,7 +614,8 @@ static void denoise_dct_sse2(MpegEncCon
#include "mpegvideo_mmx_template.c"
#ifdef HAVE_SSSE3_BAK
-#define HAVE_SSSE3
+#undef HAVE_SSSE3
+#define HAVE_SSSE3 1
#undef RENAME
#undef RENAMEl
#define RENAME(a) a ## _SSSE3
@@ -637,7 +643,7 @@ void MPV_common_init_mmx(MpegEncContext
}
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
if(mm_flags & FF_MM_SSSE3){
s->dct_quantize= dct_quantize_SSSE3;
} else
Modified: trunk/libavcodec/x86/mpegvideo_mmx_template.c
==============================================================================
--- trunk/libavcodec/x86/mpegvideo_mmx_template.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/mpegvideo_mmx_template.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -29,7 +29,7 @@
#undef SAVE_SIGN
#undef RESTORE_SIGN
-#if defined(HAVE_SSE2)
+#if HAVE_SSE2
#define MMREG_WIDTH "16"
#define MM "%%xmm"
#define MOVQ "movdqa"
@@ -48,7 +48,7 @@
#define MMREG_WIDTH "8"
#define MM "%%mm"
#define MOVQ "movq"
-#if defined(HAVE_MMX2)
+#if HAVE_MMX2
#define SPREADW(a) "pshufw $0, "a", "a" \n\t"
#define PMAXW(a,b) "pmaxsw "a", "b" \n\t"
#define PMAX(a,b) \
@@ -74,7 +74,7 @@
#endif
#endif
-#ifdef HAVE_SSSE3
+#if HAVE_SSSE3
#define SAVE_SIGN(a,b) \
"movdqa "b", "a" \n\t"\
"pabsw "b", "b" \n\t"
@@ -219,7 +219,7 @@ static int RENAME(dct_quantize)(MpegEncC
SPREADW(MM"1")
"psubusw "MM"1, "MM"4 \n\t"
"packuswb "MM"4, "MM"4 \n\t"
-#ifdef HAVE_SSE2
+#if HAVE_SSE2
"packuswb "MM"4, "MM"4 \n\t"
#endif
"movd "MM"4, %0 \n\t" // *overflow
Modified: trunk/libavcodec/x86/snowdsp_mmx.c
==============================================================================
--- trunk/libavcodec/x86/snowdsp_mmx.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavcodec/x86/snowdsp_mmx.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -386,7 +386,7 @@ void ff_snow_horizontal_compose97i_mmx(I
}
}
-#ifdef HAVE_7REGS
+#if HAVE_7REGS
#define snow_vertical_compose_sse2_load_add(op,r,t0,t1,t2,t3)\
""op" ("r",%%"REG_d"), %%"t0" \n\t"\
""op" 16("r",%%"REG_d"), %%"t1" \n\t"\
Modified: trunk/libavdevice/audio.c
==============================================================================
--- trunk/libavdevice/audio.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavdevice/audio.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <string.h>
#include <errno.h>
-#ifdef HAVE_SOUNDCARD_H
+#if HAVE_SOUNDCARD_H
#include <soundcard.h>
#else
#include <sys/soundcard.h>
@@ -311,7 +311,7 @@ static int audio_read_close(AVFormatCont
return 0;
}
-#ifdef CONFIG_OSS_DEMUXER
+#if CONFIG_OSS_DEMUXER
AVInputFormat oss_demuxer = {
"oss",
NULL_IF_CONFIG_SMALL("Open Sound System capture"),
@@ -324,7 +324,7 @@ AVInputFormat oss_demuxer = {
};
#endif
-#ifdef CONFIG_OSS_MUXER
+#if CONFIG_OSS_MUXER
AVOutputFormat oss_muxer = {
"oss",
NULL_IF_CONFIG_SMALL("Open Sound System playback"),
Modified: trunk/libavdevice/beosaudio.cpp
==============================================================================
--- trunk/libavdevice/beosaudio.cpp Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavdevice/beosaudio.cpp Wed Jan 14 00:44:16 2009 (r16590)
@@ -33,7 +33,7 @@ extern "C" {
#include "libavformat/avformat.h"
}
-#ifdef HAVE_BSOUNDRECORDER
+#if HAVE_BSOUNDRECORDER
#include <SoundRecorder.h>
using namespace BPrivate::Media::Experimental;
#endif
@@ -63,7 +63,7 @@ typedef struct {
sem_id output_sem;
int output_index;
BSoundPlayer *player;
-#ifdef HAVE_BSOUNDRECORDER
+#if HAVE_BSOUNDRECORDER
BSoundRecorder *recorder;
#endif
int has_quit; /* signal callbacks not to wait */
@@ -150,7 +150,7 @@ static void audioplay_callback(void *coo
}
}
-#ifdef HAVE_BSOUNDRECORDER
+#if HAVE_BSOUNDRECORDER
/* called back by BSoundRecorder */
static void audiorecord_callback(void *cookie, bigtime_t timestamp, void *buffer, size_t bufferSize, const media_multi_audio_format &format)
{
@@ -192,7 +192,7 @@ static int audio_open(AudioData *s, int
media_raw_audio_format format;
media_multi_audio_format iformat;
-#ifndef HAVE_BSOUNDRECORDER
+#if !HAVE_BSOUNDRECORDER
if (!is_output)
return AVERROR(EIO); /* not for now */
#endif
@@ -210,7 +210,7 @@ static int audio_open(AudioData *s, int
s->frame_size = AUDIO_BLOCK_SIZE;
/* bump up the priority (avoid realtime though) */
set_thread_priority(find_thread(NULL), B_DISPLAY_PRIORITY+1);
-#ifdef HAVE_BSOUNDRECORDER
+#if HAVE_BSOUNDRECORDER
if (!is_output) {
bool wait_for_input = false;
if (audio_device && !strcmp(audio_device, "wait:"))
@@ -273,7 +273,7 @@ static int audio_close(AudioData *s)
}
if (s->player)
delete s->player;
-#ifdef HAVE_BSOUNDRECORDER
+#if HAVE_BSOUNDRECORDER
if (s->recorder)
delete s->recorder;
#endif
Modified: trunk/libavdevice/bktr.c
==============================================================================
--- trunk/libavdevice/bktr.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavdevice/bktr.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -26,13 +26,13 @@
#define _BSD_SOURCE 1
#include "libavformat/avformat.h"
-#if defined (HAVE_DEV_BKTR_IOCTL_METEOR_H) && defined (HAVE_DEV_BKTR_IOCTL_BT848_H)
+#if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
# include <dev/bktr/ioctl_meteor.h>
# include <dev/bktr/ioctl_bt848.h>
-#elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H)
+#elif HAVE_MACHINE_IOCTL_METEOR_H && HAVE_MACHINE_IOCTL_BT848_H
# include <machine/ioctl_meteor.h>
# include <machine/ioctl_bt848.h>
-#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H)
+#elif HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H && HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H
# include <dev/video/meteor/ioctl_meteor.h>
# include <dev/video/bktr/ioctl_bt848.h>
#elif HAVE_DEV_IC_BT8XX_H
Modified: trunk/libavdevice/v4l2.c
==============================================================================
--- trunk/libavdevice/v4l2.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavdevice/v4l2.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -35,7 +35,7 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
-#ifdef HAVE_SYS_VIDEOIO_H
+#if HAVE_SYS_VIDEOIO_H
#include <sys/videoio.h>
#else
#include <asm/types.h>
Modified: trunk/libavformat/aiff.c
==============================================================================
--- trunk/libavformat/aiff.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/aiff.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -170,7 +170,7 @@ static unsigned int get_aiff_header(Byte
return num_frames;
}
-#ifdef CONFIG_AIFF_MUXER
+#if CONFIG_AIFF_MUXER
typedef struct {
int64_t form;
int64_t frames;
@@ -439,7 +439,7 @@ static int aiff_read_packet(AVFormatCont
return 0;
}
-#ifdef CONFIG_AIFF_DEMUXER
+#if CONFIG_AIFF_DEMUXER
AVInputFormat aiff_demuxer = {
"aiff",
NULL_IF_CONFIG_SMALL("Audio IFF"),
@@ -453,7 +453,7 @@ AVInputFormat aiff_demuxer = {
};
#endif
-#ifdef CONFIG_AIFF_MUXER
+#if CONFIG_AIFF_MUXER
AVOutputFormat aiff_muxer = {
"aiff",
NULL_IF_CONFIG_SMALL("Audio IFF"),
Modified: trunk/libavformat/allformats.c
==============================================================================
--- trunk/libavformat/allformats.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/allformats.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -168,7 +168,7 @@ void av_register_all(void)
REGISTER_MUXER (RTP, rtp);
REGISTER_DEMUXER (RTSP, rtsp);
REGISTER_DEMUXER (SDP, sdp);
-#ifdef CONFIG_SDP_DEMUXER
+#if CONFIG_SDP_DEMUXER
av_register_rtp_dynamic_payload_handlers();
av_register_rdt_dynamic_payload_handlers();
#endif
Modified: trunk/libavformat/amr.c
==============================================================================
--- trunk/libavformat/amr.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/amr.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,7 +30,7 @@ Only mono files are supported.
static const char AMR_header [] = "#!AMR\n";
static const char AMRWB_header [] = "#!AMR-WB\n";
-#ifdef CONFIG_AMR_MUXER
+#if CONFIG_AMR_MUXER
static int amr_write_header(AVFormatContext *s)
{
ByteIOContext *pb = s->pb;
@@ -166,7 +166,7 @@ static int amr_read_packet(AVFormatConte
return 0;
}
-#ifdef CONFIG_AMR_DEMUXER
+#if CONFIG_AMR_DEMUXER
AVInputFormat amr_demuxer = {
"amr",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
@@ -178,7 +178,7 @@ AVInputFormat amr_demuxer = {
};
#endif
-#ifdef CONFIG_AMR_MUXER
+#if CONFIG_AMR_MUXER
AVOutputFormat amr_muxer = {
"amr",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
Modified: trunk/libavformat/asf-enc.c
==============================================================================
--- trunk/libavformat/asf-enc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/asf-enc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -812,14 +812,14 @@ static int asf_write_trailer(AVFormatCon
return 0;
}
-#ifdef CONFIG_ASF_MUXER
+#if CONFIG_ASF_MUXER
AVOutputFormat asf_muxer = {
"asf",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
"asf,wmv,wma",
sizeof(ASFContext),
-#ifdef CONFIG_LIBMP3LAME
+#if CONFIG_LIBMP3LAME
CODEC_ID_MP3,
#else
CODEC_ID_MP2,
@@ -833,14 +833,14 @@ AVOutputFormat asf_muxer = {
};
#endif
-#ifdef CONFIG_ASF_STREAM_MUXER
+#if CONFIG_ASF_STREAM_MUXER
AVOutputFormat asf_stream_muxer = {
"asf_stream",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
"asf,wmv,wma",
sizeof(ASFContext),
-#ifdef CONFIG_LIBMP3LAME
+#if CONFIG_LIBMP3LAME
CODEC_ID_MP3,
#else
CODEC_ID_MP2,
Modified: trunk/libavformat/au.c
==============================================================================
--- trunk/libavformat/au.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/au.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -47,7 +47,7 @@ static const AVCodecTag codec_au_tags[]
{ 0, 0 },
};
-#ifdef CONFIG_AU_MUXER
+#if CONFIG_AU_MUXER
/* AUDIO_FILE header */
static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
{
@@ -177,7 +177,7 @@ static int au_read_packet(AVFormatContex
return 0;
}
-#ifdef CONFIG_AU_DEMUXER
+#if CONFIG_AU_DEMUXER
AVInputFormat au_demuxer = {
"au",
NULL_IF_CONFIG_SMALL("SUN AU format"),
@@ -191,7 +191,7 @@ AVInputFormat au_demuxer = {
};
#endif
-#ifdef CONFIG_AU_MUXER
+#if CONFIG_AU_MUXER
AVOutputFormat au_muxer = {
"au",
NULL_IF_CONFIG_SMALL("SUN AU format"),
Modified: trunk/libavformat/avienc.c
==============================================================================
--- trunk/libavformat/avienc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/avienc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -27,7 +27,7 @@
* - fill all fields if non streamed (nb_frames for example)
*/
-#ifdef CONFIG_AVI_MUXER
+#if CONFIG_AVI_MUXER
typedef struct AVIIentry {
unsigned int flags, pos, len;
} AVIIentry;
Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/aviobuf.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -160,12 +160,12 @@ int64_t url_fseek(ByteIOContext *s, int6
} else {
int64_t res = AVERROR(EPIPE);
-#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)
+#if CONFIG_MUXERS || CONFIG_NETWORK
if (s->write_flag) {
flush_buffer(s);
s->must_flush = 1;
}
-#endif /* defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) */
+#endif /* CONFIG_MUXERS || CONFIG_NETWORK */
if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0)
return res;
if (!s->write_flag)
@@ -624,7 +624,7 @@ URLContext *url_fileno(ByteIOContext *s)
return s->opaque;
}
-#ifdef CONFIG_MUXERS
+#if CONFIG_MUXERS
int url_fprintf(ByteIOContext *s, const char *fmt, ...)
{
va_list ap;
@@ -688,8 +688,8 @@ int64_t av_url_read_fseek(ByteIOContext
}
/* url_open_dyn_buf and url_close_dyn_buf are used in rtp.c to send a response
- * back to the server even if CONFIG_MUXERS is not set. */
-#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)
+ * back to the server even if CONFIG_MUXERS is false. */
+#if CONFIG_MUXERS || CONFIG_NETWORK
/* buffer handling */
int url_open_buf(ByteIOContext **s, uint8_t *buf, int buf_size, int flags)
{
Modified: trunk/libavformat/daud.c
==============================================================================
--- trunk/libavformat/daud.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/daud.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -78,7 +78,7 @@ AVInputFormat daud_demuxer = {
};
#endif
-#ifdef CONFIG_DAUD_MUXER
+#if CONFIG_DAUD_MUXER
AVOutputFormat daud_muxer =
{
"daud",
Modified: trunk/libavformat/dv.c
==============================================================================
--- trunk/libavformat/dv.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/dv.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -462,7 +462,7 @@ static int dv_read_close(AVFormatContext
return 0;
}
-#ifdef CONFIG_DV_DEMUXER
+#if CONFIG_DV_DEMUXER
AVInputFormat dv_demuxer = {
"dv",
NULL_IF_CONFIG_SMALL("DV video format"),
Modified: trunk/libavformat/dvenc.c
==============================================================================
--- trunk/libavformat/dvenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/dvenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -359,7 +359,7 @@ void dv_delete_mux(DVMuxContext *c)
av_fifo_free(&c->audio_data[i]);
}
-#ifdef CONFIG_DV_MUXER
+#if CONFIG_DV_MUXER
static int dv_write_header(AVFormatContext *s)
{
if (!dv_init_mux(s)) {
Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/ffmdec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "ffm.h"
-#ifdef CONFIG_FFSERVER
+#if CONFIG_FFSERVER
#include <unistd.h>
int64_t ffm_read_write_index(int fd)
Modified: trunk/libavformat/file.c
==============================================================================
--- trunk/libavformat/file.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/file.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#include "libavutil/avstring.h"
#include "avformat.h"
#include <fcntl.h>
-#ifdef HAVE_SETMODE
+#if HAVE_SETMODE
#include <io.h>
#endif
#include <unistd.h>
@@ -107,7 +107,7 @@ static int pipe_open(URLContext *h, cons
fd = 0;
}
}
-#ifdef HAVE_SETMODE
+#if HAVE_SETMODE
setmode(fd, O_BINARY);
#endif
h->priv_data = (void *)(size_t)fd;
Modified: trunk/libavformat/flvenc.c
==============================================================================
--- trunk/libavformat/flvenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/flvenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -382,7 +382,7 @@ AVOutputFormat flv_muxer = {
"video/x-flv",
"flv",
sizeof(FLVContext),
-#ifdef CONFIG_LIBMP3LAME
+#if CONFIG_LIBMP3LAME
CODEC_ID_MP3,
#else // CONFIG_LIBMP3LAME
CODEC_ID_ADPCM_SWF,
Modified: trunk/libavformat/framehook.c
==============================================================================
--- trunk/libavformat/framehook.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/framehook.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -23,7 +23,7 @@
#include "avformat.h"
#include "framehook.h"
-#ifdef HAVE_DLFCN_H
+#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
Modified: trunk/libavformat/img2.c
==============================================================================
--- trunk/libavformat/img2.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/img2.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -305,7 +305,7 @@ static int img_read_packet(AVFormatConte
}
}
-#if defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER)
+#if CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER
/******************************************************/
/* image output */
@@ -370,10 +370,10 @@ static int img_write_packet(AVFormatCont
return 0;
}
-#endif /* defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER) */
+#endif /* CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER */
/* input */
-#ifdef CONFIG_IMAGE2_DEMUXER
+#if CONFIG_IMAGE2_DEMUXER
AVInputFormat image2_demuxer = {
"image2",
NULL_IF_CONFIG_SMALL("image2 sequence"),
@@ -387,7 +387,7 @@ AVInputFormat image2_demuxer = {
AVFMT_NOFILE,
};
#endif
-#ifdef CONFIG_IMAGE2PIPE_DEMUXER
+#if CONFIG_IMAGE2PIPE_DEMUXER
AVInputFormat image2pipe_demuxer = {
"image2pipe",
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
@@ -399,7 +399,7 @@ AVInputFormat image2pipe_demuxer = {
#endif
/* output */
-#ifdef CONFIG_IMAGE2_MUXER
+#if CONFIG_IMAGE2_MUXER
AVOutputFormat image2_muxer = {
"image2",
NULL_IF_CONFIG_SMALL("image2 sequence"),
@@ -414,7 +414,7 @@ AVOutputFormat image2_muxer = {
.flags= AVFMT_NOTIMESTAMPS | AVFMT_NOFILE
};
#endif
-#ifdef CONFIG_IMAGE2PIPE_MUXER
+#if CONFIG_IMAGE2PIPE_MUXER
AVOutputFormat image2pipe_muxer = {
"image2pipe",
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
Modified: trunk/libavformat/libnut.c
==============================================================================
--- trunk/libavformat/libnut.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/libnut.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -44,7 +44,7 @@ static const AVCodecTag nut_tags[] = {
{ 0, 0 },
};
-#ifdef CONFIG_LIBNUT_MUXER
+#if CONFIG_LIBNUT_MUXER
static int av_write(void * h, size_t len, const uint8_t * buf) {
ByteIOContext * bc = h;
put_buffer(bc, buf, len);
Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/matroskadec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -39,10 +39,10 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/lzo.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
-#ifdef CONFIG_BZLIB
+#if CONFIG_BZLIB
#include <bzlib.h>
#endif
@@ -879,7 +879,7 @@ static int matroska_decode_buffer(uint8_
goto failed;
pkt_size -= olen;
break;
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
z_stream zstream = {0};
if (inflateInit(&zstream) != Z_OK)
@@ -900,7 +900,7 @@ static int matroska_decode_buffer(uint8_
break;
}
#endif
-#ifdef CONFIG_BZLIB
+#if CONFIG_BZLIB
case MATROSKA_TRACK_ENCODING_COMP_BZLIB: {
bz_stream bzstream = {0};
if (BZ2_bzDecompressInit(&bzstream, 0, 0) != BZ_OK)
@@ -1147,10 +1147,10 @@ static int matroska_read_header(AVFormat
} else if (encodings_list->nb_elem == 1) {
if (encodings[0].type ||
(encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP &&
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB &&
#endif
-#ifdef CONFIG_BZLIB
+#if CONFIG_BZLIB
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB &&
#endif
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) {
Modified: trunk/libavformat/mmf.c
==============================================================================
--- trunk/libavformat/mmf.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/mmf.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -36,7 +36,7 @@ static int mmf_rate(int code)
return mmf_rates[code];
}
-#ifdef CONFIG_MMF_MUXER
+#if CONFIG_MMF_MUXER
static int mmf_rate_code(int rate)
{
int i;
@@ -290,7 +290,7 @@ static int mmf_read_packet(AVFormatConte
return ret;
}
-#ifdef CONFIG_MMF_DEMUXER
+#if CONFIG_MMF_DEMUXER
AVInputFormat mmf_demuxer = {
"mmf",
NULL_IF_CONFIG_SMALL("mmf format"),
@@ -302,7 +302,7 @@ AVInputFormat mmf_demuxer = {
pcm_read_seek,
};
#endif
-#ifdef CONFIG_MMF_MUXER
+#if CONFIG_MMF_MUXER
AVOutputFormat mmf_muxer = {
"mmf",
NULL_IF_CONFIG_SMALL("mmf format"),
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/mov.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -31,7 +31,7 @@
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/mpegaudiodata.h"
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
#include <zlib.h>
#endif
@@ -1005,7 +1005,7 @@ static int mov_read_stsd(MOVContext *c,
/* special codec parameters handling */
switch (st->codec->codec_id) {
-#ifdef CONFIG_DV_DEMUXER
+#if CONFIG_DV_DEMUXER
case CODEC_ID_DVAUDIO:
c->dv_fctx = av_alloc_format_context();
c->dv_demux = dv_init_demux(c->dv_fctx);
@@ -1380,13 +1380,13 @@ static int mov_read_trak(MOVContext *c,
sc->pb = c->fc->pb;
switch (st->codec->codec_id) {
-#ifdef CONFIG_H261_DECODER
+#if CONFIG_H261_DECODER
case CODEC_ID_H261:
#endif
-#ifdef CONFIG_H263_DECODER
+#if CONFIG_H263_DECODER
case CODEC_ID_H263:
#endif
-#ifdef CONFIG_MPEG4_DECODER
+#if CONFIG_MPEG4_DECODER
case CODEC_ID_MPEG4:
#endif
st->codec->width= 0; /* let decoder init width/height */
@@ -1691,7 +1691,7 @@ static int mov_read_wide(MOVContext *c,
static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
-#ifdef CONFIG_ZLIB
+#if CONFIG_ZLIB
ByteIOContext ctx;
uint8_t *cmov_data;
uint8_t *moov_data; /* uncompressed data */
@@ -1939,7 +1939,7 @@ static int mov_read_packet(AVFormatConte
return -1;
}
av_get_packet(sc->pb, pkt, sample->size);
-#ifdef CONFIG_DV_DEMUXER
+#if CONFIG_DV_DEMUXER
if (mov->dv_demux && sc->dv_audio_container) {
dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size);
av_free(pkt->data);
Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/movenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -1819,7 +1819,7 @@ static int mov_write_trailer(AVFormatCon
return res;
}
-#ifdef CONFIG_MOV_MUXER
+#if CONFIG_MOV_MUXER
AVOutputFormat mov_muxer = {
"mov",
NULL_IF_CONFIG_SMALL("MOV format"),
@@ -1835,7 +1835,7 @@ AVOutputFormat mov_muxer = {
.codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0},
};
#endif
-#ifdef CONFIG_TGP_MUXER
+#if CONFIG_TGP_MUXER
AVOutputFormat tgp_muxer = {
"3gp",
NULL_IF_CONFIG_SMALL("3GP format"),
@@ -1851,7 +1851,7 @@ AVOutputFormat tgp_muxer = {
.codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0},
};
#endif
-#ifdef CONFIG_MP4_MUXER
+#if CONFIG_MP4_MUXER
AVOutputFormat mp4_muxer = {
"mp4",
NULL_IF_CONFIG_SMALL("MP4 format"),
@@ -1867,7 +1867,7 @@ AVOutputFormat mp4_muxer = {
.codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0},
};
#endif
-#ifdef CONFIG_PSP_MUXER
+#if CONFIG_PSP_MUXER
AVOutputFormat psp_muxer = {
"psp",
NULL_IF_CONFIG_SMALL("PSP MP4 format"),
@@ -1883,7 +1883,7 @@ AVOutputFormat psp_muxer = {
.codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0},
};
#endif
-#ifdef CONFIG_TG2_MUXER
+#if CONFIG_TG2_MUXER
AVOutputFormat tg2_muxer = {
"3g2",
NULL_IF_CONFIG_SMALL("3GP2 format"),
@@ -1899,7 +1899,7 @@ AVOutputFormat tg2_muxer = {
.codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0},
};
#endif
-#ifdef CONFIG_IPOD_MUXER
+#if CONFIG_IPOD_MUXER
AVOutputFormat ipod_muxer = {
"ipod",
NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"),
Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/mp3.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -527,7 +527,7 @@ static int mp3_read_packet(AVFormatConte
return ret;
}
-#if defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER)
+#if CONFIG_MP2_MUXER || CONFIG_MP3_MUXER
static void id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
{
int v, i;
@@ -645,9 +645,9 @@ static int mp3_write_trailer(struct AVFo
}
return 0;
}
-#endif /* defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER) */
+#endif /* CONFIG_MP2_MUXER || CONFIG_MP3_MUXER */
-#ifdef CONFIG_MP3_DEMUXER
+#if CONFIG_MP3_DEMUXER
AVInputFormat mp3_demuxer = {
"mp3",
NULL_IF_CONFIG_SMALL("MPEG audio"),
@@ -659,12 +659,12 @@ AVInputFormat mp3_demuxer = {
.extensions = "mp2,mp3,m2a", /* XXX: use probe */
};
#endif
-#ifdef CONFIG_MP2_MUXER
+#if CONFIG_MP2_MUXER
AVOutputFormat mp2_muxer = {
"mp2",
NULL_IF_CONFIG_SMALL("MPEG audio layer 2"),
"audio/x-mpeg",
-#ifdef CONFIG_LIBMP3LAME
+#if CONFIG_LIBMP3LAME
"mp2,m2a",
#else
"mp2,mp3,m2a",
@@ -677,7 +677,7 @@ AVOutputFormat mp2_muxer = {
mp3_write_trailer,
};
#endif
-#ifdef CONFIG_MP3_MUXER
+#if CONFIG_MP3_MUXER
AVOutputFormat mp3_muxer = {
"mp3",
NULL_IF_CONFIG_SMALL("MPEG audio layer 3"),
Modified: trunk/libavformat/mpegenc.c
==============================================================================
--- trunk/libavformat/mpegenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/mpegenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -1219,7 +1219,7 @@ static int mpeg_mux_end(AVFormatContext
return 0;
}
-#ifdef CONFIG_MPEG1SYSTEM_MUXER
+#if CONFIG_MPEG1SYSTEM_MUXER
AVOutputFormat mpeg1system_muxer = {
"mpeg",
NULL_IF_CONFIG_SMALL("MPEG-1 System format"),
@@ -1233,7 +1233,7 @@ AVOutputFormat mpeg1system_muxer = {
mpeg_mux_end,
};
#endif
-#ifdef CONFIG_MPEG1VCD_MUXER
+#if CONFIG_MPEG1VCD_MUXER
AVOutputFormat mpeg1vcd_muxer = {
"vcd",
NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"),
@@ -1247,7 +1247,7 @@ AVOutputFormat mpeg1vcd_muxer = {
mpeg_mux_end,
};
#endif
-#ifdef CONFIG_MPEG2VOB_MUXER
+#if CONFIG_MPEG2VOB_MUXER
AVOutputFormat mpeg2vob_muxer = {
"vob",
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
@@ -1263,7 +1263,7 @@ AVOutputFormat mpeg2vob_muxer = {
#endif
/* Same as mpeg2vob_mux except that the pack size is 2324 */
-#ifdef CONFIG_MPEG2SVCD_MUXER
+#if CONFIG_MPEG2SVCD_MUXER
AVOutputFormat mpeg2svcd_muxer = {
"svcd",
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
@@ -1279,7 +1279,7 @@ AVOutputFormat mpeg2svcd_muxer = {
#endif
/* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */
-#ifdef CONFIG_MPEG2DVD_MUXER
+#if CONFIG_MPEG2DVD_MUXER
AVOutputFormat mpeg2dvd_muxer = {
"dvd",
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"),
Modified: trunk/libavformat/network.h
==============================================================================
--- trunk/libavformat/network.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/network.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -21,7 +21,7 @@
#ifndef AVFORMAT_NETWORK_H
#define AVFORMAT_NETWORK_H
-#ifdef HAVE_WINSOCK2_H
+#if HAVE_WINSOCK2_H
#include <winsock2.h>
#include <ws2tcpip.h>
@@ -38,7 +38,7 @@
#define FF_NETERROR(err) err
#endif
-#ifdef HAVE_ARPA_INET_H
+#if HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -46,7 +46,7 @@ int ff_socket_nonblock(int socket, int e
static inline int ff_network_init(void)
{
-#ifdef HAVE_WINSOCK2_H
+#if HAVE_WINSOCK2_H
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1,1), &wsaData))
return 0;
@@ -56,12 +56,12 @@ static inline int ff_network_init(void)
static inline void ff_network_close(void)
{
-#ifdef HAVE_WINSOCK2_H
+#if HAVE_WINSOCK2_H
WSACleanup();
#endif
}
-#if !defined(HAVE_INET_ATON)
+#if !HAVE_INET_ATON
/* in os_support.c */
int inet_aton (const char * str, struct in_addr * add);
#endif
Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/nutdec.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -906,7 +906,7 @@ static int nut_read_close(AVFormatContex
return 0;
}
-#ifdef CONFIG_NUT_DEMUXER
+#if CONFIG_NUT_DEMUXER
AVInputFormat nut_demuxer = {
"nut",
NULL_IF_CONFIG_SMALL("NUT format"),
Modified: trunk/libavformat/nutenc.c
==============================================================================
--- trunk/libavformat/nutenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/nutenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -809,9 +809,9 @@ AVOutputFormat nut_muxer = {
"video/x-nut",
"nut",
sizeof(NUTContext),
-#ifdef CONFIG_LIBVORBIS
+#if CONFIG_LIBVORBIS
CODEC_ID_VORBIS,
-#elif defined(CONFIG_LIBMP3LAME)
+#elif CONFIG_LIBMP3LAME
CODEC_ID_MP3,
#else
CODEC_ID_MP2,
Modified: trunk/libavformat/os_support.c
==============================================================================
--- trunk/libavformat/os_support.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/os_support.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,18 +30,18 @@
#include <sys/time.h>
#include "os_support.h"
-#ifdef CONFIG_NETWORK
-#ifndef HAVE_POLL_H
-#ifdef HAVE_WINSOCK2_H
+#if CONFIG_NETWORK
+#if !HAVE_POLL_H
+#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif defined (HAVE_SYS_SELECT_H)
+#elif HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif
#include "network.h"
-#if !defined(HAVE_INET_ATON)
+#if !HAVE_INET_ATON
#include <stdlib.h>
#include <strings.h>
@@ -58,7 +58,7 @@ int inet_aton (const char * str, struct
return 1;
}
-#endif /* !defined(HAVE_INET_ATON) */
+#endif /* !HAVE_INET_ATON */
/* resolve host with also IP address parsing */
int resolve_host(struct in_addr *sin_addr, const char *hostname)
@@ -76,7 +76,7 @@ int resolve_host(struct in_addr *sin_add
int ff_socket_nonblock(int socket, int enable)
{
-#ifdef HAVE_WINSOCK2_H
+#if HAVE_WINSOCK2_H
return ioctlsocket(socket, FIONBIO, &enable);
#else
if (enable)
@@ -87,8 +87,8 @@ int ff_socket_nonblock(int socket, int e
}
#endif /* CONFIG_NETWORK */
-#ifdef CONFIG_FFSERVER
-#ifndef HAVE_POLL_H
+#if CONFIG_FFSERVER
+#if !HAVE_POLL_H
int poll(struct pollfd *fds, nfds_t numfds, int timeout)
{
fd_set read_set;
@@ -98,7 +98,7 @@ int poll(struct pollfd *fds, nfds_t numf
int n;
int rc;
-#ifdef HAVE_WINSOCK2_H
+#if HAVE_WINSOCK2_H
if (numfds >= FD_SETSIZE) {
errno = EINVAL;
return -1;
@@ -113,7 +113,7 @@ int poll(struct pollfd *fds, nfds_t numf
for(i = 0; i < numfds; i++) {
if (fds[i].fd < 0)
continue;
-#ifndef HAVE_WINSOCK2_H
+#if !HAVE_WINSOCK2_H
if (fds[i].fd >= FD_SETSIZE) {
errno = EINVAL;
return -1;
Modified: trunk/libavformat/os_support.h
==============================================================================
--- trunk/libavformat/os_support.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/os_support.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -34,7 +34,7 @@
static inline int is_dos_path(const char *path)
{
-#ifdef HAVE_DOS_PATHS
+#if HAVE_DOS_PATHS
if (path[0] && path[1] == ':')
return 1;
#endif
@@ -58,18 +58,18 @@ static inline int is_dos_path(const char
# endif
#endif
-#ifdef CONFIG_NETWORK
-#ifndef HAVE_SOCKLEN_T
+#if CONFIG_NETWORK
+#if !HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
/* most of the time closing a socket is just closing an fd */
-#ifndef HAVE_CLOSESOCKET
+#if !HAVE_CLOSESOCKET
#define closesocket close
#endif
-#ifdef CONFIG_FFSERVER
-#ifndef HAVE_POLL_H
+#if CONFIG_FFSERVER
+#if !HAVE_POLL_H
typedef unsigned long nfds_t;
struct pollfd {
Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/raw.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -28,7 +28,7 @@
#include "raw.h"
/* simple formats */
-#ifdef CONFIG_FLAC_MUXER
+#if CONFIG_FLAC_MUXER
static int flac_write_header(struct AVFormatContext *s)
{
static const uint8_t header[8] = {
@@ -61,7 +61,7 @@ static int flac_write_trailer(struct AVF
}
#endif
-#ifdef CONFIG_ROQ_MUXER
+#if CONFIG_ROQ_MUXER
static int roq_write_header(struct AVFormatContext *s)
{
static const uint8_t header[] = {
@@ -75,14 +75,14 @@ static int roq_write_header(struct AVFor
}
#endif
-#ifdef CONFIG_NULL_MUXER
+#if CONFIG_NULL_MUXER
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
return 0;
}
#endif
-#ifdef CONFIG_MUXERS
+#if CONFIG_MUXERS
static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
put_buffer(s->pb, pkt->data, pkt->size);
@@ -91,7 +91,7 @@ static int raw_write_packet(struct AVFor
}
#endif
-#ifdef CONFIG_DEMUXERS
+#if CONFIG_DEMUXERS
/* raw input */
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
@@ -182,7 +182,7 @@ static int raw_read_partial_packet(AVFor
}
#endif
-#ifdef CONFIG_RAWVIDEO_DEMUXER
+#if CONFIG_RAWVIDEO_DEMUXER
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int packet_size, ret, width, height;
@@ -208,7 +208,7 @@ static int rawvideo_read_packet(AVFormat
}
#endif
-#ifdef CONFIG_INGENIENT_DEMUXER
+#if CONFIG_INGENIENT_DEMUXER
// http://www.artificis.hu/files/texts/ingenient.txt
static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt)
{
@@ -246,7 +246,7 @@ static int ingenient_read_packet(AVForma
}
#endif
-#ifdef CONFIG_DEMUXERS
+#if CONFIG_DEMUXERS
int pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags)
{
@@ -320,7 +320,7 @@ static int video_read_header(AVFormatCon
}
#endif
-#ifdef CONFIG_MPEGVIDEO_DEMUXER
+#if CONFIG_MPEGVIDEO_DEMUXER
#define SEQ_START_CODE 0x000001b3
#define GOP_START_CODE 0x000001b8
#define PICTURE_START_CODE 0x00000100
@@ -354,7 +354,7 @@ static int mpegvideo_probe(AVProbeData *
}
#endif
-#ifdef CONFIG_M4V_DEMUXER
+#if CONFIG_M4V_DEMUXER
#define VISUAL_OBJECT_START_CODE 0x000001b5
#define VOP_START_CODE 0x000001b6
@@ -383,7 +383,7 @@ static int mpeg4video_probe(AVProbeData
}
#endif
-#ifdef CONFIG_H264_DEMUXER
+#if CONFIG_H264_DEMUXER
static int h264_probe(AVProbeData *p)
{
uint32_t code= -1;
@@ -430,7 +430,7 @@ static int h264_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_H263_DEMUXER
+#if CONFIG_H263_DEMUXER
static int h263_probe(AVProbeData *p)
{
int code;
@@ -445,7 +445,7 @@ static int h263_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_H261_DEMUXER
+#if CONFIG_H261_DEMUXER
static int h261_probe(AVProbeData *p)
{
int code;
@@ -460,7 +460,7 @@ static int h261_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_DTS_DEMUXER
+#if CONFIG_DTS_DEMUXER
#define DCA_MARKER_14B_BE 0x1FFFE800
#define DCA_MARKER_14B_LE 0xFF1F00E8
#define DCA_MARKER_RAW_BE 0x7FFE8001
@@ -495,7 +495,7 @@ static int dts_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_DIRAC_DEMUXER
+#if CONFIG_DIRAC_DEMUXER
static int dirac_probe(AVProbeData *p)
{
if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D'))
@@ -505,7 +505,7 @@ static int dirac_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_DNXHD_DEMUXER
+#if CONFIG_DNXHD_DEMUXER
static int dnxhd_probe(AVProbeData *p)
{
static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
@@ -516,7 +516,7 @@ static int dnxhd_probe(AVProbeData *p)
}
#endif
-#if defined(CONFIG_AC3_DEMUXER) || defined(CONFIG_EAC3_DEMUXER)
+#if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER
static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
{
int max_frames, first_frames = 0, frames;
@@ -555,21 +555,21 @@ static int ac3_eac3_probe(AVProbeData *p
}
#endif
-#ifdef CONFIG_AC3_DEMUXER
+#if CONFIG_AC3_DEMUXER
static int ac3_probe(AVProbeData *p)
{
return ac3_eac3_probe(p, CODEC_ID_AC3);
}
#endif
-#ifdef CONFIG_EAC3_DEMUXER
+#if CONFIG_EAC3_DEMUXER
static int eac3_probe(AVProbeData *p)
{
return ac3_eac3_probe(p, CODEC_ID_EAC3);
}
#endif
-#ifdef CONFIG_FLAC_DEMUXER
+#if CONFIG_FLAC_DEMUXER
static int flac_probe(AVProbeData *p)
{
if(memcmp(p->buf, "fLaC", 4)) return 0;
@@ -577,7 +577,7 @@ static int flac_probe(AVProbeData *p)
}
#endif
-#ifdef CONFIG_AAC_DEMUXER
+#if CONFIG_AAC_DEMUXER
static int adts_aac_probe(AVProbeData *p)
{
int max_frames = 0, first_frames = 0;
@@ -612,7 +612,7 @@ static int adts_aac_probe(AVProbeData *p
/* Note: Do not forget to add new entries to the Makefile as well. */
-#ifdef CONFIG_AAC_DEMUXER
+#if CONFIG_AAC_DEMUXER
AVInputFormat aac_demuxer = {
"aac",
NULL_IF_CONFIG_SMALL("ADTS AAC"),
@@ -626,7 +626,7 @@ AVInputFormat aac_demuxer = {
};
#endif
-#ifdef CONFIG_AC3_DEMUXER
+#if CONFIG_AC3_DEMUXER
AVInputFormat ac3_demuxer = {
"ac3",
NULL_IF_CONFIG_SMALL("raw AC-3"),
@@ -640,7 +640,7 @@ AVInputFormat ac3_demuxer = {
};
#endif
-#ifdef CONFIG_AC3_MUXER
+#if CONFIG_AC3_MUXER
AVOutputFormat ac3_muxer = {
"ac3",
NULL_IF_CONFIG_SMALL("raw AC-3"),
@@ -655,7 +655,7 @@ AVOutputFormat ac3_muxer = {
};
#endif
-#ifdef CONFIG_DIRAC_DEMUXER
+#if CONFIG_DIRAC_DEMUXER
AVInputFormat dirac_demuxer = {
"dirac",
NULL_IF_CONFIG_SMALL("raw Dirac"),
@@ -668,7 +668,7 @@ AVInputFormat dirac_demuxer = {
};
#endif
-#ifdef CONFIG_DIRAC_MUXER
+#if CONFIG_DIRAC_MUXER
AVOutputFormat dirac_muxer = {
"dirac",
NULL_IF_CONFIG_SMALL("raw Dirac"),
@@ -683,7 +683,7 @@ AVOutputFormat dirac_muxer = {
};
#endif
-#ifdef CONFIG_DNXHD_DEMUXER
+#if CONFIG_DNXHD_DEMUXER
AVInputFormat dnxhd_demuxer = {
"dnxhd",
NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
@@ -696,7 +696,7 @@ AVInputFormat dnxhd_demuxer = {
};
#endif
-#ifdef CONFIG_DNXHD_MUXER
+#if CONFIG_DNXHD_MUXER
AVOutputFormat dnxhd_muxer = {
"dnxhd",
NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
@@ -711,7 +711,7 @@ AVOutputFormat dnxhd_muxer = {
};
#endif
-#ifdef CONFIG_DTS_DEMUXER
+#if CONFIG_DTS_DEMUXER
AVInputFormat dts_demuxer = {
"dts",
NULL_IF_CONFIG_SMALL("raw DTS"),
@@ -725,7 +725,7 @@ AVInputFormat dts_demuxer = {
};
#endif
-#ifdef CONFIG_DTS_MUXER
+#if CONFIG_DTS_MUXER
AVOutputFormat dts_muxer = {
"dts",
NULL_IF_CONFIG_SMALL("raw DTS"),
@@ -740,7 +740,7 @@ AVOutputFormat dts_muxer = {
};
#endif
-#ifdef CONFIG_EAC3_DEMUXER
+#if CONFIG_EAC3_DEMUXER
AVInputFormat eac3_demuxer = {
"eac3",
NULL_IF_CONFIG_SMALL("raw E-AC-3"),
@@ -754,7 +754,7 @@ AVInputFormat eac3_demuxer = {
};
#endif
-#ifdef CONFIG_EAC3_MUXER
+#if CONFIG_EAC3_MUXER
AVOutputFormat eac3_muxer = {
"eac3",
NULL_IF_CONFIG_SMALL("raw E-AC-3"),
@@ -769,7 +769,7 @@ AVOutputFormat eac3_muxer = {
};
#endif
-#ifdef CONFIG_FLAC_DEMUXER
+#if CONFIG_FLAC_DEMUXER
AVInputFormat flac_demuxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
@@ -783,7 +783,7 @@ AVInputFormat flac_demuxer = {
};
#endif
-#ifdef CONFIG_FLAC_MUXER
+#if CONFIG_FLAC_MUXER
AVOutputFormat flac_muxer = {
"flac",
NULL_IF_CONFIG_SMALL("raw FLAC"),
@@ -799,7 +799,7 @@ AVOutputFormat flac_muxer = {
};
#endif
-#ifdef CONFIG_GSM_DEMUXER
+#if CONFIG_GSM_DEMUXER
AVInputFormat gsm_demuxer = {
"gsm",
NULL_IF_CONFIG_SMALL("GSM"),
@@ -813,7 +813,7 @@ AVInputFormat gsm_demuxer = {
};
#endif
-#ifdef CONFIG_H261_DEMUXER
+#if CONFIG_H261_DEMUXER
AVInputFormat h261_demuxer = {
"h261",
NULL_IF_CONFIG_SMALL("raw H.261"),
@@ -827,7 +827,7 @@ AVInputFormat h261_demuxer = {
};
#endif
-#ifdef CONFIG_H261_MUXER
+#if CONFIG_H261_MUXER
AVOutputFormat h261_muxer = {
"h261",
NULL_IF_CONFIG_SMALL("raw H.261"),
@@ -842,7 +842,7 @@ AVOutputFormat h261_muxer = {
};
#endif
-#ifdef CONFIG_H263_DEMUXER
+#if CONFIG_H263_DEMUXER
AVInputFormat h263_demuxer = {
"h263",
NULL_IF_CONFIG_SMALL("raw H.263"),
@@ -856,7 +856,7 @@ AVInputFormat h263_demuxer = {
};
#endif
-#ifdef CONFIG_H263_MUXER
+#if CONFIG_H263_MUXER
AVOutputFormat h263_muxer = {
"h263",
NULL_IF_CONFIG_SMALL("raw H.263"),
@@ -871,7 +871,7 @@ AVOutputFormat h263_muxer = {
};
#endif
-#ifdef CONFIG_H264_DEMUXER
+#if CONFIG_H264_DEMUXER
AVInputFormat h264_demuxer = {
"h264",
NULL_IF_CONFIG_SMALL("raw H.264 video format"),
@@ -885,7 +885,7 @@ AVInputFormat h264_demuxer = {
};
#endif
-#ifdef CONFIG_H264_MUXER
+#if CONFIG_H264_MUXER
AVOutputFormat h264_muxer = {
"h264",
NULL_IF_CONFIG_SMALL("raw H.264 video format"),
@@ -900,7 +900,7 @@ AVOutputFormat h264_muxer = {
};
#endif
-#ifdef CONFIG_INGENIENT_DEMUXER
+#if CONFIG_INGENIENT_DEMUXER
AVInputFormat ingenient_demuxer = {
"ingenient",
NULL_IF_CONFIG_SMALL("Ingenient MJPEG"),
@@ -914,7 +914,7 @@ AVInputFormat ingenient_demuxer = {
};
#endif
-#ifdef CONFIG_M4V_DEMUXER
+#if CONFIG_M4V_DEMUXER
AVInputFormat m4v_demuxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
@@ -928,7 +928,7 @@ AVInputFormat m4v_demuxer = {
};
#endif
-#ifdef CONFIG_M4V_MUXER
+#if CONFIG_M4V_MUXER
AVOutputFormat m4v_muxer = {
"m4v",
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
@@ -943,7 +943,7 @@ AVOutputFormat m4v_muxer = {
};
#endif
-#ifdef CONFIG_MJPEG_DEMUXER
+#if CONFIG_MJPEG_DEMUXER
AVInputFormat mjpeg_demuxer = {
"mjpeg",
NULL_IF_CONFIG_SMALL("MJPEG video"),
@@ -957,7 +957,7 @@ AVInputFormat mjpeg_demuxer = {
};
#endif
-#ifdef CONFIG_MJPEG_MUXER
+#if CONFIG_MJPEG_MUXER
AVOutputFormat mjpeg_muxer = {
"mjpeg",
NULL_IF_CONFIG_SMALL("MJPEG video"),
@@ -972,7 +972,7 @@ AVOutputFormat mjpeg_muxer = {
};
#endif
-#ifdef CONFIG_MLP_DEMUXER
+#if CONFIG_MLP_DEMUXER
AVInputFormat mlp_demuxer = {
"mlp",
NULL_IF_CONFIG_SMALL("raw MLP"),
@@ -986,7 +986,7 @@ AVInputFormat mlp_demuxer = {
};
#endif
-#ifdef CONFIG_MPEG1VIDEO_MUXER
+#if CONFIG_MPEG1VIDEO_MUXER
AVOutputFormat mpeg1video_muxer = {
"mpeg1video",
NULL_IF_CONFIG_SMALL("MPEG video"),
@@ -1001,7 +1001,7 @@ AVOutputFormat mpeg1video_muxer = {
};
#endif
-#ifdef CONFIG_MPEG2VIDEO_MUXER
+#if CONFIG_MPEG2VIDEO_MUXER
AVOutputFormat mpeg2video_muxer = {
"mpeg2video",
NULL_IF_CONFIG_SMALL("MPEG-2 video"),
@@ -1016,7 +1016,7 @@ AVOutputFormat mpeg2video_muxer = {
};
#endif
-#ifdef CONFIG_MPEGVIDEO_DEMUXER
+#if CONFIG_MPEGVIDEO_DEMUXER
AVInputFormat mpegvideo_demuxer = {
"mpegvideo",
NULL_IF_CONFIG_SMALL("MPEG video"),
@@ -1029,7 +1029,7 @@ AVInputFormat mpegvideo_demuxer = {
};
#endif
-#ifdef CONFIG_NULL_MUXER
+#if CONFIG_NULL_MUXER
AVOutputFormat null_muxer = {
"null",
NULL_IF_CONFIG_SMALL("null video format"),
@@ -1048,7 +1048,7 @@ AVOutputFormat null_muxer = {
};
#endif
-#ifdef CONFIG_RAWVIDEO_DEMUXER
+#if CONFIG_RAWVIDEO_DEMUXER
AVInputFormat rawvideo_demuxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
@@ -1062,7 +1062,7 @@ AVInputFormat rawvideo_demuxer = {
};
#endif
-#ifdef CONFIG_RAWVIDEO_MUXER
+#if CONFIG_RAWVIDEO_MUXER
AVOutputFormat rawvideo_muxer = {
"rawvideo",
NULL_IF_CONFIG_SMALL("raw video format"),
@@ -1077,7 +1077,7 @@ AVOutputFormat rawvideo_muxer = {
};
#endif
-#ifdef CONFIG_ROQ_MUXER
+#if CONFIG_ROQ_MUXER
AVOutputFormat roq_muxer =
{
"RoQ",
@@ -1092,7 +1092,7 @@ AVOutputFormat roq_muxer =
};
#endif
-#ifdef CONFIG_SHORTEN_DEMUXER
+#if CONFIG_SHORTEN_DEMUXER
AVInputFormat shorten_demuxer = {
"shn",
NULL_IF_CONFIG_SMALL("raw Shorten"),
@@ -1106,7 +1106,7 @@ AVInputFormat shorten_demuxer = {
};
#endif
-#ifdef CONFIG_VC1_DEMUXER
+#if CONFIG_VC1_DEMUXER
AVInputFormat vc1_demuxer = {
"vc1",
NULL_IF_CONFIG_SMALL("raw VC-1"),
@@ -1151,13 +1151,13 @@ AVOutputFormat pcm_ ## name ## _muxer =
};
-#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
+#if !CONFIG_MUXERS && CONFIG_DEMUXERS
#define PCMDEF(name, long_name, ext, codec) \
PCMINPUTDEF(name, long_name, ext, codec)
-#elif defined(CONFIG_MUXERS) && !defined(CONFIG_DEMUXERS)
+#elif CONFIG_MUXERS && !CONFIG_DEMUXERS
#define PCMDEF(name, long_name, ext, codec) \
PCMOUTPUTDEF(name, long_name, ext, codec)
-#elif defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
+#elif CONFIG_MUXERS && CONFIG_DEMUXERS
#define PCMDEF(name, long_name, ext, codec) \
PCMINPUTDEF(name, long_name, ext, codec)\
PCMOUTPUTDEF(name, long_name, ext, codec)
Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/riff.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -248,7 +248,7 @@ const AVCodecTag codec_wav_tags[] = {
{ 0, 0 },
};
-#ifdef CONFIG_MUXERS
+#if CONFIG_MUXERS
int64_t start_tag(ByteIOContext *pb, const char *tag)
{
put_tag(pb, tag);
@@ -379,7 +379,7 @@ void put_bmp_header(ByteIOContext *pb, A
}
#endif //CONFIG_MUXERS
-#ifdef CONFIG_DEMUXERS
+#if CONFIG_DEMUXERS
/* We could be given one of the three possible structures here:
* WAVEFORMAT, PCMWAVEFORMAT or WAVEFORMATEX. Each structure
* is an expansion of the previous one with the fields added
Modified: trunk/libavformat/rtpproto.c
==============================================================================
--- trunk/libavformat/rtpproto.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/rtpproto.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -32,7 +32,7 @@
#include "network.h"
#include "os_support.h"
#include <fcntl.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/rtsp.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -27,7 +27,7 @@
#include "avformat.h"
#include <sys/time.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <strings.h>
@@ -1502,7 +1502,7 @@ static int rtsp_read_close(AVFormatConte
return 0;
}
-#ifdef CONFIG_RTSP_DEMUXER
+#if CONFIG_RTSP_DEMUXER
AVInputFormat rtsp_demuxer = {
"rtsp",
NULL_IF_CONFIG_SMALL("RTSP input format"),
@@ -1595,7 +1595,7 @@ static int sdp_read_close(AVFormatContex
return 0;
}
-#ifdef CONFIG_SDP_DEMUXER
+#if CONFIG_SDP_DEMUXER
AVInputFormat sdp_demuxer = {
"sdp",
NULL_IF_CONFIG_SMALL("SDP"),
@@ -1607,7 +1607,7 @@ AVInputFormat sdp_demuxer = {
};
#endif
-#ifdef CONFIG_REDIR_DEMUXER
+#if CONFIG_REDIR_DEMUXER
/* dummy redirector format (used directly in av_open_input_file now) */
static int redir_probe(AVProbeData *pd)
{
Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/sdp.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -25,7 +25,7 @@
#include "avc.h"
#include "rtp.h"
-#ifdef CONFIG_RTP_MUXER
+#if CONFIG_RTP_MUXER
#define MAX_EXTRADATA_SIZE ((INT_MAX - 10) / 2)
struct sdp_session_level {
Modified: trunk/libavformat/swfenc.c
==============================================================================
--- trunk/libavformat/swfenc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/swfenc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -503,7 +503,7 @@ static int swf_write_trailer(AVFormatCon
return 0;
}
-#ifdef CONFIG_SWF_MUXER
+#if CONFIG_SWF_MUXER
AVOutputFormat swf_muxer = {
"swf",
NULL_IF_CONFIG_SMALL("Flash format"),
@@ -517,7 +517,7 @@ AVOutputFormat swf_muxer = {
swf_write_trailer,
};
#endif
-#ifdef CONFIG_AVM2_MUXER
+#if CONFIG_AVM2_MUXER
AVOutputFormat avm2_muxer = {
"avm2",
NULL_IF_CONFIG_SMALL("Flash 9 (AVM2) format"),
Modified: trunk/libavformat/tcp.c
==============================================================================
--- trunk/libavformat/tcp.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/tcp.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#include <unistd.h>
#include "network.h"
#include "os_support.h"
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <sys/time.h>
Modified: trunk/libavformat/udp.c
==============================================================================
--- trunk/libavformat/udp.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/udp.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -29,7 +29,7 @@
#include <unistd.h>
#include "network.h"
#include "os_support.h"
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <sys/time.h>
@@ -52,7 +52,7 @@ typedef struct {
int is_multicast;
int local_port;
int reuse_socket;
-#ifndef CONFIG_IPV6
+#if !CONFIG_IPV6
struct sockaddr_in dest_addr;
#else
struct sockaddr_storage dest_addr;
@@ -72,7 +72,7 @@ static int udp_set_multicast_ttl(int soc
}
}
#endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
if (addr->sa_family == AF_INET6) {
if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastTTL, sizeof(mcastTTL)) < 0) {
av_log(NULL, AV_LOG_ERROR, "setsockopt(IPV6_MULTICAST_HOPS): %s\n", strerror(errno));
@@ -96,7 +96,7 @@ static int udp_join_multicast_group(int
}
}
#endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
if (addr->sa_family == AF_INET6) {
struct ipv6_mreq mreq6;
@@ -124,7 +124,7 @@ static int udp_leave_multicast_group(int
}
}
#endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
if (addr->sa_family == AF_INET6) {
struct ipv6_mreq mreq6;
@@ -139,7 +139,7 @@ static int udp_leave_multicast_group(int
return 0;
}
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, int type, int family, int flags) {
struct addrinfo hints, *res = 0;
int error;
@@ -342,7 +342,7 @@ static int udp_open(URLContext *h, const
int is_output;
const char *p;
char buf[256];
-#ifndef CONFIG_IPV6
+#if !CONFIG_IPV6
struct sockaddr_in my_addr;
#else
struct sockaddr_storage my_addr;
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/utils.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -160,7 +160,7 @@ AVOutputFormat *guess_format(const char
int score_max, score;
/* specific test for image sequences */
-#ifdef CONFIG_IMAGE2_MUXER
+#if CONFIG_IMAGE2_MUXER
if (!short_name && filename &&
av_filename_number_test(filename) &&
av_guess_image2_codec(filename) != CODEC_ID_NONE) {
@@ -214,7 +214,7 @@ enum CodecID av_guess_codec(AVOutputForm
if(type == CODEC_TYPE_VIDEO){
enum CodecID codec_id= CODEC_ID_NONE;
-#ifdef CONFIG_IMAGE2_MUXER
+#if CONFIG_IMAGE2_MUXER
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
codec_id= av_guess_image2_codec(filename);
}
Modified: trunk/libavformat/wav.c
==============================================================================
--- trunk/libavformat/wav.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/wav.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,7 +30,7 @@ typedef struct {
int last_duration;
} WAVContext;
-#ifdef CONFIG_WAV_MUXER
+#if CONFIG_WAV_MUXER
static int wav_write_header(AVFormatContext *s)
{
WAVContext *wav = s->priv_data;
@@ -256,7 +256,7 @@ static int wav_read_seek(AVFormatContext
return pcm_read_seek(s, stream_index, timestamp, flags);
}
-#ifdef CONFIG_WAV_DEMUXER
+#if CONFIG_WAV_DEMUXER
AVInputFormat wav_demuxer = {
"wav",
NULL_IF_CONFIG_SMALL("WAV format"),
@@ -270,7 +270,7 @@ AVInputFormat wav_demuxer = {
.codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0},
};
#endif
-#ifdef CONFIG_WAV_MUXER
+#if CONFIG_WAV_MUXER
AVOutputFormat wav_muxer = {
"wav",
NULL_IF_CONFIG_SMALL("WAV format"),
Modified: trunk/libavformat/westwood.c
==============================================================================
--- trunk/libavformat/westwood.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/westwood.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -371,7 +371,7 @@ static int wsvqa_read_packet(AVFormatCon
return ret;
}
-#ifdef CONFIG_WSAUD_DEMUXER
+#if CONFIG_WSAUD_DEMUXER
AVInputFormat wsaud_demuxer = {
"wsaud",
NULL_IF_CONFIG_SMALL("Westwood Studios audio format"),
@@ -381,7 +381,7 @@ AVInputFormat wsaud_demuxer = {
wsaud_read_packet,
};
#endif
-#ifdef CONFIG_WSVQA_DEMUXER
+#if CONFIG_WSVQA_DEMUXER
AVInputFormat wsvqa_demuxer = {
"wsvqa",
NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"),
Modified: trunk/libavformat/yuv4mpeg.c
==============================================================================
--- trunk/libavformat/yuv4mpeg.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavformat/yuv4mpeg.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -29,7 +29,7 @@ struct frame_attributes {
int top_field_first;
};
-#ifdef CONFIG_YUV4MPEGPIPE_MUXER
+#if CONFIG_YUV4MPEGPIPE_MUXER
static int yuv4_generate_header(AVFormatContext *s, char* buf)
{
AVStream *st;
@@ -382,7 +382,7 @@ static int yuv4_probe(AVProbeData *pd)
return 0;
}
-#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
+#if CONFIG_YUV4MPEGPIPE_DEMUXER
AVInputFormat yuv4mpegpipe_demuxer = {
"yuv4mpegpipe",
NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
Modified: trunk/libavutil/adler32.c
==============================================================================
--- trunk/libavutil/adler32.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/adler32.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -35,7 +35,7 @@ unsigned long av_adler32_update(unsigned
unsigned long s2 = adler >> 16;
while (len>0) {
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
while(len>4 && s2 < (1U<<31)){
DO4(buf); len-=4;
#else
Modified: trunk/libavutil/aes.c
==============================================================================
--- trunk/libavutil/aes.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/aes.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -39,7 +39,7 @@ static const uint8_t rcon[10] = {
static uint8_t sbox[256];
static uint8_t inv_sbox[256];
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
static uint32_t enc_multbl[1][256];
static uint32_t dec_multbl[1][256];
#else
@@ -62,7 +62,7 @@ static void subshift(uint8_t s0[2][16],
}
static inline int mix_core(uint32_t multbl[4][256], int a, int b, int c, int d){
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
#define ROT(x,s) ((x<<s)|(x>>(32-s)))
return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24);
#else
@@ -114,7 +114,7 @@ static void init_multbl2(uint8_t tbl[102
int x= sbox[i>>2];
if(x) tbl[i]= alog8[ log8[x] + log8[c[i&3]] ];
}
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
for(j=256; j<1024; j++)
for(i=0; i<4; i++)
tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024];
Modified: trunk/libavutil/arm/bswap.h
==============================================================================
--- trunk/libavutil/arm/bswap.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/arm/bswap.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -23,7 +23,7 @@
#include "config.h"
#include "libavutil/common.h"
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
#define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
{
@@ -35,7 +35,7 @@ static av_always_inline av_const uint16_
#define bswap_32 bswap_32
static av_always_inline av_const uint32_t bswap_32(uint32_t x)
{
-#ifdef HAVE_ARMV6
+#if HAVE_ARMV6
__asm__("rev %0, %0" : "+r"(x));
#else
uint32_t t;
Modified: trunk/libavutil/bswap.h
==============================================================================
--- trunk/libavutil/bswap.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/bswap.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -30,13 +30,13 @@
#include "config.h"
#include "common.h"
-#if defined(ARCH_ARM)
+#if ARCH_ARM
# include "arm/bswap.h"
-#elif defined(ARCH_BFIN)
+#elif ARCH_BFIN
# include "bfin/bswap.h"
-#elif defined(ARCH_SH4)
+#elif ARCH_SH4
# include "sh4/bswap.h"
-#elif defined(ARCH_X86)
+#elif ARCH_X86
# include "x86/bswap.h"
#endif
Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/common.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -154,7 +154,7 @@ static inline av_const int av_log2_16bit
/* median of 3 */
static inline av_const int mid_pred(int a, int b, int c)
{
-#ifdef HAVE_CMOV
+#if HAVE_CMOV
int i=b;
__asm__ volatile(
"cmp %2, %1 \n\t"
@@ -323,9 +323,9 @@ static inline av_pure int ff_get_fourcc(
}\
}
-#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_BFIN)
+#if ARCH_X86 || ARCH_PPC || ARCH_BFIN
#define AV_READ_TIME read_time
-#if defined(ARCH_X86)
+#if ARCH_X86
static inline uint64_t read_time(void)
{
uint32_t a, d;
@@ -366,7 +366,7 @@ static inline uint64_t read_time(void)
return (((uint64_t)tbu)<<32) | (uint64_t)tbl;
}
#endif
-#elif defined(HAVE_GETHRTIME)
+#elif HAVE_GETHRTIME
#define AV_READ_TIME gethrtime
#endif
@@ -397,11 +397,11 @@ tend= AV_READ_TIME();\
#endif
/**
- * Returns NULL if CONFIG_SMALL is defined otherwise the argument
+ * Returns NULL if CONFIG_SMALL is true otherwise the argument
* without modifications, used to disable the definition of strings
* (for example AVCodec long_names).
*/
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
# define NULL_IF_CONFIG_SMALL(x) NULL
#else
# define NULL_IF_CONFIG_SMALL(x) x
Modified: trunk/libavutil/crc.c
==============================================================================
--- trunk/libavutil/crc.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/crc.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -22,7 +22,7 @@
#include "bswap.h"
#include "crc.h"
-#ifdef CONFIG_HARDCODED_TABLES
+#if CONFIG_HARDCODED_TABLES
#include "crc_data.h"
#else
static struct {
@@ -75,7 +75,7 @@ int av_crc_init(AVCRC *ctx, int le, int
}
}
ctx[256]=1;
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
if(ctx_size >= sizeof(AVCRC)*1024)
for (i = 0; i < 256; i++)
for(j=0; j<3; j++)
@@ -91,7 +91,7 @@ int av_crc_init(AVCRC *ctx, int le, int
* @return a pointer to the CRC table or NULL on failure
*/
const AVCRC *av_crc_get_table(AVCRCId crc_id){
-#ifndef CONFIG_HARDCODED_TABLES
+#if !CONFIG_HARDCODED_TABLES
if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1])
if (av_crc_init(av_crc_table[crc_id],
av_crc_table_params[crc_id].le,
@@ -113,7 +113,7 @@ const AVCRC *av_crc_get_table(AVCRCId cr
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){
const uint8_t *end= buffer+length;
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
if(!ctx[256])
while(buffer<end-3){
crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4;
Modified: trunk/libavutil/des.c
==============================================================================
--- trunk/libavutil/des.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/des.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -74,7 +74,7 @@ static const uint8_t PC2_shuffle[] = {
};
#undef T
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
static const uint8_t S_boxes[8][32] = {
{
0x0e, 0xf4, 0x7d, 0x41, 0xe2, 0x2f, 0xdb, 0x18, 0xa3, 0x6a, 0xc6, 0xbc, 0x95, 0x59, 0x30, 0x87,
@@ -218,7 +218,7 @@ static uint32_t f_func(uint32_t r, uint6
// apply S-boxes, those compress the data again from 8 * 6 to 8 * 4 bits
for (i = 7; i >= 0; i--) {
uint8_t tmp = (r ^ k) & 0x3f;
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
uint8_t v = S_boxes[i][tmp >> 1];
if (tmp & 1) v >>= 4;
out = (out >> 4) | (v << 28);
@@ -229,7 +229,7 @@ static uint32_t f_func(uint32_t r, uint6
r = (r >> 4) | (r << 28);
k >>= 6;
}
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
out = shuffle(out, P_shuffle, sizeof(P_shuffle));
#endif
return out;
Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/internal.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -102,7 +102,7 @@
#endif
// Use rip-relative addressing if compiling PIC code on x86-64.
-#if defined(ARCH_X86_64) && defined(PIC)
+#if ARCH_X86_64 && defined(PIC)
# define LOCAL_MANGLE(a) #a "(%%rip)"
#else
# define LOCAL_MANGLE(a) #a
@@ -125,7 +125,7 @@
extern const uint32_t ff_inverse[256];
-#if defined(ARCH_X86)
+#if ARCH_X86
# define FASTDIV(a,b) \
({\
int ret,dmy;\
@@ -136,7 +136,7 @@ extern const uint32_t ff_inverse[256];
);\
ret;\
})
-#elif defined(HAVE_ARMV6)
+#elif HAVE_ARMV6
static inline av_const int FASTDIV(int a, int b)
{
int r, t;
@@ -147,7 +147,7 @@ static inline av_const int FASTDIV(int a
: "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
return r;
}
-#elif defined(ARCH_ARM)
+#elif ARCH_ARM
static inline av_const int FASTDIV(int a, int b)
{
int r, t;
@@ -155,7 +155,7 @@ static inline av_const int FASTDIV(int a
: "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
return r;
}
-#elif defined(CONFIG_FASTDIV)
+#elif CONFIG_FASTDIV
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32))
#else
# define FASTDIV(a,b) ((a)/(b))
@@ -171,7 +171,7 @@ static inline av_const unsigned int ff_s
if(a<255) return (ff_sqrt_tab[a+1]-1)>>4;
else if(a<(1<<12)) b= ff_sqrt_tab[a>>4 ]>>2;
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
else if(a<(1<<14)) b= ff_sqrt_tab[a>>6 ]>>1;
else if(a<(1<<16)) b= ff_sqrt_tab[a>>8 ] ;
#endif
@@ -185,7 +185,7 @@ static inline av_const unsigned int ff_s
return b - (a<b*b);
}
-#if defined(ARCH_X86)
+#if ARCH_X86
#define MASK_ABS(mask, level)\
__asm__ volatile(\
"cltd \n\t"\
@@ -199,7 +199,7 @@ static inline av_const unsigned int ff_s
level= (level^mask)-mask;
#endif
-#ifdef HAVE_CMOV
+#if HAVE_CMOV
#define COPY3_IF_LT(x,y,a,b,c,d)\
__asm__ volatile (\
"cmpl %0, %3 \n\t"\
@@ -259,42 +259,42 @@ if((y)<(x)){\
}\
}
-#ifndef HAVE_LLRINT
+#if !HAVE_LLRINT
static av_always_inline av_const long long llrint(double x)
{
return rint(x);
}
#endif /* HAVE_LLRINT */
-#ifndef HAVE_LRINT
+#if !HAVE_LRINT
static av_always_inline av_const long int lrint(double x)
{
return rint(x);
}
#endif /* HAVE_LRINT */
-#ifndef HAVE_LRINTF
+#if !HAVE_LRINTF
static av_always_inline av_const long int lrintf(float x)
{
return (int)(rint(x));
}
#endif /* HAVE_LRINTF */
-#ifndef HAVE_ROUND
+#if !HAVE_ROUND
static av_always_inline av_const double round(double x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUND */
-#ifndef HAVE_ROUNDF
+#if !HAVE_ROUNDF
static av_always_inline av_const float roundf(float x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUNDF */
-#ifndef HAVE_TRUNCF
+#if !HAVE_TRUNCF
static av_always_inline av_const float truncf(float x)
{
return (x > 0) ? floor(x) : ceil(x);
Modified: trunk/libavutil/intreadwrite.h
==============================================================================
--- trunk/libavutil/intreadwrite.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/intreadwrite.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -66,7 +66,7 @@ struct unaligned_16 { uint16_t l; } __at
#define AV_RL8(x) AV_RB8(x)
#define AV_WL8(p, d) AV_WB8(p, d)
-#ifdef HAVE_FAST_UNALIGNED
+#if HAVE_FAST_UNALIGNED
# ifdef WORDS_BIGENDIAN
# define AV_RB16(x) AV_RN16(x)
# define AV_WB16(p, d) AV_WN16(p, d)
Modified: trunk/libavutil/md5.c
==============================================================================
--- trunk/libavutil/md5.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/md5.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -98,7 +98,7 @@ static void body(uint32_t ABCD[4], uint3
X[i]= bswap_32(X[i]);
#endif
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
for( i = 0; i < 64; i++ ){
CORE(i,a,b,c,d)
t=d; d=c; c=b; b=a; a=t;
Modified: trunk/libavutil/mem.c
==============================================================================
--- trunk/libavutil/mem.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/mem.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -32,7 +32,7 @@
#undef realloc
#include <stdlib.h>
-#ifdef HAVE_MALLOC_H
+#if HAVE_MALLOC_H
#include <malloc.h>
#endif
@@ -43,7 +43,7 @@
void *av_malloc(unsigned int size)
{
void *ptr = NULL;
-#ifdef CONFIG_MEMALIGN_HACK
+#if CONFIG_MEMALIGN_HACK
long diff;
#endif
@@ -51,16 +51,16 @@ void *av_malloc(unsigned int size)
if(size > (INT_MAX-16) )
return NULL;
-#ifdef CONFIG_MEMALIGN_HACK
+#if CONFIG_MEMALIGN_HACK
ptr = malloc(size+16);
if(!ptr)
return ptr;
diff= ((-(long)ptr - 1)&15) + 1;
ptr = (char*)ptr + diff;
((char*)ptr)[-1]= diff;
-#elif defined (HAVE_POSIX_MEMALIGN)
+#elif HAVE_POSIX_MEMALIGN
posix_memalign(&ptr,16,size);
-#elif defined (HAVE_MEMALIGN)
+#elif HAVE_MEMALIGN
ptr = memalign(16,size);
/* Why 64?
Indeed, we should align it:
@@ -96,7 +96,7 @@ void *av_malloc(unsigned int size)
void *av_realloc(void *ptr, unsigned int size)
{
-#ifdef CONFIG_MEMALIGN_HACK
+#if CONFIG_MEMALIGN_HACK
int diff;
#endif
@@ -104,7 +104,7 @@ void *av_realloc(void *ptr, unsigned int
if(size > (INT_MAX-16) )
return NULL;
-#ifdef CONFIG_MEMALIGN_HACK
+#if CONFIG_MEMALIGN_HACK
//FIXME this isn't aligned correctly, though it probably isn't needed
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
@@ -118,7 +118,7 @@ void av_free(void *ptr)
{
/* XXX: this test should not be needed on most libcs */
if (ptr)
-#ifdef CONFIG_MEMALIGN_HACK
+#if CONFIG_MEMALIGN_HACK
free((char*)ptr - ((char*)ptr)[-1]);
#else
free(ptr);
Modified: trunk/libavutil/mem.h
==============================================================================
--- trunk/libavutil/mem.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/mem.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -37,7 +37,7 @@
#elif defined(_MSC_VER)
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
-#elif defined(HAVE_INLINE_ASM)
+#elif HAVE_INLINE_ASM
#error The asm code needs alignment, but we do not know how to do it for this compiler.
#else
#define DECLARE_ALIGNED(n,t,v) t v
Modified: trunk/libavutil/sha1.c
==============================================================================
--- trunk/libavutil/sha1.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/sha1.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -54,7 +54,7 @@ static void transform(uint32_t state[5],
c = state[2];
d = state[3];
e = state[4];
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
for(i=0; i<80; i++){
int t;
if(i<16) t= be2me_32(((uint32_t*)buffer)[i]);
@@ -110,7 +110,7 @@ void av_sha1_update(AVSHA1* ctx, const u
j = ctx->count & 63;
ctx->count += len;
-#ifdef CONFIG_SMALL
+#if CONFIG_SMALL
for( i = 0; i < len; i++ ){
ctx->buffer[ j++ ] = data[i];
if( 64 == j ){
Modified: trunk/libavutil/x86/bswap.h
==============================================================================
--- trunk/libavutil/x86/bswap.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/x86/bswap.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -38,7 +38,7 @@ static av_always_inline av_const uint16_
#define bswap_32 bswap_32
static av_always_inline av_const uint32_t bswap_32(uint32_t x)
{
-#ifdef HAVE_BSWAP
+#if HAVE_BSWAP
__asm__("bswap %0" : "+r" (x));
#else
__asm__("rorw $8, %w0 \n\t"
@@ -49,7 +49,7 @@ static av_always_inline av_const uint32_
return x;
}
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
#define bswap_64 bswap_64
static inline uint64_t av_const bswap_64(uint64_t x)
{
Modified: trunk/libavutil/x86_cpu.h
==============================================================================
--- trunk/libavutil/x86_cpu.h Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libavutil/x86_cpu.h Wed Jan 14 00:44:16 2009 (r16590)
@@ -24,7 +24,7 @@
#include <stdint.h>
#include "config.h"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
# define REG_a "rax"
# define REG_b "rbx"
# define REG_c "rcx"
@@ -64,15 +64,10 @@ typedef int32_t x86_reg;
# define REGSP esp
#endif
-#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(HAVE_EBX_AVAILABLE) && defined(HAVE_EBP_AVAILABLE))
-# define HAVE_7REGS 1
-#endif
-
-#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && (defined(HAVE_EBX_AVAILABLE) || defined(HAVE_EBP_AVAILABLE)))
-# define HAVE_6REGS 1
-#endif
+#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
+#define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
-#if defined(ARCH_X86_64) && defined(PIC)
+#if ARCH_X86_64 && defined(PIC)
# define BROKEN_RELOCATIONS 1
#endif
Modified: trunk/libpostproc/postprocess.c
==============================================================================
--- trunk/libpostproc/postprocess.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libpostproc/postprocess.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -92,7 +92,7 @@ unsigned postproc_version(void)
return LIBPOSTPROC_VERSION_INT;
}
-#ifdef HAVE_ALTIVEC_H
+#if HAVE_ALTIVEC_H
#include <altivec.h>
#endif
@@ -102,7 +102,7 @@ unsigned postproc_version(void)
#define TEMP_STRIDE 8
//#define NUM_BLOCKS_AT_ONCE 16 //not used yet
-#if defined(ARCH_X86)
+#if ARCH_X86
DECLARE_ASM_CONST(8, uint64_t, w05)= 0x0005000500050005LL;
DECLARE_ASM_CONST(8, uint64_t, w04)= 0x0004000400040004LL;
DECLARE_ASM_CONST(8, uint64_t, w20)= 0x0020002000200020LL;
@@ -150,7 +150,7 @@ static const char *replaceTable[]=
};
-#if defined(ARCH_X86)
+#if ARCH_X86
static inline void prefetchnta(void *p)
{
__asm__ volatile( "prefetchnta (%0)\n\t"
@@ -554,45 +554,47 @@ static av_always_inline void do_a_debloc
//Note: we have C, MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one
//Plain C versions
-#if !(defined (HAVE_MMX) || defined (HAVE_ALTIVEC)) || defined (RUNTIME_CPUDETECT)
+#if !(HAVE_MMX || HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)
#define COMPILE_C
#endif
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
#define COMPILE_ALTIVEC
#endif //HAVE_ALTIVEC
-#if defined(ARCH_X86)
+#if ARCH_X86
-#if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
+#if (HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
#define COMPILE_MMX
#endif
-#if defined (HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
+#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT)
#define COMPILE_MMX2
#endif
-#if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
+#if (HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
#define COMPILE_3DNOW
#endif
-#endif /* defined(ARCH_X86) */
+#endif /* ARCH_X86 */
#undef HAVE_MMX
+#define HAVE_MMX 0
#undef HAVE_MMX2
+#define HAVE_MMX2 0
#undef HAVE_3DNOW
+#define HAVE_3DNOW 0
#undef HAVE_ALTIVEC
+#define HAVE_ALTIVEC 0
#ifdef COMPILE_C
-#undef HAVE_MMX
-#undef HAVE_MMX2
-#undef HAVE_3DNOW
#define RENAME(a) a ## _C
#include "postprocess_template.c"
#endif
#ifdef COMPILE_ALTIVEC
#undef RENAME
-#define HAVE_ALTIVEC
+#undef HAVE_ALTIVEC
+#define HAVE_ALTIVEC 1
#define RENAME(a) a ## _altivec
#include "postprocess_altivec_template.c"
#include "postprocess_template.c"
@@ -601,9 +603,8 @@ static av_always_inline void do_a_debloc
//MMX versions
#ifdef COMPILE_MMX
#undef RENAME
-#define HAVE_MMX
-#undef HAVE_MMX2
-#undef HAVE_3DNOW
+#undef HAVE_MMX
+#define HAVE_MMX 1
#define RENAME(a) a ## _MMX
#include "postprocess_template.c"
#endif
@@ -611,9 +612,10 @@ static av_always_inline void do_a_debloc
//MMX2 versions
#ifdef COMPILE_MMX2
#undef RENAME
-#define HAVE_MMX
-#define HAVE_MMX2
-#undef HAVE_3DNOW
+#undef HAVE_MMX
+#undef HAVE_MMX2
+#define HAVE_MMX 1
+#define HAVE_MMX2 1
#define RENAME(a) a ## _MMX2
#include "postprocess_template.c"
#endif
@@ -621,9 +623,12 @@ static av_always_inline void do_a_debloc
//3DNOW versions
#ifdef COMPILE_3DNOW
#undef RENAME
-#define HAVE_MMX
+#undef HAVE_MMX
#undef HAVE_MMX2
-#define HAVE_3DNOW
+#undef HAVE_3DNOW
+#define HAVE_MMX 1
+#define HAVE_MMX2 0
+#define HAVE_3DNOW 1
#define RENAME(a) a ## _3DNow
#include "postprocess_template.c"
#endif
@@ -641,7 +646,7 @@ static inline void postProcess(const uin
// difference would not be measurable here but it is much better because
// someone might exchange the CPU whithout restarting MPlayer ;)
#ifdef RUNTIME_CPUDETECT
-#if defined(ARCH_X86)
+#if ARCH_X86
// ordered per speed fastest first
if(c->cpuCaps & PP_CPU_CAPS_MMX2)
postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
@@ -652,7 +657,7 @@ static inline void postProcess(const uin
else
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
#else
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
if(c->cpuCaps & PP_CPU_CAPS_ALTIVEC)
postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
else
@@ -660,13 +665,13 @@ static inline void postProcess(const uin
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
#endif
#else //RUNTIME_CPUDETECT
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
-#elif defined (HAVE_3DNOW)
+#elif HAVE_3DNOW
postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
-#elif defined (HAVE_MMX)
+#elif HAVE_MMX
postProcess_MMX(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
-#elif defined (HAVE_ALTIVEC)
+#elif HAVE_ALTIVEC
postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
#else
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
Modified: trunk/libpostproc/postprocess_template.c
==============================================================================
--- trunk/libpostproc/postprocess_template.c Wed Jan 14 00:36:06 2009 (r16589)
+++ trunk/libpostproc/postprocess_template.c Wed Jan 14 00:44:16 2009 (r16590)
@@ -31,32 +31,32 @@
#undef PMINUB
#undef PMAXUB
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
#define REAL_PAVGB(a,b) "pavgb " #a ", " #b " \n\t"
-#elif defined (HAVE_3DNOW)
+#elif HAVE_3DNOW
#define REAL_PAVGB(a,b) "pavgusb " #a ", " #b " \n\t"
#endif
#define PAVGB(a,b) REAL_PAVGB(a,b)
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
#define PMINUB(a,b,t) "pminub " #a ", " #b " \n\t"
-#elif defined (HAVE_MMX)
+#elif HAVE_MMX
#define PMINUB(b,a,t) \
"movq " #a ", " #t " \n\t"\
"psubusb " #b ", " #t " \n\t"\
"psubb " #t ", " #a " \n\t"
#endif
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
#define PMAXUB(a,b) "pmaxub " #a ", " #b " \n\t"
-#elif defined (HAVE_MMX)
+#elif HAVE_MMX
#define PMAXUB(a,b) \
"psubusb " #a ", " #b " \n\t"\
"paddb " #a ", " #b " \n\t"
#endif
//FIXME? |255-0| = 1 (should not be a problem ...)
-#ifdef HAVE_MMX
+#if HAVE_MMX
/**
* Check if the middle 8x8 Block in the given 8x16 block is flat
*/
@@ -136,7 +136,7 @@ static inline int RENAME(vertClassify)(u
"psubusb %%mm3, %%mm4 \n\t"
" \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pxor %%mm7, %%mm7 \n\t"
"psadbw %%mm7, %%mm0 \n\t"
#else
@@ -176,10 +176,10 @@ static inline int RENAME(vertClassify)(u
* Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle)
* using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16
*/
-#ifndef HAVE_ALTIVEC
+#if !HAVE_ALTIVEC
static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*3;
__asm__ volatile( //"movv %0 %1 %2\n\t"
"movq %2, %%mm0 \n\t" // QP,..., QP
@@ -306,7 +306,7 @@ static inline void RENAME(doVertLowPass)
: "r" (src), "r" ((x86_reg)stride), "m" (c->pQPb)
: "%"REG_a, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
const int l1= stride;
const int l2= stride + l1;
const int l3= stride + l2;
@@ -345,7 +345,7 @@ static inline void RENAME(doVertLowPass)
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
#endif //HAVE_ALTIVEC
@@ -364,7 +364,7 @@ static inline void RENAME(doVertLowPass)
*/
static inline void RENAME(vertRK1Filter)(uint8_t *src, int stride, int QP)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*3;
// FIXME rounding
__asm__ volatile(
@@ -426,7 +426,7 @@ static inline void RENAME(vertRK1Filter)
: "r" (src), "r" ((x86_reg)stride)
: "%"REG_a, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
const int l1= stride;
const int l2= stride + l1;
const int l3= stride + l2;
@@ -449,7 +449,7 @@ static inline void RENAME(vertRK1Filter)
}
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
#endif //0
@@ -462,7 +462,7 @@ static inline void RENAME(vertRK1Filter)
*/
static inline void RENAME(vertX1Filter)(uint8_t *src, int stride, PPContext *co)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*3;
__asm__ volatile(
@@ -548,7 +548,7 @@ static inline void RENAME(vertX1Filter)(
: "r" (src), "r" ((x86_reg)stride), "m" (co->pQPb)
: "%"REG_a, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
const int l1= stride;
const int l2= stride + l1;
@@ -582,13 +582,13 @@ static inline void RENAME(vertX1Filter)(
}
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
-#ifndef HAVE_ALTIVEC
+#if !HAVE_ALTIVEC
static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext *c)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
/*
uint8_t tmp[16];
const int l1= stride;
@@ -869,7 +869,7 @@ static inline void RENAME(doVertDefFilte
}
}
*/
-#elif defined (HAVE_MMX)
+#elif HAVE_MMX
src+= stride*4;
__asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
@@ -978,7 +978,7 @@ static inline void RENAME(doVertDefFilte
"movq (%%"REG_c"), %%mm2 \n\t" // 2L0 - 5L1 + 5L2 - 2L3
"movq 8(%%"REG_c"), %%mm3 \n\t" // 2H0 - 5H1 + 5H2 - 2H3
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"movq %%mm7, %%mm6 \n\t" // 0
"psubw %%mm0, %%mm6 \n\t"
"pmaxsw %%mm6, %%mm0 \n\t" // |2L4 - 5L5 + 5L6 - 2L7|
@@ -1010,7 +1010,7 @@ static inline void RENAME(doVertDefFilte
"psubw %%mm6, %%mm3 \n\t" // |2H0 - 5H1 + 5H2 - 2H3|
#endif
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pminsw %%mm2, %%mm0 \n\t"
"pminsw %%mm3, %%mm1 \n\t"
#else
@@ -1074,7 +1074,7 @@ static inline void RENAME(doVertDefFilte
"pand %%mm2, %%mm4 \n\t"
"pand %%mm3, %%mm5 \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pminsw %%mm0, %%mm4 \n\t"
"pminsw %%mm1, %%mm5 \n\t"
#else
@@ -1101,7 +1101,7 @@ static inline void RENAME(doVertDefFilte
: "r" ((x86_reg)stride), "m" (c->pQPb)
: "%"REG_a, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
const int l1= stride;
const int l2= stride + l1;
const int l3= stride + l2;
@@ -1139,14 +1139,14 @@ static inline void RENAME(doVertDefFilte
}
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
#endif //HAVE_ALTIVEC
-#ifndef HAVE_ALTIVEC
+#if !HAVE_ALTIVEC
static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
__asm__ volatile(
"pxor %%mm6, %%mm6 \n\t"
"pcmpeqb %%mm7, %%mm7 \n\t"
@@ -1164,7 +1164,7 @@ static inline void RENAME(dering)(uint8_
// %0 eax eax+%1 eax+2%1 %0+4%1 edx edx+%1 edx+2%1 %0+8%1 edx+4%1
#undef FIND_MIN_MAX
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
#define REAL_FIND_MIN_MAX(addr)\
"movq " #addr ", %%mm0 \n\t"\
"pminub %%mm0, %%mm7 \n\t"\
@@ -1191,7 +1191,7 @@ FIND_MIN_MAX((%0, %1, 8))
"movq %%mm7, %%mm4 \n\t"
"psrlq $8, %%mm7 \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pminub %%mm4, %%mm7 \n\t" // min of pixels
"pshufw $0xF9, %%mm7, %%mm4 \n\t"
"pminub %%mm4, %%mm7 \n\t" // min of pixels
@@ -1216,7 +1216,7 @@ FIND_MIN_MAX((%0, %1, 8))
"movq %%mm6, %%mm4 \n\t"
"psrlq $8, %%mm6 \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pmaxub %%mm4, %%mm6 \n\t" // max of pixels
"pshufw $0xF9, %%mm6, %%mm4 \n\t"
"pmaxub %%mm4, %%mm6 \n\t"
@@ -1370,7 +1370,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1,
: : "r" (src), "r" ((x86_reg)stride), "m" (c->pQPb), "m"(c->pQPb2)
: "%"REG_a, "%"REG_d, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
int y;
int min=255;
int max=0;
@@ -1487,7 +1487,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1,
// src[0] = src[7]=src[stride*7]=src[stride*7 + 7]=255;
}
#endif
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
#endif //HAVE_ALTIVEC
@@ -1499,7 +1499,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1,
*/
static inline void RENAME(deInterlaceInterpolateLinear)(uint8_t src[], int stride)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= 4*stride;
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
@@ -1552,7 +1552,7 @@ static inline void RENAME(deInterlaceInt
*/
static inline void RENAME(deInterlaceInterpolateCubic)(uint8_t src[], int stride)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*3;
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
@@ -1594,7 +1594,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) ,
: : "r" (src), "r" ((x86_reg)stride)
: "%"REG_a, "%"REG_d, "%"REG_c
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
int x;
src+= stride*3;
for(x=0; x<8; x++){
@@ -1604,7 +1604,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) ,
src[stride*9] = CLIP((-src[stride*6] + 9*src[stride*8] + 9*src[stride*10] - src[stride*12])>>4);
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
/**
@@ -1616,7 +1616,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) ,
*/
static inline void RENAME(deInterlaceFF)(uint8_t src[], int stride, uint8_t *tmp)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*4;
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
@@ -1665,7 +1665,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2),
: : "r" (src), "r" ((x86_reg)stride), "r"(tmp)
: "%"REG_a, "%"REG_d
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
int x;
src+= stride*4;
for(x=0; x<8; x++){
@@ -1683,7 +1683,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2),
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
/**
@@ -1695,7 +1695,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2),
*/
static inline void RENAME(deInterlaceL5)(uint8_t src[], int stride, uint8_t *tmp, uint8_t *tmp2)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= stride*4;
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
@@ -1755,7 +1755,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2),
: : "r" (src), "r" ((x86_reg)stride), "r"(tmp), "r"(tmp2)
: "%"REG_a, "%"REG_d
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
int x;
src+= stride*4;
for(x=0; x<8; x++){
@@ -1784,7 +1784,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2),
src++;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
/**
@@ -1796,7 +1796,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2),
*/
static inline void RENAME(deInterlaceBlendLinear)(uint8_t src[], int stride, uint8_t *tmp)
{
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
src+= 4*stride;
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
@@ -1843,7 +1843,7 @@ static inline void RENAME(deInterlaceBle
: : "r" (src), "r" ((x86_reg)stride), "r" (tmp)
: "%"REG_a, "%"REG_d
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
int a, b, c, x;
src+= 4*stride;
@@ -1886,7 +1886,7 @@ static inline void RENAME(deInterlaceBle
src += 4;
tmp += 4;
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
/**
@@ -1897,9 +1897,9 @@ static inline void RENAME(deInterlaceBle
*/
static inline void RENAME(deInterlaceMedian)(uint8_t src[], int stride)
{
-#ifdef HAVE_MMX
+#ifd HAVE_MMX
src+= 4*stride;
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
__asm__ volatile(
"lea (%0, %1), %%"REG_a" \n\t"
"lea (%%"REG_a", %1, 4), %%"REG_d" \n\t"
@@ -2012,7 +2012,7 @@ MEDIAN((%%REGd, %1), (%%REGd, %1, 2), (%
#endif //HAVE_MMX
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
/**
* transposes and shift the given 8x8 Block into dst1 and dst2
*/
@@ -2180,7 +2180,7 @@ static inline void RENAME(transpose2)(ui
#endif //HAVE_MMX
//static long test=0;
-#ifndef HAVE_ALTIVEC
+#if !HAVE_ALTIVEC
static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
uint8_t *tempBlurred, uint32_t *tempBlurredPast, int *maxNoise)
{
@@ -2191,7 +2191,7 @@ static inline void RENAME(tempNoiseReduc
#define FAST_L2_DIFF
//#define L1_DIFF //u should change the thresholds too if u try that one
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#if HAVE_MMX2 || HAVE_3DNOW
__asm__ volatile(
"lea (%2, %2, 2), %%"REG_a" \n\t" // 3*stride
"lea (%2, %2, 4), %%"REG_d" \n\t" // 5*stride
@@ -2479,7 +2479,7 @@ L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc
:: "r" (src), "r" (tempBlurred), "r"((x86_reg)stride), "m" (tempBlurredPast)
: "%"REG_a, "%"REG_d, "%"REG_c, "memory"
);
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#else //HAVE_MMX2 || HAVE_3DNOW
{
int y;
int d=0;
@@ -2562,11 +2562,11 @@ Switch between
}
}
}
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
+#endif //HAVE_MMX2 || HAVE_3DNOW
}
#endif //HAVE_ALTIVEC
-#ifdef HAVE_MMX
+#if HAVE_MMX
/**
* accurate deblock filter
*/
@@ -2970,7 +2970,7 @@ static av_always_inline void RENAME(do_a
"movq (%%"REG_c"), %%mm2 \n\t" // 2L0 - 5L1 + 5L2 - 2L3
"movq 8(%%"REG_c"), %%mm3 \n\t" // 2H0 - 5H1 + 5H2 - 2H3
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"movq %%mm7, %%mm6 \n\t" // 0
"psubw %%mm0, %%mm6 \n\t"
"pmaxsw %%mm6, %%mm0 \n\t" // |2L4 - 5L5 + 5L6 - 2L7|
@@ -3002,7 +3002,7 @@ static av_always_inline void RENAME(do_a
"psubw %%mm6, %%mm3 \n\t" // |2H0 - 5H1 + 5H2 - 2H3|
#endif
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pminsw %%mm2, %%mm0 \n\t"
"pminsw %%mm3, %%mm1 \n\t"
#else
@@ -3066,7 +3066,7 @@ static av_always_inline void RENAME(do_a
"pand %%mm2, %%mm4 \n\t"
"pand %%mm3, %%mm5 \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
"pminsw %%mm0, %%mm4 \n\t"
"pminsw %%mm1, %%mm5 \n\t"
#else
@@ -3116,18 +3116,18 @@ static void RENAME(postProcess)(const ui
static inline void RENAME(blockCopy)(uint8_t dst[], int dstStride, const uint8_t src[], int srcStride,
int levelFix, int64_t *packedOffsetAndScale)
{
-#ifndef HAVE_MMX
+#if !HAVE_MMX
int i;
#endif
if(levelFix){
-#ifdef HAVE_MMX
+#if HAVE_MMX
__asm__ volatile(
"movq (%%"REG_a"), %%mm2 \n\t" // packedYOffset
"movq 8(%%"REG_a"), %%mm3 \n\t" // packedYScale
"lea (%2,%4), %%"REG_a" \n\t"
"lea (%3,%5), %%"REG_d" \n\t"
"pxor %%mm4, %%mm4 \n\t"
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
#define REAL_SCALED_CPY(src1, src2, dst1, dst2) \
"movq " #src1 ", %%mm0 \n\t"\
"movq " #src1 ", %%mm5 \n\t"\
@@ -3203,7 +3203,7 @@ SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2)
&(src[srcStride*i]), BLOCK_SIZE);
#endif //HAVE_MMX
}else{
-#ifdef HAVE_MMX
+#if HAVE_MMX
__asm__ volatile(
"lea (%0,%2), %%"REG_a" \n\t"
"lea (%1,%3), %%"REG_d" \n\t"
@@ -3243,7 +3243,7 @@ SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2)
*/
static inline void RENAME(duplicate)(uint8_t src[], int stride)
{
-#ifdef HAVE_MMX
+#if HAVE_MMX
__asm__ volatile(
"movq (%0), %%mm0 \n\t"
"add %1, %0 \n\t"
@@ -3280,7 +3280,7 @@ static void RENAME(postProcess)(const ui
int QPCorrecture= 256*256;
int copyAhead;
-#ifdef HAVE_MMX
+#if HAVE_MMX
int i;
#endif
@@ -3293,7 +3293,7 @@ static void RENAME(postProcess)(const ui
uint8_t * const tempDst= dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride;
//const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4;
-#ifdef HAVE_MMX
+#if HAVE_MMX
for(i=0; i<57; i++){
int offset= ((i*c.ppMode.baseDcDiff)>>8) + 1;
int threshold= offset*2 + 1;
@@ -3351,7 +3351,7 @@ static void RENAME(postProcess)(const ui
scale= (double)(c.ppMode.maxAllowedY - c.ppMode.minAllowedY) / (double)(white-black);
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
c.packedYScale= (uint16_t)(scale*256.0 + 0.5);
c.packedYOffset= (((black*c.packedYScale)>>8) - c.ppMode.minAllowedY) & 0xFFFF;
#else
@@ -3384,7 +3384,7 @@ static void RENAME(postProcess)(const ui
// with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing
for(x=0; x<width; x+=BLOCK_SIZE){
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
/*
prefetchnta(srcBlock + (((x>>2)&6) + 5)*srcStride + 32);
prefetchnta(srcBlock + (((x>>2)&6) + 6)*srcStride + 32);
@@ -3411,7 +3411,7 @@ static void RENAME(postProcess)(const ui
: "%"REG_a, "%"REG_d
);
-#elif defined(HAVE_3DNOW)
+#elif HAVE_3DNOW
//FIXME check if this is faster on an 3dnow chip or if it is faster without the prefetch or ...
/* prefetch(srcBlock + (((x>>3)&3) + 5)*srcStride + 32);
prefetch(srcBlock + (((x>>3)&3) + 9)*srcStride + 32);
@@ -3457,7 +3457,7 @@ static void RENAME(postProcess)(const ui
//1% speedup if these are here instead of the inner loop
const uint8_t *srcBlock= &(src[y*srcStride]);
uint8_t *dstBlock= &(dst[y*dstStride]);
-#ifdef HAVE_MMX
+#if HAVE_MMX
uint8_t *tempBlock1= c.tempBlocks;
uint8_t *tempBlock2= c.tempBlocks + 8;
#endif
@@ -3493,7 +3493,7 @@ static void RENAME(postProcess)(const ui
// with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing
for(x=0; x<width; x+=BLOCK_SIZE){
const int stride= dstStride;
-#ifdef HAVE_MMX
+#if HAVE_MMX
uint8_t *tmpXchg;
#endif
if(isColor){
@@ -3507,7 +3507,7 @@ static void RENAME(postProcess)(const ui
yHistogram[ srcBlock[srcStride*12 + 4] ]++;
}
c.QP= QP;
-#ifdef HAVE_MMX
+#if HAVE_MMX
__asm__ volatile(
"movd %1, %%mm7 \n\t"
"packuswb %%mm7, %%mm7 \n\t" // 0, 0, 0, QP, 0, 0, 0, QP
@@ -3520,7 +3520,7 @@ static void RENAME(postProcess)(const ui
#endif
-#ifdef HAVE_MMX2
+#if HAVE_MMX2
/*
prefetchnta(srcBlock + (((x>>2)&6) + 5)*srcStride + 32);
prefetchnta(srcBlock + (((x>>2)&6) + 6)*srcStride + 32);
@@ -3547,7 +3547,7 @@ static void RENAME(postProcess)(const ui
: "%"REG_a, "%"REG_d
);
-#elif defined(HAVE_3DNOW)
+#elif HAVE_3DNOW
//FIXME check if this is faster on an 3dnow chip or if it is faster without the prefetch or ...
/* prefetch(srcBlock + (((x>>3)&3) + 5)*srcStride + 32);
prefetch(srcBlock + (((x>>3)&3) + 9)*srcStride + 32);
@@ -3591,12 +3591,12 @@ static void RENAME(postProcess)(const ui
}
}
-#ifdef HAVE_MMX
+#if HAVE_MMX
RENAME(transpose1)(tempBlock1, tempBlock2, dstBlock, dstStride);
#endif
/* check if we have a previous block to deblock it with dstBlock */
if(x - 8 >= 0){
-#ifdef HAVE_MMX
+#if HAVE_MMX
if(mode & H_X1_FILTER)
RENAME(vertX1Filter)(tempBlock1, 16, &c);
else if(mode & H_DEBLOCK){
@@ -3617,7 +3617,7 @@ static void RENAME(postProcess)(const ui
if(mode & H_X1_FILTER)
horizX1Filter(dstBlock-4, stride, QP);
else if(mode & H_DEBLOCK){
-#ifdef HAVE_ALTIVEC
+#if HAVE_ALTIVEC
DECLARE_ALIGNED(16, unsigned char, tempBlock[272]);
transpose_16x8_char_toPackedAlign_altivec(tempBlock, dstBlock - (4 + 1), stride);
@@ -3659,7 +3659,7 @@ static void RENAME(postProcess)(const ui
dstBlock+=8;
srcBlock+=8;
-#ifdef HAVE_MMX
+#if HAVE_MMX
tmpXchg= tempBlock1;
tempBlock1= tempBlock2;
tempBlock2 = tmpXchg;
@@ -3699,9 +3699,9 @@ static void RENAME(postProcess)(const ui
+ dstBlock[x +14*dstStride] + dstBlock[x +15*dstStride];
}*/
}
-#ifdef HAVE_3DNOW
+#if HAVE_3DNOW
__asm__ volatile("femms");
-#elif defined (HAVE_MMX)
+#elif HAVE_MMX
__asm__ volatile("emms");
#endif
More information about the ffmpeg-cvslog
mailing list