Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -30,19 +30,19 @@ |
| 30 | 30 |
|
| 31 | 31 |
#include "config.h" |
| 32 | 32 |
#include "libavformat/avformat.h" |
| 33 |
-#ifdef CONFIG_AVFILTER |
|
| 33 |
+#if CONFIG_AVFILTER |
|
| 34 | 34 |
#include "libavfilter/avfilter.h" |
| 35 | 35 |
#endif |
| 36 | 36 |
#include "libavdevice/avdevice.h" |
| 37 | 37 |
#include "libswscale/swscale.h" |
| 38 |
-#ifdef CONFIG_POSTPROC |
|
| 38 |
+#if CONFIG_POSTPROC |
|
| 39 | 39 |
#include "libpostproc/postprocess.h" |
| 40 | 40 |
#endif |
| 41 | 41 |
#include "libavutil/avstring.h" |
| 42 | 42 |
#include "libavcodec/opt.h" |
| 43 | 43 |
#include "cmdutils.h" |
| 44 | 44 |
#include "version.h" |
| 45 |
-#ifdef CONFIG_NETWORK |
|
| 45 |
+#if CONFIG_NETWORK |
|
| 46 | 46 |
#include "libavformat/network.h" |
| 47 | 47 |
#endif |
| 48 | 48 |
|
| ... | ... |
@@ -255,7 +255,7 @@ void print_error(const char *filename, int err) |
| 255 | 255 |
case AVERROR(ENOENT): |
| 256 | 256 |
fprintf(stderr, "%s: no such file or directory\n", filename); |
| 257 | 257 |
break; |
| 258 |
-#ifdef CONFIG_NETWORK |
|
| 258 |
+#if CONFIG_NETWORK |
|
| 259 | 259 |
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)): |
| 260 | 260 |
fprintf(stderr, "%s: Unsupported network protocol\n", filename); |
| 261 | 261 |
break; |
| ... | ... |
@@ -279,13 +279,13 @@ static void print_all_lib_versions(FILE* outstream, int indent) |
| 279 | 279 |
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent); |
| 280 | 280 |
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent); |
| 281 | 281 |
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent); |
| 282 |
-#ifdef CONFIG_AVFILTER |
|
| 282 |
+#if CONFIG_AVFILTER |
|
| 283 | 283 |
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent); |
| 284 | 284 |
#endif |
| 285 |
-#ifdef CONFIG_SWSCALE |
|
| 285 |
+#if CONFIG_SWSCALE |
|
| 286 | 286 |
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent); |
| 287 | 287 |
#endif |
| 288 |
-#ifdef CONFIG_POSTPROC |
|
| 288 |
+#if CONFIG_POSTPROC |
|
| 289 | 289 |
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent); |
| 290 | 290 |
#endif |
| 291 | 291 |
} |
| ... | ... |
@@ -311,7 +311,7 @@ void show_version(void) {
|
| 311 | 311 |
|
| 312 | 312 |
void show_license(void) |
| 313 | 313 |
{
|
| 314 |
-#ifdef CONFIG_NONFREE |
|
| 314 |
+#if CONFIG_NONFREE |
|
| 315 | 315 |
printf( |
| 316 | 316 |
"This version of %s has nonfree parts compiled in.\n" |
| 317 | 317 |
"Therefore it is not legally redistributable.\n", |
| ... | ... |
@@ -426,7 +426,7 @@ you need the debug information, used the *_g versions. |
| 426 | 426 |
@section I do not like the LGPL, can I contribute code under the GPL instead? |
| 427 | 427 |
|
| 428 | 428 |
Yes, as long as the code is optional and can easily and cleanly be placed |
| 429 |
-under #ifdef CONFIG_GPL without breaking anything. So for example a new codec |
|
| 429 |
+under #if CONFIG_GPL without breaking anything. So for example a new codec |
|
| 430 | 430 |
or filter would be OK under GPL while a bug fix to LGPL code would not. |
| 431 | 431 |
|
| 432 | 432 |
@section I want to compile xyz.c alone but my compiler produced many errors. |
| ... | ... |
@@ -41,23 +41,23 @@ |
| 41 | 41 |
#include "libavutil/avstring.h" |
| 42 | 42 |
#include "libavformat/os_support.h" |
| 43 | 43 |
|
| 44 |
-#ifdef HAVE_SYS_RESOURCE_H |
|
| 44 |
+#if HAVE_SYS_RESOURCE_H |
|
| 45 | 45 |
#include <sys/types.h> |
| 46 | 46 |
#include <sys/resource.h> |
| 47 |
-#elif defined(HAVE_GETPROCESSTIMES) |
|
| 47 |
+#elif HAVE_GETPROCESSTIMES |
|
| 48 | 48 |
#include <windows.h> |
| 49 | 49 |
#endif |
| 50 | 50 |
|
| 51 |
-#ifdef HAVE_SYS_SELECT_H |
|
| 51 |
+#if HAVE_SYS_SELECT_H |
|
| 52 | 52 |
#include <sys/select.h> |
| 53 | 53 |
#endif |
| 54 | 54 |
|
| 55 |
-#ifdef HAVE_TERMIOS_H |
|
| 55 |
+#if HAVE_TERMIOS_H |
|
| 56 | 56 |
#include <fcntl.h> |
| 57 | 57 |
#include <sys/ioctl.h> |
| 58 | 58 |
#include <sys/time.h> |
| 59 | 59 |
#include <termios.h> |
| 60 |
-#elif defined(HAVE_CONIO_H) |
|
| 60 |
+#elif HAVE_CONIO_H |
|
| 61 | 61 |
#include <conio.h> |
| 62 | 62 |
#endif |
| 63 | 63 |
#undef time //needed because HAVE_AV_CONFIG_H is defined on top |
| ... | ... |
@@ -295,7 +295,7 @@ typedef struct AVInputFile {
|
| 295 | 295 |
int nb_streams; /* nb streams we are aware of */ |
| 296 | 296 |
} AVInputFile; |
| 297 | 297 |
|
| 298 |
-#ifdef HAVE_TERMIOS_H |
|
| 298 |
+#if HAVE_TERMIOS_H |
|
| 299 | 299 |
|
| 300 | 300 |
/* init terminal so that we can grab keys */ |
| 301 | 301 |
static struct termios oldtty; |
| ... | ... |
@@ -303,7 +303,7 @@ static struct termios oldtty; |
| 303 | 303 |
|
| 304 | 304 |
static void term_exit(void) |
| 305 | 305 |
{
|
| 306 |
-#ifdef HAVE_TERMIOS_H |
|
| 306 |
+#if HAVE_TERMIOS_H |
|
| 307 | 307 |
tcsetattr (0, TCSANOW, &oldtty); |
| 308 | 308 |
#endif |
| 309 | 309 |
} |
| ... | ... |
@@ -319,7 +319,7 @@ sigterm_handler(int sig) |
| 319 | 319 |
|
| 320 | 320 |
static void term_init(void) |
| 321 | 321 |
{
|
| 322 |
-#ifdef HAVE_TERMIOS_H |
|
| 322 |
+#if HAVE_TERMIOS_H |
|
| 323 | 323 |
struct termios tty; |
| 324 | 324 |
|
| 325 | 325 |
tcgetattr (0, &tty); |
| ... | ... |
@@ -344,7 +344,7 @@ static void term_init(void) |
| 344 | 344 |
register a function to be called at normal program termination |
| 345 | 345 |
*/ |
| 346 | 346 |
atexit(term_exit); |
| 347 |
-#ifdef CONFIG_BEOS_NETSERVER |
|
| 347 |
+#if CONFIG_BEOS_NETSERVER |
|
| 348 | 348 |
fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); |
| 349 | 349 |
#endif |
| 350 | 350 |
} |
| ... | ... |
@@ -352,10 +352,10 @@ static void term_init(void) |
| 352 | 352 |
/* read a key without blocking */ |
| 353 | 353 |
static int read_key(void) |
| 354 | 354 |
{
|
| 355 |
-#if defined(HAVE_TERMIOS_H) |
|
| 355 |
+#if HAVE_TERMIOS_H |
|
| 356 | 356 |
int n = 1; |
| 357 | 357 |
unsigned char ch; |
| 358 |
-#ifndef CONFIG_BEOS_NETSERVER |
|
| 358 |
+#if !CONFIG_BEOS_NETSERVER |
|
| 359 | 359 |
struct timeval tv; |
| 360 | 360 |
fd_set rfds; |
| 361 | 361 |
|
| ... | ... |
@@ -372,7 +372,7 @@ static int read_key(void) |
| 372 | 372 |
|
| 373 | 373 |
return n; |
| 374 | 374 |
} |
| 375 |
-#elif defined(HAVE_CONIO_H) |
|
| 375 |
+#elif HAVE_CONIO_H |
|
| 376 | 376 |
if(kbhit()) |
| 377 | 377 |
return(getch()); |
| 378 | 378 |
#endif |
| ... | ... |
@@ -427,7 +427,7 @@ static int av_exit(int ret) |
| 427 | 427 |
|
| 428 | 428 |
av_free(video_standard); |
| 429 | 429 |
|
| 430 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 430 |
+#if CONFIG_POWERPC_PERF |
|
| 431 | 431 |
void powerpc_display_perf_report(void); |
| 432 | 432 |
powerpc_display_perf_report(); |
| 433 | 433 |
#endif /* CONFIG_POWERPC_PERF */ |
| ... | ... |
@@ -2553,7 +2553,7 @@ static void opt_top_field_first(const char *arg) |
| 2553 | 2553 |
static int opt_thread_count(const char *opt, const char *arg) |
| 2554 | 2554 |
{
|
| 2555 | 2555 |
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); |
| 2556 |
-#if !defined(HAVE_THREADS) |
|
| 2556 |
+#if !HAVE_THREADS |
|
| 2557 | 2557 |
if (verbose >= 0) |
| 2558 | 2558 |
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n"); |
| 2559 | 2559 |
#endif |
| ... | ... |
@@ -2626,7 +2626,7 @@ static void opt_video_tag(const char *arg) |
| 2626 | 2626 |
video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24); |
| 2627 | 2627 |
} |
| 2628 | 2628 |
|
| 2629 |
-#ifdef CONFIG_VHOOK |
|
| 2629 |
+#if CONFIG_VHOOK |
|
| 2630 | 2630 |
static void add_frame_hooker(const char *arg) |
| 2631 | 2631 |
{
|
| 2632 | 2632 |
int argc = 0; |
| ... | ... |
@@ -3416,12 +3416,12 @@ static void opt_pass(const char *pass_str) |
| 3416 | 3416 |
|
| 3417 | 3417 |
static int64_t getutime(void) |
| 3418 | 3418 |
{
|
| 3419 |
-#ifdef HAVE_GETRUSAGE |
|
| 3419 |
+#if HAVE_GETRUSAGE |
|
| 3420 | 3420 |
struct rusage rusage; |
| 3421 | 3421 |
|
| 3422 | 3422 |
getrusage(RUSAGE_SELF, &rusage); |
| 3423 | 3423 |
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec; |
| 3424 |
-#elif defined(HAVE_GETPROCESSTIMES) |
|
| 3424 |
+#elif HAVE_GETPROCESSTIMES |
|
| 3425 | 3425 |
HANDLE proc; |
| 3426 | 3426 |
FILETIME c, e, k, u; |
| 3427 | 3427 |
proc = GetCurrentProcess(); |
| ... | ... |
@@ -3828,7 +3828,7 @@ static const OptionDef options[] = {
|
| 3828 | 3828 |
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
|
| 3829 | 3829 |
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
|
| 3830 | 3830 |
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
|
| 3831 |
-#ifdef CONFIG_VHOOK |
|
| 3831 |
+#if CONFIG_VHOOK |
|
| 3832 | 3832 |
{ "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
|
| 3833 | 3833 |
#endif |
| 3834 | 3834 |
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
|
| ... | ... |
@@ -2019,7 +2019,7 @@ static int decode_thread(void *arg) |
| 2019 | 2019 |
else |
| 2020 | 2020 |
av_read_play(ic); |
| 2021 | 2021 |
} |
| 2022 |
-#if defined(CONFIG_RTSP_DEMUXER) || defined(CONFIG_MMSH_PROTOCOL) |
|
| 2022 |
+#if CONFIG_RTSP_DEMUXER || CONFIG_MMSH_PROTOCOL |
|
| 2023 | 2023 |
if (is->paused && |
| 2024 | 2024 |
(!strcmp(ic->iformat->name, "rtsp") || |
| 2025 | 2025 |
(ic->pb && !strcmp(url_fileno(ic->pb)->prot->name, "mmsh")))) {
|
| ... | ... |
@@ -2467,7 +2467,7 @@ static int opt_vismv(const char *opt, const char *arg) |
| 2467 | 2467 |
static int opt_thread_count(const char *opt, const char *arg) |
| 2468 | 2468 |
{
|
| 2469 | 2469 |
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); |
| 2470 |
-#if !defined(HAVE_THREADS) |
|
| 2470 |
+#if !HAVE_THREADS |
|
| 2471 | 2471 |
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n"); |
| 2472 | 2472 |
#endif |
| 2473 | 2473 |
return 0; |
| ... | ... |
@@ -2579,7 +2579,7 @@ int main(int argc, char **argv) |
| 2579 | 2579 |
} |
| 2580 | 2580 |
|
| 2581 | 2581 |
if (!display_disable) {
|
| 2582 |
-#ifdef HAVE_SDL_VIDEO_SIZE |
|
| 2582 |
+#if HAVE_SDL_VIDEO_SIZE |
|
| 2583 | 2583 |
const SDL_VideoInfo *vi = SDL_GetVideoInfo(); |
| 2584 | 2584 |
fs_screen_width = vi->current_w; |
| 2585 | 2585 |
fs_screen_height = vi->current_h; |
| ... | ... |
@@ -22,7 +22,7 @@ |
| 22 | 22 |
#define _XOPEN_SOURCE 600 |
| 23 | 23 |
|
| 24 | 24 |
#include "config.h" |
| 25 |
-#ifndef HAVE_CLOSESOCKET |
|
| 25 |
+#if !HAVE_CLOSESOCKET |
|
| 26 | 26 |
#define closesocket close |
| 27 | 27 |
#endif |
| 28 | 28 |
#include <string.h> |
| ... | ... |
@@ -41,7 +41,7 @@ |
| 41 | 41 |
#include <unistd.h> |
| 42 | 42 |
#include <fcntl.h> |
| 43 | 43 |
#include <sys/ioctl.h> |
| 44 |
-#ifdef HAVE_POLL_H |
|
| 44 |
+#if HAVE_POLL_H |
|
| 45 | 45 |
#include <poll.h> |
| 46 | 46 |
#endif |
| 47 | 47 |
#include <errno.h> |
| ... | ... |
@@ -50,7 +50,7 @@ |
| 50 | 50 |
#include <time.h> |
| 51 | 51 |
#include <sys/wait.h> |
| 52 | 52 |
#include <signal.h> |
| 53 |
-#ifdef HAVE_DLFCN_H |
|
| 53 |
+#if HAVE_DLFCN_H |
|
| 54 | 54 |
#include <dlfcn.h> |
| 55 | 55 |
#endif |
| 56 | 56 |
|
| ... | ... |
@@ -3709,7 +3709,7 @@ static enum CodecID opt_video_codec(const char *arg) |
| 3709 | 3709 |
|
| 3710 | 3710 |
/* simplistic plugin support */ |
| 3711 | 3711 |
|
| 3712 |
-#ifdef HAVE_DLOPEN |
|
| 3712 |
+#if HAVE_DLOPEN |
|
| 3713 | 3713 |
static void load_module(const char *filename) |
| 3714 | 3714 |
{
|
| 3715 | 3715 |
void *dll; |
| ... | ... |
@@ -4394,7 +4394,7 @@ static int parse_ffconfig(const char *filename) |
| 4394 | 4394 |
} |
| 4395 | 4395 |
} else if (!strcasecmp(cmd, "LoadModule")) {
|
| 4396 | 4396 |
get_arg(arg, sizeof(arg), &p); |
| 4397 |
-#ifdef HAVE_DLOPEN |
|
| 4397 |
+#if HAVE_DLOPEN |
|
| 4398 | 4398 |
load_module(arg); |
| 4399 | 4399 |
#else |
| 4400 | 4400 |
fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n", |
| ... | ... |
@@ -435,7 +435,7 @@ static av_cold int aac_decode_init(AVCodecContext * avccontext) {
|
| 435 | 435 |
ac->sf_offset = 60; |
| 436 | 436 |
} |
| 437 | 437 |
|
| 438 |
-#ifndef CONFIG_HARDCODED_TABLES |
|
| 438 |
+#if !CONFIG_HARDCODED_TABLES |
|
| 439 | 439 |
for (i = 0; i < 428; i++) |
| 440 | 440 |
ff_aac_pow2sf_tab[i] = pow(2, (i - 200)/4.); |
| 441 | 441 |
#endif /* CONFIG_HARDCODED_TABLES */ |
| ... | ... |
@@ -899,7 +899,7 @@ const float * const ff_aac_codebook_vectors[] = {
|
| 899 | 899 |
codebook_vector8, codebook_vector10, |
| 900 | 900 |
}; |
| 901 | 901 |
|
| 902 |
-#ifdef CONFIG_HARDCODED_TABLES |
|
| 902 |
+#if CONFIG_HARDCODED_TABLES |
|
| 903 | 903 |
|
| 904 | 904 |
/** |
| 905 | 905 |
* Table of pow(2, (i - 200)/4.) used for different purposes depending on the |
| ... | ... |
@@ -65,7 +65,7 @@ extern const uint16_t ff_aac_spectral_sizes[11]; |
| 65 | 65 |
|
| 66 | 66 |
extern const float *ff_aac_codebook_vectors[]; |
| 67 | 67 |
|
| 68 |
-#ifdef CONFIG_HARDCODED_TABLES |
|
| 68 |
+#if CONFIG_HARDCODED_TABLES |
|
| 69 | 69 |
extern const float ff_aac_pow2sf_tab[316]; |
| 70 | 70 |
#else |
| 71 | 71 |
extern float ff_aac_pow2sf_tab[316]; |
| ... | ... |
@@ -153,7 +153,7 @@ typedef struct ADPCMContext {
|
| 153 | 153 |
|
| 154 | 154 |
/* XXX: implement encoding */ |
| 155 | 155 |
|
| 156 |
-#ifdef CONFIG_ENCODERS |
|
| 156 |
+#if CONFIG_ENCODERS |
|
| 157 | 157 |
static int adpcm_encode_init(AVCodecContext *avctx) |
| 158 | 158 |
{
|
| 159 | 159 |
if (avctx->channels > 2) |
| ... | ... |
@@ -1589,7 +1589,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, |
| 1589 | 1589 |
|
| 1590 | 1590 |
|
| 1591 | 1591 |
|
| 1592 |
-#ifdef CONFIG_ENCODERS |
|
| 1592 |
+#if CONFIG_ENCODERS |
|
| 1593 | 1593 |
#define ADPCM_ENCODER(id,name,long_name_) \ |
| 1594 | 1594 |
AVCodec name ## _encoder = { \
|
| 1595 | 1595 |
#name, \ |
| ... | ... |
@@ -1607,7 +1607,7 @@ AVCodec name ## _encoder = { \
|
| 1607 | 1607 |
#define ADPCM_ENCODER(id,name,long_name_) |
| 1608 | 1608 |
#endif |
| 1609 | 1609 |
|
| 1610 |
-#ifdef CONFIG_DECODERS |
|
| 1610 |
+#if CONFIG_DECODERS |
|
| 1611 | 1611 |
#define ADPCM_DECODER(id,name,long_name_) \ |
| 1612 | 1612 |
AVCodec name ## _decoder = { \
|
| 1613 | 1613 |
#name, \ |
| ... | ... |
@@ -53,7 +53,7 @@ put_pixels_axp_asm: |
| 53 | 53 |
.frame sp, 0, ra |
| 54 | 54 |
.prologue 0 |
| 55 | 55 |
|
| 56 |
-#ifdef CONFIG_GPROF |
|
| 56 |
+#if CONFIG_GPROF |
|
| 57 | 57 |
lda AT, _mcount |
| 58 | 58 |
jsr AT, (AT), _mcount |
| 59 | 59 |
#endif |
| ... | ... |
@@ -150,7 +150,7 @@ put_pixels_clamped_mvi_asm: |
| 150 | 150 |
.frame sp, 0, ra |
| 151 | 151 |
.prologue 0 |
| 152 | 152 |
|
| 153 |
-#ifdef CONFIG_GPROF |
|
| 153 |
+#if CONFIG_GPROF |
|
| 154 | 154 |
lda AT, _mcount |
| 155 | 155 |
jsr AT, (AT), _mcount |
| 156 | 156 |
#endif |
| ... | ... |
@@ -205,7 +205,7 @@ add_pixels_clamped_mvi_asm: |
| 205 | 205 |
.frame sp, 0, ra |
| 206 | 206 |
.prologue 0 |
| 207 | 207 |
|
| 208 |
-#ifdef CONFIG_GPROF |
|
| 208 |
+#if CONFIG_GPROF |
|
| 209 | 209 |
lda AT, _mcount |
| 210 | 210 |
jsr AT, (AT), _mcount |
| 211 | 211 |
#endif |
| ... | ... |
@@ -20,7 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavcodec/dsputil.h" |
| 23 |
-#ifdef HAVE_IPP |
|
| 23 |
+#if HAVE_IPP |
|
| 24 | 24 |
#include <ipp.h> |
| 25 | 25 |
#endif |
| 26 | 26 |
|
| ... | ... |
@@ -93,7 +93,7 @@ static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) |
| 93 | 93 |
ff_add_pixels_clamped(block, dest, line_size); |
| 94 | 94 |
} |
| 95 | 95 |
|
| 96 |
-#ifdef HAVE_IPP |
|
| 96 |
+#if HAVE_IPP |
|
| 97 | 97 |
static void simple_idct_ipp(DCTELEM *block) |
| 98 | 98 |
{
|
| 99 | 99 |
ippiDCT8x8Inv_Video_16s_C1I(block); |
| ... | ... |
@@ -108,7 +108,7 @@ void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_s |
| 108 | 108 |
static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block) |
| 109 | 109 |
{
|
| 110 | 110 |
ippiDCT8x8Inv_Video_16s_C1I(block); |
| 111 |
-#ifdef HAVE_IWMMXT |
|
| 111 |
+#if HAVE_IWMMXT |
|
| 112 | 112 |
add_pixels_clamped_iwmmxt(block, dest, line_size); |
| 113 | 113 |
#else |
| 114 | 114 |
ff_add_pixels_clamped_ARM(block, dest, line_size); |
| ... | ... |
@@ -130,13 +130,13 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) |
| 130 | 130 |
|
| 131 | 131 |
if (avctx->lowres == 0) {
|
| 132 | 132 |
if(idct_algo == FF_IDCT_AUTO){
|
| 133 |
-#if defined(HAVE_IPP) |
|
| 133 |
+#if HAVE_IPP |
|
| 134 | 134 |
idct_algo = FF_IDCT_IPP; |
| 135 |
-#elif defined(HAVE_NEON) |
|
| 135 |
+#elif HAVE_NEON |
|
| 136 | 136 |
idct_algo = FF_IDCT_SIMPLENEON; |
| 137 |
-#elif defined(HAVE_ARMV6) |
|
| 137 |
+#elif HAVE_ARMV6 |
|
| 138 | 138 |
idct_algo = FF_IDCT_SIMPLEARMV6; |
| 139 |
-#elif defined(HAVE_ARMV5TE) |
|
| 139 |
+#elif HAVE_ARMV5TE |
|
| 140 | 140 |
idct_algo = FF_IDCT_SIMPLEARMV5TE; |
| 141 | 141 |
#else |
| 142 | 142 |
idct_algo = FF_IDCT_ARM; |
| ... | ... |
@@ -153,28 +153,28 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) |
| 153 | 153 |
c->idct_add= simple_idct_ARM_add; |
| 154 | 154 |
c->idct = simple_idct_ARM; |
| 155 | 155 |
c->idct_permutation_type= FF_NO_IDCT_PERM; |
| 156 |
-#ifdef HAVE_ARMV6 |
|
| 156 |
+#if HAVE_ARMV6 |
|
| 157 | 157 |
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
|
| 158 | 158 |
c->idct_put= ff_simple_idct_put_armv6; |
| 159 | 159 |
c->idct_add= ff_simple_idct_add_armv6; |
| 160 | 160 |
c->idct = ff_simple_idct_armv6; |
| 161 | 161 |
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; |
| 162 | 162 |
#endif |
| 163 |
-#ifdef HAVE_ARMV5TE |
|
| 163 |
+#if HAVE_ARMV5TE |
|
| 164 | 164 |
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
|
| 165 | 165 |
c->idct_put= simple_idct_put_armv5te; |
| 166 | 166 |
c->idct_add= simple_idct_add_armv5te; |
| 167 | 167 |
c->idct = simple_idct_armv5te; |
| 168 | 168 |
c->idct_permutation_type = FF_NO_IDCT_PERM; |
| 169 | 169 |
#endif |
| 170 |
-#ifdef HAVE_IPP |
|
| 170 |
+#if HAVE_IPP |
|
| 171 | 171 |
} else if (idct_algo==FF_IDCT_IPP){
|
| 172 | 172 |
c->idct_put= simple_idct_ipp_put; |
| 173 | 173 |
c->idct_add= simple_idct_ipp_add; |
| 174 | 174 |
c->idct = simple_idct_ipp; |
| 175 | 175 |
c->idct_permutation_type= FF_NO_IDCT_PERM; |
| 176 | 176 |
#endif |
| 177 |
-#ifdef HAVE_NEON |
|
| 177 |
+#if HAVE_NEON |
|
| 178 | 178 |
} else if (idct_algo==FF_IDCT_SIMPLENEON){
|
| 179 | 179 |
c->idct_put= ff_simple_idct_put_neon; |
| 180 | 180 |
c->idct_add= ff_simple_idct_add_neon; |
| ... | ... |
@@ -201,17 +201,17 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) |
| 201 | 201 |
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm; |
| 202 | 202 |
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm; |
| 203 | 203 |
|
| 204 |
-#ifdef HAVE_ARMV5TE |
|
| 204 |
+#if HAVE_ARMV5TE |
|
| 205 | 205 |
c->prefetch = ff_prefetch_arm; |
| 206 | 206 |
#endif |
| 207 | 207 |
|
| 208 |
-#ifdef HAVE_IWMMXT |
|
| 208 |
+#if HAVE_IWMMXT |
|
| 209 | 209 |
dsputil_init_iwmmxt(c, avctx); |
| 210 | 210 |
#endif |
| 211 |
-#ifdef HAVE_ARMVFP |
|
| 211 |
+#if HAVE_ARMVFP |
|
| 212 | 212 |
ff_float_init_arm_vfp(c, avctx); |
| 213 | 213 |
#endif |
| 214 |
-#ifdef HAVE_NEON |
|
| 214 |
+#if HAVE_NEON |
|
| 215 | 215 |
ff_dsputil_init_neon(c, avctx); |
| 216 | 216 |
#endif |
| 217 | 217 |
} |
| ... | ... |
@@ -133,7 +133,7 @@ function ff_vector_fmul_reverse_vfp, export=1 |
| 133 | 133 |
bx lr |
| 134 | 134 |
.endfunc |
| 135 | 135 |
|
| 136 |
-#ifdef HAVE_ARMV6 |
|
| 136 |
+#if HAVE_ARMV6 |
|
| 137 | 137 |
/** |
| 138 | 138 |
* ARM VFP optimized float to int16 conversion. |
| 139 | 139 |
* Assume that len is a positive number and is multiple of 8, destination |
| ... | ... |
@@ -29,7 +29,7 @@ void ff_float_init_arm_vfp(DSPContext* c, AVCodecContext *avctx) |
| 29 | 29 |
{
|
| 30 | 30 |
c->vector_fmul = ff_vector_fmul_vfp; |
| 31 | 31 |
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; |
| 32 |
-#ifdef HAVE_ARMV6 |
|
| 32 |
+#if HAVE_ARMV6 |
|
| 33 | 33 |
c->float_to_int16 = ff_float_to_int16_vfp; |
| 34 | 34 |
#endif |
| 35 | 35 |
} |
| ... | ... |
@@ -38,7 +38,7 @@ static inline av_const int MULL(int a, int b, unsigned shift) |
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 | 40 |
#define MULH MULH |
| 41 |
-#ifdef HAVE_ARMV6 |
|
| 41 |
+#if HAVE_ARMV6 |
|
| 42 | 42 |
static inline av_const int MULH(int a, int b) |
| 43 | 43 |
{
|
| 44 | 44 |
int r; |
| ... | ... |
@@ -73,7 +73,7 @@ static inline av_const int64_t MAC64(int64_t d, int a, int b) |
| 73 | 73 |
#define MAC64(d, a, b) ((d) = MAC64(d, a, b)) |
| 74 | 74 |
#define MLS64(d, a, b) MAC64(d, -(a), b) |
| 75 | 75 |
|
| 76 |
-#if defined(HAVE_ARMV5TE) |
|
| 76 |
+#if HAVE_ARMV5TE |
|
| 77 | 77 |
|
| 78 | 78 |
/* signed 16x16 -> 32 multiply add accumulate */ |
| 79 | 79 |
# define MAC16(rt, ra, rb) \ |
| ... | ... |
@@ -31,10 +31,10 @@ void MPV_common_init_arm(MpegEncContext *s) |
| 31 | 31 |
* allow optimized functions for armv5te unless |
| 32 | 32 |
* a better iwmmxt function exists |
| 33 | 33 |
*/ |
| 34 |
-#ifdef HAVE_ARMV5TE |
|
| 34 |
+#if HAVE_ARMV5TE |
|
| 35 | 35 |
MPV_common_init_armv5te(s); |
| 36 | 36 |
#endif |
| 37 |
-#ifdef HAVE_IWMMXT |
|
| 37 |
+#if HAVE_IWMMXT |
|
| 38 | 38 |
MPV_common_init_iwmmxt(s); |
| 39 | 39 |
#endif |
| 40 | 40 |
} |
| ... | ... |
@@ -465,7 +465,7 @@ for(i=0; i<s->avctx->extradata_size; i++){
|
| 465 | 465 |
return (get_bits_count(&a->gb)+31)/32*4; |
| 466 | 466 |
} |
| 467 | 467 |
|
| 468 |
-#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) |
|
| 468 |
+#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER |
|
| 469 | 469 |
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
| 470 | 470 |
ASV1Context * const a = avctx->priv_data; |
| 471 | 471 |
AVFrame *pict = data; |
| ... | ... |
@@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, |
| 519 | 519 |
|
| 520 | 520 |
return size*4; |
| 521 | 521 |
} |
| 522 |
-#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */ |
|
| 522 |
+#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */ |
|
| 523 | 523 |
|
| 524 | 524 |
static av_cold void common_init(AVCodecContext *avctx){
|
| 525 | 525 |
ASV1Context * const a = avctx->priv_data; |
| ... | ... |
@@ -569,7 +569,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
| 569 | 569 |
return 0; |
| 570 | 570 |
} |
| 571 | 571 |
|
| 572 |
-#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) |
|
| 572 |
+#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER |
|
| 573 | 573 |
static av_cold int encode_init(AVCodecContext *avctx){
|
| 574 | 574 |
ASV1Context * const a = avctx->priv_data; |
| 575 | 575 |
int i; |
| ... | ... |
@@ -593,7 +593,7 @@ static av_cold int encode_init(AVCodecContext *avctx){
|
| 593 | 593 |
|
| 594 | 594 |
return 0; |
| 595 | 595 |
} |
| 596 |
-#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */ |
|
| 596 |
+#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */ |
|
| 597 | 597 |
|
| 598 | 598 |
static av_cold int decode_end(AVCodecContext *avctx){
|
| 599 | 599 |
ASV1Context * const a = avctx->priv_data; |
| ... | ... |
@@ -631,7 +631,7 @@ AVCodec asv2_decoder = {
|
| 631 | 631 |
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
| 632 | 632 |
}; |
| 633 | 633 |
|
| 634 |
-#ifdef CONFIG_ASV1_ENCODER |
|
| 634 |
+#if CONFIG_ASV1_ENCODER |
|
| 635 | 635 |
AVCodec asv1_encoder = {
|
| 636 | 636 |
"asv1", |
| 637 | 637 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -645,7 +645,7 @@ AVCodec asv1_encoder = {
|
| 645 | 645 |
}; |
| 646 | 646 |
#endif |
| 647 | 647 |
|
| 648 |
-#ifdef CONFIG_ASV2_ENCODER |
|
| 648 |
+#if CONFIG_ASV2_ENCODER |
|
| 649 | 649 |
AVCodec asv2_encoder = {
|
| 650 | 650 |
"asv2", |
| 651 | 651 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -41,7 +41,7 @@ |
| 41 | 41 |
//#define ALT_BITSTREAM_WRITER |
| 42 | 42 |
//#define ALIGNED_BITSTREAM_WRITER |
| 43 | 43 |
#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER) |
| 44 |
-# ifdef ARCH_ARM |
|
| 44 |
+# if ARCH_ARM |
|
| 45 | 45 |
# define A32_BITSTREAM_READER |
| 46 | 46 |
# else |
| 47 | 47 |
# define ALT_BITSTREAM_READER |
| ... | ... |
@@ -52,7 +52,7 @@ |
| 52 | 52 |
|
| 53 | 53 |
extern const uint8_t ff_reverse[256]; |
| 54 | 54 |
|
| 55 |
-#if defined(ARCH_X86) |
|
| 55 |
+#if ARCH_X86 |
|
| 56 | 56 |
// avoid +32 for shift optimization (gcc should do that ...) |
| 57 | 57 |
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
| 58 | 58 |
__asm__ ("sarl %1, %0\n\t"
|
| ... | ... |
@@ -196,7 +196,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
| 196 | 196 |
#ifdef BITSTREAM_WRITER_LE |
| 197 | 197 |
bit_buf |= value << (32 - bit_left); |
| 198 | 198 |
if (n >= bit_left) {
|
| 199 |
-#ifndef HAVE_FAST_UNALIGNED |
|
| 199 |
+#if !HAVE_FAST_UNALIGNED |
|
| 200 | 200 |
if (3 & (intptr_t) s->buf_ptr) {
|
| 201 | 201 |
s->buf_ptr[0] = bit_buf ; |
| 202 | 202 |
s->buf_ptr[1] = bit_buf >> 8; |
| ... | ... |
@@ -217,7 +217,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
| 217 | 217 |
} else {
|
| 218 | 218 |
bit_buf<<=bit_left; |
| 219 | 219 |
bit_buf |= value >> (n - bit_left); |
| 220 |
-#ifndef HAVE_FAST_UNALIGNED |
|
| 220 |
+#if !HAVE_FAST_UNALIGNED |
|
| 221 | 221 |
if (3 & (intptr_t) s->buf_ptr) {
|
| 222 | 222 |
s->buf_ptr[0] = bit_buf >> 24; |
| 223 | 223 |
s->buf_ptr[1] = bit_buf >> 16; |
| ... | ... |
@@ -243,7 +243,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
| 243 | 243 |
static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
| 244 | 244 |
{
|
| 245 | 245 |
# ifdef ALIGNED_BITSTREAM_WRITER |
| 246 |
-# if defined(ARCH_X86) |
|
| 246 |
+# if ARCH_X86 |
|
| 247 | 247 |
__asm__ volatile( |
| 248 | 248 |
"movl %0, %%ecx \n\t" |
| 249 | 249 |
"xorl %%eax, %%eax \n\t" |
| ... | ... |
@@ -274,7 +274,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
| 274 | 274 |
s->index= index; |
| 275 | 275 |
# endif |
| 276 | 276 |
# else //ALIGNED_BITSTREAM_WRITER |
| 277 |
-# if defined(ARCH_X86) |
|
| 277 |
+# if ARCH_X86 |
|
| 278 | 278 |
__asm__ volatile( |
| 279 | 279 |
"movl $7, %%ecx \n\t" |
| 280 | 280 |
"andl %0, %%ecx \n\t" |
| ... | ... |
@@ -550,7 +550,7 @@ static inline void skip_bits_long(GetBitContext *s, int n){
|
| 550 | 550 |
name##_bit_count-= 32;\ |
| 551 | 551 |
}\ |
| 552 | 552 |
|
| 553 |
-#if defined(ARCH_X86) |
|
| 553 |
+#if ARCH_X86 |
|
| 554 | 554 |
# define SKIP_CACHE(name, gb, num)\ |
| 555 | 555 |
__asm__(\ |
| 556 | 556 |
"shldl %2, %1, %0 \n\t"\ |
| ... | ... |
@@ -270,7 +270,7 @@ static void refill(CABACContext *c){
|
| 270 | 270 |
c->bytestream+= CABAC_BITS/8; |
| 271 | 271 |
} |
| 272 | 272 |
|
| 273 |
-#if ! ( defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) ) |
|
| 273 |
+#if ! ( ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) ) |
|
| 274 | 274 |
static void refill2(CABACContext *c){
|
| 275 | 275 |
int i, x; |
| 276 | 276 |
|
| ... | ... |
@@ -372,7 +372,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st |
| 372 | 372 |
//FIXME gcc generates duplicate load/stores for c->low and c->range |
| 373 | 373 |
#define LOW "0" |
| 374 | 374 |
#define RANGE "4" |
| 375 |
-#ifdef ARCH_X86_64 |
|
| 375 |
+#if ARCH_X86_64 |
|
| 376 | 376 |
#define BYTESTART "16" |
| 377 | 377 |
#define BYTE "24" |
| 378 | 378 |
#define BYTEEND "32" |
| ... | ... |
@@ -381,7 +381,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st |
| 381 | 381 |
#define BYTE "16" |
| 382 | 382 |
#define BYTEEND "20" |
| 383 | 383 |
#endif |
| 384 |
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) |
|
| 384 |
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) |
|
| 385 | 385 |
int bit; |
| 386 | 386 |
|
| 387 | 387 |
#ifndef BRANCHLESS_CABAC_DECODER |
| ... | ... |
@@ -467,7 +467,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st |
| 467 | 467 |
#else /* BRANCHLESS_CABAC_DECODER */ |
| 468 | 468 |
|
| 469 | 469 |
|
| 470 |
-#if defined HAVE_FAST_CMOV |
|
| 470 |
+#if HAVE_FAST_CMOV |
|
| 471 | 471 |
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\ |
| 472 | 472 |
"mov "tmp" , %%ecx \n\t"\ |
| 473 | 473 |
"shl $17 , "tmp" \n\t"\ |
| ... | ... |
@@ -537,7 +537,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st |
| 537 | 537 |
); |
| 538 | 538 |
bit&=1; |
| 539 | 539 |
#endif /* BRANCHLESS_CABAC_DECODER */ |
| 540 |
-#else /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */ |
|
| 540 |
+#else /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */ |
|
| 541 | 541 |
int s = *state; |
| 542 | 542 |
int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s]; |
| 543 | 543 |
int bit, lps_mask av_unused; |
| ... | ... |
@@ -576,7 +576,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st |
| 576 | 576 |
if(!(c->low & CABAC_MASK)) |
| 577 | 577 |
refill2(c); |
| 578 | 578 |
#endif /* BRANCHLESS_CABAC_DECODER */ |
| 579 |
-#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */ |
|
| 579 |
+#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */ |
|
| 580 | 580 |
return bit; |
| 581 | 581 |
} |
| 582 | 582 |
|
| ... | ... |
@@ -637,7 +637,7 @@ static int av_unused get_cabac_bypass(CABACContext *c){
|
| 637 | 637 |
|
| 638 | 638 |
|
| 639 | 639 |
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
|
| 640 |
-#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) |
|
| 640 |
+#if ARCH_X86 && !(defined(PIC) && defined(__GNUC__)) |
|
| 641 | 641 |
__asm__ volatile( |
| 642 | 642 |
"movl "RANGE "(%1), %%ebx \n\t" |
| 643 | 643 |
"movl "LOW "(%1), %%eax \n\t" |
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
|
| 31 | 31 |
/* Disable the encoder. */ |
| 32 | 32 |
#undef CONFIG_CLJR_ENCODER |
| 33 |
+#define CONFIG_CLJR_ENCODER 0 |
|
| 33 | 34 |
|
| 34 | 35 |
typedef struct CLJRContext{
|
| 35 | 36 |
AVCodecContext *avctx; |
| ... | ... |
@@ -84,7 +85,7 @@ static int decode_frame(AVCodecContext *avctx, |
| 84 | 84 |
return buf_size; |
| 85 | 85 |
} |
| 86 | 86 |
|
| 87 |
-#ifdef CONFIG_CLJR_ENCODER |
|
| 87 |
+#if CONFIG_CLJR_ENCODER |
|
| 88 | 88 |
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
| 89 | 89 |
CLJRContext * const a = avctx->priv_data; |
| 90 | 90 |
AVFrame *pict = data; |
| ... | ... |
@@ -124,7 +125,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
| 124 | 124 |
return 0; |
| 125 | 125 |
} |
| 126 | 126 |
|
| 127 |
-#ifdef CONFIG_CLJR_ENCODER |
|
| 127 |
+#if CONFIG_CLJR_ENCODER |
|
| 128 | 128 |
static av_cold int encode_init(AVCodecContext *avctx){
|
| 129 | 129 |
|
| 130 | 130 |
common_init(avctx); |
| ... | ... |
@@ -146,7 +147,7 @@ AVCodec cljr_decoder = {
|
| 146 | 146 |
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
| 147 | 147 |
}; |
| 148 | 148 |
|
| 149 |
-#ifdef CONFIG_CLJR_ENCODER |
|
| 149 |
+#if CONFIG_CLJR_ENCODER |
|
| 150 | 150 |
AVCodec cljr_encoder = {
|
| 151 | 151 |
"cljr", |
| 152 | 152 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -23,7 +23,7 @@ |
| 23 | 23 |
|
| 24 | 24 |
#include "avcodec.h" |
| 25 | 25 |
|
| 26 |
-#ifdef CONFIG_ZLIB |
|
| 26 |
+#if CONFIG_ZLIB |
|
| 27 | 27 |
#include <zlib.h> |
| 28 | 28 |
#endif |
| 29 | 29 |
#include "libavutil/lzo.h" |
| ... | ... |
@@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
| 163 | 163 |
break; |
| 164 | 164 |
} |
| 165 | 165 |
case 1: { // zlib compression
|
| 166 |
-#ifdef CONFIG_ZLIB |
|
| 166 |
+#if CONFIG_ZLIB |
|
| 167 | 167 |
unsigned long dlen = c->decomp_size; |
| 168 | 168 |
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK) |
| 169 | 169 |
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n"); |
| ... | ... |
@@ -97,14 +97,14 @@ struct algo algos[] = {
|
| 97 | 97 |
{"INT", 1, j_rev_dct, idct, MMX_PERM},
|
| 98 | 98 |
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
|
| 99 | 99 |
|
| 100 |
-#ifdef HAVE_MMX |
|
| 100 |
+#if HAVE_MMX |
|
| 101 | 101 |
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, FF_MM_MMX},
|
| 102 |
-#ifdef HAVE_MMX2 |
|
| 102 |
+#if HAVE_MMX2 |
|
| 103 | 103 |
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT},
|
| 104 | 104 |
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2},
|
| 105 | 105 |
#endif |
| 106 | 106 |
|
| 107 |
-#ifdef CONFIG_GPL |
|
| 107 |
+#if CONFIG_GPL |
|
| 108 | 108 |
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX},
|
| 109 | 109 |
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT},
|
| 110 | 110 |
#endif |
| ... | ... |
@@ -114,25 +114,25 @@ struct algo algos[] = {
|
| 114 | 114 |
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2},
|
| 115 | 115 |
#endif |
| 116 | 116 |
|
| 117 |
-#ifdef HAVE_ALTIVEC |
|
| 117 |
+#if HAVE_ALTIVEC |
|
| 118 | 118 |
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, FF_MM_ALTIVEC},
|
| 119 | 119 |
#endif |
| 120 | 120 |
|
| 121 |
-#ifdef ARCH_BFIN |
|
| 121 |
+#if ARCH_BFIN |
|
| 122 | 122 |
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM},
|
| 123 | 123 |
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM},
|
| 124 | 124 |
#endif |
| 125 | 125 |
|
| 126 |
-#ifdef ARCH_ARM |
|
| 126 |
+#if ARCH_ARM |
|
| 127 | 127 |
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM },
|
| 128 | 128 |
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM },
|
| 129 |
-#ifdef HAVE_ARMV5TE |
|
| 129 |
+#if HAVE_ARMV5TE |
|
| 130 | 130 |
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM },
|
| 131 | 131 |
#endif |
| 132 |
-#ifdef HAVE_ARMV6 |
|
| 132 |
+#if HAVE_ARMV6 |
|
| 133 | 133 |
{"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, idct, MMX_PERM },
|
| 134 | 134 |
#endif |
| 135 |
-#ifdef HAVE_NEON |
|
| 135 |
+#if HAVE_NEON |
|
| 136 | 136 |
{"SIMPLE-NEON", 1, ff_simple_idct_neon, idct, PARTTRANS_PERM },
|
| 137 | 137 |
#endif |
| 138 | 138 |
#endif /* ARCH_ARM */ |
| ... | ... |
@@ -186,7 +186,7 @@ static DCTELEM block_org[64] __attribute__ ((aligned (8))); |
| 186 | 186 |
|
| 187 | 187 |
static inline void mmx_emms(void) |
| 188 | 188 |
{
|
| 189 |
-#ifdef HAVE_MMX |
|
| 189 |
+#if HAVE_MMX |
|
| 190 | 190 |
if (cpu_flags & FF_MM_MMX) |
| 191 | 191 |
__asm__ volatile ("emms\n\t");
|
| 192 | 192 |
#endif |
| ... | ... |
@@ -169,7 +169,7 @@ void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_s |
| 169 | 169 |
int j; |
| 170 | 170 |
j = src_scantable[i]; |
| 171 | 171 |
st->permutated[i] = permutation[j]; |
| 172 |
-#ifdef ARCH_PPC |
|
| 172 |
+#if ARCH_PPC |
|
| 173 | 173 |
st->inverse[j] = i; |
| 174 | 174 |
#endif |
| 175 | 175 |
} |
| ... | ... |
@@ -340,7 +340,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
| 340 | 340 |
} |
| 341 | 341 |
|
| 342 | 342 |
|
| 343 |
-#ifdef CONFIG_SNOW_ENCODER //dwt is in snow.c |
|
| 343 |
+#if CONFIG_SNOW_ENCODER //dwt is in snow.c |
|
| 344 | 344 |
static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){
|
| 345 | 345 |
int s, i, j; |
| 346 | 346 |
const int dec_count= w==8 ? 3 : 4; |
| ... | ... |
@@ -2711,7 +2711,7 @@ static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int |
| 2711 | 2711 |
} |
| 2712 | 2712 |
} |
| 2713 | 2713 |
|
| 2714 |
-#ifdef CONFIG_CAVS_DECODER |
|
| 2714 |
+#if CONFIG_CAVS_DECODER |
|
| 2715 | 2715 |
/* AVS specific */ |
| 2716 | 2716 |
void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx); |
| 2717 | 2717 |
|
| ... | ... |
@@ -2729,7 +2729,7 @@ void ff_avg_cavs_qpel16_mc00_c(uint8_t *dst, uint8_t *src, int stride) {
|
| 2729 | 2729 |
} |
| 2730 | 2730 |
#endif /* CONFIG_CAVS_DECODER */ |
| 2731 | 2731 |
|
| 2732 |
-#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER) |
|
| 2732 |
+#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER |
|
| 2733 | 2733 |
/* VC-1 specific */ |
| 2734 | 2734 |
void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx); |
| 2735 | 2735 |
|
| ... | ... |
@@ -2743,11 +2743,11 @@ void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx); |
| 2743 | 2743 |
/* H264 specific */ |
| 2744 | 2744 |
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx); |
| 2745 | 2745 |
|
| 2746 |
-#if defined(CONFIG_RV30_DECODER) |
|
| 2746 |
+#if CONFIG_RV30_DECODER |
|
| 2747 | 2747 |
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx); |
| 2748 | 2748 |
#endif /* CONFIG_RV30_DECODER */ |
| 2749 | 2749 |
|
| 2750 |
-#if defined(CONFIG_RV40_DECODER) |
|
| 2750 |
+#if CONFIG_RV40_DECODER |
|
| 2751 | 2751 |
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
|
| 2752 | 2752 |
put_pixels16_xy2_c(dst, src, stride, 16); |
| 2753 | 2753 |
} |
| ... | ... |
@@ -3467,7 +3467,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
|
| 3467 | 3467 |
case FF_CMP_NSSE: |
| 3468 | 3468 |
cmp[i]= c->nsse[i]; |
| 3469 | 3469 |
break; |
| 3470 |
-#ifdef CONFIG_SNOW_ENCODER |
|
| 3470 |
+#if CONFIG_SNOW_ENCODER |
|
| 3471 | 3471 |
case FF_CMP_W53: |
| 3472 | 3472 |
cmp[i]= c->w53[i]; |
| 3473 | 3473 |
break; |
| ... | ... |
@@ -3518,7 +3518,7 @@ static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
| 3518 | 3518 |
|
| 3519 | 3519 |
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
| 3520 | 3520 |
long i; |
| 3521 |
-#ifndef HAVE_FAST_UNALIGNED |
|
| 3521 |
+#if !HAVE_FAST_UNALIGNED |
|
| 3522 | 3522 |
if((long)src2 & (sizeof(long)-1)){
|
| 3523 | 3523 |
for(i=0; i+7<w; i+=8){
|
| 3524 | 3524 |
dst[i+0] = src1[i+0]-src2[i+0]; |
| ... | ... |
@@ -3686,7 +3686,7 @@ static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2 |
| 3686 | 3686 |
return s->dsp.sum_abs_dctelem(temp); |
| 3687 | 3687 |
} |
| 3688 | 3688 |
|
| 3689 |
-#ifdef CONFIG_GPL |
|
| 3689 |
+#if CONFIG_GPL |
|
| 3690 | 3690 |
#define DCT8_1D {\
|
| 3691 | 3691 |
const int s07 = SRC(0) + SRC(7);\ |
| 3692 | 3692 |
const int s16 = SRC(1) + SRC(6);\ |
| ... | ... |
@@ -3992,7 +3992,7 @@ static int ssd_int8_vs_int16_c(const int8_t *pix1, const int16_t *pix2, |
| 3992 | 3992 |
WRAPPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c) |
| 3993 | 3993 |
WRAPPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c) |
| 3994 | 3994 |
WRAPPER8_16_SQ(dct_sad8x8_c, dct_sad16_c) |
| 3995 |
-#ifdef CONFIG_GPL |
|
| 3995 |
+#if CONFIG_GPL |
|
| 3996 | 3996 |
WRAPPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c) |
| 3997 | 3997 |
#endif |
| 3998 | 3998 |
WRAPPER8_16_SQ(dct_max8x8_c, dct_max16_c) |
| ... | ... |
@@ -4249,7 +4249,7 @@ int ff_check_alignment(void){
|
| 4249 | 4249 |
|
| 4250 | 4250 |
if((long)&aligned & 15){
|
| 4251 | 4251 |
if(!did_fail){
|
| 4252 |
-#if defined(HAVE_MMX) || defined(HAVE_ALTIVEC) |
|
| 4252 |
+#if HAVE_MMX || HAVE_ALTIVEC |
|
| 4253 | 4253 |
av_log(NULL, AV_LOG_ERROR, |
| 4254 | 4254 |
"Compiler did not align stack variables. Libavcodec has been miscompiled\n" |
| 4255 | 4255 |
"and may be very slow or crash. This is not a bug in libavcodec,\n" |
| ... | ... |
@@ -4269,7 +4269,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4269 | 4269 |
|
| 4270 | 4270 |
ff_check_alignment(); |
| 4271 | 4271 |
|
| 4272 |
-#ifdef CONFIG_ENCODERS |
|
| 4272 |
+#if CONFIG_ENCODERS |
|
| 4273 | 4273 |
if(avctx->dct_algo==FF_DCT_FASTINT) {
|
| 4274 | 4274 |
c->fdct = fdct_ifast; |
| 4275 | 4275 |
c->fdct248 = fdct_ifast248; |
| ... | ... |
@@ -4487,22 +4487,22 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4487 | 4487 |
|
| 4488 | 4488 |
c->draw_edges = draw_edges_c; |
| 4489 | 4489 |
|
| 4490 |
-#ifdef CONFIG_CAVS_DECODER |
|
| 4490 |
+#if CONFIG_CAVS_DECODER |
|
| 4491 | 4491 |
ff_cavsdsp_init(c,avctx); |
| 4492 | 4492 |
#endif |
| 4493 |
-#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER) |
|
| 4493 |
+#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER |
|
| 4494 | 4494 |
ff_vc1dsp_init(c,avctx); |
| 4495 | 4495 |
#endif |
| 4496 |
-#if defined(CONFIG_WMV2_DECODER) || defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER) |
|
| 4496 |
+#if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER |
|
| 4497 | 4497 |
ff_intrax8dsp_init(c,avctx); |
| 4498 | 4498 |
#endif |
| 4499 |
-#if defined(CONFIG_H264_ENCODER) |
|
| 4499 |
+#if CONFIG_H264_ENCODER |
|
| 4500 | 4500 |
ff_h264dspenc_init(c,avctx); |
| 4501 | 4501 |
#endif |
| 4502 |
-#if defined(CONFIG_RV30_DECODER) |
|
| 4502 |
+#if CONFIG_RV30_DECODER |
|
| 4503 | 4503 |
ff_rv30dsp_init(c,avctx); |
| 4504 | 4504 |
#endif |
| 4505 |
-#if defined(CONFIG_RV40_DECODER) |
|
| 4505 |
+#if CONFIG_RV40_DECODER |
|
| 4506 | 4506 |
ff_rv40dsp_init(c,avctx); |
| 4507 | 4507 |
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c; |
| 4508 | 4508 |
c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c; |
| ... | ... |
@@ -4527,7 +4527,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4527 | 4527 |
c->hadamard8_diff[4]= hadamard8_intra16_c; |
| 4528 | 4528 |
SET_CMP_FUNC(dct_sad) |
| 4529 | 4529 |
SET_CMP_FUNC(dct_max) |
| 4530 |
-#ifdef CONFIG_GPL |
|
| 4530 |
+#if CONFIG_GPL |
|
| 4531 | 4531 |
SET_CMP_FUNC(dct264_sad) |
| 4532 | 4532 |
#endif |
| 4533 | 4533 |
c->sad[0]= pix_abs16_c; |
| ... | ... |
@@ -4544,7 +4544,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4544 | 4544 |
c->vsse[4]= vsse_intra16_c; |
| 4545 | 4545 |
c->nsse[0]= nsse16_c; |
| 4546 | 4546 |
c->nsse[1]= nsse8_c; |
| 4547 |
-#ifdef CONFIG_SNOW_ENCODER |
|
| 4547 |
+#if CONFIG_SNOW_ENCODER |
|
| 4548 | 4548 |
c->w53[0]= w53_16_c; |
| 4549 | 4549 |
c->w53[1]= w53_8_c; |
| 4550 | 4550 |
c->w97[0]= w97_16_c; |
| ... | ... |
@@ -4558,7 +4558,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4558 | 4558 |
c->diff_bytes= diff_bytes_c; |
| 4559 | 4559 |
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c; |
| 4560 | 4560 |
c->bswap_buf= bswap_buf; |
| 4561 |
-#ifdef CONFIG_PNG_DECODER |
|
| 4561 |
+#if CONFIG_PNG_DECODER |
|
| 4562 | 4562 |
c->add_png_paeth_prediction= ff_add_png_paeth_prediction; |
| 4563 | 4563 |
#endif |
| 4564 | 4564 |
|
| ... | ... |
@@ -4587,19 +4587,19 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
| 4587 | 4587 |
c->try_8x8basis= try_8x8basis_c; |
| 4588 | 4588 |
c->add_8x8basis= add_8x8basis_c; |
| 4589 | 4589 |
|
| 4590 |
-#ifdef CONFIG_SNOW_DECODER |
|
| 4590 |
+#if CONFIG_SNOW_DECODER |
|
| 4591 | 4591 |
c->vertical_compose97i = ff_snow_vertical_compose97i; |
| 4592 | 4592 |
c->horizontal_compose97i = ff_snow_horizontal_compose97i; |
| 4593 | 4593 |
c->inner_add_yblock = ff_snow_inner_add_yblock; |
| 4594 | 4594 |
#endif |
| 4595 | 4595 |
|
| 4596 |
-#ifdef CONFIG_VORBIS_DECODER |
|
| 4596 |
+#if CONFIG_VORBIS_DECODER |
|
| 4597 | 4597 |
c->vorbis_inverse_coupling = vorbis_inverse_coupling; |
| 4598 | 4598 |
#endif |
| 4599 |
-#ifdef CONFIG_AC3_DECODER |
|
| 4599 |
+#if CONFIG_AC3_DECODER |
|
| 4600 | 4600 |
c->ac3_downmix = ff_ac3_downmix_c; |
| 4601 | 4601 |
#endif |
| 4602 |
-#ifdef CONFIG_FLAC_ENCODER |
|
| 4602 |
+#if CONFIG_FLAC_ENCODER |
|
| 4603 | 4603 |
c->flac_compute_autocorr = ff_flac_compute_autocorr; |
| 4604 | 4604 |
#endif |
| 4605 | 4605 |
c->vector_fmul = vector_fmul_c; |
| ... | ... |
@@ -174,7 +174,7 @@ typedef struct ScanTable{
|
| 174 | 174 |
const uint8_t *scantable; |
| 175 | 175 |
uint8_t permutated[64]; |
| 176 | 176 |
uint8_t raster_end[64]; |
| 177 |
-#ifdef ARCH_PPC |
|
| 177 |
+#if ARCH_PPC |
|
| 178 | 178 |
/** Used by dct_quantize_altivec to find last-non-zero */ |
| 179 | 179 |
DECLARE_ALIGNED(16, uint8_t, inverse[64]); |
| 180 | 180 |
#endif |
| ... | ... |
@@ -584,7 +584,7 @@ void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); |
| 584 | 584 |
|
| 585 | 585 |
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v) |
| 586 | 586 |
|
| 587 |
-#if defined(HAVE_MMX) |
|
| 587 |
+#if HAVE_MMX |
|
| 588 | 588 |
|
| 589 | 589 |
#undef emms_c |
| 590 | 590 |
|
| ... | ... |
@@ -608,23 +608,23 @@ static inline void emms(void) |
| 608 | 608 |
|
| 609 | 609 |
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx); |
| 610 | 610 |
|
| 611 |
-#elif defined(ARCH_ARM) |
|
| 611 |
+#elif ARCH_ARM |
|
| 612 | 612 |
|
| 613 | 613 |
extern int mm_flags; |
| 614 | 614 |
|
| 615 |
-#ifdef HAVE_NEON |
|
| 615 |
+#if HAVE_NEON |
|
| 616 | 616 |
# define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v) |
| 617 | 617 |
# define STRIDE_ALIGN 16 |
| 618 | 618 |
#endif |
| 619 | 619 |
|
| 620 |
-#elif defined(ARCH_PPC) |
|
| 620 |
+#elif ARCH_PPC |
|
| 621 | 621 |
|
| 622 | 622 |
extern int mm_flags; |
| 623 | 623 |
|
| 624 | 624 |
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v) |
| 625 | 625 |
#define STRIDE_ALIGN 16 |
| 626 | 626 |
|
| 627 |
-#elif defined(HAVE_MMI) |
|
| 627 |
+#elif HAVE_MMI |
|
| 628 | 628 |
|
| 629 | 629 |
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v) |
| 630 | 630 |
#define STRIDE_ALIGN 16 |
| ... | ... |
@@ -1123,7 +1123,7 @@ static int dv_encode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu |
| 1123 | 1123 |
return 0; |
| 1124 | 1124 |
} |
| 1125 | 1125 |
|
| 1126 |
-#ifdef CONFIG_DVVIDEO_DECODER |
|
| 1126 |
+#if CONFIG_DVVIDEO_DECODER |
|
| 1127 | 1127 |
/* NOTE: exactly one frame must be given (120000 bytes for NTSC, |
| 1128 | 1128 |
144000 bytes for PAL - or twice those for 50Mbps) */ |
| 1129 | 1129 |
static int dvvideo_decode_frame(AVCodecContext *avctx, |
| ... | ... |
@@ -1240,7 +1240,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, |
| 1240 | 1240 |
return 5; |
| 1241 | 1241 |
} |
| 1242 | 1242 |
|
| 1243 |
-#ifdef CONFIG_DVVIDEO_ENCODER |
|
| 1243 |
+#if CONFIG_DVVIDEO_ENCODER |
|
| 1244 | 1244 |
static void dv_format_frame(DVVideoContext* c, uint8_t* buf) |
| 1245 | 1245 |
{
|
| 1246 | 1246 |
int chan, i, j, k; |
| ... | ... |
@@ -1328,7 +1328,7 @@ static int dvvideo_close(AVCodecContext *c) |
| 1328 | 1328 |
} |
| 1329 | 1329 |
|
| 1330 | 1330 |
|
| 1331 |
-#ifdef CONFIG_DVVIDEO_ENCODER |
|
| 1331 |
+#if CONFIG_DVVIDEO_ENCODER |
|
| 1332 | 1332 |
AVCodec dvvideo_encoder = {
|
| 1333 | 1333 |
"dvvideo", |
| 1334 | 1334 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -1341,7 +1341,7 @@ AVCodec dvvideo_encoder = {
|
| 1341 | 1341 |
}; |
| 1342 | 1342 |
#endif // CONFIG_DVVIDEO_ENCODER |
| 1343 | 1343 |
|
| 1344 |
-#ifdef CONFIG_DVVIDEO_DECODER |
|
| 1344 |
+#if CONFIG_DVVIDEO_DECODER |
|
| 1345 | 1345 |
AVCodec dvvideo_decoder = {
|
| 1346 | 1346 |
"dvvideo", |
| 1347 | 1347 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -563,7 +563,7 @@ static int is_intra_more_likely(MpegEncContext *s){
|
| 563 | 563 |
|
| 564 | 564 |
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction |
| 565 | 565 |
|
| 566 |
-#ifdef CONFIG_XVMC |
|
| 566 |
+#if CONFIG_XVMC |
|
| 567 | 567 |
//prevent dsp.sad() check, that requires access to the image |
| 568 | 568 |
if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1; |
| 569 | 569 |
#endif |
| ... | ... |
@@ -935,7 +935,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
| 935 | 935 |
}else |
| 936 | 936 |
guess_mv(s); |
| 937 | 937 |
|
| 938 |
-#ifdef CONFIG_XVMC |
|
| 938 |
+#if CONFIG_XVMC |
|
| 939 | 939 |
/* the filters below are not XvMC compatible, skip them */ |
| 940 | 940 |
if(s->avctx->xvmc_acceleration) goto ec_clean; |
| 941 | 941 |
#endif |
| ... | ... |
@@ -1024,7 +1024,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
| 1024 | 1024 |
v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); |
| 1025 | 1025 |
} |
| 1026 | 1026 |
|
| 1027 |
-#ifdef CONFIG_XVMC |
|
| 1027 |
+#if CONFIG_XVMC |
|
| 1028 | 1028 |
ec_clean: |
| 1029 | 1029 |
#endif |
| 1030 | 1030 |
/* clean a few tables */ |
| ... | ... |
@@ -91,7 +91,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse) |
| 91 | 91 |
s->imdct_half = ff_imdct_half_c; |
| 92 | 92 |
s->exptab1 = NULL; |
| 93 | 93 |
|
| 94 |
-#if defined HAVE_MMX && defined HAVE_YASM |
|
| 94 |
+#if HAVE_MMX && HAVE_YASM |
|
| 95 | 95 |
has_vectors = mm_support(); |
| 96 | 96 |
if (has_vectors & FF_MM_SSE) {
|
| 97 | 97 |
/* SSE for P3/P4/K8 */ |
| ... | ... |
@@ -110,7 +110,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse) |
| 110 | 110 |
s->imdct_half = ff_imdct_half_3dn; |
| 111 | 111 |
s->fft_calc = ff_fft_calc_3dn; |
| 112 | 112 |
} |
| 113 |
-#elif defined HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE |
|
| 113 |
+#elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE |
|
| 114 | 114 |
has_vectors = mm_support(); |
| 115 | 115 |
if (has_vectors & FF_MM_ALTIVEC) {
|
| 116 | 116 |
s->fft_calc = ff_fft_calc_altivec; |
| ... | ... |
@@ -336,7 +336,7 @@ static void fft8(FFTComplex *z) |
| 336 | 336 |
TRANSFORM(z[1],z[3],z[5],z[7],sqrthalf,sqrthalf); |
| 337 | 337 |
} |
| 338 | 338 |
|
| 339 |
-#ifndef CONFIG_SMALL |
|
| 339 |
+#if !CONFIG_SMALL |
|
| 340 | 340 |
static void fft16(FFTComplex *z) |
| 341 | 341 |
{
|
| 342 | 342 |
FFTSample t1, t2, t3, t4, t5, t6; |
| ... | ... |
@@ -358,7 +358,7 @@ DECL_FFT(64,32,16) |
| 358 | 358 |
DECL_FFT(128,64,32) |
| 359 | 359 |
DECL_FFT(256,128,64) |
| 360 | 360 |
DECL_FFT(512,256,128) |
| 361 |
-#ifndef CONFIG_SMALL |
|
| 361 |
+#if !CONFIG_SMALL |
|
| 362 | 362 |
#define pass pass_big |
| 363 | 363 |
#endif |
| 364 | 364 |
DECL_FFT(1024,512,256) |
| ... | ... |
@@ -350,7 +350,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int |
| 350 | 350 |
return ret; |
| 351 | 351 |
} |
| 352 | 352 |
|
| 353 |
-#ifdef CONFIG_FFV1_ENCODER |
|
| 353 |
+#if CONFIG_FFV1_ENCODER |
|
| 354 | 354 |
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
|
| 355 | 355 |
PlaneContext * const p= &s->plane[plane_index]; |
| 356 | 356 |
RangeCoder * const c= &s->c; |
| ... | ... |
@@ -543,7 +543,7 @@ static av_cold int common_init(AVCodecContext *avctx){
|
| 543 | 543 |
return 0; |
| 544 | 544 |
} |
| 545 | 545 |
|
| 546 |
-#ifdef CONFIG_FFV1_ENCODER |
|
| 546 |
+#if CONFIG_FFV1_ENCODER |
|
| 547 | 547 |
static av_cold int encode_init(AVCodecContext *avctx) |
| 548 | 548 |
{
|
| 549 | 549 |
FFV1Context *s = avctx->priv_data; |
| ... | ... |
@@ -632,7 +632,7 @@ static void clear_state(FFV1Context *f){
|
| 632 | 632 |
} |
| 633 | 633 |
} |
| 634 | 634 |
|
| 635 |
-#ifdef CONFIG_FFV1_ENCODER |
|
| 635 |
+#if CONFIG_FFV1_ENCODER |
|
| 636 | 636 |
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
| 637 | 637 |
FFV1Context *f = avctx->priv_data; |
| 638 | 638 |
RangeCoder * const c= &f->c; |
| ... | ... |
@@ -1025,7 +1025,7 @@ AVCodec ffv1_decoder = {
|
| 1025 | 1025 |
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
|
| 1026 | 1026 |
}; |
| 1027 | 1027 |
|
| 1028 |
-#ifdef CONFIG_FFV1_ENCODER |
|
| 1028 |
+#if CONFIG_FFV1_ENCODER |
|
| 1029 | 1029 |
AVCodec ffv1_encoder = {
|
| 1030 | 1030 |
"ffv1", |
| 1031 | 1031 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -285,7 +285,7 @@ static av_cold int g726_reset(G726Context* c, int index) |
| 285 | 285 |
return 0; |
| 286 | 286 |
} |
| 287 | 287 |
|
| 288 |
-#ifdef CONFIG_ADPCM_G726_ENCODER |
|
| 288 |
+#if CONFIG_ADPCM_G726_ENCODER |
|
| 289 | 289 |
static int16_t g726_encode(G726Context* c, int16_t sig) |
| 290 | 290 |
{
|
| 291 | 291 |
uint8_t i; |
| ... | ... |
@@ -342,7 +342,7 @@ static av_cold int g726_close(AVCodecContext *avctx) |
| 342 | 342 |
return 0; |
| 343 | 343 |
} |
| 344 | 344 |
|
| 345 |
-#ifdef CONFIG_ADPCM_G726_ENCODER |
|
| 345 |
+#if CONFIG_ADPCM_G726_ENCODER |
|
| 346 | 346 |
static int g726_encode_frame(AVCodecContext *avctx, |
| 347 | 347 |
uint8_t *dst, int buf_size, void *data) |
| 348 | 348 |
{
|
| ... | ... |
@@ -381,7 +381,7 @@ static int g726_decode_frame(AVCodecContext *avctx, |
| 381 | 381 |
return buf_size; |
| 382 | 382 |
} |
| 383 | 383 |
|
| 384 |
-#ifdef CONFIG_ADPCM_G726_ENCODER |
|
| 384 |
+#if CONFIG_ADPCM_G726_ENCODER |
|
| 385 | 385 |
AVCodec adpcm_g726_encoder = {
|
| 386 | 386 |
"g726", |
| 387 | 387 |
CODEC_TYPE_AUDIO, |
| ... | ... |
@@ -54,7 +54,7 @@ |
| 54 | 54 |
#define H263_MBTYPE_B_VLC_BITS 6 |
| 55 | 55 |
#define CBPC_B_VLC_BITS 3 |
| 56 | 56 |
|
| 57 |
-#ifdef CONFIG_ENCODERS |
|
| 57 |
+#if CONFIG_ENCODERS |
|
| 58 | 58 |
static void h263_encode_block(MpegEncContext * s, DCTELEM * block, |
| 59 | 59 |
int n); |
| 60 | 60 |
static void h263p_encode_umotion(MpegEncContext * s, int val); |
| ... | ... |
@@ -72,7 +72,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, |
| 72 | 72 |
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr); |
| 73 | 73 |
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, |
| 74 | 74 |
int n, int coded, int intra, int rvlc); |
| 75 |
-#ifdef CONFIG_ENCODERS |
|
| 75 |
+#if CONFIG_ENCODERS |
|
| 76 | 76 |
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr); |
| 77 | 77 |
static void mpeg4_encode_visual_object_header(MpegEncContext * s); |
| 78 | 78 |
static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number); |
| ... | ... |
@@ -80,7 +80,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n |
| 80 | 80 |
static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb); |
| 81 | 81 |
static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *dir_ptr, int encoding); |
| 82 | 82 |
|
| 83 |
-#ifdef CONFIG_ENCODERS |
|
| 83 |
+#if CONFIG_ENCODERS |
|
| 84 | 84 |
static uint8_t uni_DCtab_lum_len[512]; |
| 85 | 85 |
static uint8_t uni_DCtab_chrom_len[512]; |
| 86 | 86 |
static uint16_t uni_DCtab_lum_bits[512]; |
| ... | ... |
@@ -155,7 +155,7 @@ static void show_pict_info(MpegEncContext *s){
|
| 155 | 155 |
); |
| 156 | 156 |
} |
| 157 | 157 |
|
| 158 |
-#ifdef CONFIG_ENCODERS |
|
| 158 |
+#if CONFIG_ENCODERS |
|
| 159 | 159 |
|
| 160 | 160 |
static void aspect_to_info(MpegEncContext * s, AVRational aspect){
|
| 161 | 161 |
int i; |
| ... | ... |
@@ -736,7 +736,7 @@ void ff_h263_update_motion_val(MpegEncContext * s){
|
| 736 | 736 |
} |
| 737 | 737 |
} |
| 738 | 738 |
|
| 739 |
-#ifdef CONFIG_ENCODERS |
|
| 739 |
+#if CONFIG_ENCODERS |
|
| 740 | 740 |
|
| 741 | 741 |
static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){
|
| 742 | 742 |
int l, bit_size, code; |
| ... | ... |
@@ -1549,7 +1549,7 @@ void ff_h263_loop_filter(MpegEncContext * s){
|
| 1549 | 1549 |
} |
| 1550 | 1550 |
} |
| 1551 | 1551 |
|
| 1552 |
-#ifdef CONFIG_ENCODERS |
|
| 1552 |
+#if CONFIG_ENCODERS |
|
| 1553 | 1553 |
static int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr) |
| 1554 | 1554 |
{
|
| 1555 | 1555 |
int x, y, wrap, a, c, pred_dc, scale; |
| ... | ... |
@@ -1741,7 +1741,7 @@ int16_t *h263_pred_motion(MpegEncContext * s, int block, int dir, |
| 1741 | 1741 |
return *mot_val; |
| 1742 | 1742 |
} |
| 1743 | 1743 |
|
| 1744 |
-#ifdef CONFIG_ENCODERS |
|
| 1744 |
+#if CONFIG_ENCODERS |
|
| 1745 | 1745 |
void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code) |
| 1746 | 1746 |
{
|
| 1747 | 1747 |
int range, l, bit_size, sign, code, bits; |
| ... | ... |
@@ -2652,7 +2652,7 @@ void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, |
| 2652 | 2652 |
|
| 2653 | 2653 |
} |
| 2654 | 2654 |
|
| 2655 |
-#ifdef CONFIG_ENCODERS |
|
| 2655 |
+#if CONFIG_ENCODERS |
|
| 2656 | 2656 |
|
| 2657 | 2657 |
/** |
| 2658 | 2658 |
* encodes the dc value. |
| ... | ... |
@@ -3049,7 +3049,7 @@ static inline void memsetw(short *tab, int val, int n) |
| 3049 | 3049 |
tab[i] = val; |
| 3050 | 3050 |
} |
| 3051 | 3051 |
|
| 3052 |
-#ifdef CONFIG_ENCODERS |
|
| 3052 |
+#if CONFIG_ENCODERS |
|
| 3053 | 3053 |
|
| 3054 | 3054 |
void ff_mpeg4_init_partitions(MpegEncContext *s) |
| 3055 | 3055 |
{
|
| ... | ... |
@@ -3106,7 +3106,7 @@ int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){
|
| 3106 | 3106 |
} |
| 3107 | 3107 |
} |
| 3108 | 3108 |
|
| 3109 |
-#ifdef CONFIG_ENCODERS |
|
| 3109 |
+#if CONFIG_ENCODERS |
|
| 3110 | 3110 |
|
| 3111 | 3111 |
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) |
| 3112 | 3112 |
{
|
| ... | ... |
@@ -4563,7 +4563,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, |
| 4563 | 4563 |
} else if (s->mb_intra) {
|
| 4564 | 4564 |
/* DC coef */ |
| 4565 | 4565 |
if(s->codec_id == CODEC_ID_RV10){
|
| 4566 |
-#ifdef CONFIG_RV10_DECODER |
|
| 4566 |
+#if CONFIG_RV10_DECODER |
|
| 4567 | 4567 |
if (s->rv10_version == 3 && s->pict_type == FF_I_TYPE) {
|
| 4568 | 4568 |
int component, diff; |
| 4569 | 4569 |
component = (n <= 3 ? 0 : n - 4 + 1); |
| ... | ... |
@@ -545,7 +545,7 @@ retry: |
| 545 | 545 |
} |
| 546 | 546 |
#endif |
| 547 | 547 |
|
| 548 |
-#if defined(HAVE_MMX) |
|
| 548 |
+#if HAVE_MMX |
|
| 549 | 549 |
if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build && avctx->idct_algo == FF_IDCT_AUTO && (mm_flags & FF_MM_MMX)){
|
| 550 | 550 |
avctx->idct_algo= FF_IDCT_XVIDMMX; |
| 551 | 551 |
avctx->coded_width= 0; // force reinit |
| ... | ... |
@@ -36,7 +36,7 @@ |
| 36 | 36 |
#include "vdpau_internal.h" |
| 37 | 37 |
|
| 38 | 38 |
#include "cabac.h" |
| 39 |
-#ifdef ARCH_X86 |
|
| 39 |
+#if ARCH_X86 |
|
| 40 | 40 |
#include "x86/h264_i386.h" |
| 41 | 41 |
#endif |
| 42 | 42 |
|
| ... | ... |
@@ -1380,8 +1380,8 @@ static const uint8_t *decode_nal(H264Context *h, const uint8_t *src, int *dst_le |
| 1380 | 1380 |
printf("%2X ", src[i]);
|
| 1381 | 1381 |
#endif |
| 1382 | 1382 |
|
| 1383 |
-#ifdef HAVE_FAST_UNALIGNED |
|
| 1384 |
-# ifdef HAVE_FAST_64BIT |
|
| 1383 |
+#if HAVE_FAST_UNALIGNED |
|
| 1384 |
+# if HAVE_FAST_64BIT |
|
| 1385 | 1385 |
# define RS 7 |
| 1386 | 1386 |
for(i=0; i+1<length; i+=9){
|
| 1387 | 1387 |
if(!((~*(uint64_t*)(src+i) & (*(uint64_t*)(src+i) - 0x0100010001000101ULL)) & 0x8000800080008080ULL)) |
| ... | ... |
@@ -5224,7 +5224,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT |
| 5224 | 5224 |
uint8_t *last_coeff_ctx_base; |
| 5225 | 5225 |
uint8_t *abs_level_m1_ctx_base; |
| 5226 | 5226 |
|
| 5227 |
-#ifndef ARCH_X86 |
|
| 5227 |
+#if !ARCH_X86 |
|
| 5228 | 5228 |
#define CABAC_ON_STACK |
| 5229 | 5229 |
#endif |
| 5230 | 5230 |
#ifdef CABAC_ON_STACK |
| ... | ... |
@@ -5285,7 +5285,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT |
| 5285 | 5285 |
index[coeff_count++] = last;\ |
| 5286 | 5286 |
} |
| 5287 | 5287 |
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD]; |
| 5288 |
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) |
|
| 5288 |
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) |
|
| 5289 | 5289 |
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off); |
| 5290 | 5290 |
} else {
|
| 5291 | 5291 |
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index); |
| ... | ... |
@@ -5360,7 +5360,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT |
| 5360 | 5360 |
|
| 5361 | 5361 |
} |
| 5362 | 5362 |
|
| 5363 |
-#ifndef CONFIG_SMALL |
|
| 5363 |
+#if !CONFIG_SMALL |
|
| 5364 | 5364 |
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 ) {
|
| 5365 | 5365 |
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 1); |
| 5366 | 5366 |
} |
| ... | ... |
@@ -5371,7 +5371,7 @@ static void decode_cabac_residual_nondc( H264Context *h, DCTELEM *block, int cat |
| 5371 | 5371 |
#endif |
| 5372 | 5372 |
|
| 5373 | 5373 |
static void decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) {
|
| 5374 |
-#ifdef CONFIG_SMALL |
|
| 5374 |
+#if CONFIG_SMALL |
|
| 5375 | 5375 |
decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, cat == 0 || cat == 3); |
| 5376 | 5376 |
#else |
| 5377 | 5377 |
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, int mb_x, int mb_y, uint8_t *img_y, uint8 |
| 6572 | 6572 |
filter_mb_mbaff_edgecv( h, &img_cr[0], uvlinesize, bS, rqp ); |
| 6573 | 6573 |
} |
| 6574 | 6574 |
|
| 6575 |
-#ifdef CONFIG_SMALL |
|
| 6575 |
+#if CONFIG_SMALL |
|
| 6576 | 6576 |
for( dir = 0; dir < 2; dir++ ) |
| 6577 | 6577 |
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); |
| 6578 | 6578 |
#else |
| ... | ... |
@@ -8023,7 +8023,7 @@ AVCodec h264_decoder = {
|
| 8023 | 8023 |
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
|
| 8024 | 8024 |
}; |
| 8025 | 8025 |
|
| 8026 |
-#ifdef CONFIG_H264_VDPAU_DECODER |
|
| 8026 |
+#if CONFIG_H264_VDPAU_DECODER |
|
| 8027 | 8027 |
AVCodec h264_vdpau_decoder = {
|
| 8028 | 8028 |
"h264_vdpau", |
| 8029 | 8029 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -8039,6 +8039,6 @@ AVCodec h264_vdpau_decoder = {
|
| 8039 | 8039 |
}; |
| 8040 | 8040 |
#endif |
| 8041 | 8041 |
|
| 8042 |
-#ifdef CONFIG_SVQ3_DECODER |
|
| 8042 |
+#if CONFIG_SVQ3_DECODER |
|
| 8043 | 8043 |
#include "svq3.c" |
| 8044 | 8044 |
#endif |
| ... | ... |
@@ -44,11 +44,11 @@ int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size) |
| 44 | 44 |
|
| 45 | 45 |
for(i=0; i<buf_size; i++){
|
| 46 | 46 |
if(state==7){
|
| 47 |
-#ifdef HAVE_FAST_UNALIGNED |
|
| 47 |
+#if HAVE_FAST_UNALIGNED |
|
| 48 | 48 |
/* we check i<buf_size instead of i+3/7 because its simpler |
| 49 | 49 |
* and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end |
| 50 | 50 |
*/ |
| 51 |
-# ifdef HAVE_FAST_64BIT |
|
| 51 |
+# if HAVE_FAST_64BIT |
|
| 52 | 52 |
while(i<buf_size && !((~*(uint64_t*)(buf+i) & (*(uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL)) |
| 53 | 53 |
i+=8; |
| 54 | 54 |
# else |
| ... | ... |
@@ -261,7 +261,7 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
|
| 261 | 261 |
return 0; |
| 262 | 262 |
} |
| 263 | 263 |
|
| 264 |
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) |
|
| 264 |
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER |
|
| 265 | 265 |
typedef struct {
|
| 266 | 266 |
uint64_t val; |
| 267 | 267 |
int name; |
| ... | ... |
@@ -317,7 +317,7 @@ static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
|
| 317 | 317 |
if(i==size) break; |
| 318 | 318 |
} |
| 319 | 319 |
} |
| 320 |
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */ |
|
| 320 |
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */ |
|
| 321 | 321 |
|
| 322 | 322 |
static void generate_joint_tables(HYuvContext *s){
|
| 323 | 323 |
uint16_t symbols[1<<VLC_BITS]; |
| ... | ... |
@@ -477,7 +477,7 @@ static int common_init(AVCodecContext *avctx){
|
| 477 | 477 |
return 0; |
| 478 | 478 |
} |
| 479 | 479 |
|
| 480 |
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) |
|
| 480 |
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER |
|
| 481 | 481 |
static av_cold int decode_init(AVCodecContext *avctx) |
| 482 | 482 |
{
|
| 483 | 483 |
HYuvContext *s = avctx->priv_data; |
| ... | ... |
@@ -573,9 +573,9 @@ s->bgr32=1; |
| 573 | 573 |
|
| 574 | 574 |
return 0; |
| 575 | 575 |
} |
| 576 |
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */ |
|
| 576 |
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */ |
|
| 577 | 577 |
|
| 578 |
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) |
|
| 578 |
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER |
|
| 579 | 579 |
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
|
| 580 | 580 |
int i; |
| 581 | 581 |
int index= 0; |
| ... | ... |
@@ -725,7 +725,7 @@ static av_cold int encode_init(AVCodecContext *avctx) |
| 725 | 725 |
|
| 726 | 726 |
return 0; |
| 727 | 727 |
} |
| 728 |
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */ |
|
| 728 |
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */ |
|
| 729 | 729 |
|
| 730 | 730 |
/* TODO instead of restarting the read when the code isn't in the first level |
| 731 | 731 |
* of the joint table, jump into the 2nd level of the individual table. */ |
| ... | ... |
@@ -761,7 +761,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
|
| 761 | 761 |
} |
| 762 | 762 |
} |
| 763 | 763 |
|
| 764 |
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) |
|
| 764 |
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER |
|
| 765 | 765 |
static int encode_422_bitstream(HYuvContext *s, int count){
|
| 766 | 766 |
int i; |
| 767 | 767 |
|
| ... | ... |
@@ -854,7 +854,7 @@ static int encode_gray_bitstream(HYuvContext *s, int count){
|
| 854 | 854 |
} |
| 855 | 855 |
return 0; |
| 856 | 856 |
} |
| 857 |
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */ |
|
| 857 |
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */ |
|
| 858 | 858 |
|
| 859 | 859 |
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
|
| 860 | 860 |
int i; |
| ... | ... |
@@ -931,7 +931,7 @@ static int encode_bgr_bitstream(HYuvContext *s, int count){
|
| 931 | 931 |
return 0; |
| 932 | 932 |
} |
| 933 | 933 |
|
| 934 |
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) |
|
| 934 |
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER |
|
| 935 | 935 |
static void draw_slice(HYuvContext *s, int y){
|
| 936 | 936 |
int h, cy; |
| 937 | 937 |
int offset[4]; |
| ... | ... |
@@ -1198,7 +1198,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const |
| 1198 | 1198 |
|
| 1199 | 1199 |
return (get_bits_count(&s->gb)+31)/32*4 + table_size; |
| 1200 | 1200 |
} |
| 1201 |
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */ |
|
| 1201 |
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */ |
|
| 1202 | 1202 |
|
| 1203 | 1203 |
static int common_end(HYuvContext *s){
|
| 1204 | 1204 |
int i; |
| ... | ... |
@@ -1209,7 +1209,7 @@ static int common_end(HYuvContext *s){
|
| 1209 | 1209 |
return 0; |
| 1210 | 1210 |
} |
| 1211 | 1211 |
|
| 1212 |
-#if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) |
|
| 1212 |
+#if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER |
|
| 1213 | 1213 |
static av_cold int decode_end(AVCodecContext *avctx) |
| 1214 | 1214 |
{
|
| 1215 | 1215 |
HYuvContext *s = avctx->priv_data; |
| ... | ... |
@@ -1224,9 +1224,9 @@ static av_cold int decode_end(AVCodecContext *avctx) |
| 1224 | 1224 |
|
| 1225 | 1225 |
return 0; |
| 1226 | 1226 |
} |
| 1227 |
-#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */ |
|
| 1227 |
+#endif /* CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER */ |
|
| 1228 | 1228 |
|
| 1229 |
-#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) |
|
| 1229 |
+#if CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER |
|
| 1230 | 1230 |
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
| 1231 | 1231 |
HYuvContext *s = avctx->priv_data; |
| 1232 | 1232 |
AVFrame *pict = data; |
| ... | ... |
@@ -1431,9 +1431,9 @@ static av_cold int encode_end(AVCodecContext *avctx) |
| 1431 | 1431 |
|
| 1432 | 1432 |
return 0; |
| 1433 | 1433 |
} |
| 1434 |
-#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */ |
|
| 1434 |
+#endif /* CONFIG_HUFFYUV_ENCODER || CONFIG_FFVHUFF_ENCODER */ |
|
| 1435 | 1435 |
|
| 1436 |
-#ifdef CONFIG_HUFFYUV_DECODER |
|
| 1436 |
+#if CONFIG_HUFFYUV_DECODER |
|
| 1437 | 1437 |
AVCodec huffyuv_decoder = {
|
| 1438 | 1438 |
"huffyuv", |
| 1439 | 1439 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -1449,7 +1449,7 @@ AVCodec huffyuv_decoder = {
|
| 1449 | 1449 |
}; |
| 1450 | 1450 |
#endif |
| 1451 | 1451 |
|
| 1452 |
-#ifdef CONFIG_FFVHUFF_DECODER |
|
| 1452 |
+#if CONFIG_FFVHUFF_DECODER |
|
| 1453 | 1453 |
AVCodec ffvhuff_decoder = {
|
| 1454 | 1454 |
"ffvhuff", |
| 1455 | 1455 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -1465,7 +1465,7 @@ AVCodec ffvhuff_decoder = {
|
| 1465 | 1465 |
}; |
| 1466 | 1466 |
#endif |
| 1467 | 1467 |
|
| 1468 |
-#ifdef CONFIG_HUFFYUV_ENCODER |
|
| 1468 |
+#if CONFIG_HUFFYUV_ENCODER |
|
| 1469 | 1469 |
AVCodec huffyuv_encoder = {
|
| 1470 | 1470 |
"huffyuv", |
| 1471 | 1471 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -1479,7 +1479,7 @@ AVCodec huffyuv_encoder = {
|
| 1479 | 1479 |
}; |
| 1480 | 1480 |
#endif |
| 1481 | 1481 |
|
| 1482 |
-#ifdef CONFIG_FFVHUFF_ENCODER |
|
| 1482 |
+#if CONFIG_FFVHUFF_ENCODER |
|
| 1483 | 1483 |
AVCodec ffvhuff_encoder = {
|
| 1484 | 1484 |
"ffvhuff", |
| 1485 | 1485 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -34,7 +34,7 @@ |
| 34 | 34 |
#include "dsputil.h" |
| 35 | 35 |
#include "colorspace.h" |
| 36 | 36 |
|
| 37 |
-#ifdef HAVE_MMX |
|
| 37 |
+#if HAVE_MMX |
|
| 38 | 38 |
#include "x86/mmx.h" |
| 39 | 39 |
#include "x86/dsputil_mmx.h" |
| 40 | 40 |
#endif |
| ... | ... |
@@ -2089,7 +2089,7 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, |
| 2089 | 2089 |
return 0; |
| 2090 | 2090 |
} |
| 2091 | 2091 |
|
| 2092 |
-#ifndef CONFIG_SWSCALE |
|
| 2092 |
+#if !CONFIG_SWSCALE |
|
| 2093 | 2093 |
static uint8_t y_ccir_to_jpeg[256]; |
| 2094 | 2094 |
static uint8_t y_jpeg_to_ccir[256]; |
| 2095 | 2095 |
static uint8_t c_ccir_to_jpeg[256]; |
| ... | ... |
@@ -2662,7 +2662,7 @@ int img_get_alpha_info(const AVPicture *src, |
| 2662 | 2662 |
return ret; |
| 2663 | 2663 |
} |
| 2664 | 2664 |
|
| 2665 |
-#ifdef HAVE_MMX |
|
| 2665 |
+#if HAVE_MMX |
|
| 2666 | 2666 |
#define DEINT_INPLACE_LINE_LUM \ |
| 2667 | 2667 |
movd_m2r(lum_m4[0],mm0);\ |
| 2668 | 2668 |
movd_m2r(lum_m3[0],mm1);\ |
| ... | ... |
@@ -2716,7 +2716,7 @@ static void deinterlace_line(uint8_t *dst, |
| 2716 | 2716 |
const uint8_t *lum, |
| 2717 | 2717 |
int size) |
| 2718 | 2718 |
{
|
| 2719 |
-#ifndef HAVE_MMX |
|
| 2719 |
+#if !HAVE_MMX |
|
| 2720 | 2720 |
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; |
| 2721 | 2721 |
int sum; |
| 2722 | 2722 |
|
| ... | ... |
@@ -2754,7 +2754,7 @@ static void deinterlace_line(uint8_t *dst, |
| 2754 | 2754 |
static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, |
| 2755 | 2755 |
int size) |
| 2756 | 2756 |
{
|
| 2757 |
-#ifndef HAVE_MMX |
|
| 2757 |
+#if !HAVE_MMX |
|
| 2758 | 2758 |
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; |
| 2759 | 2759 |
int sum; |
| 2760 | 2760 |
|
| ... | ... |
@@ -29,7 +29,7 @@ |
| 29 | 29 |
#include "imgconvert.h" |
| 30 | 30 |
#include "libswscale/swscale.h" |
| 31 | 31 |
|
| 32 |
-#ifdef HAVE_ALTIVEC |
|
| 32 |
+#if HAVE_ALTIVEC |
|
| 33 | 33 |
#include "ppc/imgresample_altivec.h" |
| 34 | 34 |
#endif |
| 35 | 35 |
|
| ... | ... |
@@ -153,7 +153,7 @@ static void v_resample(uint8_t *dst, int dst_width, const uint8_t *src, |
| 153 | 153 |
} |
| 154 | 154 |
} |
| 155 | 155 |
|
| 156 |
-#ifdef HAVE_MMX |
|
| 156 |
+#if HAVE_MMX |
|
| 157 | 157 |
|
| 158 | 158 |
#include "x86/mmx.h" |
| 159 | 159 |
|
| ... | ... |
@@ -340,7 +340,7 @@ static void h_resample(uint8_t *dst, int dst_width, const uint8_t *src, |
| 340 | 340 |
} else {
|
| 341 | 341 |
n = dst_width; |
| 342 | 342 |
} |
| 343 |
-#ifdef HAVE_MMX |
|
| 343 |
+#if HAVE_MMX |
|
| 344 | 344 |
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4) |
| 345 | 345 |
h_resample_fast4_mmx(dst, n, |
| 346 | 346 |
src, src_width, src_start, src_incr, filters); |
| ... | ... |
@@ -397,7 +397,7 @@ static void component_resample(ImgReSampleContext *s, |
| 397 | 397 |
} |
| 398 | 398 |
/* apply vertical filter */ |
| 399 | 399 |
phase_y = get_phase(src_y); |
| 400 |
-#ifdef HAVE_MMX |
|
| 400 |
+#if HAVE_MMX |
|
| 401 | 401 |
/* desactivated MMX because loss of precision */ |
| 402 | 402 |
if ((mm_flags & FF_MM_MMX) && NB_TAPS == 4 && 0) |
| 403 | 403 |
v_resample4_mmx(output, owidth, |
| ... | ... |
@@ -405,7 +405,7 @@ static void component_resample(ImgReSampleContext *s, |
| 405 | 405 |
&s->v_filters[phase_y][0]); |
| 406 | 406 |
else |
| 407 | 407 |
#endif |
| 408 |
-#ifdef HAVE_ALTIVEC |
|
| 408 |
+#if HAVE_ALTIVEC |
|
| 409 | 409 |
if ((mm_flags & FF_MM_ALTIVEC) && NB_TAPS == 4 && FILTER_BITS <= 6) |
| 410 | 410 |
v_resample16_altivec(output, owidth, |
| 411 | 411 |
s->line_buf + (ring_y - NB_TAPS + 1) * owidth, |
| ... | ... |
@@ -732,7 +732,7 @@ static void dump_filter(int16_t *filter) |
| 732 | 732 |
} |
| 733 | 733 |
} |
| 734 | 734 |
|
| 735 |
-#ifdef HAVE_MMX |
|
| 735 |
+#if HAVE_MMX |
|
| 736 | 736 |
int mm_flags; |
| 737 | 737 |
#endif |
| 738 | 738 |
|
| ... | ... |
@@ -804,7 +804,7 @@ int main(int argc, char **argv) |
| 804 | 804 |
} |
| 805 | 805 |
|
| 806 | 806 |
/* mmx test */ |
| 807 |
-#ifdef HAVE_MMX |
|
| 807 |
+#if HAVE_MMX |
|
| 808 | 808 |
av_log(NULL, AV_LOG_INFO, "MMX test\n"); |
| 809 | 809 |
fact = 0.72; |
| 810 | 810 |
xsize = (int)(XSIZE * fact); |
| ... | ... |
@@ -45,7 +45,7 @@ |
| 45 | 45 |
#include "bitstream.h" |
| 46 | 46 |
#include "lcl.h" |
| 47 | 47 |
|
| 48 |
-#ifdef CONFIG_ZLIB |
|
| 48 |
+#if CONFIG_ZLIB |
|
| 49 | 49 |
#include <zlib.h> |
| 50 | 50 |
#endif |
| 51 | 51 |
|
| ... | ... |
@@ -65,7 +65,7 @@ typedef struct LclDecContext {
|
| 65 | 65 |
unsigned int decomp_size; |
| 66 | 66 |
// Decompression buffer |
| 67 | 67 |
unsigned char* decomp_buf; |
| 68 |
-#ifdef CONFIG_ZLIB |
|
| 68 |
+#if CONFIG_ZLIB |
|
| 69 | 69 |
z_stream zstream; |
| 70 | 70 |
#endif |
| 71 | 71 |
} LclDecContext; |
| ... | ... |
@@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const |
| 174 | 174 |
unsigned char yq, y1q, uq, vq; |
| 175 | 175 |
int uqvq; |
| 176 | 176 |
unsigned int mthread_inlen, mthread_outlen; |
| 177 |
-#ifdef CONFIG_ZLIB |
|
| 177 |
+#if CONFIG_ZLIB |
|
| 178 | 178 |
int zret; // Zlib return code |
| 179 | 179 |
#endif |
| 180 | 180 |
unsigned int len = buf_size; |
| ... | ... |
@@ -235,7 +235,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const |
| 235 | 235 |
} |
| 236 | 236 |
break; |
| 237 | 237 |
case CODEC_ID_ZLIB: |
| 238 |
-#ifdef CONFIG_ZLIB |
|
| 238 |
+#if CONFIG_ZLIB |
|
| 239 | 239 |
/* Using the original dll with normal compression (-1) and RGB format |
| 240 | 240 |
* gives a file with ZLIB fourcc, but frame is really uncompressed. |
| 241 | 241 |
* To be sure that's true check also frame size */ |
| ... | ... |
@@ -524,7 +524,7 @@ static av_cold int decode_init(AVCodecContext *avctx) |
| 524 | 524 |
|
| 525 | 525 |
c->pic.data[0] = NULL; |
| 526 | 526 |
|
| 527 |
-#ifdef CONFIG_ZLIB |
|
| 527 |
+#if CONFIG_ZLIB |
|
| 528 | 528 |
// Needed if zlib unused or init aborted before inflateInit |
| 529 | 529 |
memset(&(c->zstream), 0, sizeof(z_stream)); |
| 530 | 530 |
#endif |
| ... | ... |
@@ -599,7 +599,7 @@ static av_cold int decode_init(AVCodecContext *avctx) |
| 599 | 599 |
} |
| 600 | 600 |
break; |
| 601 | 601 |
case CODEC_ID_ZLIB: |
| 602 |
-#ifdef CONFIG_ZLIB |
|
| 602 |
+#if CONFIG_ZLIB |
|
| 603 | 603 |
switch (c->compression) {
|
| 604 | 604 |
case COMP_ZLIB_HISPEED: |
| 605 | 605 |
av_log(avctx, AV_LOG_INFO, "High speed compression.\n"); |
| ... | ... |
@@ -648,7 +648,7 @@ static av_cold int decode_init(AVCodecContext *avctx) |
| 648 | 648 |
|
| 649 | 649 |
/* If needed init zlib */ |
| 650 | 650 |
if (avctx->codec_id == CODEC_ID_ZLIB) {
|
| 651 |
-#ifdef CONFIG_ZLIB |
|
| 651 |
+#if CONFIG_ZLIB |
|
| 652 | 652 |
c->zstream.zalloc = Z_NULL; |
| 653 | 653 |
c->zstream.zfree = Z_NULL; |
| 654 | 654 |
c->zstream.opaque = Z_NULL; |
| ... | ... |
@@ -679,14 +679,14 @@ static av_cold int decode_end(AVCodecContext *avctx) |
| 679 | 679 |
|
| 680 | 680 |
if (c->pic.data[0]) |
| 681 | 681 |
avctx->release_buffer(avctx, &c->pic); |
| 682 |
-#ifdef CONFIG_ZLIB |
|
| 682 |
+#if CONFIG_ZLIB |
|
| 683 | 683 |
inflateEnd(&(c->zstream)); |
| 684 | 684 |
#endif |
| 685 | 685 |
|
| 686 | 686 |
return 0; |
| 687 | 687 |
} |
| 688 | 688 |
|
| 689 |
-#ifdef CONFIG_MSZH_DECODER |
|
| 689 |
+#if CONFIG_MSZH_DECODER |
|
| 690 | 690 |
AVCodec mszh_decoder = {
|
| 691 | 691 |
"mszh", |
| 692 | 692 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -701,7 +701,7 @@ AVCodec mszh_decoder = {
|
| 701 | 701 |
}; |
| 702 | 702 |
#endif |
| 703 | 703 |
|
| 704 |
-#ifdef CONFIG_ZLIB_DECODER |
|
| 704 |
+#if CONFIG_ZLIB_DECODER |
|
| 705 | 705 |
AVCodec zlib_decoder = {
|
| 706 | 706 |
"zlib", |
| 707 | 707 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -45,7 +45,7 @@ |
| 45 | 45 |
#include "bitstream.h" |
| 46 | 46 |
#include "lcl.h" |
| 47 | 47 |
|
| 48 |
-#ifdef CONFIG_ZLIB |
|
| 48 |
+#if CONFIG_ZLIB |
|
| 49 | 49 |
#include <zlib.h> |
| 50 | 50 |
#endif |
| 51 | 51 |
|
| ... | ... |
@@ -70,7 +70,7 @@ typedef struct LclEncContext {
|
| 70 | 70 |
unsigned int max_comp_size; |
| 71 | 71 |
// Compression buffer |
| 72 | 72 |
unsigned char* comp_buf; |
| 73 |
-#ifdef CONFIG_ZLIB |
|
| 73 |
+#if CONFIG_ZLIB |
|
| 74 | 74 |
z_stream zstream; |
| 75 | 75 |
#endif |
| 76 | 76 |
} LclEncContext; |
| ... | ... |
@@ -87,7 +87,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, |
| 87 | 87 |
int i; |
| 88 | 88 |
int zret; // Zlib return code |
| 89 | 89 |
|
| 90 |
-#ifndef CONFIG_ZLIB |
|
| 90 |
+#if !CONFIG_ZLIB |
|
| 91 | 91 |
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n"); |
| 92 | 92 |
return -1; |
| 93 | 93 |
#else |
| ... | ... |
@@ -144,7 +144,7 @@ static av_cold int encode_init(AVCodecContext *avctx) |
| 144 | 144 |
LclEncContext *c = avctx->priv_data; |
| 145 | 145 |
int zret; // Zlib return code |
| 146 | 146 |
|
| 147 |
-#ifndef CONFIG_ZLIB |
|
| 147 |
+#if !CONFIG_ZLIB |
|
| 148 | 148 |
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n"); |
| 149 | 149 |
return 1; |
| 150 | 150 |
#else |
| ... | ... |
@@ -213,7 +213,7 @@ static av_cold int encode_end(AVCodecContext *avctx) |
| 213 | 213 |
|
| 214 | 214 |
av_freep(&avctx->extradata); |
| 215 | 215 |
av_freep(&c->comp_buf); |
| 216 |
-#ifdef CONFIG_ZLIB |
|
| 216 |
+#if CONFIG_ZLIB |
|
| 217 | 217 |
deflateEnd(&(c->zstream)); |
| 218 | 218 |
#endif |
| 219 | 219 |
|
| ... | ... |
@@ -65,7 +65,7 @@ |
| 65 | 65 |
|
| 66 | 66 |
#include "avcodec.h" |
| 67 | 67 |
|
| 68 |
-#ifdef CONFIG_LIBAMR_NB_FIXED |
|
| 68 |
+#if CONFIG_LIBAMR_NB_FIXED |
|
| 69 | 69 |
|
| 70 | 70 |
#define MMS_IO |
| 71 | 71 |
|
| ... | ... |
@@ -137,7 +137,7 @@ static void amr_decode_fix_avctx(AVCodecContext * avctx) |
| 137 | 137 |
avctx->sample_fmt = SAMPLE_FMT_S16; |
| 138 | 138 |
} |
| 139 | 139 |
|
| 140 |
-#ifdef CONFIG_LIBAMR_NB_FIXED |
|
| 140 |
+#if CONFIG_LIBAMR_NB_FIXED |
|
| 141 | 141 |
/* fixed point version*/ |
| 142 | 142 |
/* frame size in serial bitstream file (frame type + serial stream + flags) */ |
| 143 | 143 |
#define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5) |
| ... | ... |
@@ -353,7 +353,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, |
| 353 | 353 |
} |
| 354 | 354 |
|
| 355 | 355 |
|
| 356 |
-#elif defined(CONFIG_LIBAMR_NB) /* Float point version*/ |
|
| 356 |
+#elif CONFIG_LIBAMR_NB /* Float point version*/ |
|
| 357 | 357 |
|
| 358 | 358 |
typedef struct AMRContext {
|
| 359 | 359 |
int frameCount; |
| ... | ... |
@@ -492,7 +492,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, |
| 492 | 492 |
|
| 493 | 493 |
#endif |
| 494 | 494 |
|
| 495 |
-#if defined(CONFIG_LIBAMR_NB) || defined(CONFIG_LIBAMR_NB_FIXED) |
|
| 495 |
+#if CONFIG_LIBAMR_NB || CONFIG_LIBAMR_NB_FIXED |
|
| 496 | 496 |
|
| 497 | 497 |
AVCodec libamr_nb_decoder = |
| 498 | 498 |
{
|
| ... | ... |
@@ -524,7 +524,7 @@ AVCodec libamr_nb_encoder = |
| 524 | 524 |
#endif |
| 525 | 525 |
|
| 526 | 526 |
/* -----------AMR wideband ------------*/ |
| 527 |
-#ifdef CONFIG_LIBAMR_WB |
|
| 527 |
+#if CONFIG_LIBAMR_WB |
|
| 528 | 528 |
|
| 529 | 529 |
#ifdef _TYPEDEF_H |
| 530 | 530 |
//To avoid duplicate typedefs from typedef in amr-nb |
| ... | ... |
@@ -35,12 +35,13 @@ |
| 35 | 35 |
#endif |
| 36 | 36 |
|
| 37 | 37 |
/* |
| 38 |
- * when CONFIG_LIBFAADBIN is defined the libfaad will be opened at runtime |
|
| 38 |
+ * when CONFIG_LIBFAADBIN is true libfaad will be opened at runtime |
|
| 39 | 39 |
*/ |
| 40 | 40 |
//#undef CONFIG_LIBFAADBIN |
| 41 |
-//#define CONFIG_LIBFAADBIN |
|
| 41 |
+//#define CONFIG_LIBFAADBIN 0 |
|
| 42 |
+//#define CONFIG_LIBFAADBIN 1 |
|
| 42 | 43 |
|
| 43 |
-#ifdef CONFIG_LIBFAADBIN |
|
| 44 |
+#if CONFIG_LIBFAADBIN |
|
| 44 | 45 |
#include <dlfcn.h> |
| 45 | 46 |
static const char* const libfaadname = "libfaad.so"; |
| 46 | 47 |
#else |
| ... | ... |
@@ -224,7 +225,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx) |
| 224 | 224 |
FAACContext *s = avctx->priv_data; |
| 225 | 225 |
faacDecConfigurationPtr faac_cfg; |
| 226 | 226 |
|
| 227 |
-#ifdef CONFIG_LIBFAADBIN |
|
| 227 |
+#if CONFIG_LIBFAADBIN |
|
| 228 | 228 |
const char* err = 0; |
| 229 | 229 |
|
| 230 | 230 |
s->handle = dlopen(libfaadname, RTLD_LAZY); |
| ... | ... |
@@ -259,7 +260,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx) |
| 259 | 259 |
|
| 260 | 260 |
#undef dfaac |
| 261 | 261 |
|
| 262 |
-#ifdef CONFIG_LIBFAADBIN |
|
| 262 |
+#if CONFIG_LIBFAADBIN |
|
| 263 | 263 |
if (err) {
|
| 264 | 264 |
dlclose(s->handle); |
| 265 | 265 |
av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n", |
| ... | ... |
@@ -166,9 +166,9 @@ av_cold int ff_xvid_encode_init(AVCodecContext *avctx) {
|
| 166 | 166 |
xvid_gbl_init.version = XVID_VERSION; |
| 167 | 167 |
xvid_gbl_init.debug = 0; |
| 168 | 168 |
|
| 169 |
-#ifdef ARCH_PPC |
|
| 169 |
+#if ARCH_PPC |
|
| 170 | 170 |
/* Xvid's PPC support is borked, use libavcodec to detect */ |
| 171 |
-#ifdef HAVE_ALTIVEC |
|
| 171 |
+#if HAVE_ALTIVEC |
|
| 172 | 172 |
if( has_altivec() ) {
|
| 173 | 173 |
xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC; |
| 174 | 174 |
} else |
| ... | ... |
@@ -24,19 +24,19 @@ |
| 24 | 24 |
|
| 25 | 25 |
#include "libavutil/common.h" |
| 26 | 26 |
|
| 27 |
-#ifdef ARCH_X86_32 |
|
| 27 |
+#if ARCH_X86_32 |
|
| 28 | 28 |
|
| 29 | 29 |
#include "x86/mathops.h" |
| 30 | 30 |
|
| 31 |
-#elif defined(ARCH_ARM) |
|
| 31 |
+#elif ARCH_ARM |
|
| 32 | 32 |
|
| 33 | 33 |
#include "arm/mathops.h" |
| 34 | 34 |
|
| 35 |
-#elif defined(ARCH_PPC) |
|
| 35 |
+#elif ARCH_PPC |
|
| 36 | 36 |
|
| 37 | 37 |
#include "ppc/mathops.h" |
| 38 | 38 |
|
| 39 |
-#elif defined(ARCH_BFIN) |
|
| 39 |
+#elif ARCH_BFIN |
|
| 40 | 40 |
|
| 41 | 41 |
#include "bfin/mathops.h" |
| 42 | 42 |
|
| ... | ... |
@@ -303,7 +303,7 @@ static int mpeg_decode_mb(MpegEncContext *s, |
| 303 | 303 |
}else |
| 304 | 304 |
memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ |
| 305 | 305 |
s->mb_intra = 1; |
| 306 |
-#ifdef CONFIG_XVMC |
|
| 306 |
+#if CONFIG_XVMC |
|
| 307 | 307 |
//if 1, we memcpy blocks in xvmcvideo |
| 308 | 308 |
if(s->avctx->xvmc_acceleration > 1){
|
| 309 | 309 |
XVMC_pack_pblocks(s,-1);//inter are always full blocks |
| ... | ... |
@@ -516,7 +516,7 @@ static int mpeg_decode_mb(MpegEncContext *s, |
| 516 | 516 |
return -1; |
| 517 | 517 |
} |
| 518 | 518 |
|
| 519 |
-#ifdef CONFIG_XVMC |
|
| 519 |
+#if CONFIG_XVMC |
|
| 520 | 520 |
//if 1, we memcpy blocks in xvmcvideo |
| 521 | 521 |
if(s->avctx->xvmc_acceleration > 1){
|
| 522 | 522 |
XVMC_pack_pblocks(s,cbp); |
| ... | ... |
@@ -1644,7 +1644,7 @@ static int mpeg_field_start(MpegEncContext *s){
|
| 1644 | 1644 |
} |
| 1645 | 1645 |
} |
| 1646 | 1646 |
} |
| 1647 |
-#ifdef CONFIG_XVMC |
|
| 1647 |
+#if CONFIG_XVMC |
|
| 1648 | 1648 |
// MPV_frame_start will call this function too, |
| 1649 | 1649 |
// but we need to call it on every field |
| 1650 | 1650 |
if(s->avctx->xvmc_acceleration) |
| ... | ... |
@@ -1735,7 +1735,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, |
| 1735 | 1735 |
} |
| 1736 | 1736 |
|
| 1737 | 1737 |
for(;;) {
|
| 1738 |
-#ifdef CONFIG_XVMC |
|
| 1738 |
+#if CONFIG_XVMC |
|
| 1739 | 1739 |
//If 1, we memcpy blocks in xvmcvideo. |
| 1740 | 1740 |
if(s->avctx->xvmc_acceleration > 1) |
| 1741 | 1741 |
XVMC_init_block(s);//set s->block |
| ... | ... |
@@ -1917,7 +1917,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) |
| 1917 | 1917 |
if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) |
| 1918 | 1918 |
return 0; |
| 1919 | 1919 |
|
| 1920 |
-#ifdef CONFIG_XVMC |
|
| 1920 |
+#if CONFIG_XVMC |
|
| 1921 | 1921 |
if(s->avctx->xvmc_acceleration) |
| 1922 | 1922 |
XVMC_field_end(s); |
| 1923 | 1923 |
#endif |
| ... | ... |
@@ -2473,7 +2473,7 @@ AVCodec mpegvideo_decoder = {
|
| 2473 | 2473 |
.long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
|
| 2474 | 2474 |
}; |
| 2475 | 2475 |
|
| 2476 |
-#ifdef CONFIG_XVMC |
|
| 2476 |
+#if CONFIG_XVMC |
|
| 2477 | 2477 |
static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
|
| 2478 | 2478 |
Mpeg1Context *s; |
| 2479 | 2479 |
|
| ... | ... |
@@ -36,7 +36,7 @@ |
| 36 | 36 |
|
| 37 | 37 |
/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg |
| 38 | 38 |
audio decoder */ |
| 39 |
-#ifdef CONFIG_MPEGAUDIO_HP |
|
| 39 |
+#if CONFIG_MPEGAUDIO_HP |
|
| 40 | 40 |
# define USE_HIGHPRECISION |
| 41 | 41 |
#endif |
| 42 | 42 |
|
| ... | ... |
@@ -2322,7 +2322,7 @@ static void flush(AVCodecContext *avctx){
|
| 2322 | 2322 |
s->last_buf_size= 0; |
| 2323 | 2323 |
} |
| 2324 | 2324 |
|
| 2325 |
-#ifdef CONFIG_MP3ADU_DECODER |
|
| 2325 |
+#if CONFIG_MP3ADU_DECODER |
|
| 2326 | 2326 |
static int decode_frame_adu(AVCodecContext * avctx, |
| 2327 | 2327 |
void *data, int *data_size, |
| 2328 | 2328 |
const uint8_t * buf, int buf_size) |
| ... | ... |
@@ -2372,7 +2372,7 @@ static int decode_frame_adu(AVCodecContext * avctx, |
| 2372 | 2372 |
} |
| 2373 | 2373 |
#endif /* CONFIG_MP3ADU_DECODER */ |
| 2374 | 2374 |
|
| 2375 |
-#ifdef CONFIG_MP3ON4_DECODER |
|
| 2375 |
+#if CONFIG_MP3ON4_DECODER |
|
| 2376 | 2376 |
|
| 2377 | 2377 |
/** |
| 2378 | 2378 |
* Context for MP3On4 decoder |
| ... | ... |
@@ -2534,7 +2534,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, |
| 2534 | 2534 |
} |
| 2535 | 2535 |
#endif /* CONFIG_MP3ON4_DECODER */ |
| 2536 | 2536 |
|
| 2537 |
-#ifdef CONFIG_MP1_DECODER |
|
| 2537 |
+#if CONFIG_MP1_DECODER |
|
| 2538 | 2538 |
AVCodec mp1_decoder = |
| 2539 | 2539 |
{
|
| 2540 | 2540 |
"mp1", |
| ... | ... |
@@ -2550,7 +2550,7 @@ AVCodec mp1_decoder = |
| 2550 | 2550 |
.long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
|
| 2551 | 2551 |
}; |
| 2552 | 2552 |
#endif |
| 2553 |
-#ifdef CONFIG_MP2_DECODER |
|
| 2553 |
+#if CONFIG_MP2_DECODER |
|
| 2554 | 2554 |
AVCodec mp2_decoder = |
| 2555 | 2555 |
{
|
| 2556 | 2556 |
"mp2", |
| ... | ... |
@@ -2566,7 +2566,7 @@ AVCodec mp2_decoder = |
| 2566 | 2566 |
.long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
|
| 2567 | 2567 |
}; |
| 2568 | 2568 |
#endif |
| 2569 |
-#ifdef CONFIG_MP3_DECODER |
|
| 2569 |
+#if CONFIG_MP3_DECODER |
|
| 2570 | 2570 |
AVCodec mp3_decoder = |
| 2571 | 2571 |
{
|
| 2572 | 2572 |
"mp3", |
| ... | ... |
@@ -2582,7 +2582,7 @@ AVCodec mp3_decoder = |
| 2582 | 2582 |
.long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
|
| 2583 | 2583 |
}; |
| 2584 | 2584 |
#endif |
| 2585 |
-#ifdef CONFIG_MP3ADU_DECODER |
|
| 2585 |
+#if CONFIG_MP3ADU_DECODER |
|
| 2586 | 2586 |
AVCodec mp3adu_decoder = |
| 2587 | 2587 |
{
|
| 2588 | 2588 |
"mp3adu", |
| ... | ... |
@@ -2598,7 +2598,7 @@ AVCodec mp3adu_decoder = |
| 2598 | 2598 |
.long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
|
| 2599 | 2599 |
}; |
| 2600 | 2600 |
#endif |
| 2601 |
-#ifdef CONFIG_MP3ON4_DECODER |
|
| 2601 |
+#if CONFIG_MP3ON4_DECODER |
|
| 2602 | 2602 |
AVCodec mp3on4_decoder = |
| 2603 | 2603 |
{
|
| 2604 | 2604 |
"mp3on4", |
| ... | ... |
@@ -121,19 +121,19 @@ int ff_dct_common_init(MpegEncContext *s) |
| 121 | 121 |
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact; |
| 122 | 122 |
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c; |
| 123 | 123 |
|
| 124 |
-#if defined(HAVE_MMX) |
|
| 124 |
+#if HAVE_MMX |
|
| 125 | 125 |
MPV_common_init_mmx(s); |
| 126 |
-#elif defined(ARCH_ALPHA) |
|
| 126 |
+#elif ARCH_ALPHA |
|
| 127 | 127 |
MPV_common_init_axp(s); |
| 128 |
-#elif defined(CONFIG_MLIB) |
|
| 128 |
+#elif CONFIG_MLIB |
|
| 129 | 129 |
MPV_common_init_mlib(s); |
| 130 |
-#elif defined(HAVE_MMI) |
|
| 130 |
+#elif HAVE_MMI |
|
| 131 | 131 |
MPV_common_init_mmi(s); |
| 132 |
-#elif defined(ARCH_ARM) |
|
| 132 |
+#elif ARCH_ARM |
|
| 133 | 133 |
MPV_common_init_arm(s); |
| 134 |
-#elif defined(HAVE_ALTIVEC) |
|
| 134 |
+#elif HAVE_ALTIVEC |
|
| 135 | 135 |
MPV_common_init_altivec(s); |
| 136 |
-#elif defined(ARCH_BFIN) |
|
| 136 |
+#elif ARCH_BFIN |
|
| 137 | 137 |
MPV_common_init_bfin(s); |
| 138 | 138 |
#endif |
| 139 | 139 |
|
| ... | ... |
@@ -939,7 +939,7 @@ alloc: |
| 939 | 939 |
update_noise_reduction(s); |
| 940 | 940 |
} |
| 941 | 941 |
|
| 942 |
-#ifdef CONFIG_XVMC |
|
| 942 |
+#if CONFIG_XVMC |
|
| 943 | 943 |
if(s->avctx->xvmc_acceleration) |
| 944 | 944 |
return XVMC_field_start(s, avctx); |
| 945 | 945 |
#endif |
| ... | ... |
@@ -951,7 +951,7 @@ void MPV_frame_end(MpegEncContext *s) |
| 951 | 951 |
{
|
| 952 | 952 |
int i; |
| 953 | 953 |
/* draw edge for correct motion prediction if outside */ |
| 954 |
-#ifdef CONFIG_XVMC |
|
| 954 |
+#if CONFIG_XVMC |
|
| 955 | 955 |
//just to make sure that all data is rendered. |
| 956 | 956 |
if(s->avctx->xvmc_acceleration){
|
| 957 | 957 |
XVMC_field_end(s); |
| ... | ... |
@@ -1736,7 +1736,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], |
| 1736 | 1736 |
{
|
| 1737 | 1737 |
int mb_x, mb_y; |
| 1738 | 1738 |
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; |
| 1739 |
-#ifdef CONFIG_XVMC |
|
| 1739 |
+#if CONFIG_XVMC |
|
| 1740 | 1740 |
if(s->avctx->xvmc_acceleration){
|
| 1741 | 1741 |
XVMC_decode_mb(s);//xvmc uses pblocks |
| 1742 | 1742 |
return; |
| ... | ... |
@@ -1974,7 +1974,7 @@ skip_idct: |
| 1974 | 1974 |
} |
| 1975 | 1975 |
|
| 1976 | 1976 |
void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
|
| 1977 |
-#ifndef CONFIG_SMALL |
|
| 1977 |
+#if !CONFIG_SMALL |
|
| 1978 | 1978 |
if(s->out_format == FMT_MPEG1) {
|
| 1979 | 1979 |
if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1); |
| 1980 | 1980 |
else MPV_decode_mb_internal(s, block, 0, 1); |
| ... | ... |
@@ -371,7 +371,7 @@ void mpeg_motion(MpegEncContext *s, |
| 371 | 371 |
uint8_t **ref_picture, op_pixels_func (*pix_op)[4], |
| 372 | 372 |
int motion_x, int motion_y, int h) |
| 373 | 373 |
{
|
| 374 |
-#ifndef CONFIG_SMALL |
|
| 374 |
+#if !CONFIG_SMALL |
|
| 375 | 375 |
if(s->out_format == FMT_MPEG1) |
| 376 | 376 |
mpeg_motion_internal(s, dest_y, dest_cb, dest_cr, field_based, |
| 377 | 377 |
bottom_field, field_select, ref_picture, pix_op, |
| ... | ... |
@@ -888,7 +888,7 @@ static inline void MPV_motion(MpegEncContext *s, |
| 888 | 888 |
op_pixels_func (*pix_op)[4], |
| 889 | 889 |
qpel_mc_func (*qpix_op)[16]) |
| 890 | 890 |
{
|
| 891 |
-#ifndef CONFIG_SMALL |
|
| 891 |
+#if !CONFIG_SMALL |
|
| 892 | 892 |
if(s->out_format == FMT_MPEG1) |
| 893 | 893 |
MPV_motion_internal(s, dest_y, dest_cb, dest_cr, dir, |
| 894 | 894 |
ref_picture, pix_op, qpix_op, 1); |
| ... | ... |
@@ -62,7 +62,7 @@ static uint32_t v2_dc_chroma_table[512][2]; |
| 62 | 62 |
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr); |
| 63 | 63 |
static void init_h263_dc_for_msmpeg4(void); |
| 64 | 64 |
static inline void msmpeg4_memsetw(short *tab, int val, int n); |
| 65 |
-#ifdef CONFIG_ENCODERS |
|
| 65 |
+#if CONFIG_ENCODERS |
|
| 66 | 66 |
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val); |
| 67 | 67 |
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra); |
| 68 | 68 |
#endif //CONFIG_ENCODERS |
| ... | ... |
@@ -79,7 +79,7 @@ int frame_count = 0; |
| 79 | 79 |
|
| 80 | 80 |
#include "msmpeg4data.h" |
| 81 | 81 |
|
| 82 |
-#ifdef CONFIG_ENCODERS //strangely gcc includes this even if it is not references |
|
| 82 |
+#if CONFIG_ENCODERS //strangely gcc includes this even if it is not referenced |
|
| 83 | 83 |
static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2]; |
| 84 | 84 |
#endif //CONFIG_ENCODERS |
| 85 | 85 |
|
| ... | ... |
@@ -109,7 +109,7 @@ static void common_init(MpegEncContext * s) |
| 109 | 109 |
s->y_dc_scale_table= wmv1_y_dc_scale_table; |
| 110 | 110 |
s->c_dc_scale_table= wmv1_c_dc_scale_table; |
| 111 | 111 |
break; |
| 112 |
-#if defined(CONFIG_WMV3_DECODER)||defined(CONFIG_VC1_DECODER) |
|
| 112 |
+#if CONFIG_WMV3_DECODER || CONFIG_VC1_DECODER |
|
| 113 | 113 |
case 6: |
| 114 | 114 |
s->y_dc_scale_table= wmv3_dc_scale_table; |
| 115 | 115 |
s->c_dc_scale_table= wmv3_dc_scale_table; |
| ... | ... |
@@ -134,7 +134,7 @@ static void common_init(MpegEncContext * s) |
| 134 | 134 |
} |
| 135 | 135 |
} |
| 136 | 136 |
|
| 137 |
-#ifdef CONFIG_ENCODERS |
|
| 137 |
+#if CONFIG_ENCODERS |
|
| 138 | 138 |
|
| 139 | 139 |
/* build the table which associate a (x,y) motion vector to a vlc */ |
| 140 | 140 |
static void init_mv_table(MVTable *tab) |
| ... | ... |
@@ -411,7 +411,7 @@ int ff_msmpeg4_coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block |
| 411 | 411 |
return pred; |
| 412 | 412 |
} |
| 413 | 413 |
|
| 414 |
-#ifdef CONFIG_ENCODERS |
|
| 414 |
+#if CONFIG_ENCODERS |
|
| 415 | 415 |
|
| 416 | 416 |
void ff_msmpeg4_encode_motion(MpegEncContext * s, |
| 417 | 417 |
int mx, int my) |
| ... | ... |
@@ -653,7 +653,7 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n, |
| 653 | 653 |
necessitate to modify mpegvideo.c. The problem comes from the |
| 654 | 654 |
fact they decided to store the quantized DC (which would lead |
| 655 | 655 |
to problems if Q could vary !) */ |
| 656 |
-#if (defined(ARCH_X86)) && !defined PIC |
|
| 656 |
+#if ARCH_X86 && !defined PIC |
|
| 657 | 657 |
__asm__ volatile( |
| 658 | 658 |
"movl %3, %%eax \n\t" |
| 659 | 659 |
"shrl $1, %%eax \n\t" |
| ... | ... |
@@ -673,7 +673,7 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n, |
| 673 | 673 |
: "%eax", "%edx" |
| 674 | 674 |
); |
| 675 | 675 |
#else |
| 676 |
- /* #elif defined (ARCH_ALPHA) */ |
|
| 676 |
+ /* #elif ARCH_ALPHA */ |
|
| 677 | 677 |
/* Divisions are extremely costly on Alpha; optimize the most |
| 678 | 678 |
common case. But they are costly everywhere... |
| 679 | 679 |
*/ |
| ... | ... |
@@ -1362,7 +1362,7 @@ static inline void msmpeg4_memsetw(short *tab, int val, int n) |
| 1362 | 1362 |
tab[i] = val; |
| 1363 | 1363 |
} |
| 1364 | 1364 |
|
| 1365 |
-#ifdef CONFIG_ENCODERS |
|
| 1365 |
+#if CONFIG_ENCODERS |
|
| 1366 | 1366 |
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val) |
| 1367 | 1367 |
{
|
| 1368 | 1368 |
int range, bit_size, sign, code, bits; |
| ... | ... |
@@ -267,7 +267,7 @@ static const AVOption options[]={
|
| 267 | 267 |
{"vsad", "sum of absolute vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSAD, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
| 268 | 268 |
{"vsse","sum of squared vertical differences", 0, FF_OPT_TYPE_CONST, FF_CMP_VSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
| 269 | 269 |
{"nsse", "noise preserving sum of squared differences", 0, FF_OPT_TYPE_CONST, FF_CMP_NSSE, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
| 270 |
-#ifdef CONFIG_SNOW_ENCODER |
|
| 270 |
+#if CONFIG_SNOW_ENCODER |
|
| 271 | 271 |
{"w53", "5/3 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W53, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
| 272 | 272 |
{"w97", "9/7 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, FF_CMP_W97, INT_MIN, INT_MAX, V|E, "cmp_func"},
|
| 273 | 273 |
#endif |
| ... | ... |
@@ -507,7 +507,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, |
| 507 | 507 |
return src - buf; |
| 508 | 508 |
} |
| 509 | 509 |
|
| 510 |
-#ifdef CONFIG_ENCODERS |
|
| 510 |
+#if CONFIG_ENCODERS |
|
| 511 | 511 |
#define PCM_ENCODER(id,sample_fmt_,name,long_name_) \ |
| 512 | 512 |
AVCodec name ## _encoder = { \
|
| 513 | 513 |
#name, \ |
| ... | ... |
@@ -525,7 +525,7 @@ AVCodec name ## _encoder = { \
|
| 525 | 525 |
#define PCM_ENCODER(id,sample_fmt_,name,long_name_) |
| 526 | 526 |
#endif |
| 527 | 527 |
|
| 528 |
-#ifdef CONFIG_DECODERS |
|
| 528 |
+#if CONFIG_DECODERS |
|
| 529 | 529 |
#define PCM_DECODER(id,sample_fmt_,name,long_name_) \ |
| 530 | 530 |
AVCodec name ## _decoder = { \
|
| 531 | 531 |
#name, \ |
| ... | ... |
@@ -354,7 +354,7 @@ static int pam_probe(AVProbeData *pd) |
| 354 | 354 |
#endif |
| 355 | 355 |
|
| 356 | 356 |
|
| 357 |
-#ifdef CONFIG_PGM_ENCODER |
|
| 357 |
+#if CONFIG_PGM_ENCODER |
|
| 358 | 358 |
AVCodec pgm_encoder = {
|
| 359 | 359 |
"pgm", |
| 360 | 360 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -369,7 +369,7 @@ AVCodec pgm_encoder = {
|
| 369 | 369 |
}; |
| 370 | 370 |
#endif // CONFIG_PGM_ENCODER |
| 371 | 371 |
|
| 372 |
-#ifdef CONFIG_PGMYUV_ENCODER |
|
| 372 |
+#if CONFIG_PGMYUV_ENCODER |
|
| 373 | 373 |
AVCodec pgmyuv_encoder = {
|
| 374 | 374 |
"pgmyuv", |
| 375 | 375 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -384,7 +384,7 @@ AVCodec pgmyuv_encoder = {
|
| 384 | 384 |
}; |
| 385 | 385 |
#endif // CONFIG_PGMYUV_ENCODER |
| 386 | 386 |
|
| 387 |
-#ifdef CONFIG_PPM_ENCODER |
|
| 387 |
+#if CONFIG_PPM_ENCODER |
|
| 388 | 388 |
AVCodec ppm_encoder = {
|
| 389 | 389 |
"ppm", |
| 390 | 390 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -399,7 +399,7 @@ AVCodec ppm_encoder = {
|
| 399 | 399 |
}; |
| 400 | 400 |
#endif // CONFIG_PPM_ENCODER |
| 401 | 401 |
|
| 402 |
-#ifdef CONFIG_PBM_ENCODER |
|
| 402 |
+#if CONFIG_PBM_ENCODER |
|
| 403 | 403 |
AVCodec pbm_encoder = {
|
| 404 | 404 |
"pbm", |
| 405 | 405 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -414,7 +414,7 @@ AVCodec pbm_encoder = {
|
| 414 | 414 |
}; |
| 415 | 415 |
#endif // CONFIG_PBM_ENCODER |
| 416 | 416 |
|
| 417 |
-#ifdef CONFIG_PAM_ENCODER |
|
| 417 |
+#if CONFIG_PAM_ENCODER |
|
| 418 | 418 |
AVCodec pam_encoder = {
|
| 419 | 419 |
"pam", |
| 420 | 420 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -24,7 +24,7 @@ |
| 24 | 24 |
|
| 25 | 25 |
#include "dsputil_ppc.h" |
| 26 | 26 |
|
| 27 |
-#ifdef HAVE_ALTIVEC |
|
| 27 |
+#if HAVE_ALTIVEC |
|
| 28 | 28 |
#include "dsputil_altivec.h" |
| 29 | 29 |
|
| 30 | 30 |
void fdct_altivec(int16_t *block); |
| ... | ... |
@@ -48,7 +48,7 @@ int mm_flags = 0; |
| 48 | 48 |
int mm_support(void) |
| 49 | 49 |
{
|
| 50 | 50 |
int result = 0; |
| 51 |
-#ifdef HAVE_ALTIVEC |
|
| 51 |
+#if HAVE_ALTIVEC |
|
| 52 | 52 |
if (has_altivec()) {
|
| 53 | 53 |
result |= FF_MM_ALTIVEC; |
| 54 | 54 |
} |
| ... | ... |
@@ -56,7 +56,7 @@ int mm_support(void) |
| 56 | 56 |
return result; |
| 57 | 57 |
} |
| 58 | 58 |
|
| 59 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 59 |
+#if CONFIG_POWERPC_PERF |
|
| 60 | 60 |
unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total]; |
| 61 | 61 |
/* list below must match enum in dsputil_ppc.h */ |
| 62 | 62 |
static unsigned char* perfname[] = {
|
| ... | ... |
@@ -91,7 +91,7 @@ static unsigned char* perfname[] = {
|
| 91 | 91 |
#include <stdio.h> |
| 92 | 92 |
#endif |
| 93 | 93 |
|
| 94 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 94 |
+#if CONFIG_POWERPC_PERF |
|
| 95 | 95 |
void powerpc_display_perf_report(void) |
| 96 | 96 |
{
|
| 97 | 97 |
int i, j; |
| ... | ... |
@@ -165,7 +165,7 @@ POWERPC_PERF_STOP_COUNT(powerpc_clear_blocks_dcbz32, 1); |
| 165 | 165 |
|
| 166 | 166 |
/* same as above, when dcbzl clear a whole 128B cache line |
| 167 | 167 |
i.e. the PPC970 aka G5 */ |
| 168 |
-#ifdef HAVE_DCBZL |
|
| 168 |
+#if HAVE_DCBZL |
|
| 169 | 169 |
void clear_blocks_dcbz128_ppc(DCTELEM *blocks) |
| 170 | 170 |
{
|
| 171 | 171 |
POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz128, 1); |
| ... | ... |
@@ -195,7 +195,7 @@ void clear_blocks_dcbz128_ppc(DCTELEM *blocks) |
| 195 | 195 |
} |
| 196 | 196 |
#endif |
| 197 | 197 |
|
| 198 |
-#ifdef HAVE_DCBZL |
|
| 198 |
+#if HAVE_DCBZL |
|
| 199 | 199 |
/* check dcbz report how many bytes are set to 0 by dcbz */ |
| 200 | 200 |
/* update 24/06/2003 : replace dcbz by dcbzl to get |
| 201 | 201 |
the intended effect (Apple "fixed" dcbz) |
| ... | ... |
@@ -261,7 +261,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) |
| 261 | 261 |
break; |
| 262 | 262 |
} |
| 263 | 263 |
|
| 264 |
-#ifdef HAVE_ALTIVEC |
|
| 264 |
+#if HAVE_ALTIVEC |
|
| 265 | 265 |
if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx); |
| 266 | 266 |
|
| 267 | 267 |
if (has_altivec()) {
|
| ... | ... |
@@ -275,7 +275,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) |
| 275 | 275 |
int_init_altivec(c, avctx); |
| 276 | 276 |
c->gmc1 = gmc1_altivec; |
| 277 | 277 |
|
| 278 |
-#ifdef CONFIG_ENCODERS |
|
| 278 |
+#if CONFIG_ENCODERS |
|
| 279 | 279 |
if (avctx->dct_algo == FF_DCT_AUTO || |
| 280 | 280 |
avctx->dct_algo == FF_DCT_ALTIVEC) {
|
| 281 | 281 |
c->fdct = fdct_altivec; |
| ... | ... |
@@ -291,7 +291,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) |
| 291 | 291 |
} |
| 292 | 292 |
} |
| 293 | 293 |
|
| 294 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 294 |
+#if CONFIG_POWERPC_PERF |
|
| 295 | 295 |
{
|
| 296 | 296 |
int i, j; |
| 297 | 297 |
for (i = 0 ; i < powerpc_perf_total ; i++) {
|
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
#ifndef AVCODEC_PPC_DSPUTIL_PPC_H |
| 22 | 22 |
#define AVCODEC_PPC_DSPUTIL_PPC_H |
| 23 | 23 |
|
| 24 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 24 |
+#if CONFIG_POWERPC_PERF |
|
| 25 | 25 |
void powerpc_display_perf_report(void); |
| 26 | 26 |
/* the 604* have 2, the G3* have 4, the G4s have 6, |
| 27 | 27 |
and the G5 are completely different (they MUST use |
| ... | ... |
@@ -68,7 +68,7 @@ enum powerpc_data_index {
|
| 68 | 68 |
}; |
| 69 | 69 |
extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total]; |
| 70 | 70 |
|
| 71 |
-#ifndef HAVE_PPC64 |
|
| 71 |
+#if !HAVE_PPC64 |
|
| 72 | 72 |
#define POWERP_PMC_DATATYPE unsigned long |
| 73 | 73 |
#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
|
| 74 | 74 |
#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
|
| ... | ... |
@@ -161,7 +161,7 @@ void idct_put_altivec(uint8_t* dest, int stride, vec_s16* block) |
| 161 | 161 |
POWERPC_PERF_DECLARE(altivec_idct_put_num, 1); |
| 162 | 162 |
vec_u8 tmp; |
| 163 | 163 |
|
| 164 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 164 |
+#if CONFIG_POWERPC_PERF |
|
| 165 | 165 |
POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1); |
| 166 | 166 |
#endif |
| 167 | 167 |
IDCT |
| ... | ... |
@@ -192,7 +192,7 @@ POWERPC_PERF_DECLARE(altivec_idct_add_num, 1); |
| 192 | 192 |
vec_u8 perm1; |
| 193 | 193 |
vec_u8 p0, p1, p; |
| 194 | 194 |
|
| 195 |
-#ifdef CONFIG_POWERPC_PERF |
|
| 195 |
+#if CONFIG_POWERPC_PERF |
|
| 196 | 196 |
POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1); |
| 197 | 197 |
#endif |
| 198 | 198 |
|
| ... | ... |
@@ -23,7 +23,7 @@ |
| 23 | 23 |
#ifndef AVCODEC_PPC_MATHOPS_H |
| 24 | 24 |
#define AVCODEC_PPC_MATHOPS_H |
| 25 | 25 |
|
| 26 |
-#if defined(ARCH_PPC_405) |
|
| 26 |
+#if ARCH_PPC_405 |
|
| 27 | 27 |
/* signed 16x16 -> 32 multiply add accumulate */ |
| 28 | 28 |
#define MAC16(rt, ra, rb) \ |
| 29 | 29 |
__asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
|
| ... | ... |
@@ -184,7 +184,7 @@ int ff_rate_control_init(MpegEncContext *s) |
| 184 | 184 |
|
| 185 | 185 |
//FIXME maybe move to end |
| 186 | 186 |
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {
|
| 187 |
-#ifdef CONFIG_LIBXVID |
|
| 187 |
+#if CONFIG_LIBXVID |
|
| 188 | 188 |
return ff_xvid_rate_control_init(s); |
| 189 | 189 |
#else |
| 190 | 190 |
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(MpegEncContext *s) |
| 260 | 260 |
ff_eval_free(rcc->rc_eq_eval); |
| 261 | 261 |
av_freep(&rcc->entry); |
| 262 | 262 |
|
| 263 |
-#ifdef CONFIG_LIBXVID |
|
| 263 |
+#if CONFIG_LIBXVID |
|
| 264 | 264 |
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) |
| 265 | 265 |
ff_xvid_rate_control_uninit(s); |
| 266 | 266 |
#endif |
| ... | ... |
@@ -678,7 +678,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) |
| 678 | 678 |
Picture * const pic= &s->current_picture; |
| 679 | 679 |
emms_c(); |
| 680 | 680 |
|
| 681 |
-#ifdef CONFIG_LIBXVID |
|
| 681 |
+#if CONFIG_LIBXVID |
|
| 682 | 682 |
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) |
| 683 | 683 |
return ff_xvid_rate_estimate_qscale(s, dry_run); |
| 684 | 684 |
#endif |
| ... | ... |
@@ -64,7 +64,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, |
| 64 | 64 |
*(uint32_t*)(p + 3*stride)= v; |
| 65 | 65 |
}else if(w==8){
|
| 66 | 66 |
//gcc can't optimize 64bit math on x86_32 |
| 67 |
-#ifdef HAVE_FAST_64BIT |
|
| 67 |
+#if HAVE_FAST_64BIT |
|
| 68 | 68 |
const uint64_t v= val*0x0100000001ULL; |
| 69 | 69 |
*(uint64_t*)(p + 0*stride)= v; |
| 70 | 70 |
if(h==1) return; |
| ... | ... |
@@ -230,7 +230,7 @@ int rv_decode_dc(MpegEncContext *s, int n) |
| 230 | 230 |
} |
| 231 | 231 |
|
| 232 | 232 |
|
| 233 |
-#if defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER) |
|
| 233 |
+#if CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER |
|
| 234 | 234 |
/* write RV 1.0 compatible frame header */ |
| 235 | 235 |
void rv10_encode_picture_header(MpegEncContext *s, int picture_number) |
| 236 | 236 |
{
|
| ... | ... |
@@ -304,7 +304,7 @@ static int get_num(GetBitContext *gb) |
| 304 | 304 |
} |
| 305 | 305 |
#endif |
| 306 | 306 |
|
| 307 |
-#endif /* defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER) */ |
|
| 307 |
+#endif /* CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER */ |
|
| 308 | 308 |
|
| 309 | 309 |
/* read RV 1.0 compatible frame header */ |
| 310 | 310 |
static int rv10_decode_picture_header(MpegEncContext *s) |
| ... | ... |
@@ -59,13 +59,13 @@ |
| 59 | 59 |
static inline void idctRowCondDC (DCTELEM * row) |
| 60 | 60 |
{
|
| 61 | 61 |
int a0, a1, a2, a3, b0, b1, b2, b3; |
| 62 |
-#ifdef HAVE_FAST_64BIT |
|
| 62 |
+#if HAVE_FAST_64BIT |
|
| 63 | 63 |
uint64_t temp; |
| 64 | 64 |
#else |
| 65 | 65 |
uint32_t temp; |
| 66 | 66 |
#endif |
| 67 | 67 |
|
| 68 |
-#ifdef HAVE_FAST_64BIT |
|
| 68 |
+#if HAVE_FAST_64BIT |
|
| 69 | 69 |
#ifdef WORDS_BIGENDIAN |
| 70 | 70 |
#define ROW0_MASK 0xffff000000000000LL |
| 71 | 71 |
#else |
| ... | ... |
@@ -127,7 +127,7 @@ static inline void idctRowCondDC (DCTELEM * row) |
| 127 | 127 |
b3 = MUL16(W7, row[1]); |
| 128 | 128 |
MAC16(b3, -W5, row[3]); |
| 129 | 129 |
|
| 130 |
-#ifdef HAVE_FAST_64BIT |
|
| 130 |
+#if HAVE_FAST_64BIT |
|
| 131 | 131 |
temp = ((uint64_t*)row)[1]; |
| 132 | 132 |
#else |
| 133 | 133 |
temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3]; |
| ... | ... |
@@ -125,7 +125,7 @@ void ff_snow_vertical_compose97i(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTE |
| 125 | 125 |
void ff_snow_horizontal_compose97i(IDWTELEM *b, int width); |
| 126 | 126 |
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); |
| 127 | 127 |
|
| 128 |
-#ifdef CONFIG_SNOW_ENCODER |
|
| 128 |
+#if CONFIG_SNOW_ENCODER |
|
| 129 | 129 |
int w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h); |
| 130 | 130 |
int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h); |
| 131 | 131 |
#else |
| ... | ... |
@@ -408,7 +408,7 @@ static int predictor_calc_error(int *k, int *state, int order, int error) |
| 408 | 408 |
return x; |
| 409 | 409 |
} |
| 410 | 410 |
|
| 411 |
-#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) |
|
| 411 |
+#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER |
|
| 412 | 412 |
// Heavily modified Levinson-Durbin algorithm which |
| 413 | 413 |
// copes better with quantization, and calculates the |
| 414 | 414 |
// actual whitened result as it goes. |
| ... | ... |
@@ -479,12 +479,12 @@ static void modified_levinson_durbin(int *window, int window_entries, |
| 479 | 479 |
|
| 480 | 480 |
av_free(state); |
| 481 | 481 |
} |
| 482 |
-#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */ |
|
| 482 |
+#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */ |
|
| 483 | 483 |
|
| 484 | 484 |
static const int samplerate_table[] = |
| 485 | 485 |
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
|
| 486 | 486 |
|
| 487 |
-#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) |
|
| 487 |
+#if CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER |
|
| 488 | 488 |
static inline int code_samplerate(int samplerate) |
| 489 | 489 |
{
|
| 490 | 490 |
switch (samplerate) |
| ... | ... |
@@ -747,9 +747,9 @@ static int sonic_encode_frame(AVCodecContext *avctx, |
| 747 | 747 |
flush_put_bits(&pb); |
| 748 | 748 |
return (put_bits_count(&pb)+7)/8; |
| 749 | 749 |
} |
| 750 |
-#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */ |
|
| 750 |
+#endif /* CONFIG_SONIC_ENCODER || CONFIG_SONIC_LS_ENCODER */ |
|
| 751 | 751 |
|
| 752 |
-#ifdef CONFIG_SONIC_DECODER |
|
| 752 |
+#if CONFIG_SONIC_DECODER |
|
| 753 | 753 |
static av_cold int sonic_decode_init(AVCodecContext *avctx) |
| 754 | 754 |
{
|
| 755 | 755 |
SonicContext *s = avctx->priv_data; |
| ... | ... |
@@ -936,7 +936,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, |
| 936 | 936 |
} |
| 937 | 937 |
#endif /* CONFIG_SONIC_DECODER */ |
| 938 | 938 |
|
| 939 |
-#ifdef CONFIG_SONIC_ENCODER |
|
| 939 |
+#if CONFIG_SONIC_ENCODER |
|
| 940 | 940 |
AVCodec sonic_encoder = {
|
| 941 | 941 |
"sonic", |
| 942 | 942 |
CODEC_TYPE_AUDIO, |
| ... | ... |
@@ -950,7 +950,7 @@ AVCodec sonic_encoder = {
|
| 950 | 950 |
}; |
| 951 | 951 |
#endif |
| 952 | 952 |
|
| 953 |
-#ifdef CONFIG_SONIC_LS_ENCODER |
|
| 953 |
+#if CONFIG_SONIC_LS_ENCODER |
|
| 954 | 954 |
AVCodec sonic_ls_encoder = {
|
| 955 | 955 |
"sonicls", |
| 956 | 956 |
CODEC_TYPE_AUDIO, |
| ... | ... |
@@ -964,7 +964,7 @@ AVCodec sonic_ls_encoder = {
|
| 964 | 964 |
}; |
| 965 | 965 |
#endif |
| 966 | 966 |
|
| 967 |
-#ifdef CONFIG_SONIC_DECODER |
|
| 967 |
+#if CONFIG_SONIC_DECODER |
|
| 968 | 968 |
AVCodec sonic_decoder = {
|
| 969 | 969 |
"sonic", |
| 970 | 970 |
CODEC_TYPE_AUDIO, |
| ... | ... |
@@ -40,7 +40,7 @@ |
| 40 | 40 |
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov |
| 41 | 41 |
*/ |
| 42 | 42 |
|
| 43 |
-#ifdef CONFIG_ZLIB |
|
| 43 |
+#if CONFIG_ZLIB |
|
| 44 | 44 |
#include <zlib.h> |
| 45 | 45 |
#endif |
| 46 | 46 |
|
| ... | ... |
@@ -849,7 +849,7 @@ static int svq3_decode_init(AVCodecContext *avctx) |
| 849 | 849 |
h->unknown_svq3_flag = get_bits1(&gb); |
| 850 | 850 |
avctx->has_b_frames = !s->low_delay; |
| 851 | 851 |
if (h->unknown_svq3_flag) {
|
| 852 |
-#ifdef CONFIG_ZLIB |
|
| 852 |
+#if CONFIG_ZLIB |
|
| 853 | 853 |
unsigned watermark_width = svq3_get_ue_golomb(&gb); |
| 854 | 854 |
unsigned watermark_height = svq3_get_ue_golomb(&gb); |
| 855 | 855 |
int u1 = svq3_get_ue_golomb(&gb); |
| ... | ... |
@@ -25,7 +25,7 @@ |
| 25 | 25 |
* @author Konstantin Shishkov |
| 26 | 26 |
*/ |
| 27 | 27 |
#include "avcodec.h" |
| 28 |
-#ifdef CONFIG_ZLIB |
|
| 28 |
+#if CONFIG_ZLIB |
|
| 29 | 29 |
#include <zlib.h> |
| 30 | 30 |
#endif |
| 31 | 31 |
#include "lzw.h" |
| ... | ... |
@@ -78,7 +78,7 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin |
| 78 | 78 |
int c, line, pixels, code; |
| 79 | 79 |
const uint8_t *ssrc = src; |
| 80 | 80 |
int width = s->width * s->bpp >> 3; |
| 81 |
-#ifdef CONFIG_ZLIB |
|
| 81 |
+#if CONFIG_ZLIB |
|
| 82 | 82 |
uint8_t *zbuf; unsigned long outlen; |
| 83 | 83 |
|
| 84 | 84 |
if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){
|
| ... | ... |
@@ -298,7 +298,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t * |
| 298 | 298 |
break; |
| 299 | 299 |
case TIFF_DEFLATE: |
| 300 | 300 |
case TIFF_ADOBE_DEFLATE: |
| 301 |
-#ifdef CONFIG_ZLIB |
|
| 301 |
+#if CONFIG_ZLIB |
|
| 302 | 302 |
break; |
| 303 | 303 |
#else |
| 304 | 304 |
av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n"); |
| ... | ... |
@@ -25,7 +25,7 @@ |
| 25 | 25 |
* @author Bartlomiej Wolowiec |
| 26 | 26 |
*/ |
| 27 | 27 |
#include "avcodec.h" |
| 28 |
-#ifdef CONFIG_ZLIB |
|
| 28 |
+#if CONFIG_ZLIB |
|
| 29 | 29 |
#include <zlib.h> |
| 30 | 30 |
#endif |
| 31 | 31 |
#include "bytestream.h" |
| ... | ... |
@@ -151,7 +151,7 @@ static int encode_strip(TiffEncoderContext * s, const int8_t * src, |
| 151 | 151 |
{
|
| 152 | 152 |
|
| 153 | 153 |
switch (compr) {
|
| 154 |
-#ifdef CONFIG_ZLIB |
|
| 154 |
+#if CONFIG_ZLIB |
|
| 155 | 155 |
case TIFF_DEFLATE: |
| 156 | 156 |
case TIFF_ADOBE_DEFLATE: |
| 157 | 157 |
{
|
| ... | ... |
@@ -229,7 +229,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf, |
| 229 | 229 |
s->compr = TIFF_RAW; |
| 230 | 230 |
} else if(avctx->compression_level == 2) {
|
| 231 | 231 |
s->compr = TIFF_LZW; |
| 232 |
-#ifdef CONFIG_ZLIB |
|
| 232 |
+#if CONFIG_ZLIB |
|
| 233 | 233 |
} else if ((avctx->compression_level >= 3)) {
|
| 234 | 234 |
s->compr = TIFF_DEFLATE; |
| 235 | 235 |
#endif |
| ... | ... |
@@ -315,7 +315,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf, |
| 315 | 315 |
} |
| 316 | 316 |
} |
| 317 | 317 |
|
| 318 |
-#ifdef CONFIG_ZLIB |
|
| 318 |
+#if CONFIG_ZLIB |
|
| 319 | 319 |
if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE) {
|
| 320 | 320 |
uint8_t *zbuf; |
| 321 | 321 |
int zlen, zn; |
| ... | ... |
@@ -40,7 +40,7 @@ |
| 40 | 40 |
#include <stdarg.h> |
| 41 | 41 |
#include <limits.h> |
| 42 | 42 |
#include <float.h> |
| 43 |
-#if !defined(HAVE_MKSTEMP) |
|
| 43 |
+#if !HAVE_MKSTEMP |
|
| 44 | 44 |
#include <fcntl.h> |
| 45 | 45 |
#endif |
| 46 | 46 |
|
| ... | ... |
@@ -251,7 +251,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
|
| 251 | 251 |
//we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the |
| 252 | 252 |
//picture size unneccessarily in some cases. The solution here is not |
| 253 | 253 |
//pretty and better ideas are welcome! |
| 254 |
-#ifdef HAVE_MMX |
|
| 254 |
+#if HAVE_MMX |
|
| 255 | 255 |
if(s->codec_id == CODEC_ID_SVQ1) |
| 256 | 256 |
stride_align[i]= 16; |
| 257 | 257 |
else |
| ... | ... |
@@ -900,7 +900,7 @@ int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {
|
| 900 | 900 |
} |
| 901 | 901 |
} |
| 902 | 902 |
|
| 903 |
-#if !defined(HAVE_THREADS) |
|
| 903 |
+#if !HAVE_THREADS |
|
| 904 | 904 |
int avcodec_thread_init(AVCodecContext *s, int thread_count){
|
| 905 | 905 |
return -1; |
| 906 | 906 |
} |
| ... | ... |
@@ -927,7 +927,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v) |
| 927 | 927 |
* and opened file name in **filename. */ |
| 928 | 928 |
int av_tempfile(char *prefix, char **filename) {
|
| 929 | 929 |
int fd=-1; |
| 930 |
-#if !defined(HAVE_MKSTEMP) |
|
| 930 |
+#if !HAVE_MKSTEMP |
|
| 931 | 931 |
*filename = tempnam(".", prefix);
|
| 932 | 932 |
#else |
| 933 | 933 |
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ |
| ... | ... |
@@ -938,7 +938,7 @@ int av_tempfile(char *prefix, char **filename) {
|
| 938 | 938 |
av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n"); |
| 939 | 939 |
return -1; |
| 940 | 940 |
} |
| 941 |
-#if !defined(HAVE_MKSTEMP) |
|
| 941 |
+#if !HAVE_MKSTEMP |
|
| 942 | 942 |
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444); |
| 943 | 943 |
#else |
| 944 | 944 |
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); |
| ... | ... |
@@ -32,6 +32,7 @@ |
| 32 | 32 |
|
| 33 | 33 |
/* Disable the encoder. */ |
| 34 | 34 |
#undef CONFIG_VCR1_ENCODER |
| 35 |
+#define CONFIG_VCR1_ENCODER 0 |
|
| 35 | 36 |
|
| 36 | 37 |
typedef struct VCR1Context{
|
| 37 | 38 |
AVCodecContext *avctx; |
| ... | ... |
@@ -116,7 +117,7 @@ static int decode_frame(AVCodecContext *avctx, |
| 116 | 116 |
return buf_size; |
| 117 | 117 |
} |
| 118 | 118 |
|
| 119 |
-#ifdef CONFIG_VCR1_ENCODER |
|
| 119 |
+#if CONFIG_VCR1_ENCODER |
|
| 120 | 120 |
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
| 121 | 121 |
VCR1Context * const a = avctx->priv_data; |
| 122 | 122 |
AVFrame *pict = data; |
| ... | ... |
@@ -156,7 +157,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
| 156 | 156 |
return 0; |
| 157 | 157 |
} |
| 158 | 158 |
|
| 159 |
-#ifdef CONFIG_VCR1_ENCODER |
|
| 159 |
+#if CONFIG_VCR1_ENCODER |
|
| 160 | 160 |
static av_cold int encode_init(AVCodecContext *avctx){
|
| 161 | 161 |
|
| 162 | 162 |
common_init(avctx); |
| ... | ... |
@@ -178,7 +179,7 @@ AVCodec vcr1_decoder = {
|
| 178 | 178 |
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
| 179 | 179 |
}; |
| 180 | 180 |
|
| 181 |
-#ifdef CONFIG_VCR1_ENCODER |
|
| 181 |
+#if CONFIG_VCR1_ENCODER |
|
| 182 | 182 |
AVCodec vcr1_encoder = {
|
| 183 | 183 |
"vcr1", |
| 184 | 184 |
CODEC_TYPE_VIDEO, |
| ... | ... |
@@ -2021,7 +2021,7 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb) |
| 2021 | 2021 |
return 0; |
| 2022 | 2022 |
} |
| 2023 | 2023 |
|
| 2024 |
-#ifdef CONFIG_THEORA_DECODER |
|
| 2024 |
+#if CONFIG_THEORA_DECODER |
|
| 2025 | 2025 |
static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) |
| 2026 | 2026 |
{
|
| 2027 | 2027 |
Vp3DecodeContext *s = avctx->priv_data; |
| ... | ... |
@@ -44,7 +44,7 @@ int mm_support(void) |
| 44 | 44 |
int max_std_level, max_ext_level, std_caps=0, ext_caps=0; |
| 45 | 45 |
x86_reg a, c; |
| 46 | 46 |
|
| 47 |
-#ifdef ARCH_X86_64 |
|
| 47 |
+#if ARCH_X86_64 |
|
| 48 | 48 |
#define PUSHF "pushfq\n\t" |
| 49 | 49 |
#define POPF "popfq\n\t" |
| 50 | 50 |
#else |
| ... | ... |
@@ -83,7 +83,7 @@ int mm_support(void) |
| 83 | 83 |
rval |= FF_MM_MMX; |
| 84 | 84 |
if (std_caps & (1<<25)) |
| 85 | 85 |
rval |= FF_MM_MMXEXT |
| 86 |
-#ifdef HAVE_SSE |
|
| 86 |
+#if HAVE_SSE |
|
| 87 | 87 |
| FF_MM_SSE; |
| 88 | 88 |
if (std_caps & (1<<26)) |
| 89 | 89 |
rval |= FF_MM_SSE2; |
| ... | ... |
@@ -880,7 +880,7 @@ static void add_png_paeth_prediction_##cpu(uint8_t *dst, uint8_t *src, uint8_t * |
| 880 | 880 |
"pabsw %%mm5, %%mm5 \n" |
| 881 | 881 |
|
| 882 | 882 |
PAETH(mmx2, ABS3_MMX2) |
| 883 |
-#ifdef HAVE_SSSE3 |
|
| 883 |
+#if HAVE_SSSE3 |
|
| 884 | 884 |
PAETH(ssse3, ABS3_SSSE3) |
| 885 | 885 |
#endif |
| 886 | 886 |
|
| ... | ... |
@@ -1765,7 +1765,7 @@ void ff_mmxext_idct(DCTELEM *block); |
| 1765 | 1765 |
|
| 1766 | 1766 |
/* XXX: those functions should be suppressed ASAP when all IDCTs are |
| 1767 | 1767 |
converted */ |
| 1768 |
-#ifdef CONFIG_GPL |
|
| 1768 |
+#if CONFIG_GPL |
|
| 1769 | 1769 |
static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block) |
| 1770 | 1770 |
{
|
| 1771 | 1771 |
ff_mmx_idct (block); |
| ... | ... |
@@ -2147,7 +2147,7 @@ static void vector_fmul_add_add_sse(float *dst, const float *src0, const float * |
| 2147 | 2147 |
|
| 2148 | 2148 |
static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float *src1, |
| 2149 | 2149 |
const float *win, float add_bias, int len){
|
| 2150 |
-#ifdef HAVE_6REGS |
|
| 2150 |
+#if HAVE_6REGS |
|
| 2151 | 2151 |
if(add_bias == 0){
|
| 2152 | 2152 |
x86_reg i = -len*4; |
| 2153 | 2153 |
x86_reg j = len*4-8; |
| ... | ... |
@@ -2182,7 +2182,7 @@ static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float |
| 2182 | 2182 |
|
| 2183 | 2183 |
static void vector_fmul_window_sse(float *dst, const float *src0, const float *src1, |
| 2184 | 2184 |
const float *win, float add_bias, int len){
|
| 2185 |
-#ifdef HAVE_6REGS |
|
| 2185 |
+#if HAVE_6REGS |
|
| 2186 | 2186 |
if(add_bias == 0){
|
| 2187 | 2187 |
x86_reg i = -len*4; |
| 2188 | 2188 |
x86_reg j = len*4-16; |
| ... | ... |
@@ -2324,7 +2324,7 @@ static void float_to_int16_sse2(int16_t *dst, const float *src, long len){
|
| 2324 | 2324 |
); |
| 2325 | 2325 |
} |
| 2326 | 2326 |
|
| 2327 |
-#ifdef HAVE_YASM |
|
| 2327 |
+#if HAVE_YASM |
|
| 2328 | 2328 |
void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len); |
| 2329 | 2329 |
void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len); |
| 2330 | 2330 |
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 *pix, int stride, int alpha, int beta, |
| 2332 | 2332 |
void ff_x264_deblock_h_luma_sse2(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); |
| 2333 | 2333 |
void ff_x264_deblock_v8_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta); |
| 2334 | 2334 |
void ff_x264_deblock_h_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta); |
| 2335 |
-#ifdef ARCH_X86_32 |
|
| 2335 |
+#if ARCH_X86_32 |
|
| 2336 | 2336 |
static void ff_x264_deblock_v_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta) |
| 2337 | 2337 |
{
|
| 2338 | 2338 |
ff_x264_deblock_v8_luma_intra_mmxext(pix+0, stride, alpha, beta); |
| ... | ... |
@@ -2555,7 +2555,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2555 | 2555 |
c->idct_add= ff_simple_idct_add_mmx; |
| 2556 | 2556 |
c->idct = ff_simple_idct_mmx; |
| 2557 | 2557 |
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM; |
| 2558 |
-#ifdef CONFIG_GPL |
|
| 2558 |
+#if CONFIG_GPL |
|
| 2559 | 2559 |
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
|
| 2560 | 2560 |
if(mm_flags & FF_MM_MMXEXT){
|
| 2561 | 2561 |
c->idct_put= ff_libmpeg2mmx2_idct_put; |
| ... | ... |
@@ -2853,7 +2853,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2853 | 2853 |
H264_QPEL_FUNCS(3, 2, sse2); |
| 2854 | 2854 |
H264_QPEL_FUNCS(3, 3, sse2); |
| 2855 | 2855 |
} |
| 2856 |
-#ifdef HAVE_SSSE3 |
|
| 2856 |
+#if HAVE_SSSE3 |
|
| 2857 | 2857 |
if(mm_flags & FF_MM_SSSE3){
|
| 2858 | 2858 |
H264_QPEL_FUNCS(1, 0, ssse3); |
| 2859 | 2859 |
H264_QPEL_FUNCS(1, 1, ssse3); |
| ... | ... |
@@ -2876,14 +2876,14 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2876 | 2876 |
} |
| 2877 | 2877 |
#endif |
| 2878 | 2878 |
|
| 2879 |
-#if defined(CONFIG_GPL) && defined(HAVE_YASM) |
|
| 2879 |
+#if CONFIG_GPL && HAVE_YASM |
|
| 2880 | 2880 |
if( mm_flags&FF_MM_MMXEXT ){
|
| 2881 |
-#ifdef ARCH_X86_32 |
|
| 2881 |
+#if ARCH_X86_32 |
|
| 2882 | 2882 |
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext; |
| 2883 | 2883 |
c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext; |
| 2884 | 2884 |
#endif |
| 2885 | 2885 |
if( mm_flags&FF_MM_SSE2 ){
|
| 2886 |
-#if defined(ARCH_X86_64) || !defined(__ICC) || __ICC > 1100 |
|
| 2886 |
+#if ARCH_X86_64 || !defined(__ICC) || __ICC > 1100 |
|
| 2887 | 2887 |
c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2; |
| 2888 | 2888 |
c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2; |
| 2889 | 2889 |
c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2; |
| ... | ... |
@@ -2896,10 +2896,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2896 | 2896 |
} |
| 2897 | 2897 |
#endif |
| 2898 | 2898 |
|
| 2899 |
-#ifdef CONFIG_SNOW_DECODER |
|
| 2899 |
+#if CONFIG_SNOW_DECODER |
|
| 2900 | 2900 |
if(mm_flags & FF_MM_SSE2 & 0){
|
| 2901 | 2901 |
c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2; |
| 2902 |
-#ifdef HAVE_7REGS |
|
| 2902 |
+#if HAVE_7REGS |
|
| 2903 | 2903 |
c->vertical_compose97i = ff_snow_vertical_compose97i_sse2; |
| 2904 | 2904 |
#endif |
| 2905 | 2905 |
c->inner_add_yblock = ff_snow_inner_add_yblock_sse2; |
| ... | ... |
@@ -2907,7 +2907,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2907 | 2907 |
else{
|
| 2908 | 2908 |
if(mm_flags & FF_MM_MMXEXT){
|
| 2909 | 2909 |
c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx; |
| 2910 |
-#ifdef HAVE_7REGS |
|
| 2910 |
+#if HAVE_7REGS |
|
| 2911 | 2911 |
c->vertical_compose97i = ff_snow_vertical_compose97i_mmx; |
| 2912 | 2912 |
#endif |
| 2913 | 2913 |
} |
| ... | ... |
@@ -104,7 +104,7 @@ extern const double ff_pd_2[2]; |
| 104 | 104 |
SBUTTERFLY(t, b, c, wd, q) /* t= a2 b2 c2 d2 e2 f2 g2 h2 */\ |
| 105 | 105 |
/* c= a3 b3 c3 d3 e3 f3 g3 h3 */ |
| 106 | 106 |
|
| 107 |
-#ifdef ARCH_X86_64 |
|
| 107 |
+#if ARCH_X86_64 |
|
| 108 | 108 |
// permutes 01234567 -> 05736421 |
| 109 | 109 |
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\ |
| 110 | 110 |
SBUTTERFLY(a,b,%%xmm8,wd,dqa)\ |
| ... | ... |
@@ -1015,7 +1015,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t |
| 1015 | 1015 |
MMABS_SUM(%%xmm7, %%xmm9, %%xmm1)\ |
| 1016 | 1016 |
"paddusw %%xmm1, %%xmm0 \n\t" |
| 1017 | 1017 |
|
| 1018 |
-#ifdef ARCH_X86_64 |
|
| 1018 |
+#if ARCH_X86_64 |
|
| 1019 | 1019 |
#define MMABS_SUM_8x8_SSE2 MMABS_SUM_8x8_NOSPILL |
| 1020 | 1020 |
#else |
| 1021 | 1021 |
#define MMABS_SUM_8x8_SSE2\ |
| ... | ... |
@@ -1180,7 +1180,7 @@ HADAMARD8_DIFF_SSE2(sse2) |
| 1180 | 1180 |
#undef MMABS_SUM_8x8 |
| 1181 | 1181 |
#undef HSUM |
| 1182 | 1182 |
|
| 1183 |
-#ifdef HAVE_SSSE3 |
|
| 1183 |
+#if HAVE_SSSE3 |
|
| 1184 | 1184 |
#define MMABS(a,z) MMABS_SSSE3(a,z) |
| 1185 | 1185 |
#define MMABS_SUM_8x8 MMABS_SUM_8x8_NOSPILL |
| 1186 | 1186 |
HADAMARD8_DIFF_SSE2(ssse3) |
| ... | ... |
@@ -1245,7 +1245,7 @@ DCT_SAD_FUNC(mmx2) |
| 1245 | 1245 |
DCT_SAD_FUNC(sse2) |
| 1246 | 1246 |
#undef MMABS |
| 1247 | 1247 |
|
| 1248 |
-#ifdef HAVE_SSSE3 |
|
| 1248 |
+#if HAVE_SSSE3 |
|
| 1249 | 1249 |
#define MMABS(a,z) MMABS_SSSE3(a,z) |
| 1250 | 1250 |
DCT_SAD_FUNC(ssse3) |
| 1251 | 1251 |
#undef MMABS |
| ... | ... |
@@ -1325,7 +1325,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si |
| 1325 | 1325 |
#undef SCALE_OFFSET |
| 1326 | 1326 |
#undef PMULHRW |
| 1327 | 1327 |
|
| 1328 |
-#ifdef HAVE_SSSE3 |
|
| 1328 |
+#if HAVE_SSSE3 |
|
| 1329 | 1329 |
#undef PHADDD |
| 1330 | 1330 |
#define DEF(x) x ## _ssse3 |
| 1331 | 1331 |
#define SET_RND(x) |
| ... | ... |
@@ -1417,7 +1417,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1417 | 1417 |
c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2; |
| 1418 | 1418 |
} |
| 1419 | 1419 |
|
| 1420 |
-#ifdef HAVE_SSSE3 |
|
| 1420 |
+#if HAVE_SSSE3 |
|
| 1421 | 1421 |
if(mm_flags & FF_MM_SSSE3){
|
| 1422 | 1422 |
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
| 1423 | 1423 |
c->try_8x8basis= try_8x8basis_ssse3; |
| ... | ... |
@@ -108,7 +108,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input |
| 108 | 108 |
::"r"(-4*k), "r"(4*k), |
| 109 | 109 |
"r"(input+n4), "r"(tcos+n8), "r"(tsin+n8) |
| 110 | 110 |
); |
| 111 |
-#ifdef ARCH_X86_64 |
|
| 111 |
+#if ARCH_X86_64 |
|
| 112 | 112 |
// if we have enough regs, don't let gcc make the luts latency-bound |
| 113 | 113 |
// but if not, latency is faster than spilling |
| 114 | 114 |
__asm__("movlps %%xmm0, %0 \n"
|
| ... | ... |
@@ -33,9 +33,7 @@ |
| 33 | 33 |
|
| 34 | 34 |
//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet |
| 35 | 35 |
//as that would make optimization work hard) |
| 36 |
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && \ |
|
| 37 |
- defined(HAVE_EBX_AVAILABLE) && \ |
|
| 38 |
- !defined(BROKEN_RELOCATIONS) |
|
| 36 |
+#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) |
|
| 39 | 37 |
static int decode_significance_x86(CABACContext *c, int max_coeff, |
| 40 | 38 |
uint8_t *significant_coeff_ctx_base, |
| 41 | 39 |
int *index){
|
| ... | ... |
@@ -149,7 +147,7 @@ static int decode_significance_8x8_x86(CABACContext *c, |
| 149 | 149 |
); |
| 150 | 150 |
return coeff_count; |
| 151 | 151 |
} |
| 152 |
-#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && */ |
|
| 153 |
- /* defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */ |
|
| 152 |
+#endif /* ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE */ |
|
| 153 |
+ /* !defined(BROKEN_RELOCATIONS) */ |
|
| 154 | 154 |
|
| 155 | 155 |
#endif /* AVCODEC_X86_H264_I386_H */ |
| ... | ... |
@@ -472,7 +472,7 @@ static void ff_h264_idct_add8_mmx2(uint8_t **dest, const int *block_offset, DCTE |
| 472 | 472 |
} |
| 473 | 473 |
} |
| 474 | 474 |
|
| 475 |
-#if defined(CONFIG_GPL) && defined(HAVE_YASM) |
|
| 475 |
+#if CONFIG_GPL && HAVE_YASM |
|
| 476 | 476 |
static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride) |
| 477 | 477 |
{
|
| 478 | 478 |
__asm__ volatile( |
| ... | ... |
@@ -1488,7 +1488,7 @@ static void OPNAME ## pixels16_l2_shift5_ ## MMX(uint8_t *dst, int16_t *src16, u |
| 1488 | 1488 |
}\ |
| 1489 | 1489 |
|
| 1490 | 1490 |
|
| 1491 |
-#ifdef ARCH_X86_64 |
|
| 1491 |
+#if ARCH_X86_64 |
|
| 1492 | 1492 |
#define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\ |
| 1493 | 1493 |
static av_noinline void OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, uint8_t *src, uint8_t *src2, int dstStride, int src2Stride){\
|
| 1494 | 1494 |
int h=16;\ |
| ... | ... |
@@ -2065,7 +2065,7 @@ QPEL_H264_V_XMM(put_, PUT_OP, sse2) |
| 2065 | 2065 |
QPEL_H264_V_XMM(avg_, AVG_MMX2_OP, sse2) |
| 2066 | 2066 |
QPEL_H264_HV_XMM(put_, PUT_OP, sse2) |
| 2067 | 2067 |
QPEL_H264_HV_XMM(avg_, AVG_MMX2_OP, sse2) |
| 2068 |
-#ifdef HAVE_SSSE3 |
|
| 2068 |
+#if HAVE_SSSE3 |
|
| 2069 | 2069 |
QPEL_H264_H_XMM(put_, PUT_OP, ssse3) |
| 2070 | 2070 |
QPEL_H264_H_XMM(avg_, AVG_MMX2_OP, ssse3) |
| 2071 | 2071 |
QPEL_H264_HV2_XMM(put_, PUT_OP, ssse3) |
| ... | ... |
@@ -2079,7 +2079,7 @@ H264_MC_4816(3dnow) |
| 2079 | 2079 |
H264_MC_4816(mmx2) |
| 2080 | 2080 |
H264_MC_816(H264_MC_V, sse2) |
| 2081 | 2081 |
H264_MC_816(H264_MC_HV, sse2) |
| 2082 |
-#ifdef HAVE_SSSE3 |
|
| 2082 |
+#if HAVE_SSSE3 |
|
| 2083 | 2083 |
H264_MC_816(H264_MC_H, ssse3) |
| 2084 | 2084 |
H264_MC_816(H264_MC_HV, ssse3) |
| 2085 | 2085 |
#endif |
| ... | ... |
@@ -2161,7 +2161,7 @@ static void avg_h264_chroma_mc4_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali |
| 2161 | 2161 |
#undef H264_CHROMA_MC4_TMPL |
| 2162 | 2162 |
#undef H264_CHROMA_MC8_MV0 |
| 2163 | 2163 |
|
| 2164 |
-#ifdef HAVE_SSSE3 |
|
| 2164 |
+#if HAVE_SSSE3 |
|
| 2165 | 2165 |
#define AVG_OP(X) |
| 2166 | 2166 |
#undef H264_CHROMA_MC8_TMPL |
| 2167 | 2167 |
#undef H264_CHROMA_MC4_TMPL |
| ... | ... |
@@ -103,7 +103,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders[]) = {
|
| 103 | 103 |
#define CLEAR_ODD(r) "pxor "r","r" \n\t" |
| 104 | 104 |
#define PUT_ODD(dst) "pshufhw $0x1B, %%xmm2, "dst" \n\t" |
| 105 | 105 |
|
| 106 |
-#ifdef ARCH_X86_64 |
|
| 106 |
+#if ARCH_X86_64 |
|
| 107 | 107 |
|
| 108 | 108 |
# define ROW0 "%%xmm8" |
| 109 | 109 |
# define REG0 ROW0 |
| ... | ... |
@@ -371,7 +371,7 @@ inline void ff_idct_xvid_sse2(short *block) |
| 371 | 371 |
JZ("%%esi", "1f")
|
| 372 | 372 |
"5: \n\t" |
| 373 | 373 |
iMTX_MULT("7*16(%0)", MANGLE(iTab2), ROUND(walkenIdctRounders+5*16), PUT_ODD(ROW7))
|
| 374 |
-#ifndef ARCH_X86_64 |
|
| 374 |
+#if !ARCH_X86_64 |
|
| 375 | 375 |
iLLM_HEAD |
| 376 | 376 |
#endif |
| 377 | 377 |
iLLM_PASS("%0")
|
| ... | ... |
@@ -583,25 +583,30 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){
|
| 583 | 583 |
); |
| 584 | 584 |
} |
| 585 | 585 |
|
| 586 |
-#ifdef HAVE_SSSE3 |
|
| 586 |
+#if HAVE_SSSE3 |
|
| 587 | 587 |
#define HAVE_SSSE3_BAK |
| 588 | 588 |
#endif |
| 589 | 589 |
#undef HAVE_SSSE3 |
| 590 |
+#define HAVE_SSSE3 0 |
|
| 590 | 591 |
|
| 591 | 592 |
#undef HAVE_SSE2 |
| 592 | 593 |
#undef HAVE_MMX2 |
| 594 |
+#define HAVE_SSE2 0 |
|
| 595 |
+#define HAVE_MMX2 0 |
|
| 593 | 596 |
#define RENAME(a) a ## _MMX |
| 594 | 597 |
#define RENAMEl(a) a ## _mmx |
| 595 | 598 |
#include "mpegvideo_mmx_template.c" |
| 596 | 599 |
|
| 597 |
-#define HAVE_MMX2 |
|
| 600 |
+#undef HAVE_MMX2 |
|
| 601 |
+#define HAVE_MMX2 1 |
|
| 598 | 602 |
#undef RENAME |
| 599 | 603 |
#undef RENAMEl |
| 600 | 604 |
#define RENAME(a) a ## _MMX2 |
| 601 | 605 |
#define RENAMEl(a) a ## _mmx2 |
| 602 | 606 |
#include "mpegvideo_mmx_template.c" |
| 603 | 607 |
|
| 604 |
-#define HAVE_SSE2 |
|
| 608 |
+#undef HAVE_SSE2 |
|
| 609 |
+#define HAVE_SSE2 1 |
|
| 605 | 610 |
#undef RENAME |
| 606 | 611 |
#undef RENAMEl |
| 607 | 612 |
#define RENAME(a) a ## _SSE2 |
| ... | ... |
@@ -609,7 +614,8 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){
|
| 609 | 609 |
#include "mpegvideo_mmx_template.c" |
| 610 | 610 |
|
| 611 | 611 |
#ifdef HAVE_SSSE3_BAK |
| 612 |
-#define HAVE_SSSE3 |
|
| 612 |
+#undef HAVE_SSSE3 |
|
| 613 |
+#define HAVE_SSSE3 1 |
|
| 613 | 614 |
#undef RENAME |
| 614 | 615 |
#undef RENAMEl |
| 615 | 616 |
#define RENAME(a) a ## _SSSE3 |
| ... | ... |
@@ -637,7 +643,7 @@ void MPV_common_init_mmx(MpegEncContext *s) |
| 637 | 637 |
} |
| 638 | 638 |
|
| 639 | 639 |
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
|
| 640 |
-#ifdef HAVE_SSSE3 |
|
| 640 |
+#if HAVE_SSSE3 |
|
| 641 | 641 |
if(mm_flags & FF_MM_SSSE3){
|
| 642 | 642 |
s->dct_quantize= dct_quantize_SSSE3; |
| 643 | 643 |
} else |
| ... | ... |
@@ -29,7 +29,7 @@ |
| 29 | 29 |
#undef SAVE_SIGN |
| 30 | 30 |
#undef RESTORE_SIGN |
| 31 | 31 |
|
| 32 |
-#if defined(HAVE_SSE2) |
|
| 32 |
+#if HAVE_SSE2 |
|
| 33 | 33 |
#define MMREG_WIDTH "16" |
| 34 | 34 |
#define MM "%%xmm" |
| 35 | 35 |
#define MOVQ "movdqa" |
| ... | ... |
@@ -48,7 +48,7 @@ |
| 48 | 48 |
#define MMREG_WIDTH "8" |
| 49 | 49 |
#define MM "%%mm" |
| 50 | 50 |
#define MOVQ "movq" |
| 51 |
-#if defined(HAVE_MMX2) |
|
| 51 |
+#if HAVE_MMX2 |
|
| 52 | 52 |
#define SPREADW(a) "pshufw $0, "a", "a" \n\t" |
| 53 | 53 |
#define PMAXW(a,b) "pmaxsw "a", "b" \n\t" |
| 54 | 54 |
#define PMAX(a,b) \ |
| ... | ... |
@@ -74,7 +74,7 @@ |
| 74 | 74 |
#endif |
| 75 | 75 |
#endif |
| 76 | 76 |
|
| 77 |
-#ifdef HAVE_SSSE3 |
|
| 77 |
+#if HAVE_SSSE3 |
|
| 78 | 78 |
#define SAVE_SIGN(a,b) \ |
| 79 | 79 |
"movdqa "b", "a" \n\t"\ |
| 80 | 80 |
"pabsw "b", "b" \n\t" |
| ... | ... |
@@ -219,7 +219,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, |
| 219 | 219 |
SPREADW(MM"1") |
| 220 | 220 |
"psubusw "MM"1, "MM"4 \n\t" |
| 221 | 221 |
"packuswb "MM"4, "MM"4 \n\t" |
| 222 |
-#ifdef HAVE_SSE2 |
|
| 222 |
+#if HAVE_SSE2 |
|
| 223 | 223 |
"packuswb "MM"4, "MM"4 \n\t" |
| 224 | 224 |
#endif |
| 225 | 225 |
"movd "MM"4, %0 \n\t" // *overflow |
| ... | ... |
@@ -386,7 +386,7 @@ void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width){
|
| 386 | 386 |
} |
| 387 | 387 |
} |
| 388 | 388 |
|
| 389 |
-#ifdef HAVE_7REGS |
|
| 389 |
+#if HAVE_7REGS |
|
| 390 | 390 |
#define snow_vertical_compose_sse2_load_add(op,r,t0,t1,t2,t3)\ |
| 391 | 391 |
""op" ("r",%%"REG_d"), %%"t0" \n\t"\
|
| 392 | 392 |
""op" 16("r",%%"REG_d"), %%"t1" \n\t"\
|
| ... | ... |
@@ -25,7 +25,7 @@ |
| 25 | 25 |
#include <stdint.h> |
| 26 | 26 |
#include <string.h> |
| 27 | 27 |
#include <errno.h> |
| 28 |
-#ifdef HAVE_SOUNDCARD_H |
|
| 28 |
+#if HAVE_SOUNDCARD_H |
|
| 29 | 29 |
#include <soundcard.h> |
| 30 | 30 |
#else |
| 31 | 31 |
#include <sys/soundcard.h> |
| ... | ... |
@@ -311,7 +311,7 @@ static int audio_read_close(AVFormatContext *s1) |
| 311 | 311 |
return 0; |
| 312 | 312 |
} |
| 313 | 313 |
|
| 314 |
-#ifdef CONFIG_OSS_DEMUXER |
|
| 314 |
+#if CONFIG_OSS_DEMUXER |
|
| 315 | 315 |
AVInputFormat oss_demuxer = {
|
| 316 | 316 |
"oss", |
| 317 | 317 |
NULL_IF_CONFIG_SMALL("Open Sound System capture"),
|
| ... | ... |
@@ -324,7 +324,7 @@ AVInputFormat oss_demuxer = {
|
| 324 | 324 |
}; |
| 325 | 325 |
#endif |
| 326 | 326 |
|
| 327 |
-#ifdef CONFIG_OSS_MUXER |
|
| 327 |
+#if CONFIG_OSS_MUXER |
|
| 328 | 328 |
AVOutputFormat oss_muxer = {
|
| 329 | 329 |
"oss", |
| 330 | 330 |
NULL_IF_CONFIG_SMALL("Open Sound System playback"),
|
| ... | ... |
@@ -33,7 +33,7 @@ extern "C" {
|
| 33 | 33 |
#include "libavformat/avformat.h" |
| 34 | 34 |
} |
| 35 | 35 |
|
| 36 |
-#ifdef HAVE_BSOUNDRECORDER |
|
| 36 |
+#if HAVE_BSOUNDRECORDER |
|
| 37 | 37 |
#include <SoundRecorder.h> |
| 38 | 38 |
using namespace BPrivate::Media::Experimental; |
| 39 | 39 |
#endif |
| ... | ... |
@@ -63,7 +63,7 @@ typedef struct {
|
| 63 | 63 |
sem_id output_sem; |
| 64 | 64 |
int output_index; |
| 65 | 65 |
BSoundPlayer *player; |
| 66 |
-#ifdef HAVE_BSOUNDRECORDER |
|
| 66 |
+#if HAVE_BSOUNDRECORDER |
|
| 67 | 67 |
BSoundRecorder *recorder; |
| 68 | 68 |
#endif |
| 69 | 69 |
int has_quit; /* signal callbacks not to wait */ |
| ... | ... |
@@ -150,7 +150,7 @@ static void audioplay_callback(void *cookie, void *buffer, size_t bufferSize, co |
| 150 | 150 |
} |
| 151 | 151 |
} |
| 152 | 152 |
|
| 153 |
-#ifdef HAVE_BSOUNDRECORDER |
|
| 153 |
+#if HAVE_BSOUNDRECORDER |
|
| 154 | 154 |
/* called back by BSoundRecorder */ |
| 155 | 155 |
static void audiorecord_callback(void *cookie, bigtime_t timestamp, void *buffer, size_t bufferSize, const media_multi_audio_format &format) |
| 156 | 156 |
{
|
| ... | ... |
@@ -192,7 +192,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) |
| 192 | 192 |
media_raw_audio_format format; |
| 193 | 193 |
media_multi_audio_format iformat; |
| 194 | 194 |
|
| 195 |
-#ifndef HAVE_BSOUNDRECORDER |
|
| 195 |
+#if !HAVE_BSOUNDRECORDER |
|
| 196 | 196 |
if (!is_output) |
| 197 | 197 |
return AVERROR(EIO); /* not for now */ |
| 198 | 198 |
#endif |
| ... | ... |
@@ -210,7 +210,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) |
| 210 | 210 |
s->frame_size = AUDIO_BLOCK_SIZE; |
| 211 | 211 |
/* bump up the priority (avoid realtime though) */ |
| 212 | 212 |
set_thread_priority(find_thread(NULL), B_DISPLAY_PRIORITY+1); |
| 213 |
-#ifdef HAVE_BSOUNDRECORDER |
|
| 213 |
+#if HAVE_BSOUNDRECORDER |
|
| 214 | 214 |
if (!is_output) {
|
| 215 | 215 |
bool wait_for_input = false; |
| 216 | 216 |
if (audio_device && !strcmp(audio_device, "wait:")) |
| ... | ... |
@@ -273,7 +273,7 @@ static int audio_close(AudioData *s) |
| 273 | 273 |
} |
| 274 | 274 |
if (s->player) |
| 275 | 275 |
delete s->player; |
| 276 |
-#ifdef HAVE_BSOUNDRECORDER |
|
| 276 |
+#if HAVE_BSOUNDRECORDER |
|
| 277 | 277 |
if (s->recorder) |
| 278 | 278 |
delete s->recorder; |
| 279 | 279 |
#endif |
| ... | ... |
@@ -26,13 +26,13 @@ |
| 26 | 26 |
|
| 27 | 27 |
#define _BSD_SOURCE 1 |
| 28 | 28 |
#include "libavformat/avformat.h" |
| 29 |
-#if defined (HAVE_DEV_BKTR_IOCTL_METEOR_H) && defined (HAVE_DEV_BKTR_IOCTL_BT848_H) |
|
| 29 |
+#if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H |
|
| 30 | 30 |
# include <dev/bktr/ioctl_meteor.h> |
| 31 | 31 |
# include <dev/bktr/ioctl_bt848.h> |
| 32 |
-#elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H) |
|
| 32 |
+#elif HAVE_MACHINE_IOCTL_METEOR_H && HAVE_MACHINE_IOCTL_BT848_H |
|
| 33 | 33 |
# include <machine/ioctl_meteor.h> |
| 34 | 34 |
# include <machine/ioctl_bt848.h> |
| 35 |
-#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H) |
|
| 35 |
+#elif HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H && HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H |
|
| 36 | 36 |
# include <dev/video/meteor/ioctl_meteor.h> |
| 37 | 37 |
# include <dev/video/bktr/ioctl_bt848.h> |
| 38 | 38 |
#elif HAVE_DEV_IC_BT8XX_H |
| ... | ... |
@@ -170,7 +170,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec, |
| 170 | 170 |
return num_frames; |
| 171 | 171 |
} |
| 172 | 172 |
|
| 173 |
-#ifdef CONFIG_AIFF_MUXER |
|
| 173 |
+#if CONFIG_AIFF_MUXER |
|
| 174 | 174 |
typedef struct {
|
| 175 | 175 |
int64_t form; |
| 176 | 176 |
int64_t frames; |
| ... | ... |
@@ -439,7 +439,7 @@ static int aiff_read_packet(AVFormatContext *s, |
| 439 | 439 |
return 0; |
| 440 | 440 |
} |
| 441 | 441 |
|
| 442 |
-#ifdef CONFIG_AIFF_DEMUXER |
|
| 442 |
+#if CONFIG_AIFF_DEMUXER |
|
| 443 | 443 |
AVInputFormat aiff_demuxer = {
|
| 444 | 444 |
"aiff", |
| 445 | 445 |
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
| ... | ... |
@@ -453,7 +453,7 @@ AVInputFormat aiff_demuxer = {
|
| 453 | 453 |
}; |
| 454 | 454 |
#endif |
| 455 | 455 |
|
| 456 |
-#ifdef CONFIG_AIFF_MUXER |
|
| 456 |
+#if CONFIG_AIFF_MUXER |
|
| 457 | 457 |
AVOutputFormat aiff_muxer = {
|
| 458 | 458 |
"aiff", |
| 459 | 459 |
NULL_IF_CONFIG_SMALL("Audio IFF"),
|
| ... | ... |
@@ -168,7 +168,7 @@ void av_register_all(void) |
| 168 | 168 |
REGISTER_MUXER (RTP, rtp); |
| 169 | 169 |
REGISTER_DEMUXER (RTSP, rtsp); |
| 170 | 170 |
REGISTER_DEMUXER (SDP, sdp); |
| 171 |
-#ifdef CONFIG_SDP_DEMUXER |
|
| 171 |
+#if CONFIG_SDP_DEMUXER |
|
| 172 | 172 |
av_register_rtp_dynamic_payload_handlers(); |
| 173 | 173 |
av_register_rdt_dynamic_payload_handlers(); |
| 174 | 174 |
#endif |
| ... | ... |
@@ -30,7 +30,7 @@ Only mono files are supported. |
| 30 | 30 |
static const char AMR_header [] = "#!AMR\n"; |
| 31 | 31 |
static const char AMRWB_header [] = "#!AMR-WB\n"; |
| 32 | 32 |
|
| 33 |
-#ifdef CONFIG_AMR_MUXER |
|
| 33 |
+#if CONFIG_AMR_MUXER |
|
| 34 | 34 |
static int amr_write_header(AVFormatContext *s) |
| 35 | 35 |
{
|
| 36 | 36 |
ByteIOContext *pb = s->pb; |
| ... | ... |
@@ -166,7 +166,7 @@ static int amr_read_packet(AVFormatContext *s, |
| 166 | 166 |
return 0; |
| 167 | 167 |
} |
| 168 | 168 |
|
| 169 |
-#ifdef CONFIG_AMR_DEMUXER |
|
| 169 |
+#if CONFIG_AMR_DEMUXER |
|
| 170 | 170 |
AVInputFormat amr_demuxer = {
|
| 171 | 171 |
"amr", |
| 172 | 172 |
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
|
| ... | ... |
@@ -178,7 +178,7 @@ AVInputFormat amr_demuxer = {
|
| 178 | 178 |
}; |
| 179 | 179 |
#endif |
| 180 | 180 |
|
| 181 |
-#ifdef CONFIG_AMR_MUXER |
|
| 181 |
+#if CONFIG_AMR_MUXER |
|
| 182 | 182 |
AVOutputFormat amr_muxer = {
|
| 183 | 183 |
"amr", |
| 184 | 184 |
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
|
| ... | ... |
@@ -812,14 +812,14 @@ static int asf_write_trailer(AVFormatContext *s) |
| 812 | 812 |
return 0; |
| 813 | 813 |
} |
| 814 | 814 |
|
| 815 |
-#ifdef CONFIG_ASF_MUXER |
|
| 815 |
+#if CONFIG_ASF_MUXER |
|
| 816 | 816 |
AVOutputFormat asf_muxer = {
|
| 817 | 817 |
"asf", |
| 818 | 818 |
NULL_IF_CONFIG_SMALL("ASF format"),
|
| 819 | 819 |
"video/x-ms-asf", |
| 820 | 820 |
"asf,wmv,wma", |
| 821 | 821 |
sizeof(ASFContext), |
| 822 |
-#ifdef CONFIG_LIBMP3LAME |
|
| 822 |
+#if CONFIG_LIBMP3LAME |
|
| 823 | 823 |
CODEC_ID_MP3, |
| 824 | 824 |
#else |
| 825 | 825 |
CODEC_ID_MP2, |
| ... | ... |
@@ -833,14 +833,14 @@ AVOutputFormat asf_muxer = {
|
| 833 | 833 |
}; |
| 834 | 834 |
#endif |
| 835 | 835 |
|
| 836 |
-#ifdef CONFIG_ASF_STREAM_MUXER |
|
| 836 |
+#if CONFIG_ASF_STREAM_MUXER |
|
| 837 | 837 |
AVOutputFormat asf_stream_muxer = {
|
| 838 | 838 |
"asf_stream", |
| 839 | 839 |
NULL_IF_CONFIG_SMALL("ASF format"),
|
| 840 | 840 |
"video/x-ms-asf", |
| 841 | 841 |
"asf,wmv,wma", |
| 842 | 842 |
sizeof(ASFContext), |
| 843 |
-#ifdef CONFIG_LIBMP3LAME |
|
| 843 |
+#if CONFIG_LIBMP3LAME |
|
| 844 | 844 |
CODEC_ID_MP3, |
| 845 | 845 |
#else |
| 846 | 846 |
CODEC_ID_MP2, |
| ... | ... |
@@ -47,7 +47,7 @@ static const AVCodecTag codec_au_tags[] = {
|
| 47 | 47 |
{ 0, 0 },
|
| 48 | 48 |
}; |
| 49 | 49 |
|
| 50 |
-#ifdef CONFIG_AU_MUXER |
|
| 50 |
+#if CONFIG_AU_MUXER |
|
| 51 | 51 |
/* AUDIO_FILE header */ |
| 52 | 52 |
static int put_au_header(ByteIOContext *pb, AVCodecContext *enc) |
| 53 | 53 |
{
|
| ... | ... |
@@ -177,7 +177,7 @@ static int au_read_packet(AVFormatContext *s, |
| 177 | 177 |
return 0; |
| 178 | 178 |
} |
| 179 | 179 |
|
| 180 |
-#ifdef CONFIG_AU_DEMUXER |
|
| 180 |
+#if CONFIG_AU_DEMUXER |
|
| 181 | 181 |
AVInputFormat au_demuxer = {
|
| 182 | 182 |
"au", |
| 183 | 183 |
NULL_IF_CONFIG_SMALL("SUN AU format"),
|
| ... | ... |
@@ -191,7 +191,7 @@ AVInputFormat au_demuxer = {
|
| 191 | 191 |
}; |
| 192 | 192 |
#endif |
| 193 | 193 |
|
| 194 |
-#ifdef CONFIG_AU_MUXER |
|
| 194 |
+#if CONFIG_AU_MUXER |
|
| 195 | 195 |
AVOutputFormat au_muxer = {
|
| 196 | 196 |
"au", |
| 197 | 197 |
NULL_IF_CONFIG_SMALL("SUN AU format"),
|
| ... | ... |
@@ -160,12 +160,12 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence) |
| 160 | 160 |
} else {
|
| 161 | 161 |
int64_t res = AVERROR(EPIPE); |
| 162 | 162 |
|
| 163 |
-#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) |
|
| 163 |
+#if CONFIG_MUXERS || CONFIG_NETWORK |
|
| 164 | 164 |
if (s->write_flag) {
|
| 165 | 165 |
flush_buffer(s); |
| 166 | 166 |
s->must_flush = 1; |
| 167 | 167 |
} |
| 168 |
-#endif /* defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) */ |
|
| 168 |
+#endif /* CONFIG_MUXERS || CONFIG_NETWORK */ |
|
| 169 | 169 |
if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0) |
| 170 | 170 |
return res; |
| 171 | 171 |
if (!s->write_flag) |
| ... | ... |
@@ -624,7 +624,7 @@ URLContext *url_fileno(ByteIOContext *s) |
| 624 | 624 |
return s->opaque; |
| 625 | 625 |
} |
| 626 | 626 |
|
| 627 |
-#ifdef CONFIG_MUXERS |
|
| 627 |
+#if CONFIG_MUXERS |
|
| 628 | 628 |
int url_fprintf(ByteIOContext *s, const char *fmt, ...) |
| 629 | 629 |
{
|
| 630 | 630 |
va_list ap; |
| ... | ... |
@@ -688,8 +688,8 @@ int64_t av_url_read_fseek(ByteIOContext *s, int stream_index, |
| 688 | 688 |
} |
| 689 | 689 |
|
| 690 | 690 |
/* url_open_dyn_buf and url_close_dyn_buf are used in rtp.c to send a response |
| 691 |
- * back to the server even if CONFIG_MUXERS is not set. */ |
|
| 692 |
-#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) |
|
| 691 |
+ * back to the server even if CONFIG_MUXERS is false. */ |
|
| 692 |
+#if CONFIG_MUXERS || CONFIG_NETWORK |
|
| 693 | 693 |
/* buffer handling */ |
| 694 | 694 |
int url_open_buf(ByteIOContext **s, uint8_t *buf, int buf_size, int flags) |
| 695 | 695 |
{
|
| ... | ... |
@@ -22,7 +22,7 @@ |
| 22 | 22 |
#include "libavutil/avstring.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 | 24 |
#include <fcntl.h> |
| 25 |
-#ifdef HAVE_SETMODE |
|
| 25 |
+#if HAVE_SETMODE |
|
| 26 | 26 |
#include <io.h> |
| 27 | 27 |
#endif |
| 28 | 28 |
#include <unistd.h> |
| ... | ... |
@@ -107,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) |
| 107 | 107 |
fd = 0; |
| 108 | 108 |
} |
| 109 | 109 |
} |
| 110 |
-#ifdef HAVE_SETMODE |
|
| 110 |
+#if HAVE_SETMODE |
|
| 111 | 111 |
setmode(fd, O_BINARY); |
| 112 | 112 |
#endif |
| 113 | 113 |
h->priv_data = (void *)(size_t)fd; |
| ... | ... |
@@ -305,7 +305,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) |
| 305 | 305 |
} |
| 306 | 306 |
} |
| 307 | 307 |
|
| 308 |
-#if defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER) |
|
| 308 |
+#if CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER |
|
| 309 | 309 |
/******************************************************/ |
| 310 | 310 |
/* image output */ |
| 311 | 311 |
|
| ... | ... |
@@ -370,10 +370,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 370 | 370 |
return 0; |
| 371 | 371 |
} |
| 372 | 372 |
|
| 373 |
-#endif /* defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER) */ |
|
| 373 |
+#endif /* CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER */ |
|
| 374 | 374 |
|
| 375 | 375 |
/* input */ |
| 376 |
-#ifdef CONFIG_IMAGE2_DEMUXER |
|
| 376 |
+#if CONFIG_IMAGE2_DEMUXER |
|
| 377 | 377 |
AVInputFormat image2_demuxer = {
|
| 378 | 378 |
"image2", |
| 379 | 379 |
NULL_IF_CONFIG_SMALL("image2 sequence"),
|
| ... | ... |
@@ -387,7 +387,7 @@ AVInputFormat image2_demuxer = {
|
| 387 | 387 |
AVFMT_NOFILE, |
| 388 | 388 |
}; |
| 389 | 389 |
#endif |
| 390 |
-#ifdef CONFIG_IMAGE2PIPE_DEMUXER |
|
| 390 |
+#if CONFIG_IMAGE2PIPE_DEMUXER |
|
| 391 | 391 |
AVInputFormat image2pipe_demuxer = {
|
| 392 | 392 |
"image2pipe", |
| 393 | 393 |
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
|
| ... | ... |
@@ -399,7 +399,7 @@ AVInputFormat image2pipe_demuxer = {
|
| 399 | 399 |
#endif |
| 400 | 400 |
|
| 401 | 401 |
/* output */ |
| 402 |
-#ifdef CONFIG_IMAGE2_MUXER |
|
| 402 |
+#if CONFIG_IMAGE2_MUXER |
|
| 403 | 403 |
AVOutputFormat image2_muxer = {
|
| 404 | 404 |
"image2", |
| 405 | 405 |
NULL_IF_CONFIG_SMALL("image2 sequence"),
|
| ... | ... |
@@ -414,7 +414,7 @@ AVOutputFormat image2_muxer = {
|
| 414 | 414 |
.flags= AVFMT_NOTIMESTAMPS | AVFMT_NOFILE |
| 415 | 415 |
}; |
| 416 | 416 |
#endif |
| 417 |
-#ifdef CONFIG_IMAGE2PIPE_MUXER |
|
| 417 |
+#if CONFIG_IMAGE2PIPE_MUXER |
|
| 418 | 418 |
AVOutputFormat image2pipe_muxer = {
|
| 419 | 419 |
"image2pipe", |
| 420 | 420 |
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
|
| ... | ... |
@@ -39,10 +39,10 @@ |
| 39 | 39 |
#include "libavutil/intreadwrite.h" |
| 40 | 40 |
#include "libavutil/avstring.h" |
| 41 | 41 |
#include "libavutil/lzo.h" |
| 42 |
-#ifdef CONFIG_ZLIB |
|
| 42 |
+#if CONFIG_ZLIB |
|
| 43 | 43 |
#include <zlib.h> |
| 44 | 44 |
#endif |
| 45 |
-#ifdef CONFIG_BZLIB |
|
| 45 |
+#if CONFIG_BZLIB |
|
| 46 | 46 |
#include <bzlib.h> |
| 47 | 47 |
#endif |
| 48 | 48 |
|
| ... | ... |
@@ -879,7 +879,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, |
| 879 | 879 |
goto failed; |
| 880 | 880 |
pkt_size -= olen; |
| 881 | 881 |
break; |
| 882 |
-#ifdef CONFIG_ZLIB |
|
| 882 |
+#if CONFIG_ZLIB |
|
| 883 | 883 |
case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
|
| 884 | 884 |
z_stream zstream = {0};
|
| 885 | 885 |
if (inflateInit(&zstream) != Z_OK) |
| ... | ... |
@@ -900,7 +900,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, |
| 900 | 900 |
break; |
| 901 | 901 |
} |
| 902 | 902 |
#endif |
| 903 |
-#ifdef CONFIG_BZLIB |
|
| 903 |
+#if CONFIG_BZLIB |
|
| 904 | 904 |
case MATROSKA_TRACK_ENCODING_COMP_BZLIB: {
|
| 905 | 905 |
bz_stream bzstream = {0};
|
| 906 | 906 |
if (BZ2_bzDecompressInit(&bzstream, 0, 0) != BZ_OK) |
| ... | ... |
@@ -1147,10 +1147,10 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 1147 | 1147 |
} else if (encodings_list->nb_elem == 1) {
|
| 1148 | 1148 |
if (encodings[0].type || |
| 1149 | 1149 |
(encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP && |
| 1150 |
-#ifdef CONFIG_ZLIB |
|
| 1150 |
+#if CONFIG_ZLIB |
|
| 1151 | 1151 |
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB && |
| 1152 | 1152 |
#endif |
| 1153 |
-#ifdef CONFIG_BZLIB |
|
| 1153 |
+#if CONFIG_BZLIB |
|
| 1154 | 1154 |
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB && |
| 1155 | 1155 |
#endif |
| 1156 | 1156 |
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) {
|
| ... | ... |
@@ -36,7 +36,7 @@ static int mmf_rate(int code) |
| 36 | 36 |
return mmf_rates[code]; |
| 37 | 37 |
} |
| 38 | 38 |
|
| 39 |
-#ifdef CONFIG_MMF_MUXER |
|
| 39 |
+#if CONFIG_MMF_MUXER |
|
| 40 | 40 |
static int mmf_rate_code(int rate) |
| 41 | 41 |
{
|
| 42 | 42 |
int i; |
| ... | ... |
@@ -290,7 +290,7 @@ static int mmf_read_packet(AVFormatContext *s, |
| 290 | 290 |
return ret; |
| 291 | 291 |
} |
| 292 | 292 |
|
| 293 |
-#ifdef CONFIG_MMF_DEMUXER |
|
| 293 |
+#if CONFIG_MMF_DEMUXER |
|
| 294 | 294 |
AVInputFormat mmf_demuxer = {
|
| 295 | 295 |
"mmf", |
| 296 | 296 |
NULL_IF_CONFIG_SMALL("mmf format"),
|
| ... | ... |
@@ -302,7 +302,7 @@ AVInputFormat mmf_demuxer = {
|
| 302 | 302 |
pcm_read_seek, |
| 303 | 303 |
}; |
| 304 | 304 |
#endif |
| 305 |
-#ifdef CONFIG_MMF_MUXER |
|
| 305 |
+#if CONFIG_MMF_MUXER |
|
| 306 | 306 |
AVOutputFormat mmf_muxer = {
|
| 307 | 307 |
"mmf", |
| 308 | 308 |
NULL_IF_CONFIG_SMALL("mmf format"),
|
| ... | ... |
@@ -31,7 +31,7 @@ |
| 31 | 31 |
#include "libavcodec/mpeg4audio.h" |
| 32 | 32 |
#include "libavcodec/mpegaudiodata.h" |
| 33 | 33 |
|
| 34 |
-#ifdef CONFIG_ZLIB |
|
| 34 |
+#if CONFIG_ZLIB |
|
| 35 | 35 |
#include <zlib.h> |
| 36 | 36 |
#endif |
| 37 | 37 |
|
| ... | ... |
@@ -1005,7 +1005,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |
| 1005 | 1005 |
|
| 1006 | 1006 |
/* special codec parameters handling */ |
| 1007 | 1007 |
switch (st->codec->codec_id) {
|
| 1008 |
-#ifdef CONFIG_DV_DEMUXER |
|
| 1008 |
+#if CONFIG_DV_DEMUXER |
|
| 1009 | 1009 |
case CODEC_ID_DVAUDIO: |
| 1010 | 1010 |
c->dv_fctx = av_alloc_format_context(); |
| 1011 | 1011 |
c->dv_demux = dv_init_demux(c->dv_fctx); |
| ... | ... |
@@ -1380,13 +1380,13 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |
| 1380 | 1380 |
sc->pb = c->fc->pb; |
| 1381 | 1381 |
|
| 1382 | 1382 |
switch (st->codec->codec_id) {
|
| 1383 |
-#ifdef CONFIG_H261_DECODER |
|
| 1383 |
+#if CONFIG_H261_DECODER |
|
| 1384 | 1384 |
case CODEC_ID_H261: |
| 1385 | 1385 |
#endif |
| 1386 |
-#ifdef CONFIG_H263_DECODER |
|
| 1386 |
+#if CONFIG_H263_DECODER |
|
| 1387 | 1387 |
case CODEC_ID_H263: |
| 1388 | 1388 |
#endif |
| 1389 |
-#ifdef CONFIG_MPEG4_DECODER |
|
| 1389 |
+#if CONFIG_MPEG4_DECODER |
|
| 1390 | 1390 |
case CODEC_ID_MPEG4: |
| 1391 | 1391 |
#endif |
| 1392 | 1392 |
st->codec->width= 0; /* let decoder init width/height */ |
| ... | ... |
@@ -1691,7 +1691,7 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |
| 1691 | 1691 |
|
| 1692 | 1692 |
static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |
| 1693 | 1693 |
{
|
| 1694 |
-#ifdef CONFIG_ZLIB |
|
| 1694 |
+#if CONFIG_ZLIB |
|
| 1695 | 1695 |
ByteIOContext ctx; |
| 1696 | 1696 |
uint8_t *cmov_data; |
| 1697 | 1697 |
uint8_t *moov_data; /* uncompressed data */ |
| ... | ... |
@@ -1939,7 +1939,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 1939 | 1939 |
return -1; |
| 1940 | 1940 |
} |
| 1941 | 1941 |
av_get_packet(sc->pb, pkt, sample->size); |
| 1942 |
-#ifdef CONFIG_DV_DEMUXER |
|
| 1942 |
+#if CONFIG_DV_DEMUXER |
|
| 1943 | 1943 |
if (mov->dv_demux && sc->dv_audio_container) {
|
| 1944 | 1944 |
dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); |
| 1945 | 1945 |
av_free(pkt->data); |
| ... | ... |
@@ -1819,7 +1819,7 @@ static int mov_write_trailer(AVFormatContext *s) |
| 1819 | 1819 |
return res; |
| 1820 | 1820 |
} |
| 1821 | 1821 |
|
| 1822 |
-#ifdef CONFIG_MOV_MUXER |
|
| 1822 |
+#if CONFIG_MOV_MUXER |
|
| 1823 | 1823 |
AVOutputFormat mov_muxer = {
|
| 1824 | 1824 |
"mov", |
| 1825 | 1825 |
NULL_IF_CONFIG_SMALL("MOV format"),
|
| ... | ... |
@@ -1835,7 +1835,7 @@ AVOutputFormat mov_muxer = {
|
| 1835 | 1835 |
.codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0},
|
| 1836 | 1836 |
}; |
| 1837 | 1837 |
#endif |
| 1838 |
-#ifdef CONFIG_TGP_MUXER |
|
| 1838 |
+#if CONFIG_TGP_MUXER |
|
| 1839 | 1839 |
AVOutputFormat tgp_muxer = {
|
| 1840 | 1840 |
"3gp", |
| 1841 | 1841 |
NULL_IF_CONFIG_SMALL("3GP format"),
|
| ... | ... |
@@ -1851,7 +1851,7 @@ AVOutputFormat tgp_muxer = {
|
| 1851 | 1851 |
.codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0},
|
| 1852 | 1852 |
}; |
| 1853 | 1853 |
#endif |
| 1854 |
-#ifdef CONFIG_MP4_MUXER |
|
| 1854 |
+#if CONFIG_MP4_MUXER |
|
| 1855 | 1855 |
AVOutputFormat mp4_muxer = {
|
| 1856 | 1856 |
"mp4", |
| 1857 | 1857 |
NULL_IF_CONFIG_SMALL("MP4 format"),
|
| ... | ... |
@@ -1867,7 +1867,7 @@ AVOutputFormat mp4_muxer = {
|
| 1867 | 1867 |
.codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0},
|
| 1868 | 1868 |
}; |
| 1869 | 1869 |
#endif |
| 1870 |
-#ifdef CONFIG_PSP_MUXER |
|
| 1870 |
+#if CONFIG_PSP_MUXER |
|
| 1871 | 1871 |
AVOutputFormat psp_muxer = {
|
| 1872 | 1872 |
"psp", |
| 1873 | 1873 |
NULL_IF_CONFIG_SMALL("PSP MP4 format"),
|
| ... | ... |
@@ -1883,7 +1883,7 @@ AVOutputFormat psp_muxer = {
|
| 1883 | 1883 |
.codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0},
|
| 1884 | 1884 |
}; |
| 1885 | 1885 |
#endif |
| 1886 |
-#ifdef CONFIG_TG2_MUXER |
|
| 1886 |
+#if CONFIG_TG2_MUXER |
|
| 1887 | 1887 |
AVOutputFormat tg2_muxer = {
|
| 1888 | 1888 |
"3g2", |
| 1889 | 1889 |
NULL_IF_CONFIG_SMALL("3GP2 format"),
|
| ... | ... |
@@ -1899,7 +1899,7 @@ AVOutputFormat tg2_muxer = {
|
| 1899 | 1899 |
.codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0},
|
| 1900 | 1900 |
}; |
| 1901 | 1901 |
#endif |
| 1902 |
-#ifdef CONFIG_IPOD_MUXER |
|
| 1902 |
+#if CONFIG_IPOD_MUXER |
|
| 1903 | 1903 |
AVOutputFormat ipod_muxer = {
|
| 1904 | 1904 |
"ipod", |
| 1905 | 1905 |
NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"),
|
| ... | ... |
@@ -527,7 +527,7 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 527 | 527 |
return ret; |
| 528 | 528 |
} |
| 529 | 529 |
|
| 530 |
-#if defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER) |
|
| 530 |
+#if CONFIG_MP2_MUXER || CONFIG_MP3_MUXER |
|
| 531 | 531 |
static void id3v1_create_tag(AVFormatContext *s, uint8_t *buf) |
| 532 | 532 |
{
|
| 533 | 533 |
int v, i; |
| ... | ... |
@@ -645,9 +645,9 @@ static int mp3_write_trailer(struct AVFormatContext *s) |
| 645 | 645 |
} |
| 646 | 646 |
return 0; |
| 647 | 647 |
} |
| 648 |
-#endif /* defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER) */ |
|
| 648 |
+#endif /* CONFIG_MP2_MUXER || CONFIG_MP3_MUXER */ |
|
| 649 | 649 |
|
| 650 |
-#ifdef CONFIG_MP3_DEMUXER |
|
| 650 |
+#if CONFIG_MP3_DEMUXER |
|
| 651 | 651 |
AVInputFormat mp3_demuxer = {
|
| 652 | 652 |
"mp3", |
| 653 | 653 |
NULL_IF_CONFIG_SMALL("MPEG audio"),
|
| ... | ... |
@@ -659,12 +659,12 @@ AVInputFormat mp3_demuxer = {
|
| 659 | 659 |
.extensions = "mp2,mp3,m2a", /* XXX: use probe */ |
| 660 | 660 |
}; |
| 661 | 661 |
#endif |
| 662 |
-#ifdef CONFIG_MP2_MUXER |
|
| 662 |
+#if CONFIG_MP2_MUXER |
|
| 663 | 663 |
AVOutputFormat mp2_muxer = {
|
| 664 | 664 |
"mp2", |
| 665 | 665 |
NULL_IF_CONFIG_SMALL("MPEG audio layer 2"),
|
| 666 | 666 |
"audio/x-mpeg", |
| 667 |
-#ifdef CONFIG_LIBMP3LAME |
|
| 667 |
+#if CONFIG_LIBMP3LAME |
|
| 668 | 668 |
"mp2,m2a", |
| 669 | 669 |
#else |
| 670 | 670 |
"mp2,mp3,m2a", |
| ... | ... |
@@ -677,7 +677,7 @@ AVOutputFormat mp2_muxer = {
|
| 677 | 677 |
mp3_write_trailer, |
| 678 | 678 |
}; |
| 679 | 679 |
#endif |
| 680 |
-#ifdef CONFIG_MP3_MUXER |
|
| 680 |
+#if CONFIG_MP3_MUXER |
|
| 681 | 681 |
AVOutputFormat mp3_muxer = {
|
| 682 | 682 |
"mp3", |
| 683 | 683 |
NULL_IF_CONFIG_SMALL("MPEG audio layer 3"),
|
| ... | ... |
@@ -1219,7 +1219,7 @@ static int mpeg_mux_end(AVFormatContext *ctx) |
| 1219 | 1219 |
return 0; |
| 1220 | 1220 |
} |
| 1221 | 1221 |
|
| 1222 |
-#ifdef CONFIG_MPEG1SYSTEM_MUXER |
|
| 1222 |
+#if CONFIG_MPEG1SYSTEM_MUXER |
|
| 1223 | 1223 |
AVOutputFormat mpeg1system_muxer = {
|
| 1224 | 1224 |
"mpeg", |
| 1225 | 1225 |
NULL_IF_CONFIG_SMALL("MPEG-1 System format"),
|
| ... | ... |
@@ -1233,7 +1233,7 @@ AVOutputFormat mpeg1system_muxer = {
|
| 1233 | 1233 |
mpeg_mux_end, |
| 1234 | 1234 |
}; |
| 1235 | 1235 |
#endif |
| 1236 |
-#ifdef CONFIG_MPEG1VCD_MUXER |
|
| 1236 |
+#if CONFIG_MPEG1VCD_MUXER |
|
| 1237 | 1237 |
AVOutputFormat mpeg1vcd_muxer = {
|
| 1238 | 1238 |
"vcd", |
| 1239 | 1239 |
NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"),
|
| ... | ... |
@@ -1247,7 +1247,7 @@ AVOutputFormat mpeg1vcd_muxer = {
|
| 1247 | 1247 |
mpeg_mux_end, |
| 1248 | 1248 |
}; |
| 1249 | 1249 |
#endif |
| 1250 |
-#ifdef CONFIG_MPEG2VOB_MUXER |
|
| 1250 |
+#if CONFIG_MPEG2VOB_MUXER |
|
| 1251 | 1251 |
AVOutputFormat mpeg2vob_muxer = {
|
| 1252 | 1252 |
"vob", |
| 1253 | 1253 |
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
|
| ... | ... |
@@ -1263,7 +1263,7 @@ AVOutputFormat mpeg2vob_muxer = {
|
| 1263 | 1263 |
#endif |
| 1264 | 1264 |
|
| 1265 | 1265 |
/* Same as mpeg2vob_mux except that the pack size is 2324 */ |
| 1266 |
-#ifdef CONFIG_MPEG2SVCD_MUXER |
|
| 1266 |
+#if CONFIG_MPEG2SVCD_MUXER |
|
| 1267 | 1267 |
AVOutputFormat mpeg2svcd_muxer = {
|
| 1268 | 1268 |
"svcd", |
| 1269 | 1269 |
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
|
| ... | ... |
@@ -1279,7 +1279,7 @@ AVOutputFormat mpeg2svcd_muxer = {
|
| 1279 | 1279 |
#endif |
| 1280 | 1280 |
|
| 1281 | 1281 |
/* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */ |
| 1282 |
-#ifdef CONFIG_MPEG2DVD_MUXER |
|
| 1282 |
+#if CONFIG_MPEG2DVD_MUXER |
|
| 1283 | 1283 |
AVOutputFormat mpeg2dvd_muxer = {
|
| 1284 | 1284 |
"dvd", |
| 1285 | 1285 |
NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"),
|
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
#ifndef AVFORMAT_NETWORK_H |
| 22 | 22 |
#define AVFORMAT_NETWORK_H |
| 23 | 23 |
|
| 24 |
-#ifdef HAVE_WINSOCK2_H |
|
| 24 |
+#if HAVE_WINSOCK2_H |
|
| 25 | 25 |
#include <winsock2.h> |
| 26 | 26 |
#include <ws2tcpip.h> |
| 27 | 27 |
|
| ... | ... |
@@ -38,7 +38,7 @@ |
| 38 | 38 |
#define FF_NETERROR(err) err |
| 39 | 39 |
#endif |
| 40 | 40 |
|
| 41 |
-#ifdef HAVE_ARPA_INET_H |
|
| 41 |
+#if HAVE_ARPA_INET_H |
|
| 42 | 42 |
#include <arpa/inet.h> |
| 43 | 43 |
#endif |
| 44 | 44 |
|
| ... | ... |
@@ -46,7 +46,7 @@ int ff_socket_nonblock(int socket, int enable); |
| 46 | 46 |
|
| 47 | 47 |
static inline int ff_network_init(void) |
| 48 | 48 |
{
|
| 49 |
-#ifdef HAVE_WINSOCK2_H |
|
| 49 |
+#if HAVE_WINSOCK2_H |
|
| 50 | 50 |
WSADATA wsaData; |
| 51 | 51 |
if (WSAStartup(MAKEWORD(1,1), &wsaData)) |
| 52 | 52 |
return 0; |
| ... | ... |
@@ -56,12 +56,12 @@ static inline int ff_network_init(void) |
| 56 | 56 |
|
| 57 | 57 |
static inline void ff_network_close(void) |
| 58 | 58 |
{
|
| 59 |
-#ifdef HAVE_WINSOCK2_H |
|
| 59 |
+#if HAVE_WINSOCK2_H |
|
| 60 | 60 |
WSACleanup(); |
| 61 | 61 |
#endif |
| 62 | 62 |
} |
| 63 | 63 |
|
| 64 |
-#if !defined(HAVE_INET_ATON) |
|
| 64 |
+#if !HAVE_INET_ATON |
|
| 65 | 65 |
/* in os_support.c */ |
| 66 | 66 |
int inet_aton (const char * str, struct in_addr * add); |
| 67 | 67 |
#endif |
| ... | ... |
@@ -809,9 +809,9 @@ AVOutputFormat nut_muxer = {
|
| 809 | 809 |
"video/x-nut", |
| 810 | 810 |
"nut", |
| 811 | 811 |
sizeof(NUTContext), |
| 812 |
-#ifdef CONFIG_LIBVORBIS |
|
| 812 |
+#if CONFIG_LIBVORBIS |
|
| 813 | 813 |
CODEC_ID_VORBIS, |
| 814 |
-#elif defined(CONFIG_LIBMP3LAME) |
|
| 814 |
+#elif CONFIG_LIBMP3LAME |
|
| 815 | 815 |
CODEC_ID_MP3, |
| 816 | 816 |
#else |
| 817 | 817 |
CODEC_ID_MP2, |
| ... | ... |
@@ -30,18 +30,18 @@ |
| 30 | 30 |
#include <sys/time.h> |
| 31 | 31 |
#include "os_support.h" |
| 32 | 32 |
|
| 33 |
-#ifdef CONFIG_NETWORK |
|
| 34 |
-#ifndef HAVE_POLL_H |
|
| 35 |
-#ifdef HAVE_WINSOCK2_H |
|
| 33 |
+#if CONFIG_NETWORK |
|
| 34 |
+#if !HAVE_POLL_H |
|
| 35 |
+#if HAVE_WINSOCK2_H |
|
| 36 | 36 |
#include <winsock2.h> |
| 37 |
-#elif defined (HAVE_SYS_SELECT_H) |
|
| 37 |
+#elif HAVE_SYS_SELECT_H |
|
| 38 | 38 |
#include <sys/select.h> |
| 39 | 39 |
#endif |
| 40 | 40 |
#endif |
| 41 | 41 |
|
| 42 | 42 |
#include "network.h" |
| 43 | 43 |
|
| 44 |
-#if !defined(HAVE_INET_ATON) |
|
| 44 |
+#if !HAVE_INET_ATON |
|
| 45 | 45 |
#include <stdlib.h> |
| 46 | 46 |
#include <strings.h> |
| 47 | 47 |
|
| ... | ... |
@@ -58,7 +58,7 @@ int inet_aton (const char * str, struct in_addr * add) |
| 58 | 58 |
|
| 59 | 59 |
return 1; |
| 60 | 60 |
} |
| 61 |
-#endif /* !defined(HAVE_INET_ATON) */ |
|
| 61 |
+#endif /* !HAVE_INET_ATON */ |
|
| 62 | 62 |
|
| 63 | 63 |
/* resolve host with also IP address parsing */ |
| 64 | 64 |
int resolve_host(struct in_addr *sin_addr, const char *hostname) |
| ... | ... |
@@ -76,7 +76,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname) |
| 76 | 76 |
|
| 77 | 77 |
int ff_socket_nonblock(int socket, int enable) |
| 78 | 78 |
{
|
| 79 |
-#ifdef HAVE_WINSOCK2_H |
|
| 79 |
+#if HAVE_WINSOCK2_H |
|
| 80 | 80 |
return ioctlsocket(socket, FIONBIO, &enable); |
| 81 | 81 |
#else |
| 82 | 82 |
if (enable) |
| ... | ... |
@@ -87,8 +87,8 @@ int ff_socket_nonblock(int socket, int enable) |
| 87 | 87 |
} |
| 88 | 88 |
#endif /* CONFIG_NETWORK */ |
| 89 | 89 |
|
| 90 |
-#ifdef CONFIG_FFSERVER |
|
| 91 |
-#ifndef HAVE_POLL_H |
|
| 90 |
+#if CONFIG_FFSERVER |
|
| 91 |
+#if !HAVE_POLL_H |
|
| 92 | 92 |
int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| 93 | 93 |
{
|
| 94 | 94 |
fd_set read_set; |
| ... | ... |
@@ -98,7 +98,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| 98 | 98 |
int n; |
| 99 | 99 |
int rc; |
| 100 | 100 |
|
| 101 |
-#ifdef HAVE_WINSOCK2_H |
|
| 101 |
+#if HAVE_WINSOCK2_H |
|
| 102 | 102 |
if (numfds >= FD_SETSIZE) {
|
| 103 | 103 |
errno = EINVAL; |
| 104 | 104 |
return -1; |
| ... | ... |
@@ -113,7 +113,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| 113 | 113 |
for(i = 0; i < numfds; i++) {
|
| 114 | 114 |
if (fds[i].fd < 0) |
| 115 | 115 |
continue; |
| 116 |
-#ifndef HAVE_WINSOCK2_H |
|
| 116 |
+#if !HAVE_WINSOCK2_H |
|
| 117 | 117 |
if (fds[i].fd >= FD_SETSIZE) {
|
| 118 | 118 |
errno = EINVAL; |
| 119 | 119 |
return -1; |
| ... | ... |
@@ -34,7 +34,7 @@ |
| 34 | 34 |
|
| 35 | 35 |
static inline int is_dos_path(const char *path) |
| 36 | 36 |
{
|
| 37 |
-#ifdef HAVE_DOS_PATHS |
|
| 37 |
+#if HAVE_DOS_PATHS |
|
| 38 | 38 |
if (path[0] && path[1] == ':') |
| 39 | 39 |
return 1; |
| 40 | 40 |
#endif |
| ... | ... |
@@ -58,18 +58,18 @@ static inline int is_dos_path(const char *path) |
| 58 | 58 |
# endif |
| 59 | 59 |
#endif |
| 60 | 60 |
|
| 61 |
-#ifdef CONFIG_NETWORK |
|
| 62 |
-#ifndef HAVE_SOCKLEN_T |
|
| 61 |
+#if CONFIG_NETWORK |
|
| 62 |
+#if !HAVE_SOCKLEN_T |
|
| 63 | 63 |
typedef int socklen_t; |
| 64 | 64 |
#endif |
| 65 | 65 |
|
| 66 | 66 |
/* most of the time closing a socket is just closing an fd */ |
| 67 |
-#ifndef HAVE_CLOSESOCKET |
|
| 67 |
+#if !HAVE_CLOSESOCKET |
|
| 68 | 68 |
#define closesocket close |
| 69 | 69 |
#endif |
| 70 | 70 |
|
| 71 |
-#ifdef CONFIG_FFSERVER |
|
| 72 |
-#ifndef HAVE_POLL_H |
|
| 71 |
+#if CONFIG_FFSERVER |
|
| 72 |
+#if !HAVE_POLL_H |
|
| 73 | 73 |
typedef unsigned long nfds_t; |
| 74 | 74 |
|
| 75 | 75 |
struct pollfd {
|
| ... | ... |
@@ -28,7 +28,7 @@ |
| 28 | 28 |
#include "raw.h" |
| 29 | 29 |
|
| 30 | 30 |
/* simple formats */ |
| 31 |
-#ifdef CONFIG_FLAC_MUXER |
|
| 31 |
+#if CONFIG_FLAC_MUXER |
|
| 32 | 32 |
static int flac_write_header(struct AVFormatContext *s) |
| 33 | 33 |
{
|
| 34 | 34 |
static const uint8_t header[8] = {
|
| ... | ... |
@@ -61,7 +61,7 @@ static int flac_write_trailer(struct AVFormatContext *s) |
| 61 | 61 |
} |
| 62 | 62 |
#endif |
| 63 | 63 |
|
| 64 |
-#ifdef CONFIG_ROQ_MUXER |
|
| 64 |
+#if CONFIG_ROQ_MUXER |
|
| 65 | 65 |
static int roq_write_header(struct AVFormatContext *s) |
| 66 | 66 |
{
|
| 67 | 67 |
static const uint8_t header[] = {
|
| ... | ... |
@@ -75,14 +75,14 @@ static int roq_write_header(struct AVFormatContext *s) |
| 75 | 75 |
} |
| 76 | 76 |
#endif |
| 77 | 77 |
|
| 78 |
-#ifdef CONFIG_NULL_MUXER |
|
| 78 |
+#if CONFIG_NULL_MUXER |
|
| 79 | 79 |
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
| 80 | 80 |
{
|
| 81 | 81 |
return 0; |
| 82 | 82 |
} |
| 83 | 83 |
#endif |
| 84 | 84 |
|
| 85 |
-#ifdef CONFIG_MUXERS |
|
| 85 |
+#if CONFIG_MUXERS |
|
| 86 | 86 |
static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
| 87 | 87 |
{
|
| 88 | 88 |
put_buffer(s->pb, pkt->data, pkt->size); |
| ... | ... |
@@ -91,7 +91,7 @@ static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
| 91 | 91 |
} |
| 92 | 92 |
#endif |
| 93 | 93 |
|
| 94 |
-#ifdef CONFIG_DEMUXERS |
|
| 94 |
+#if CONFIG_DEMUXERS |
|
| 95 | 95 |
/* raw input */ |
| 96 | 96 |
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 97 | 97 |
{
|
| ... | ... |
@@ -182,7 +182,7 @@ static int raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt) |
| 182 | 182 |
} |
| 183 | 183 |
#endif |
| 184 | 184 |
|
| 185 |
-#ifdef CONFIG_RAWVIDEO_DEMUXER |
|
| 185 |
+#if CONFIG_RAWVIDEO_DEMUXER |
|
| 186 | 186 |
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 187 | 187 |
{
|
| 188 | 188 |
int packet_size, ret, width, height; |
| ... | ... |
@@ -208,7 +208,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 208 | 208 |
} |
| 209 | 209 |
#endif |
| 210 | 210 |
|
| 211 |
-#ifdef CONFIG_INGENIENT_DEMUXER |
|
| 211 |
+#if CONFIG_INGENIENT_DEMUXER |
|
| 212 | 212 |
// http://www.artificis.hu/files/texts/ingenient.txt |
| 213 | 213 |
static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 214 | 214 |
{
|
| ... | ... |
@@ -246,7 +246,7 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 246 | 246 |
} |
| 247 | 247 |
#endif |
| 248 | 248 |
|
| 249 |
-#ifdef CONFIG_DEMUXERS |
|
| 249 |
+#if CONFIG_DEMUXERS |
|
| 250 | 250 |
int pcm_read_seek(AVFormatContext *s, |
| 251 | 251 |
int stream_index, int64_t timestamp, int flags) |
| 252 | 252 |
{
|
| ... | ... |
@@ -320,7 +320,7 @@ static int video_read_header(AVFormatContext *s, |
| 320 | 320 |
} |
| 321 | 321 |
#endif |
| 322 | 322 |
|
| 323 |
-#ifdef CONFIG_MPEGVIDEO_DEMUXER |
|
| 323 |
+#if CONFIG_MPEGVIDEO_DEMUXER |
|
| 324 | 324 |
#define SEQ_START_CODE 0x000001b3 |
| 325 | 325 |
#define GOP_START_CODE 0x000001b8 |
| 326 | 326 |
#define PICTURE_START_CODE 0x00000100 |
| ... | ... |
@@ -354,7 +354,7 @@ static int mpegvideo_probe(AVProbeData *p) |
| 354 | 354 |
} |
| 355 | 355 |
#endif |
| 356 | 356 |
|
| 357 |
-#ifdef CONFIG_M4V_DEMUXER |
|
| 357 |
+#if CONFIG_M4V_DEMUXER |
|
| 358 | 358 |
#define VISUAL_OBJECT_START_CODE 0x000001b5 |
| 359 | 359 |
#define VOP_START_CODE 0x000001b6 |
| 360 | 360 |
|
| ... | ... |
@@ -383,7 +383,7 @@ static int mpeg4video_probe(AVProbeData *probe_packet) |
| 383 | 383 |
} |
| 384 | 384 |
#endif |
| 385 | 385 |
|
| 386 |
-#ifdef CONFIG_H264_DEMUXER |
|
| 386 |
+#if CONFIG_H264_DEMUXER |
|
| 387 | 387 |
static int h264_probe(AVProbeData *p) |
| 388 | 388 |
{
|
| 389 | 389 |
uint32_t code= -1; |
| ... | ... |
@@ -430,7 +430,7 @@ static int h264_probe(AVProbeData *p) |
| 430 | 430 |
} |
| 431 | 431 |
#endif |
| 432 | 432 |
|
| 433 |
-#ifdef CONFIG_H263_DEMUXER |
|
| 433 |
+#if CONFIG_H263_DEMUXER |
|
| 434 | 434 |
static int h263_probe(AVProbeData *p) |
| 435 | 435 |
{
|
| 436 | 436 |
int code; |
| ... | ... |
@@ -445,7 +445,7 @@ static int h263_probe(AVProbeData *p) |
| 445 | 445 |
} |
| 446 | 446 |
#endif |
| 447 | 447 |
|
| 448 |
-#ifdef CONFIG_H261_DEMUXER |
|
| 448 |
+#if CONFIG_H261_DEMUXER |
|
| 449 | 449 |
static int h261_probe(AVProbeData *p) |
| 450 | 450 |
{
|
| 451 | 451 |
int code; |
| ... | ... |
@@ -460,7 +460,7 @@ static int h261_probe(AVProbeData *p) |
| 460 | 460 |
} |
| 461 | 461 |
#endif |
| 462 | 462 |
|
| 463 |
-#ifdef CONFIG_DTS_DEMUXER |
|
| 463 |
+#if CONFIG_DTS_DEMUXER |
|
| 464 | 464 |
#define DCA_MARKER_14B_BE 0x1FFFE800 |
| 465 | 465 |
#define DCA_MARKER_14B_LE 0xFF1F00E8 |
| 466 | 466 |
#define DCA_MARKER_RAW_BE 0x7FFE8001 |
| ... | ... |
@@ -495,7 +495,7 @@ static int dts_probe(AVProbeData *p) |
| 495 | 495 |
} |
| 496 | 496 |
#endif |
| 497 | 497 |
|
| 498 |
-#ifdef CONFIG_DIRAC_DEMUXER |
|
| 498 |
+#if CONFIG_DIRAC_DEMUXER |
|
| 499 | 499 |
static int dirac_probe(AVProbeData *p) |
| 500 | 500 |
{
|
| 501 | 501 |
if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D'))
|
| ... | ... |
@@ -505,7 +505,7 @@ static int dirac_probe(AVProbeData *p) |
| 505 | 505 |
} |
| 506 | 506 |
#endif |
| 507 | 507 |
|
| 508 |
-#ifdef CONFIG_DNXHD_DEMUXER |
|
| 508 |
+#if CONFIG_DNXHD_DEMUXER |
|
| 509 | 509 |
static int dnxhd_probe(AVProbeData *p) |
| 510 | 510 |
{
|
| 511 | 511 |
static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
|
| ... | ... |
@@ -516,7 +516,7 @@ static int dnxhd_probe(AVProbeData *p) |
| 516 | 516 |
} |
| 517 | 517 |
#endif |
| 518 | 518 |
|
| 519 |
-#if defined(CONFIG_AC3_DEMUXER) || defined(CONFIG_EAC3_DEMUXER) |
|
| 519 |
+#if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER |
|
| 520 | 520 |
static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) |
| 521 | 521 |
{
|
| 522 | 522 |
int max_frames, first_frames = 0, frames; |
| ... | ... |
@@ -555,21 +555,21 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) |
| 555 | 555 |
} |
| 556 | 556 |
#endif |
| 557 | 557 |
|
| 558 |
-#ifdef CONFIG_AC3_DEMUXER |
|
| 558 |
+#if CONFIG_AC3_DEMUXER |
|
| 559 | 559 |
static int ac3_probe(AVProbeData *p) |
| 560 | 560 |
{
|
| 561 | 561 |
return ac3_eac3_probe(p, CODEC_ID_AC3); |
| 562 | 562 |
} |
| 563 | 563 |
#endif |
| 564 | 564 |
|
| 565 |
-#ifdef CONFIG_EAC3_DEMUXER |
|
| 565 |
+#if CONFIG_EAC3_DEMUXER |
|
| 566 | 566 |
static int eac3_probe(AVProbeData *p) |
| 567 | 567 |
{
|
| 568 | 568 |
return ac3_eac3_probe(p, CODEC_ID_EAC3); |
| 569 | 569 |
} |
| 570 | 570 |
#endif |
| 571 | 571 |
|
| 572 |
-#ifdef CONFIG_FLAC_DEMUXER |
|
| 572 |
+#if CONFIG_FLAC_DEMUXER |
|
| 573 | 573 |
static int flac_probe(AVProbeData *p) |
| 574 | 574 |
{
|
| 575 | 575 |
if(memcmp(p->buf, "fLaC", 4)) return 0; |
| ... | ... |
@@ -577,7 +577,7 @@ static int flac_probe(AVProbeData *p) |
| 577 | 577 |
} |
| 578 | 578 |
#endif |
| 579 | 579 |
|
| 580 |
-#ifdef CONFIG_AAC_DEMUXER |
|
| 580 |
+#if CONFIG_AAC_DEMUXER |
|
| 581 | 581 |
static int adts_aac_probe(AVProbeData *p) |
| 582 | 582 |
{
|
| 583 | 583 |
int max_frames = 0, first_frames = 0; |
| ... | ... |
@@ -612,7 +612,7 @@ static int adts_aac_probe(AVProbeData *p) |
| 612 | 612 |
|
| 613 | 613 |
/* Note: Do not forget to add new entries to the Makefile as well. */ |
| 614 | 614 |
|
| 615 |
-#ifdef CONFIG_AAC_DEMUXER |
|
| 615 |
+#if CONFIG_AAC_DEMUXER |
|
| 616 | 616 |
AVInputFormat aac_demuxer = {
|
| 617 | 617 |
"aac", |
| 618 | 618 |
NULL_IF_CONFIG_SMALL("ADTS AAC"),
|
| ... | ... |
@@ -626,7 +626,7 @@ AVInputFormat aac_demuxer = {
|
| 626 | 626 |
}; |
| 627 | 627 |
#endif |
| 628 | 628 |
|
| 629 |
-#ifdef CONFIG_AC3_DEMUXER |
|
| 629 |
+#if CONFIG_AC3_DEMUXER |
|
| 630 | 630 |
AVInputFormat ac3_demuxer = {
|
| 631 | 631 |
"ac3", |
| 632 | 632 |
NULL_IF_CONFIG_SMALL("raw AC-3"),
|
| ... | ... |
@@ -640,7 +640,7 @@ AVInputFormat ac3_demuxer = {
|
| 640 | 640 |
}; |
| 641 | 641 |
#endif |
| 642 | 642 |
|
| 643 |
-#ifdef CONFIG_AC3_MUXER |
|
| 643 |
+#if CONFIG_AC3_MUXER |
|
| 644 | 644 |
AVOutputFormat ac3_muxer = {
|
| 645 | 645 |
"ac3", |
| 646 | 646 |
NULL_IF_CONFIG_SMALL("raw AC-3"),
|
| ... | ... |
@@ -655,7 +655,7 @@ AVOutputFormat ac3_muxer = {
|
| 655 | 655 |
}; |
| 656 | 656 |
#endif |
| 657 | 657 |
|
| 658 |
-#ifdef CONFIG_DIRAC_DEMUXER |
|
| 658 |
+#if CONFIG_DIRAC_DEMUXER |
|
| 659 | 659 |
AVInputFormat dirac_demuxer = {
|
| 660 | 660 |
"dirac", |
| 661 | 661 |
NULL_IF_CONFIG_SMALL("raw Dirac"),
|
| ... | ... |
@@ -668,7 +668,7 @@ AVInputFormat dirac_demuxer = {
|
| 668 | 668 |
}; |
| 669 | 669 |
#endif |
| 670 | 670 |
|
| 671 |
-#ifdef CONFIG_DIRAC_MUXER |
|
| 671 |
+#if CONFIG_DIRAC_MUXER |
|
| 672 | 672 |
AVOutputFormat dirac_muxer = {
|
| 673 | 673 |
"dirac", |
| 674 | 674 |
NULL_IF_CONFIG_SMALL("raw Dirac"),
|
| ... | ... |
@@ -683,7 +683,7 @@ AVOutputFormat dirac_muxer = {
|
| 683 | 683 |
}; |
| 684 | 684 |
#endif |
| 685 | 685 |
|
| 686 |
-#ifdef CONFIG_DNXHD_DEMUXER |
|
| 686 |
+#if CONFIG_DNXHD_DEMUXER |
|
| 687 | 687 |
AVInputFormat dnxhd_demuxer = {
|
| 688 | 688 |
"dnxhd", |
| 689 | 689 |
NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
|
| ... | ... |
@@ -696,7 +696,7 @@ AVInputFormat dnxhd_demuxer = {
|
| 696 | 696 |
}; |
| 697 | 697 |
#endif |
| 698 | 698 |
|
| 699 |
-#ifdef CONFIG_DNXHD_MUXER |
|
| 699 |
+#if CONFIG_DNXHD_MUXER |
|
| 700 | 700 |
AVOutputFormat dnxhd_muxer = {
|
| 701 | 701 |
"dnxhd", |
| 702 | 702 |
NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
|
| ... | ... |
@@ -711,7 +711,7 @@ AVOutputFormat dnxhd_muxer = {
|
| 711 | 711 |
}; |
| 712 | 712 |
#endif |
| 713 | 713 |
|
| 714 |
-#ifdef CONFIG_DTS_DEMUXER |
|
| 714 |
+#if CONFIG_DTS_DEMUXER |
|
| 715 | 715 |
AVInputFormat dts_demuxer = {
|
| 716 | 716 |
"dts", |
| 717 | 717 |
NULL_IF_CONFIG_SMALL("raw DTS"),
|
| ... | ... |
@@ -725,7 +725,7 @@ AVInputFormat dts_demuxer = {
|
| 725 | 725 |
}; |
| 726 | 726 |
#endif |
| 727 | 727 |
|
| 728 |
-#ifdef CONFIG_DTS_MUXER |
|
| 728 |
+#if CONFIG_DTS_MUXER |
|
| 729 | 729 |
AVOutputFormat dts_muxer = {
|
| 730 | 730 |
"dts", |
| 731 | 731 |
NULL_IF_CONFIG_SMALL("raw DTS"),
|
| ... | ... |
@@ -740,7 +740,7 @@ AVOutputFormat dts_muxer = {
|
| 740 | 740 |
}; |
| 741 | 741 |
#endif |
| 742 | 742 |
|
| 743 |
-#ifdef CONFIG_EAC3_DEMUXER |
|
| 743 |
+#if CONFIG_EAC3_DEMUXER |
|
| 744 | 744 |
AVInputFormat eac3_demuxer = {
|
| 745 | 745 |
"eac3", |
| 746 | 746 |
NULL_IF_CONFIG_SMALL("raw E-AC-3"),
|
| ... | ... |
@@ -754,7 +754,7 @@ AVInputFormat eac3_demuxer = {
|
| 754 | 754 |
}; |
| 755 | 755 |
#endif |
| 756 | 756 |
|
| 757 |
-#ifdef CONFIG_EAC3_MUXER |
|
| 757 |
+#if CONFIG_EAC3_MUXER |
|
| 758 | 758 |
AVOutputFormat eac3_muxer = {
|
| 759 | 759 |
"eac3", |
| 760 | 760 |
NULL_IF_CONFIG_SMALL("raw E-AC-3"),
|
| ... | ... |
@@ -769,7 +769,7 @@ AVOutputFormat eac3_muxer = {
|
| 769 | 769 |
}; |
| 770 | 770 |
#endif |
| 771 | 771 |
|
| 772 |
-#ifdef CONFIG_FLAC_DEMUXER |
|
| 772 |
+#if CONFIG_FLAC_DEMUXER |
|
| 773 | 773 |
AVInputFormat flac_demuxer = {
|
| 774 | 774 |
"flac", |
| 775 | 775 |
NULL_IF_CONFIG_SMALL("raw FLAC"),
|
| ... | ... |
@@ -783,7 +783,7 @@ AVInputFormat flac_demuxer = {
|
| 783 | 783 |
}; |
| 784 | 784 |
#endif |
| 785 | 785 |
|
| 786 |
-#ifdef CONFIG_FLAC_MUXER |
|
| 786 |
+#if CONFIG_FLAC_MUXER |
|
| 787 | 787 |
AVOutputFormat flac_muxer = {
|
| 788 | 788 |
"flac", |
| 789 | 789 |
NULL_IF_CONFIG_SMALL("raw FLAC"),
|
| ... | ... |
@@ -799,7 +799,7 @@ AVOutputFormat flac_muxer = {
|
| 799 | 799 |
}; |
| 800 | 800 |
#endif |
| 801 | 801 |
|
| 802 |
-#ifdef CONFIG_GSM_DEMUXER |
|
| 802 |
+#if CONFIG_GSM_DEMUXER |
|
| 803 | 803 |
AVInputFormat gsm_demuxer = {
|
| 804 | 804 |
"gsm", |
| 805 | 805 |
NULL_IF_CONFIG_SMALL("GSM"),
|
| ... | ... |
@@ -813,7 +813,7 @@ AVInputFormat gsm_demuxer = {
|
| 813 | 813 |
}; |
| 814 | 814 |
#endif |
| 815 | 815 |
|
| 816 |
-#ifdef CONFIG_H261_DEMUXER |
|
| 816 |
+#if CONFIG_H261_DEMUXER |
|
| 817 | 817 |
AVInputFormat h261_demuxer = {
|
| 818 | 818 |
"h261", |
| 819 | 819 |
NULL_IF_CONFIG_SMALL("raw H.261"),
|
| ... | ... |
@@ -827,7 +827,7 @@ AVInputFormat h261_demuxer = {
|
| 827 | 827 |
}; |
| 828 | 828 |
#endif |
| 829 | 829 |
|
| 830 |
-#ifdef CONFIG_H261_MUXER |
|
| 830 |
+#if CONFIG_H261_MUXER |
|
| 831 | 831 |
AVOutputFormat h261_muxer = {
|
| 832 | 832 |
"h261", |
| 833 | 833 |
NULL_IF_CONFIG_SMALL("raw H.261"),
|
| ... | ... |
@@ -842,7 +842,7 @@ AVOutputFormat h261_muxer = {
|
| 842 | 842 |
}; |
| 843 | 843 |
#endif |
| 844 | 844 |
|
| 845 |
-#ifdef CONFIG_H263_DEMUXER |
|
| 845 |
+#if CONFIG_H263_DEMUXER |
|
| 846 | 846 |
AVInputFormat h263_demuxer = {
|
| 847 | 847 |
"h263", |
| 848 | 848 |
NULL_IF_CONFIG_SMALL("raw H.263"),
|
| ... | ... |
@@ -856,7 +856,7 @@ AVInputFormat h263_demuxer = {
|
| 856 | 856 |
}; |
| 857 | 857 |
#endif |
| 858 | 858 |
|
| 859 |
-#ifdef CONFIG_H263_MUXER |
|
| 859 |
+#if CONFIG_H263_MUXER |
|
| 860 | 860 |
AVOutputFormat h263_muxer = {
|
| 861 | 861 |
"h263", |
| 862 | 862 |
NULL_IF_CONFIG_SMALL("raw H.263"),
|
| ... | ... |
@@ -871,7 +871,7 @@ AVOutputFormat h263_muxer = {
|
| 871 | 871 |
}; |
| 872 | 872 |
#endif |
| 873 | 873 |
|
| 874 |
-#ifdef CONFIG_H264_DEMUXER |
|
| 874 |
+#if CONFIG_H264_DEMUXER |
|
| 875 | 875 |
AVInputFormat h264_demuxer = {
|
| 876 | 876 |
"h264", |
| 877 | 877 |
NULL_IF_CONFIG_SMALL("raw H.264 video format"),
|
| ... | ... |
@@ -885,7 +885,7 @@ AVInputFormat h264_demuxer = {
|
| 885 | 885 |
}; |
| 886 | 886 |
#endif |
| 887 | 887 |
|
| 888 |
-#ifdef CONFIG_H264_MUXER |
|
| 888 |
+#if CONFIG_H264_MUXER |
|
| 889 | 889 |
AVOutputFormat h264_muxer = {
|
| 890 | 890 |
"h264", |
| 891 | 891 |
NULL_IF_CONFIG_SMALL("raw H.264 video format"),
|
| ... | ... |
@@ -900,7 +900,7 @@ AVOutputFormat h264_muxer = {
|
| 900 | 900 |
}; |
| 901 | 901 |
#endif |
| 902 | 902 |
|
| 903 |
-#ifdef CONFIG_INGENIENT_DEMUXER |
|
| 903 |
+#if CONFIG_INGENIENT_DEMUXER |
|
| 904 | 904 |
AVInputFormat ingenient_demuxer = {
|
| 905 | 905 |
"ingenient", |
| 906 | 906 |
NULL_IF_CONFIG_SMALL("Ingenient MJPEG"),
|
| ... | ... |
@@ -914,7 +914,7 @@ AVInputFormat ingenient_demuxer = {
|
| 914 | 914 |
}; |
| 915 | 915 |
#endif |
| 916 | 916 |
|
| 917 |
-#ifdef CONFIG_M4V_DEMUXER |
|
| 917 |
+#if CONFIG_M4V_DEMUXER |
|
| 918 | 918 |
AVInputFormat m4v_demuxer = {
|
| 919 | 919 |
"m4v", |
| 920 | 920 |
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
|
| ... | ... |
@@ -928,7 +928,7 @@ AVInputFormat m4v_demuxer = {
|
| 928 | 928 |
}; |
| 929 | 929 |
#endif |
| 930 | 930 |
|
| 931 |
-#ifdef CONFIG_M4V_MUXER |
|
| 931 |
+#if CONFIG_M4V_MUXER |
|
| 932 | 932 |
AVOutputFormat m4v_muxer = {
|
| 933 | 933 |
"m4v", |
| 934 | 934 |
NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
|
| ... | ... |
@@ -943,7 +943,7 @@ AVOutputFormat m4v_muxer = {
|
| 943 | 943 |
}; |
| 944 | 944 |
#endif |
| 945 | 945 |
|
| 946 |
-#ifdef CONFIG_MJPEG_DEMUXER |
|
| 946 |
+#if CONFIG_MJPEG_DEMUXER |
|
| 947 | 947 |
AVInputFormat mjpeg_demuxer = {
|
| 948 | 948 |
"mjpeg", |
| 949 | 949 |
NULL_IF_CONFIG_SMALL("MJPEG video"),
|
| ... | ... |
@@ -957,7 +957,7 @@ AVInputFormat mjpeg_demuxer = {
|
| 957 | 957 |
}; |
| 958 | 958 |
#endif |
| 959 | 959 |
|
| 960 |
-#ifdef CONFIG_MJPEG_MUXER |
|
| 960 |
+#if CONFIG_MJPEG_MUXER |
|
| 961 | 961 |
AVOutputFormat mjpeg_muxer = {
|
| 962 | 962 |
"mjpeg", |
| 963 | 963 |
NULL_IF_CONFIG_SMALL("MJPEG video"),
|
| ... | ... |
@@ -972,7 +972,7 @@ AVOutputFormat mjpeg_muxer = {
|
| 972 | 972 |
}; |
| 973 | 973 |
#endif |
| 974 | 974 |
|
| 975 |
-#ifdef CONFIG_MLP_DEMUXER |
|
| 975 |
+#if CONFIG_MLP_DEMUXER |
|
| 976 | 976 |
AVInputFormat mlp_demuxer = {
|
| 977 | 977 |
"mlp", |
| 978 | 978 |
NULL_IF_CONFIG_SMALL("raw MLP"),
|
| ... | ... |
@@ -986,7 +986,7 @@ AVInputFormat mlp_demuxer = {
|
| 986 | 986 |
}; |
| 987 | 987 |
#endif |
| 988 | 988 |
|
| 989 |
-#ifdef CONFIG_MPEG1VIDEO_MUXER |
|
| 989 |
+#if CONFIG_MPEG1VIDEO_MUXER |
|
| 990 | 990 |
AVOutputFormat mpeg1video_muxer = {
|
| 991 | 991 |
"mpeg1video", |
| 992 | 992 |
NULL_IF_CONFIG_SMALL("MPEG video"),
|
| ... | ... |
@@ -1001,7 +1001,7 @@ AVOutputFormat mpeg1video_muxer = {
|
| 1001 | 1001 |
}; |
| 1002 | 1002 |
#endif |
| 1003 | 1003 |
|
| 1004 |
-#ifdef CONFIG_MPEG2VIDEO_MUXER |
|
| 1004 |
+#if CONFIG_MPEG2VIDEO_MUXER |
|
| 1005 | 1005 |
AVOutputFormat mpeg2video_muxer = {
|
| 1006 | 1006 |
"mpeg2video", |
| 1007 | 1007 |
NULL_IF_CONFIG_SMALL("MPEG-2 video"),
|
| ... | ... |
@@ -1016,7 +1016,7 @@ AVOutputFormat mpeg2video_muxer = {
|
| 1016 | 1016 |
}; |
| 1017 | 1017 |
#endif |
| 1018 | 1018 |
|
| 1019 |
-#ifdef CONFIG_MPEGVIDEO_DEMUXER |
|
| 1019 |
+#if CONFIG_MPEGVIDEO_DEMUXER |
|
| 1020 | 1020 |
AVInputFormat mpegvideo_demuxer = {
|
| 1021 | 1021 |
"mpegvideo", |
| 1022 | 1022 |
NULL_IF_CONFIG_SMALL("MPEG video"),
|
| ... | ... |
@@ -1029,7 +1029,7 @@ AVInputFormat mpegvideo_demuxer = {
|
| 1029 | 1029 |
}; |
| 1030 | 1030 |
#endif |
| 1031 | 1031 |
|
| 1032 |
-#ifdef CONFIG_NULL_MUXER |
|
| 1032 |
+#if CONFIG_NULL_MUXER |
|
| 1033 | 1033 |
AVOutputFormat null_muxer = {
|
| 1034 | 1034 |
"null", |
| 1035 | 1035 |
NULL_IF_CONFIG_SMALL("null video format"),
|
| ... | ... |
@@ -1048,7 +1048,7 @@ AVOutputFormat null_muxer = {
|
| 1048 | 1048 |
}; |
| 1049 | 1049 |
#endif |
| 1050 | 1050 |
|
| 1051 |
-#ifdef CONFIG_RAWVIDEO_DEMUXER |
|
| 1051 |
+#if CONFIG_RAWVIDEO_DEMUXER |
|
| 1052 | 1052 |
AVInputFormat rawvideo_demuxer = {
|
| 1053 | 1053 |
"rawvideo", |
| 1054 | 1054 |
NULL_IF_CONFIG_SMALL("raw video format"),
|
| ... | ... |
@@ -1062,7 +1062,7 @@ AVInputFormat rawvideo_demuxer = {
|
| 1062 | 1062 |
}; |
| 1063 | 1063 |
#endif |
| 1064 | 1064 |
|
| 1065 |
-#ifdef CONFIG_RAWVIDEO_MUXER |
|
| 1065 |
+#if CONFIG_RAWVIDEO_MUXER |
|
| 1066 | 1066 |
AVOutputFormat rawvideo_muxer = {
|
| 1067 | 1067 |
"rawvideo", |
| 1068 | 1068 |
NULL_IF_CONFIG_SMALL("raw video format"),
|
| ... | ... |
@@ -1077,7 +1077,7 @@ AVOutputFormat rawvideo_muxer = {
|
| 1077 | 1077 |
}; |
| 1078 | 1078 |
#endif |
| 1079 | 1079 |
|
| 1080 |
-#ifdef CONFIG_ROQ_MUXER |
|
| 1080 |
+#if CONFIG_ROQ_MUXER |
|
| 1081 | 1081 |
AVOutputFormat roq_muxer = |
| 1082 | 1082 |
{
|
| 1083 | 1083 |
"RoQ", |
| ... | ... |
@@ -1092,7 +1092,7 @@ AVOutputFormat roq_muxer = |
| 1092 | 1092 |
}; |
| 1093 | 1093 |
#endif |
| 1094 | 1094 |
|
| 1095 |
-#ifdef CONFIG_SHORTEN_DEMUXER |
|
| 1095 |
+#if CONFIG_SHORTEN_DEMUXER |
|
| 1096 | 1096 |
AVInputFormat shorten_demuxer = {
|
| 1097 | 1097 |
"shn", |
| 1098 | 1098 |
NULL_IF_CONFIG_SMALL("raw Shorten"),
|
| ... | ... |
@@ -1106,7 +1106,7 @@ AVInputFormat shorten_demuxer = {
|
| 1106 | 1106 |
}; |
| 1107 | 1107 |
#endif |
| 1108 | 1108 |
|
| 1109 |
-#ifdef CONFIG_VC1_DEMUXER |
|
| 1109 |
+#if CONFIG_VC1_DEMUXER |
|
| 1110 | 1110 |
AVInputFormat vc1_demuxer = {
|
| 1111 | 1111 |
"vc1", |
| 1112 | 1112 |
NULL_IF_CONFIG_SMALL("raw VC-1"),
|
| ... | ... |
@@ -1151,13 +1151,13 @@ AVOutputFormat pcm_ ## name ## _muxer = {\
|
| 1151 | 1151 |
}; |
| 1152 | 1152 |
|
| 1153 | 1153 |
|
| 1154 |
-#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS) |
|
| 1154 |
+#if !CONFIG_MUXERS && CONFIG_DEMUXERS |
|
| 1155 | 1155 |
#define PCMDEF(name, long_name, ext, codec) \ |
| 1156 | 1156 |
PCMINPUTDEF(name, long_name, ext, codec) |
| 1157 |
-#elif defined(CONFIG_MUXERS) && !defined(CONFIG_DEMUXERS) |
|
| 1157 |
+#elif CONFIG_MUXERS && !CONFIG_DEMUXERS |
|
| 1158 | 1158 |
#define PCMDEF(name, long_name, ext, codec) \ |
| 1159 | 1159 |
PCMOUTPUTDEF(name, long_name, ext, codec) |
| 1160 |
-#elif defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS) |
|
| 1160 |
+#elif CONFIG_MUXERS && CONFIG_DEMUXERS |
|
| 1161 | 1161 |
#define PCMDEF(name, long_name, ext, codec) \ |
| 1162 | 1162 |
PCMINPUTDEF(name, long_name, ext, codec)\ |
| 1163 | 1163 |
PCMOUTPUTDEF(name, long_name, ext, codec) |
| ... | ... |
@@ -248,7 +248,7 @@ const AVCodecTag codec_wav_tags[] = {
|
| 248 | 248 |
{ 0, 0 },
|
| 249 | 249 |
}; |
| 250 | 250 |
|
| 251 |
-#ifdef CONFIG_MUXERS |
|
| 251 |
+#if CONFIG_MUXERS |
|
| 252 | 252 |
int64_t start_tag(ByteIOContext *pb, const char *tag) |
| 253 | 253 |
{
|
| 254 | 254 |
put_tag(pb, tag); |
| ... | ... |
@@ -379,7 +379,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta |
| 379 | 379 |
} |
| 380 | 380 |
#endif //CONFIG_MUXERS |
| 381 | 381 |
|
| 382 |
-#ifdef CONFIG_DEMUXERS |
|
| 382 |
+#if CONFIG_DEMUXERS |
|
| 383 | 383 |
/* We could be given one of the three possible structures here: |
| 384 | 384 |
* WAVEFORMAT, PCMWAVEFORMAT or WAVEFORMATEX. Each structure |
| 385 | 385 |
* is an expansion of the previous one with the fields added |
| ... | ... |
@@ -27,7 +27,7 @@ |
| 27 | 27 |
#include "avformat.h" |
| 28 | 28 |
|
| 29 | 29 |
#include <sys/time.h> |
| 30 |
-#ifdef HAVE_SYS_SELECT_H |
|
| 30 |
+#if HAVE_SYS_SELECT_H |
|
| 31 | 31 |
#include <sys/select.h> |
| 32 | 32 |
#endif |
| 33 | 33 |
#include <strings.h> |
| ... | ... |
@@ -1502,7 +1502,7 @@ static int rtsp_read_close(AVFormatContext *s) |
| 1502 | 1502 |
return 0; |
| 1503 | 1503 |
} |
| 1504 | 1504 |
|
| 1505 |
-#ifdef CONFIG_RTSP_DEMUXER |
|
| 1505 |
+#if CONFIG_RTSP_DEMUXER |
|
| 1506 | 1506 |
AVInputFormat rtsp_demuxer = {
|
| 1507 | 1507 |
"rtsp", |
| 1508 | 1508 |
NULL_IF_CONFIG_SMALL("RTSP input format"),
|
| ... | ... |
@@ -1595,7 +1595,7 @@ static int sdp_read_close(AVFormatContext *s) |
| 1595 | 1595 |
return 0; |
| 1596 | 1596 |
} |
| 1597 | 1597 |
|
| 1598 |
-#ifdef CONFIG_SDP_DEMUXER |
|
| 1598 |
+#if CONFIG_SDP_DEMUXER |
|
| 1599 | 1599 |
AVInputFormat sdp_demuxer = {
|
| 1600 | 1600 |
"sdp", |
| 1601 | 1601 |
NULL_IF_CONFIG_SMALL("SDP"),
|
| ... | ... |
@@ -1607,7 +1607,7 @@ AVInputFormat sdp_demuxer = {
|
| 1607 | 1607 |
}; |
| 1608 | 1608 |
#endif |
| 1609 | 1609 |
|
| 1610 |
-#ifdef CONFIG_REDIR_DEMUXER |
|
| 1610 |
+#if CONFIG_REDIR_DEMUXER |
|
| 1611 | 1611 |
/* dummy redirector format (used directly in av_open_input_file now) */ |
| 1612 | 1612 |
static int redir_probe(AVProbeData *pd) |
| 1613 | 1613 |
{
|
| ... | ... |
@@ -503,7 +503,7 @@ static int swf_write_trailer(AVFormatContext *s) |
| 503 | 503 |
return 0; |
| 504 | 504 |
} |
| 505 | 505 |
|
| 506 |
-#ifdef CONFIG_SWF_MUXER |
|
| 506 |
+#if CONFIG_SWF_MUXER |
|
| 507 | 507 |
AVOutputFormat swf_muxer = {
|
| 508 | 508 |
"swf", |
| 509 | 509 |
NULL_IF_CONFIG_SMALL("Flash format"),
|
| ... | ... |
@@ -517,7 +517,7 @@ AVOutputFormat swf_muxer = {
|
| 517 | 517 |
swf_write_trailer, |
| 518 | 518 |
}; |
| 519 | 519 |
#endif |
| 520 |
-#ifdef CONFIG_AVM2_MUXER |
|
| 520 |
+#if CONFIG_AVM2_MUXER |
|
| 521 | 521 |
AVOutputFormat avm2_muxer = {
|
| 522 | 522 |
"avm2", |
| 523 | 523 |
NULL_IF_CONFIG_SMALL("Flash 9 (AVM2) format"),
|
| ... | ... |
@@ -29,7 +29,7 @@ |
| 29 | 29 |
#include <unistd.h> |
| 30 | 30 |
#include "network.h" |
| 31 | 31 |
#include "os_support.h" |
| 32 |
-#ifdef HAVE_SYS_SELECT_H |
|
| 32 |
+#if HAVE_SYS_SELECT_H |
|
| 33 | 33 |
#include <sys/select.h> |
| 34 | 34 |
#endif |
| 35 | 35 |
#include <sys/time.h> |
| ... | ... |
@@ -52,7 +52,7 @@ typedef struct {
|
| 52 | 52 |
int is_multicast; |
| 53 | 53 |
int local_port; |
| 54 | 54 |
int reuse_socket; |
| 55 |
-#ifndef CONFIG_IPV6 |
|
| 55 |
+#if !CONFIG_IPV6 |
|
| 56 | 56 |
struct sockaddr_in dest_addr; |
| 57 | 57 |
#else |
| 58 | 58 |
struct sockaddr_storage dest_addr; |
| ... | ... |
@@ -72,7 +72,7 @@ static int udp_set_multicast_ttl(int sockfd, int mcastTTL, struct sockaddr *addr |
| 72 | 72 |
} |
| 73 | 73 |
} |
| 74 | 74 |
#endif |
| 75 |
-#ifdef CONFIG_IPV6 |
|
| 75 |
+#if CONFIG_IPV6 |
|
| 76 | 76 |
if (addr->sa_family == AF_INET6) {
|
| 77 | 77 |
if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastTTL, sizeof(mcastTTL)) < 0) {
|
| 78 | 78 |
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 sockfd, struct sockaddr *addr) {
|
| 96 | 96 |
} |
| 97 | 97 |
} |
| 98 | 98 |
#endif |
| 99 |
-#ifdef CONFIG_IPV6 |
|
| 99 |
+#if CONFIG_IPV6 |
|
| 100 | 100 |
if (addr->sa_family == AF_INET6) {
|
| 101 | 101 |
struct ipv6_mreq mreq6; |
| 102 | 102 |
|
| ... | ... |
@@ -124,7 +124,7 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr) {
|
| 124 | 124 |
} |
| 125 | 125 |
} |
| 126 | 126 |
#endif |
| 127 |
-#ifdef CONFIG_IPV6 |
|
| 127 |
+#if CONFIG_IPV6 |
|
| 128 | 128 |
if (addr->sa_family == AF_INET6) {
|
| 129 | 129 |
struct ipv6_mreq mreq6; |
| 130 | 130 |
|
| ... | ... |
@@ -139,7 +139,7 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr) {
|
| 139 | 139 |
return 0; |
| 140 | 140 |
} |
| 141 | 141 |
|
| 142 |
-#ifdef CONFIG_IPV6 |
|
| 142 |
+#if CONFIG_IPV6 |
|
| 143 | 143 |
static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, int type, int family, int flags) {
|
| 144 | 144 |
struct addrinfo hints, *res = 0; |
| 145 | 145 |
int error; |
| ... | ... |
@@ -342,7 +342,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) |
| 342 | 342 |
int is_output; |
| 343 | 343 |
const char *p; |
| 344 | 344 |
char buf[256]; |
| 345 |
-#ifndef CONFIG_IPV6 |
|
| 345 |
+#if !CONFIG_IPV6 |
|
| 346 | 346 |
struct sockaddr_in my_addr; |
| 347 | 347 |
#else |
| 348 | 348 |
struct sockaddr_storage my_addr; |
| ... | ... |
@@ -160,7 +160,7 @@ AVOutputFormat *guess_format(const char *short_name, const char *filename, |
| 160 | 160 |
int score_max, score; |
| 161 | 161 |
|
| 162 | 162 |
/* specific test for image sequences */ |
| 163 |
-#ifdef CONFIG_IMAGE2_MUXER |
|
| 163 |
+#if CONFIG_IMAGE2_MUXER |
|
| 164 | 164 |
if (!short_name && filename && |
| 165 | 165 |
av_filename_number_test(filename) && |
| 166 | 166 |
av_guess_image2_codec(filename) != CODEC_ID_NONE) {
|
| ... | ... |
@@ -214,7 +214,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, |
| 214 | 214 |
if(type == CODEC_TYPE_VIDEO){
|
| 215 | 215 |
enum CodecID codec_id= CODEC_ID_NONE; |
| 216 | 216 |
|
| 217 |
-#ifdef CONFIG_IMAGE2_MUXER |
|
| 217 |
+#if CONFIG_IMAGE2_MUXER |
|
| 218 | 218 |
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
|
| 219 | 219 |
codec_id= av_guess_image2_codec(filename); |
| 220 | 220 |
} |
| ... | ... |
@@ -30,7 +30,7 @@ typedef struct {
|
| 30 | 30 |
int last_duration; |
| 31 | 31 |
} WAVContext; |
| 32 | 32 |
|
| 33 |
-#ifdef CONFIG_WAV_MUXER |
|
| 33 |
+#if CONFIG_WAV_MUXER |
|
| 34 | 34 |
static int wav_write_header(AVFormatContext *s) |
| 35 | 35 |
{
|
| 36 | 36 |
WAVContext *wav = s->priv_data; |
| ... | ... |
@@ -256,7 +256,7 @@ static int wav_read_seek(AVFormatContext *s, |
| 256 | 256 |
return pcm_read_seek(s, stream_index, timestamp, flags); |
| 257 | 257 |
} |
| 258 | 258 |
|
| 259 |
-#ifdef CONFIG_WAV_DEMUXER |
|
| 259 |
+#if CONFIG_WAV_DEMUXER |
|
| 260 | 260 |
AVInputFormat wav_demuxer = {
|
| 261 | 261 |
"wav", |
| 262 | 262 |
NULL_IF_CONFIG_SMALL("WAV format"),
|
| ... | ... |
@@ -270,7 +270,7 @@ AVInputFormat wav_demuxer = {
|
| 270 | 270 |
.codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0},
|
| 271 | 271 |
}; |
| 272 | 272 |
#endif |
| 273 |
-#ifdef CONFIG_WAV_MUXER |
|
| 273 |
+#if CONFIG_WAV_MUXER |
|
| 274 | 274 |
AVOutputFormat wav_muxer = {
|
| 275 | 275 |
"wav", |
| 276 | 276 |
NULL_IF_CONFIG_SMALL("WAV format"),
|
| ... | ... |
@@ -371,7 +371,7 @@ static int wsvqa_read_packet(AVFormatContext *s, |
| 371 | 371 |
return ret; |
| 372 | 372 |
} |
| 373 | 373 |
|
| 374 |
-#ifdef CONFIG_WSAUD_DEMUXER |
|
| 374 |
+#if CONFIG_WSAUD_DEMUXER |
|
| 375 | 375 |
AVInputFormat wsaud_demuxer = {
|
| 376 | 376 |
"wsaud", |
| 377 | 377 |
NULL_IF_CONFIG_SMALL("Westwood Studios audio format"),
|
| ... | ... |
@@ -381,7 +381,7 @@ AVInputFormat wsaud_demuxer = {
|
| 381 | 381 |
wsaud_read_packet, |
| 382 | 382 |
}; |
| 383 | 383 |
#endif |
| 384 |
-#ifdef CONFIG_WSVQA_DEMUXER |
|
| 384 |
+#if CONFIG_WSVQA_DEMUXER |
|
| 385 | 385 |
AVInputFormat wsvqa_demuxer = {
|
| 386 | 386 |
"wsvqa", |
| 387 | 387 |
NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"),
|
| ... | ... |
@@ -29,7 +29,7 @@ struct frame_attributes {
|
| 29 | 29 |
int top_field_first; |
| 30 | 30 |
}; |
| 31 | 31 |
|
| 32 |
-#ifdef CONFIG_YUV4MPEGPIPE_MUXER |
|
| 32 |
+#if CONFIG_YUV4MPEGPIPE_MUXER |
|
| 33 | 33 |
static int yuv4_generate_header(AVFormatContext *s, char* buf) |
| 34 | 34 |
{
|
| 35 | 35 |
AVStream *st; |
| ... | ... |
@@ -382,7 +382,7 @@ static int yuv4_probe(AVProbeData *pd) |
| 382 | 382 |
return 0; |
| 383 | 383 |
} |
| 384 | 384 |
|
| 385 |
-#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER |
|
| 385 |
+#if CONFIG_YUV4MPEGPIPE_DEMUXER |
|
| 386 | 386 |
AVInputFormat yuv4mpegpipe_demuxer = {
|
| 387 | 387 |
"yuv4mpegpipe", |
| 388 | 388 |
NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
|
| ... | ... |
@@ -39,7 +39,7 @@ static const uint8_t rcon[10] = {
|
| 39 | 39 |
|
| 40 | 40 |
static uint8_t sbox[256]; |
| 41 | 41 |
static uint8_t inv_sbox[256]; |
| 42 |
-#ifdef CONFIG_SMALL |
|
| 42 |
+#if CONFIG_SMALL |
|
| 43 | 43 |
static uint32_t enc_multbl[1][256]; |
| 44 | 44 |
static uint32_t dec_multbl[1][256]; |
| 45 | 45 |
#else |
| ... | ... |
@@ -62,7 +62,7 @@ static void subshift(uint8_t s0[2][16], int s, uint8_t *box){
|
| 62 | 62 |
} |
| 63 | 63 |
|
| 64 | 64 |
static inline int mix_core(uint32_t multbl[4][256], int a, int b, int c, int d){
|
| 65 |
-#ifdef CONFIG_SMALL |
|
| 65 |
+#if CONFIG_SMALL |
|
| 66 | 66 |
#define ROT(x,s) ((x<<s)|(x>>(32-s))) |
| 67 | 67 |
return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24); |
| 68 | 68 |
#else |
| ... | ... |
@@ -114,7 +114,7 @@ static void init_multbl2(uint8_t tbl[1024], int c[4], uint8_t *log8, uint8_t *al |
| 114 | 114 |
int x= sbox[i>>2]; |
| 115 | 115 |
if(x) tbl[i]= alog8[ log8[x] + log8[c[i&3]] ]; |
| 116 | 116 |
} |
| 117 |
-#ifndef CONFIG_SMALL |
|
| 117 |
+#if !CONFIG_SMALL |
|
| 118 | 118 |
for(j=256; j<1024; j++) |
| 119 | 119 |
for(i=0; i<4; i++) |
| 120 | 120 |
tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024]; |
| ... | ... |
@@ -23,7 +23,7 @@ |
| 23 | 23 |
#include "config.h" |
| 24 | 24 |
#include "libavutil/common.h" |
| 25 | 25 |
|
| 26 |
-#ifdef HAVE_ARMV6 |
|
| 26 |
+#if HAVE_ARMV6 |
|
| 27 | 27 |
#define bswap_16 bswap_16 |
| 28 | 28 |
static av_always_inline av_const uint16_t bswap_16(uint16_t x) |
| 29 | 29 |
{
|
| ... | ... |
@@ -35,7 +35,7 @@ static av_always_inline av_const uint16_t bswap_16(uint16_t x) |
| 35 | 35 |
#define bswap_32 bswap_32 |
| 36 | 36 |
static av_always_inline av_const uint32_t bswap_32(uint32_t x) |
| 37 | 37 |
{
|
| 38 |
-#ifdef HAVE_ARMV6 |
|
| 38 |
+#if HAVE_ARMV6 |
|
| 39 | 39 |
__asm__("rev %0, %0" : "+r"(x));
|
| 40 | 40 |
#else |
| 41 | 41 |
uint32_t t; |
| ... | ... |
@@ -30,13 +30,13 @@ |
| 30 | 30 |
#include "config.h" |
| 31 | 31 |
#include "common.h" |
| 32 | 32 |
|
| 33 |
-#if defined(ARCH_ARM) |
|
| 33 |
+#if ARCH_ARM |
|
| 34 | 34 |
# include "arm/bswap.h" |
| 35 |
-#elif defined(ARCH_BFIN) |
|
| 35 |
+#elif ARCH_BFIN |
|
| 36 | 36 |
# include "bfin/bswap.h" |
| 37 |
-#elif defined(ARCH_SH4) |
|
| 37 |
+#elif ARCH_SH4 |
|
| 38 | 38 |
# include "sh4/bswap.h" |
| 39 |
-#elif defined(ARCH_X86) |
|
| 39 |
+#elif ARCH_X86 |
|
| 40 | 40 |
# include "x86/bswap.h" |
| 41 | 41 |
#endif |
| 42 | 42 |
|
| ... | ... |
@@ -154,7 +154,7 @@ static inline av_const int av_log2_16bit(unsigned int v) |
| 154 | 154 |
/* median of 3 */ |
| 155 | 155 |
static inline av_const int mid_pred(int a, int b, int c) |
| 156 | 156 |
{
|
| 157 |
-#ifdef HAVE_CMOV |
|
| 157 |
+#if HAVE_CMOV |
|
| 158 | 158 |
int i=b; |
| 159 | 159 |
__asm__ volatile( |
| 160 | 160 |
"cmp %2, %1 \n\t" |
| ... | ... |
@@ -323,9 +323,9 @@ static inline av_pure int ff_get_fourcc(const char *s){
|
| 323 | 323 |
}\ |
| 324 | 324 |
} |
| 325 | 325 |
|
| 326 |
-#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_BFIN) |
|
| 326 |
+#if ARCH_X86 || ARCH_PPC || ARCH_BFIN |
|
| 327 | 327 |
#define AV_READ_TIME read_time |
| 328 |
-#if defined(ARCH_X86) |
|
| 328 |
+#if ARCH_X86 |
|
| 329 | 329 |
static inline uint64_t read_time(void) |
| 330 | 330 |
{
|
| 331 | 331 |
uint32_t a, d; |
| ... | ... |
@@ -366,7 +366,7 @@ static inline uint64_t read_time(void) |
| 366 | 366 |
return (((uint64_t)tbu)<<32) | (uint64_t)tbl; |
| 367 | 367 |
} |
| 368 | 368 |
#endif |
| 369 |
-#elif defined(HAVE_GETHRTIME) |
|
| 369 |
+#elif HAVE_GETHRTIME |
|
| 370 | 370 |
#define AV_READ_TIME gethrtime |
| 371 | 371 |
#endif |
| 372 | 372 |
|
| ... | ... |
@@ -397,11 +397,11 @@ tend= AV_READ_TIME();\ |
| 397 | 397 |
#endif |
| 398 | 398 |
|
| 399 | 399 |
/** |
| 400 |
- * Returns NULL if CONFIG_SMALL is defined otherwise the argument |
|
| 400 |
+ * Returns NULL if CONFIG_SMALL is true otherwise the argument |
|
| 401 | 401 |
* without modifications, used to disable the definition of strings |
| 402 | 402 |
* (for example AVCodec long_names). |
| 403 | 403 |
*/ |
| 404 |
-#ifdef CONFIG_SMALL |
|
| 404 |
+#if CONFIG_SMALL |
|
| 405 | 405 |
# define NULL_IF_CONFIG_SMALL(x) NULL |
| 406 | 406 |
#else |
| 407 | 407 |
# define NULL_IF_CONFIG_SMALL(x) x |
| ... | ... |
@@ -22,7 +22,7 @@ |
| 22 | 22 |
#include "bswap.h" |
| 23 | 23 |
#include "crc.h" |
| 24 | 24 |
|
| 25 |
-#ifdef CONFIG_HARDCODED_TABLES |
|
| 25 |
+#if CONFIG_HARDCODED_TABLES |
|
| 26 | 26 |
#include "crc_data.h" |
| 27 | 27 |
#else |
| 28 | 28 |
static struct {
|
| ... | ... |
@@ -75,7 +75,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
|
| 75 | 75 |
} |
| 76 | 76 |
} |
| 77 | 77 |
ctx[256]=1; |
| 78 |
-#ifndef CONFIG_SMALL |
|
| 78 |
+#if !CONFIG_SMALL |
|
| 79 | 79 |
if(ctx_size >= sizeof(AVCRC)*1024) |
| 80 | 80 |
for (i = 0; i < 256; i++) |
| 81 | 81 |
for(j=0; j<3; j++) |
| ... | ... |
@@ -91,7 +91,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
|
| 91 | 91 |
* @return a pointer to the CRC table or NULL on failure |
| 92 | 92 |
*/ |
| 93 | 93 |
const AVCRC *av_crc_get_table(AVCRCId crc_id){
|
| 94 |
-#ifndef CONFIG_HARDCODED_TABLES |
|
| 94 |
+#if !CONFIG_HARDCODED_TABLES |
|
| 95 | 95 |
if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1]) |
| 96 | 96 |
if (av_crc_init(av_crc_table[crc_id], |
| 97 | 97 |
av_crc_table_params[crc_id].le, |
| ... | ... |
@@ -113,7 +113,7 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id){
|
| 113 | 113 |
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){
|
| 114 | 114 |
const uint8_t *end= buffer+length; |
| 115 | 115 |
|
| 116 |
-#ifndef CONFIG_SMALL |
|
| 116 |
+#if !CONFIG_SMALL |
|
| 117 | 117 |
if(!ctx[256]) |
| 118 | 118 |
while(buffer<end-3){
|
| 119 | 119 |
crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4; |
| ... | ... |
@@ -74,7 +74,7 @@ static const uint8_t PC2_shuffle[] = {
|
| 74 | 74 |
}; |
| 75 | 75 |
#undef T |
| 76 | 76 |
|
| 77 |
-#ifdef CONFIG_SMALL |
|
| 77 |
+#if CONFIG_SMALL |
|
| 78 | 78 |
static const uint8_t S_boxes[8][32] = {
|
| 79 | 79 |
{
|
| 80 | 80 |
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, uint64_t k) {
|
| 218 | 218 |
// apply S-boxes, those compress the data again from 8 * 6 to 8 * 4 bits |
| 219 | 219 |
for (i = 7; i >= 0; i--) {
|
| 220 | 220 |
uint8_t tmp = (r ^ k) & 0x3f; |
| 221 |
-#ifdef CONFIG_SMALL |
|
| 221 |
+#if CONFIG_SMALL |
|
| 222 | 222 |
uint8_t v = S_boxes[i][tmp >> 1]; |
| 223 | 223 |
if (tmp & 1) v >>= 4; |
| 224 | 224 |
out = (out >> 4) | (v << 28); |
| ... | ... |
@@ -229,7 +229,7 @@ static uint32_t f_func(uint32_t r, uint64_t k) {
|
| 229 | 229 |
r = (r >> 4) | (r << 28); |
| 230 | 230 |
k >>= 6; |
| 231 | 231 |
} |
| 232 |
-#ifdef CONFIG_SMALL |
|
| 232 |
+#if CONFIG_SMALL |
|
| 233 | 233 |
out = shuffle(out, P_shuffle, sizeof(P_shuffle)); |
| 234 | 234 |
#endif |
| 235 | 235 |
return out; |
| ... | ... |
@@ -102,7 +102,7 @@ |
| 102 | 102 |
#endif |
| 103 | 103 |
|
| 104 | 104 |
// Use rip-relative addressing if compiling PIC code on x86-64. |
| 105 |
-#if defined(ARCH_X86_64) && defined(PIC) |
|
| 105 |
+#if ARCH_X86_64 && defined(PIC) |
|
| 106 | 106 |
# define LOCAL_MANGLE(a) #a "(%%rip)" |
| 107 | 107 |
#else |
| 108 | 108 |
# define LOCAL_MANGLE(a) #a |
| ... | ... |
@@ -125,7 +125,7 @@ |
| 125 | 125 |
|
| 126 | 126 |
extern const uint32_t ff_inverse[256]; |
| 127 | 127 |
|
| 128 |
-#if defined(ARCH_X86) |
|
| 128 |
+#if ARCH_X86 |
|
| 129 | 129 |
# define FASTDIV(a,b) \ |
| 130 | 130 |
({\
|
| 131 | 131 |
int ret,dmy;\ |
| ... | ... |
@@ -136,7 +136,7 @@ extern const uint32_t ff_inverse[256]; |
| 136 | 136 |
);\ |
| 137 | 137 |
ret;\ |
| 138 | 138 |
}) |
| 139 |
-#elif defined(HAVE_ARMV6) |
|
| 139 |
+#elif HAVE_ARMV6 |
|
| 140 | 140 |
static inline av_const int FASTDIV(int a, int b) |
| 141 | 141 |
{
|
| 142 | 142 |
int r, t; |
| ... | ... |
@@ -147,7 +147,7 @@ static inline av_const int FASTDIV(int a, int b) |
| 147 | 147 |
: "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse)); |
| 148 | 148 |
return r; |
| 149 | 149 |
} |
| 150 |
-#elif defined(ARCH_ARM) |
|
| 150 |
+#elif ARCH_ARM |
|
| 151 | 151 |
static inline av_const int FASTDIV(int a, int b) |
| 152 | 152 |
{
|
| 153 | 153 |
int r, t; |
| ... | ... |
@@ -155,7 +155,7 @@ static inline av_const int FASTDIV(int a, int b) |
| 155 | 155 |
: "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b])); |
| 156 | 156 |
return r; |
| 157 | 157 |
} |
| 158 |
-#elif defined(CONFIG_FASTDIV) |
|
| 158 |
+#elif CONFIG_FASTDIV |
|
| 159 | 159 |
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32)) |
| 160 | 160 |
#else |
| 161 | 161 |
# define FASTDIV(a,b) ((a)/(b)) |
| ... | ... |
@@ -171,7 +171,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a) |
| 171 | 171 |
|
| 172 | 172 |
if(a<255) return (ff_sqrt_tab[a+1]-1)>>4; |
| 173 | 173 |
else if(a<(1<<12)) b= ff_sqrt_tab[a>>4 ]>>2; |
| 174 |
-#ifndef CONFIG_SMALL |
|
| 174 |
+#if !CONFIG_SMALL |
|
| 175 | 175 |
else if(a<(1<<14)) b= ff_sqrt_tab[a>>6 ]>>1; |
| 176 | 176 |
else if(a<(1<<16)) b= ff_sqrt_tab[a>>8 ] ; |
| 177 | 177 |
#endif |
| ... | ... |
@@ -185,7 +185,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a) |
| 185 | 185 |
return b - (a<b*b); |
| 186 | 186 |
} |
| 187 | 187 |
|
| 188 |
-#if defined(ARCH_X86) |
|
| 188 |
+#if ARCH_X86 |
|
| 189 | 189 |
#define MASK_ABS(mask, level)\ |
| 190 | 190 |
__asm__ volatile(\ |
| 191 | 191 |
"cltd \n\t"\ |
| ... | ... |
@@ -199,7 +199,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a) |
| 199 | 199 |
level= (level^mask)-mask; |
| 200 | 200 |
#endif |
| 201 | 201 |
|
| 202 |
-#ifdef HAVE_CMOV |
|
| 202 |
+#if HAVE_CMOV |
|
| 203 | 203 |
#define COPY3_IF_LT(x,y,a,b,c,d)\ |
| 204 | 204 |
__asm__ volatile (\ |
| 205 | 205 |
"cmpl %0, %3 \n\t"\ |
| ... | ... |
@@ -259,42 +259,42 @@ if((y)<(x)){\
|
| 259 | 259 |
}\ |
| 260 | 260 |
} |
| 261 | 261 |
|
| 262 |
-#ifndef HAVE_LLRINT |
|
| 262 |
+#if !HAVE_LLRINT |
|
| 263 | 263 |
static av_always_inline av_const long long llrint(double x) |
| 264 | 264 |
{
|
| 265 | 265 |
return rint(x); |
| 266 | 266 |
} |
| 267 | 267 |
#endif /* HAVE_LLRINT */ |
| 268 | 268 |
|
| 269 |
-#ifndef HAVE_LRINT |
|
| 269 |
+#if !HAVE_LRINT |
|
| 270 | 270 |
static av_always_inline av_const long int lrint(double x) |
| 271 | 271 |
{
|
| 272 | 272 |
return rint(x); |
| 273 | 273 |
} |
| 274 | 274 |
#endif /* HAVE_LRINT */ |
| 275 | 275 |
|
| 276 |
-#ifndef HAVE_LRINTF |
|
| 276 |
+#if !HAVE_LRINTF |
|
| 277 | 277 |
static av_always_inline av_const long int lrintf(float x) |
| 278 | 278 |
{
|
| 279 | 279 |
return (int)(rint(x)); |
| 280 | 280 |
} |
| 281 | 281 |
#endif /* HAVE_LRINTF */ |
| 282 | 282 |
|
| 283 |
-#ifndef HAVE_ROUND |
|
| 283 |
+#if !HAVE_ROUND |
|
| 284 | 284 |
static av_always_inline av_const double round(double x) |
| 285 | 285 |
{
|
| 286 | 286 |
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); |
| 287 | 287 |
} |
| 288 | 288 |
#endif /* HAVE_ROUND */ |
| 289 | 289 |
|
| 290 |
-#ifndef HAVE_ROUNDF |
|
| 290 |
+#if !HAVE_ROUNDF |
|
| 291 | 291 |
static av_always_inline av_const float roundf(float x) |
| 292 | 292 |
{
|
| 293 | 293 |
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); |
| 294 | 294 |
} |
| 295 | 295 |
#endif /* HAVE_ROUNDF */ |
| 296 | 296 |
|
| 297 |
-#ifndef HAVE_TRUNCF |
|
| 297 |
+#if !HAVE_TRUNCF |
|
| 298 | 298 |
static av_always_inline av_const float truncf(float x) |
| 299 | 299 |
{
|
| 300 | 300 |
return (x > 0) ? floor(x) : ceil(x); |
| ... | ... |
@@ -66,7 +66,7 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
|
| 66 | 66 |
#define AV_RL8(x) AV_RB8(x) |
| 67 | 67 |
#define AV_WL8(p, d) AV_WB8(p, d) |
| 68 | 68 |
|
| 69 |
-#ifdef HAVE_FAST_UNALIGNED |
|
| 69 |
+#if HAVE_FAST_UNALIGNED |
|
| 70 | 70 |
# ifdef WORDS_BIGENDIAN |
| 71 | 71 |
# define AV_RB16(x) AV_RN16(x) |
| 72 | 72 |
# define AV_WB16(p, d) AV_WN16(p, d) |
| ... | ... |
@@ -32,7 +32,7 @@ |
| 32 | 32 |
#undef realloc |
| 33 | 33 |
|
| 34 | 34 |
#include <stdlib.h> |
| 35 |
-#ifdef HAVE_MALLOC_H |
|
| 35 |
+#if HAVE_MALLOC_H |
|
| 36 | 36 |
#include <malloc.h> |
| 37 | 37 |
#endif |
| 38 | 38 |
|
| ... | ... |
@@ -43,7 +43,7 @@ |
| 43 | 43 |
void *av_malloc(unsigned int size) |
| 44 | 44 |
{
|
| 45 | 45 |
void *ptr = NULL; |
| 46 |
-#ifdef CONFIG_MEMALIGN_HACK |
|
| 46 |
+#if CONFIG_MEMALIGN_HACK |
|
| 47 | 47 |
long diff; |
| 48 | 48 |
#endif |
| 49 | 49 |
|
| ... | ... |
@@ -51,16 +51,16 @@ void *av_malloc(unsigned int size) |
| 51 | 51 |
if(size > (INT_MAX-16) ) |
| 52 | 52 |
return NULL; |
| 53 | 53 |
|
| 54 |
-#ifdef CONFIG_MEMALIGN_HACK |
|
| 54 |
+#if CONFIG_MEMALIGN_HACK |
|
| 55 | 55 |
ptr = malloc(size+16); |
| 56 | 56 |
if(!ptr) |
| 57 | 57 |
return ptr; |
| 58 | 58 |
diff= ((-(long)ptr - 1)&15) + 1; |
| 59 | 59 |
ptr = (char*)ptr + diff; |
| 60 | 60 |
((char*)ptr)[-1]= diff; |
| 61 |
-#elif defined (HAVE_POSIX_MEMALIGN) |
|
| 61 |
+#elif HAVE_POSIX_MEMALIGN |
|
| 62 | 62 |
posix_memalign(&ptr,16,size); |
| 63 |
-#elif defined (HAVE_MEMALIGN) |
|
| 63 |
+#elif HAVE_MEMALIGN |
|
| 64 | 64 |
ptr = memalign(16,size); |
| 65 | 65 |
/* Why 64? |
| 66 | 66 |
Indeed, we should align it: |
| ... | ... |
@@ -96,7 +96,7 @@ void *av_malloc(unsigned int size) |
| 96 | 96 |
|
| 97 | 97 |
void *av_realloc(void *ptr, unsigned int size) |
| 98 | 98 |
{
|
| 99 |
-#ifdef CONFIG_MEMALIGN_HACK |
|
| 99 |
+#if CONFIG_MEMALIGN_HACK |
|
| 100 | 100 |
int diff; |
| 101 | 101 |
#endif |
| 102 | 102 |
|
| ... | ... |
@@ -104,7 +104,7 @@ void *av_realloc(void *ptr, unsigned int size) |
| 104 | 104 |
if(size > (INT_MAX-16) ) |
| 105 | 105 |
return NULL; |
| 106 | 106 |
|
| 107 |
-#ifdef CONFIG_MEMALIGN_HACK |
|
| 107 |
+#if CONFIG_MEMALIGN_HACK |
|
| 108 | 108 |
//FIXME this isn't aligned correctly, though it probably isn't needed |
| 109 | 109 |
if(!ptr) return av_malloc(size); |
| 110 | 110 |
diff= ((char*)ptr)[-1]; |
| ... | ... |
@@ -118,7 +118,7 @@ void av_free(void *ptr) |
| 118 | 118 |
{
|
| 119 | 119 |
/* XXX: this test should not be needed on most libcs */ |
| 120 | 120 |
if (ptr) |
| 121 |
-#ifdef CONFIG_MEMALIGN_HACK |
|
| 121 |
+#if CONFIG_MEMALIGN_HACK |
|
| 122 | 122 |
free((char*)ptr - ((char*)ptr)[-1]); |
| 123 | 123 |
#else |
| 124 | 124 |
free(ptr); |
| ... | ... |
@@ -37,7 +37,7 @@ |
| 37 | 37 |
#elif defined(_MSC_VER) |
| 38 | 38 |
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v |
| 39 | 39 |
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v |
| 40 |
-#elif defined(HAVE_INLINE_ASM) |
|
| 40 |
+#elif HAVE_INLINE_ASM |
|
| 41 | 41 |
#error The asm code needs alignment, but we do not know how to do it for this compiler. |
| 42 | 42 |
#else |
| 43 | 43 |
#define DECLARE_ALIGNED(n,t,v) t v |
| ... | ... |
@@ -54,7 +54,7 @@ static void transform(uint32_t state[5], const uint8_t buffer[64]){
|
| 54 | 54 |
c = state[2]; |
| 55 | 55 |
d = state[3]; |
| 56 | 56 |
e = state[4]; |
| 57 |
-#ifdef CONFIG_SMALL |
|
| 57 |
+#if CONFIG_SMALL |
|
| 58 | 58 |
for(i=0; i<80; i++){
|
| 59 | 59 |
int t; |
| 60 | 60 |
if(i<16) t= be2me_32(((uint32_t*)buffer)[i]); |
| ... | ... |
@@ -110,7 +110,7 @@ void av_sha1_update(AVSHA1* ctx, const uint8_t* data, unsigned int len){
|
| 110 | 110 |
|
| 111 | 111 |
j = ctx->count & 63; |
| 112 | 112 |
ctx->count += len; |
| 113 |
-#ifdef CONFIG_SMALL |
|
| 113 |
+#if CONFIG_SMALL |
|
| 114 | 114 |
for( i = 0; i < len; i++ ){
|
| 115 | 115 |
ctx->buffer[ j++ ] = data[i]; |
| 116 | 116 |
if( 64 == j ){
|
| ... | ... |
@@ -38,7 +38,7 @@ static av_always_inline av_const uint16_t bswap_16(uint16_t x) |
| 38 | 38 |
#define bswap_32 bswap_32 |
| 39 | 39 |
static av_always_inline av_const uint32_t bswap_32(uint32_t x) |
| 40 | 40 |
{
|
| 41 |
-#ifdef HAVE_BSWAP |
|
| 41 |
+#if HAVE_BSWAP |
|
| 42 | 42 |
__asm__("bswap %0" : "+r" (x));
|
| 43 | 43 |
#else |
| 44 | 44 |
__asm__("rorw $8, %w0 \n\t"
|
| ... | ... |
@@ -49,7 +49,7 @@ static av_always_inline av_const uint32_t bswap_32(uint32_t x) |
| 49 | 49 |
return x; |
| 50 | 50 |
} |
| 51 | 51 |
|
| 52 |
-#ifdef ARCH_X86_64 |
|
| 52 |
+#if ARCH_X86_64 |
|
| 53 | 53 |
#define bswap_64 bswap_64 |
| 54 | 54 |
static inline uint64_t av_const bswap_64(uint64_t x) |
| 55 | 55 |
{
|
| ... | ... |
@@ -24,7 +24,7 @@ |
| 24 | 24 |
#include <stdint.h> |
| 25 | 25 |
#include "config.h" |
| 26 | 26 |
|
| 27 |
-#ifdef ARCH_X86_64 |
|
| 27 |
+#if ARCH_X86_64 |
|
| 28 | 28 |
# define REG_a "rax" |
| 29 | 29 |
# define REG_b "rbx" |
| 30 | 30 |
# define REG_c "rcx" |
| ... | ... |
@@ -64,15 +64,10 @@ typedef int32_t x86_reg; |
| 64 | 64 |
# define REGSP esp |
| 65 | 65 |
#endif |
| 66 | 66 |
|
| 67 |
-#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(HAVE_EBX_AVAILABLE) && defined(HAVE_EBP_AVAILABLE)) |
|
| 68 |
-# define HAVE_7REGS 1 |
|
| 69 |
-#endif |
|
| 70 |
- |
|
| 71 |
-#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && (defined(HAVE_EBX_AVAILABLE) || defined(HAVE_EBP_AVAILABLE))) |
|
| 72 |
-# define HAVE_6REGS 1 |
|
| 73 |
-#endif |
|
| 67 |
+#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) |
|
| 68 |
+#define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE)) |
|
| 74 | 69 |
|
| 75 |
-#if defined(ARCH_X86_64) && defined(PIC) |
|
| 70 |
+#if ARCH_X86_64 && defined(PIC) |
|
| 76 | 71 |
# define BROKEN_RELOCATIONS 1 |
| 77 | 72 |
#endif |
| 78 | 73 |
|
| ... | ... |
@@ -92,7 +92,7 @@ unsigned postproc_version(void) |
| 92 | 92 |
return LIBPOSTPROC_VERSION_INT; |
| 93 | 93 |
} |
| 94 | 94 |
|
| 95 |
-#ifdef HAVE_ALTIVEC_H |
|
| 95 |
+#if HAVE_ALTIVEC_H |
|
| 96 | 96 |
#include <altivec.h> |
| 97 | 97 |
#endif |
| 98 | 98 |
|
| ... | ... |
@@ -102,7 +102,7 @@ unsigned postproc_version(void) |
| 102 | 102 |
#define TEMP_STRIDE 8 |
| 103 | 103 |
//#define NUM_BLOCKS_AT_ONCE 16 //not used yet |
| 104 | 104 |
|
| 105 |
-#if defined(ARCH_X86) |
|
| 105 |
+#if ARCH_X86 |
|
| 106 | 106 |
DECLARE_ASM_CONST(8, uint64_t, w05)= 0x0005000500050005LL; |
| 107 | 107 |
DECLARE_ASM_CONST(8, uint64_t, w04)= 0x0004000400040004LL; |
| 108 | 108 |
DECLARE_ASM_CONST(8, uint64_t, w20)= 0x0020002000200020LL; |
| ... | ... |
@@ -150,7 +150,7 @@ static const char *replaceTable[]= |
| 150 | 150 |
}; |
| 151 | 151 |
|
| 152 | 152 |
|
| 153 |
-#if defined(ARCH_X86) |
|
| 153 |
+#if ARCH_X86 |
|
| 154 | 154 |
static inline void prefetchnta(void *p) |
| 155 | 155 |
{
|
| 156 | 156 |
__asm__ volatile( "prefetchnta (%0)\n\t" |
| ... | ... |
@@ -554,45 +554,47 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
| 554 | 554 |
|
| 555 | 555 |
//Note: we have C, MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one |
| 556 | 556 |
//Plain C versions |
| 557 |
-#if !(defined (HAVE_MMX) || defined (HAVE_ALTIVEC)) || defined (RUNTIME_CPUDETECT) |
|
| 557 |
+#if !(HAVE_MMX || HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT) |
|
| 558 | 558 |
#define COMPILE_C |
| 559 | 559 |
#endif |
| 560 | 560 |
|
| 561 |
-#ifdef HAVE_ALTIVEC |
|
| 561 |
+#if HAVE_ALTIVEC |
|
| 562 | 562 |
#define COMPILE_ALTIVEC |
| 563 | 563 |
#endif //HAVE_ALTIVEC |
| 564 | 564 |
|
| 565 |
-#if defined(ARCH_X86) |
|
| 565 |
+#if ARCH_X86 |
|
| 566 | 566 |
|
| 567 |
-#if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT) |
|
| 567 |
+#if (HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) |
|
| 568 | 568 |
#define COMPILE_MMX |
| 569 | 569 |
#endif |
| 570 | 570 |
|
| 571 |
-#if defined (HAVE_MMX2) || defined (RUNTIME_CPUDETECT) |
|
| 571 |
+#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT) |
|
| 572 | 572 |
#define COMPILE_MMX2 |
| 573 | 573 |
#endif |
| 574 | 574 |
|
| 575 |
-#if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT) |
|
| 575 |
+#if (HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT) |
|
| 576 | 576 |
#define COMPILE_3DNOW |
| 577 | 577 |
#endif |
| 578 |
-#endif /* defined(ARCH_X86) */ |
|
| 578 |
+#endif /* ARCH_X86 */ |
|
| 579 | 579 |
|
| 580 | 580 |
#undef HAVE_MMX |
| 581 |
+#define HAVE_MMX 0 |
|
| 581 | 582 |
#undef HAVE_MMX2 |
| 583 |
+#define HAVE_MMX2 0 |
|
| 582 | 584 |
#undef HAVE_3DNOW |
| 585 |
+#define HAVE_3DNOW 0 |
|
| 583 | 586 |
#undef HAVE_ALTIVEC |
| 587 |
+#define HAVE_ALTIVEC 0 |
|
| 584 | 588 |
|
| 585 | 589 |
#ifdef COMPILE_C |
| 586 |
-#undef HAVE_MMX |
|
| 587 |
-#undef HAVE_MMX2 |
|
| 588 |
-#undef HAVE_3DNOW |
|
| 589 | 590 |
#define RENAME(a) a ## _C |
| 590 | 591 |
#include "postprocess_template.c" |
| 591 | 592 |
#endif |
| 592 | 593 |
|
| 593 | 594 |
#ifdef COMPILE_ALTIVEC |
| 594 | 595 |
#undef RENAME |
| 595 |
-#define HAVE_ALTIVEC |
|
| 596 |
+#undef HAVE_ALTIVEC |
|
| 597 |
+#define HAVE_ALTIVEC 1 |
|
| 596 | 598 |
#define RENAME(a) a ## _altivec |
| 597 | 599 |
#include "postprocess_altivec_template.c" |
| 598 | 600 |
#include "postprocess_template.c" |
| ... | ... |
@@ -601,9 +603,8 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
| 601 | 601 |
//MMX versions |
| 602 | 602 |
#ifdef COMPILE_MMX |
| 603 | 603 |
#undef RENAME |
| 604 |
-#define HAVE_MMX |
|
| 605 |
-#undef HAVE_MMX2 |
|
| 606 |
-#undef HAVE_3DNOW |
|
| 604 |
+#undef HAVE_MMX |
|
| 605 |
+#define HAVE_MMX 1 |
|
| 607 | 606 |
#define RENAME(a) a ## _MMX |
| 608 | 607 |
#include "postprocess_template.c" |
| 609 | 608 |
#endif |
| ... | ... |
@@ -611,9 +612,10 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
| 611 | 611 |
//MMX2 versions |
| 612 | 612 |
#ifdef COMPILE_MMX2 |
| 613 | 613 |
#undef RENAME |
| 614 |
-#define HAVE_MMX |
|
| 615 |
-#define HAVE_MMX2 |
|
| 616 |
-#undef HAVE_3DNOW |
|
| 614 |
+#undef HAVE_MMX |
|
| 615 |
+#undef HAVE_MMX2 |
|
| 616 |
+#define HAVE_MMX 1 |
|
| 617 |
+#define HAVE_MMX2 1 |
|
| 617 | 618 |
#define RENAME(a) a ## _MMX2 |
| 618 | 619 |
#include "postprocess_template.c" |
| 619 | 620 |
#endif |
| ... | ... |
@@ -621,9 +623,12 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, |
| 621 | 621 |
//3DNOW versions |
| 622 | 622 |
#ifdef COMPILE_3DNOW |
| 623 | 623 |
#undef RENAME |
| 624 |
-#define HAVE_MMX |
|
| 624 |
+#undef HAVE_MMX |
|
| 625 | 625 |
#undef HAVE_MMX2 |
| 626 |
-#define HAVE_3DNOW |
|
| 626 |
+#undef HAVE_3DNOW |
|
| 627 |
+#define HAVE_MMX 1 |
|
| 628 |
+#define HAVE_MMX2 0 |
|
| 629 |
+#define HAVE_3DNOW 1 |
|
| 627 | 630 |
#define RENAME(a) a ## _3DNow |
| 628 | 631 |
#include "postprocess_template.c" |
| 629 | 632 |
#endif |
| ... | ... |
@@ -641,7 +646,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
| 641 | 641 |
// difference would not be measurable here but it is much better because |
| 642 | 642 |
// someone might exchange the CPU whithout restarting MPlayer ;) |
| 643 | 643 |
#ifdef RUNTIME_CPUDETECT |
| 644 |
-#if defined(ARCH_X86) |
|
| 644 |
+#if ARCH_X86 |
|
| 645 | 645 |
// ordered per speed fastest first |
| 646 | 646 |
if(c->cpuCaps & PP_CPU_CAPS_MMX2) |
| 647 | 647 |
postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| ... | ... |
@@ -652,7 +657,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
| 652 | 652 |
else |
| 653 | 653 |
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 654 | 654 |
#else |
| 655 |
-#ifdef HAVE_ALTIVEC |
|
| 655 |
+#if HAVE_ALTIVEC |
|
| 656 | 656 |
if(c->cpuCaps & PP_CPU_CAPS_ALTIVEC) |
| 657 | 657 |
postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 658 | 658 |
else |
| ... | ... |
@@ -660,13 +665,13 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[] |
| 660 | 660 |
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 661 | 661 |
#endif |
| 662 | 662 |
#else //RUNTIME_CPUDETECT |
| 663 |
-#ifdef HAVE_MMX2 |
|
| 663 |
+#if HAVE_MMX2 |
|
| 664 | 664 |
postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 665 |
-#elif defined (HAVE_3DNOW) |
|
| 665 |
+#elif HAVE_3DNOW |
|
| 666 | 666 |
postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 667 |
-#elif defined (HAVE_MMX) |
|
| 667 |
+#elif HAVE_MMX |
|
| 668 | 668 |
postProcess_MMX(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 669 |
-#elif defined (HAVE_ALTIVEC) |
|
| 669 |
+#elif HAVE_ALTIVEC |
|
| 670 | 670 |
postProcess_altivec(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| 671 | 671 |
#else |
| 672 | 672 |
postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); |
| ... | ... |
@@ -31,32 +31,32 @@ |
| 31 | 31 |
#undef PMINUB |
| 32 | 32 |
#undef PMAXUB |
| 33 | 33 |
|
| 34 |
-#ifdef HAVE_MMX2 |
|
| 34 |
+#if HAVE_MMX2 |
|
| 35 | 35 |
#define REAL_PAVGB(a,b) "pavgb " #a ", " #b " \n\t" |
| 36 |
-#elif defined (HAVE_3DNOW) |
|
| 36 |
+#elif HAVE_3DNOW |
|
| 37 | 37 |
#define REAL_PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" |
| 38 | 38 |
#endif |
| 39 | 39 |
#define PAVGB(a,b) REAL_PAVGB(a,b) |
| 40 | 40 |
|
| 41 |
-#ifdef HAVE_MMX2 |
|
| 41 |
+#if HAVE_MMX2 |
|
| 42 | 42 |
#define PMINUB(a,b,t) "pminub " #a ", " #b " \n\t" |
| 43 |
-#elif defined (HAVE_MMX) |
|
| 43 |
+#elif HAVE_MMX |
|
| 44 | 44 |
#define PMINUB(b,a,t) \ |
| 45 | 45 |
"movq " #a ", " #t " \n\t"\ |
| 46 | 46 |
"psubusb " #b ", " #t " \n\t"\ |
| 47 | 47 |
"psubb " #t ", " #a " \n\t" |
| 48 | 48 |
#endif |
| 49 | 49 |
|
| 50 |
-#ifdef HAVE_MMX2 |
|
| 50 |
+#if HAVE_MMX2 |
|
| 51 | 51 |
#define PMAXUB(a,b) "pmaxub " #a ", " #b " \n\t" |
| 52 |
-#elif defined (HAVE_MMX) |
|
| 52 |
+#elif HAVE_MMX |
|
| 53 | 53 |
#define PMAXUB(a,b) \ |
| 54 | 54 |
"psubusb " #a ", " #b " \n\t"\ |
| 55 | 55 |
"paddb " #a ", " #b " \n\t" |
| 56 | 56 |
#endif |
| 57 | 57 |
|
| 58 | 58 |
//FIXME? |255-0| = 1 (should not be a problem ...) |
| 59 |
-#ifdef HAVE_MMX |
|
| 59 |
+#if HAVE_MMX |
|
| 60 | 60 |
/** |
| 61 | 61 |
* Check if the middle 8x8 Block in the given 8x16 block is flat |
| 62 | 62 |
*/ |
| ... | ... |
@@ -136,7 +136,7 @@ static inline int RENAME(vertClassify)(uint8_t src[], int stride, PPContext *c){
|
| 136 | 136 |
"psubusb %%mm3, %%mm4 \n\t" |
| 137 | 137 |
|
| 138 | 138 |
" \n\t" |
| 139 |
-#ifdef HAVE_MMX2 |
|
| 139 |
+#if HAVE_MMX2 |
|
| 140 | 140 |
"pxor %%mm7, %%mm7 \n\t" |
| 141 | 141 |
"psadbw %%mm7, %%mm0 \n\t" |
| 142 | 142 |
#else |
| ... | ... |
@@ -176,10 +176,10 @@ static inline int RENAME(vertClassify)(uint8_t src[], int stride, PPContext *c){
|
| 176 | 176 |
* Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle) |
| 177 | 177 |
* using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16 |
| 178 | 178 |
*/ |
| 179 |
-#ifndef HAVE_ALTIVEC |
|
| 179 |
+#if !HAVE_ALTIVEC |
|
| 180 | 180 |
static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c) |
| 181 | 181 |
{
|
| 182 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 182 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 183 | 183 |
src+= stride*3; |
| 184 | 184 |
__asm__ volatile( //"movv %0 %1 %2\n\t" |
| 185 | 185 |
"movq %2, %%mm0 \n\t" // QP,..., QP |
| ... | ... |
@@ -306,7 +306,7 @@ static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c) |
| 306 | 306 |
: "r" (src), "r" ((x86_reg)stride), "m" (c->pQPb) |
| 307 | 307 |
: "%"REG_a, "%"REG_c |
| 308 | 308 |
); |
| 309 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 309 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 310 | 310 |
const int l1= stride; |
| 311 | 311 |
const int l2= stride + l1; |
| 312 | 312 |
const int l3= stride + l2; |
| ... | ... |
@@ -345,7 +345,7 @@ static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c) |
| 345 | 345 |
|
| 346 | 346 |
src++; |
| 347 | 347 |
} |
| 348 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 348 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 349 | 349 |
} |
| 350 | 350 |
#endif //HAVE_ALTIVEC |
| 351 | 351 |
|
| ... | ... |
@@ -364,7 +364,7 @@ static inline void RENAME(doVertLowPass)(uint8_t *src, int stride, PPContext *c) |
| 364 | 364 |
*/ |
| 365 | 365 |
static inline void RENAME(vertRK1Filter)(uint8_t *src, int stride, int QP) |
| 366 | 366 |
{
|
| 367 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 367 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 368 | 368 |
src+= stride*3; |
| 369 | 369 |
// FIXME rounding |
| 370 | 370 |
__asm__ volatile( |
| ... | ... |
@@ -426,7 +426,7 @@ static inline void RENAME(vertRK1Filter)(uint8_t *src, int stride, int QP) |
| 426 | 426 |
: "r" (src), "r" ((x86_reg)stride) |
| 427 | 427 |
: "%"REG_a, "%"REG_c |
| 428 | 428 |
); |
| 429 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 429 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 430 | 430 |
const int l1= stride; |
| 431 | 431 |
const int l2= stride + l1; |
| 432 | 432 |
const int l3= stride + l2; |
| ... | ... |
@@ -449,7 +449,7 @@ static inline void RENAME(vertRK1Filter)(uint8_t *src, int stride, int QP) |
| 449 | 449 |
} |
| 450 | 450 |
} |
| 451 | 451 |
|
| 452 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 452 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 453 | 453 |
} |
| 454 | 454 |
#endif //0 |
| 455 | 455 |
|
| ... | ... |
@@ -462,7 +462,7 @@ static inline void RENAME(vertRK1Filter)(uint8_t *src, int stride, int QP) |
| 462 | 462 |
*/ |
| 463 | 463 |
static inline void RENAME(vertX1Filter)(uint8_t *src, int stride, PPContext *co) |
| 464 | 464 |
{
|
| 465 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 465 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 466 | 466 |
src+= stride*3; |
| 467 | 467 |
|
| 468 | 468 |
__asm__ volatile( |
| ... | ... |
@@ -548,7 +548,7 @@ static inline void RENAME(vertX1Filter)(uint8_t *src, int stride, PPContext *co) |
| 548 | 548 |
: "r" (src), "r" ((x86_reg)stride), "m" (co->pQPb) |
| 549 | 549 |
: "%"REG_a, "%"REG_c |
| 550 | 550 |
); |
| 551 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 551 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 552 | 552 |
|
| 553 | 553 |
const int l1= stride; |
| 554 | 554 |
const int l2= stride + l1; |
| ... | ... |
@@ -582,13 +582,13 @@ static inline void RENAME(vertX1Filter)(uint8_t *src, int stride, PPContext *co) |
| 582 | 582 |
} |
| 583 | 583 |
src++; |
| 584 | 584 |
} |
| 585 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 585 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 586 | 586 |
} |
| 587 | 587 |
|
| 588 |
-#ifndef HAVE_ALTIVEC |
|
| 588 |
+#if !HAVE_ALTIVEC |
|
| 589 | 589 |
static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext *c) |
| 590 | 590 |
{
|
| 591 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 591 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 592 | 592 |
/* |
| 593 | 593 |
uint8_t tmp[16]; |
| 594 | 594 |
const int l1= stride; |
| ... | ... |
@@ -869,7 +869,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 869 | 869 |
} |
| 870 | 870 |
} |
| 871 | 871 |
*/ |
| 872 |
-#elif defined (HAVE_MMX) |
|
| 872 |
+#elif HAVE_MMX |
|
| 873 | 873 |
src+= stride*4; |
| 874 | 874 |
__asm__ volatile( |
| 875 | 875 |
"pxor %%mm7, %%mm7 \n\t" |
| ... | ... |
@@ -978,7 +978,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 978 | 978 |
"movq (%%"REG_c"), %%mm2 \n\t" // 2L0 - 5L1 + 5L2 - 2L3 |
| 979 | 979 |
"movq 8(%%"REG_c"), %%mm3 \n\t" // 2H0 - 5H1 + 5H2 - 2H3 |
| 980 | 980 |
|
| 981 |
-#ifdef HAVE_MMX2 |
|
| 981 |
+#if HAVE_MMX2 |
|
| 982 | 982 |
"movq %%mm7, %%mm6 \n\t" // 0 |
| 983 | 983 |
"psubw %%mm0, %%mm6 \n\t" |
| 984 | 984 |
"pmaxsw %%mm6, %%mm0 \n\t" // |2L4 - 5L5 + 5L6 - 2L7| |
| ... | ... |
@@ -1010,7 +1010,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 1010 | 1010 |
"psubw %%mm6, %%mm3 \n\t" // |2H0 - 5H1 + 5H2 - 2H3| |
| 1011 | 1011 |
#endif |
| 1012 | 1012 |
|
| 1013 |
-#ifdef HAVE_MMX2 |
|
| 1013 |
+#if HAVE_MMX2 |
|
| 1014 | 1014 |
"pminsw %%mm2, %%mm0 \n\t" |
| 1015 | 1015 |
"pminsw %%mm3, %%mm1 \n\t" |
| 1016 | 1016 |
#else |
| ... | ... |
@@ -1074,7 +1074,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 1074 | 1074 |
"pand %%mm2, %%mm4 \n\t" |
| 1075 | 1075 |
"pand %%mm3, %%mm5 \n\t" |
| 1076 | 1076 |
|
| 1077 |
-#ifdef HAVE_MMX2 |
|
| 1077 |
+#if HAVE_MMX2 |
|
| 1078 | 1078 |
"pminsw %%mm0, %%mm4 \n\t" |
| 1079 | 1079 |
"pminsw %%mm1, %%mm5 \n\t" |
| 1080 | 1080 |
#else |
| ... | ... |
@@ -1101,7 +1101,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 1101 | 1101 |
: "r" ((x86_reg)stride), "m" (c->pQPb) |
| 1102 | 1102 |
: "%"REG_a, "%"REG_c |
| 1103 | 1103 |
); |
| 1104 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1104 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1105 | 1105 |
const int l1= stride; |
| 1106 | 1106 |
const int l2= stride + l1; |
| 1107 | 1107 |
const int l3= stride + l2; |
| ... | ... |
@@ -1139,14 +1139,14 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext |
| 1139 | 1139 |
} |
| 1140 | 1140 |
src++; |
| 1141 | 1141 |
} |
| 1142 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1142 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1143 | 1143 |
} |
| 1144 | 1144 |
#endif //HAVE_ALTIVEC |
| 1145 | 1145 |
|
| 1146 |
-#ifndef HAVE_ALTIVEC |
|
| 1146 |
+#if !HAVE_ALTIVEC |
|
| 1147 | 1147 |
static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c) |
| 1148 | 1148 |
{
|
| 1149 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1149 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1150 | 1150 |
__asm__ volatile( |
| 1151 | 1151 |
"pxor %%mm6, %%mm6 \n\t" |
| 1152 | 1152 |
"pcmpeqb %%mm7, %%mm7 \n\t" |
| ... | ... |
@@ -1164,7 +1164,7 @@ static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c) |
| 1164 | 1164 |
// %0 eax eax+%1 eax+2%1 %0+4%1 edx edx+%1 edx+2%1 %0+8%1 edx+4%1 |
| 1165 | 1165 |
|
| 1166 | 1166 |
#undef FIND_MIN_MAX |
| 1167 |
-#ifdef HAVE_MMX2 |
|
| 1167 |
+#if HAVE_MMX2 |
|
| 1168 | 1168 |
#define REAL_FIND_MIN_MAX(addr)\ |
| 1169 | 1169 |
"movq " #addr ", %%mm0 \n\t"\ |
| 1170 | 1170 |
"pminub %%mm0, %%mm7 \n\t"\ |
| ... | ... |
@@ -1191,7 +1191,7 @@ FIND_MIN_MAX((%0, %1, 8)) |
| 1191 | 1191 |
|
| 1192 | 1192 |
"movq %%mm7, %%mm4 \n\t" |
| 1193 | 1193 |
"psrlq $8, %%mm7 \n\t" |
| 1194 |
-#ifdef HAVE_MMX2 |
|
| 1194 |
+#if HAVE_MMX2 |
|
| 1195 | 1195 |
"pminub %%mm4, %%mm7 \n\t" // min of pixels |
| 1196 | 1196 |
"pshufw $0xF9, %%mm7, %%mm4 \n\t" |
| 1197 | 1197 |
"pminub %%mm4, %%mm7 \n\t" // min of pixels |
| ... | ... |
@@ -1216,7 +1216,7 @@ FIND_MIN_MAX((%0, %1, 8)) |
| 1216 | 1216 |
|
| 1217 | 1217 |
"movq %%mm6, %%mm4 \n\t" |
| 1218 | 1218 |
"psrlq $8, %%mm6 \n\t" |
| 1219 |
-#ifdef HAVE_MMX2 |
|
| 1219 |
+#if HAVE_MMX2 |
|
| 1220 | 1220 |
"pmaxub %%mm4, %%mm6 \n\t" // max of pixels |
| 1221 | 1221 |
"pshufw $0xF9, %%mm6, %%mm4 \n\t" |
| 1222 | 1222 |
"pmaxub %%mm4, %%mm6 \n\t" |
| ... | ... |
@@ -1370,7 +1370,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1, 4),%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1, |
| 1370 | 1370 |
: : "r" (src), "r" ((x86_reg)stride), "m" (c->pQPb), "m"(c->pQPb2) |
| 1371 | 1371 |
: "%"REG_a, "%"REG_d, "%"REG_c |
| 1372 | 1372 |
); |
| 1373 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1373 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1374 | 1374 |
int y; |
| 1375 | 1375 |
int min=255; |
| 1376 | 1376 |
int max=0; |
| ... | ... |
@@ -1487,7 +1487,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1, 4),%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1, |
| 1487 | 1487 |
// src[0] = src[7]=src[stride*7]=src[stride*7 + 7]=255; |
| 1488 | 1488 |
} |
| 1489 | 1489 |
#endif |
| 1490 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1490 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1491 | 1491 |
} |
| 1492 | 1492 |
#endif //HAVE_ALTIVEC |
| 1493 | 1493 |
|
| ... | ... |
@@ -1499,7 +1499,7 @@ DERING_CORE((%0, %1, 8) ,(%%REGd, %1, 4),%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1, |
| 1499 | 1499 |
*/ |
| 1500 | 1500 |
static inline void RENAME(deInterlaceInterpolateLinear)(uint8_t src[], int stride) |
| 1501 | 1501 |
{
|
| 1502 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1502 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1503 | 1503 |
src+= 4*stride; |
| 1504 | 1504 |
__asm__ volatile( |
| 1505 | 1505 |
"lea (%0, %1), %%"REG_a" \n\t" |
| ... | ... |
@@ -1552,7 +1552,7 @@ static inline void RENAME(deInterlaceInterpolateLinear)(uint8_t src[], int strid |
| 1552 | 1552 |
*/ |
| 1553 | 1553 |
static inline void RENAME(deInterlaceInterpolateCubic)(uint8_t src[], int stride) |
| 1554 | 1554 |
{
|
| 1555 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1555 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1556 | 1556 |
src+= stride*3; |
| 1557 | 1557 |
__asm__ volatile( |
| 1558 | 1558 |
"lea (%0, %1), %%"REG_a" \n\t" |
| ... | ... |
@@ -1594,7 +1594,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) , (%%REGd, %1, 4), (%%REGc) , (%%REGc, |
| 1594 | 1594 |
: : "r" (src), "r" ((x86_reg)stride) |
| 1595 | 1595 |
: "%"REG_a, "%"REG_d, "%"REG_c |
| 1596 | 1596 |
); |
| 1597 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1597 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1598 | 1598 |
int x; |
| 1599 | 1599 |
src+= stride*3; |
| 1600 | 1600 |
for(x=0; x<8; x++){
|
| ... | ... |
@@ -1604,7 +1604,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) , (%%REGd, %1, 4), (%%REGc) , (%%REGc, |
| 1604 | 1604 |
src[stride*9] = CLIP((-src[stride*6] + 9*src[stride*8] + 9*src[stride*10] - src[stride*12])>>4); |
| 1605 | 1605 |
src++; |
| 1606 | 1606 |
} |
| 1607 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1607 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1608 | 1608 |
} |
| 1609 | 1609 |
|
| 1610 | 1610 |
/** |
| ... | ... |
@@ -1616,7 +1616,7 @@ DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) , (%%REGd, %1, 4), (%%REGc) , (%%REGc, |
| 1616 | 1616 |
*/ |
| 1617 | 1617 |
static inline void RENAME(deInterlaceFF)(uint8_t src[], int stride, uint8_t *tmp) |
| 1618 | 1618 |
{
|
| 1619 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1619 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1620 | 1620 |
src+= stride*4; |
| 1621 | 1621 |
__asm__ volatile( |
| 1622 | 1622 |
"lea (%0, %1), %%"REG_a" \n\t" |
| ... | ... |
@@ -1665,7 +1665,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1665 | 1665 |
: : "r" (src), "r" ((x86_reg)stride), "r"(tmp) |
| 1666 | 1666 |
: "%"REG_a, "%"REG_d |
| 1667 | 1667 |
); |
| 1668 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1668 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1669 | 1669 |
int x; |
| 1670 | 1670 |
src+= stride*4; |
| 1671 | 1671 |
for(x=0; x<8; x++){
|
| ... | ... |
@@ -1683,7 +1683,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1683 | 1683 |
|
| 1684 | 1684 |
src++; |
| 1685 | 1685 |
} |
| 1686 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1686 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1687 | 1687 |
} |
| 1688 | 1688 |
|
| 1689 | 1689 |
/** |
| ... | ... |
@@ -1695,7 +1695,7 @@ DEINT_FF((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1695 | 1695 |
*/ |
| 1696 | 1696 |
static inline void RENAME(deInterlaceL5)(uint8_t src[], int stride, uint8_t *tmp, uint8_t *tmp2) |
| 1697 | 1697 |
{
|
| 1698 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1698 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1699 | 1699 |
src+= stride*4; |
| 1700 | 1700 |
__asm__ volatile( |
| 1701 | 1701 |
"lea (%0, %1), %%"REG_a" \n\t" |
| ... | ... |
@@ -1755,7 +1755,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1755 | 1755 |
: : "r" (src), "r" ((x86_reg)stride), "r"(tmp), "r"(tmp2) |
| 1756 | 1756 |
: "%"REG_a, "%"REG_d |
| 1757 | 1757 |
); |
| 1758 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1758 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1759 | 1759 |
int x; |
| 1760 | 1760 |
src+= stride*4; |
| 1761 | 1761 |
for(x=0; x<8; x++){
|
| ... | ... |
@@ -1784,7 +1784,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1784 | 1784 |
|
| 1785 | 1785 |
src++; |
| 1786 | 1786 |
} |
| 1787 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1787 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1788 | 1788 |
} |
| 1789 | 1789 |
|
| 1790 | 1790 |
/** |
| ... | ... |
@@ -1796,7 +1796,7 @@ DEINT_L5(%%mm1, %%mm0, (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4)) |
| 1796 | 1796 |
*/ |
| 1797 | 1797 |
static inline void RENAME(deInterlaceBlendLinear)(uint8_t src[], int stride, uint8_t *tmp) |
| 1798 | 1798 |
{
|
| 1799 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1799 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 1800 | 1800 |
src+= 4*stride; |
| 1801 | 1801 |
__asm__ volatile( |
| 1802 | 1802 |
"lea (%0, %1), %%"REG_a" \n\t" |
| ... | ... |
@@ -1843,7 +1843,7 @@ static inline void RENAME(deInterlaceBlendLinear)(uint8_t src[], int stride, uin |
| 1843 | 1843 |
: : "r" (src), "r" ((x86_reg)stride), "r" (tmp) |
| 1844 | 1844 |
: "%"REG_a, "%"REG_d |
| 1845 | 1845 |
); |
| 1846 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1846 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 1847 | 1847 |
int a, b, c, x; |
| 1848 | 1848 |
src+= 4*stride; |
| 1849 | 1849 |
|
| ... | ... |
@@ -1886,7 +1886,7 @@ static inline void RENAME(deInterlaceBlendLinear)(uint8_t src[], int stride, uin |
| 1886 | 1886 |
src += 4; |
| 1887 | 1887 |
tmp += 4; |
| 1888 | 1888 |
} |
| 1889 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 1889 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 1890 | 1890 |
} |
| 1891 | 1891 |
|
| 1892 | 1892 |
/** |
| ... | ... |
@@ -1897,9 +1897,9 @@ static inline void RENAME(deInterlaceBlendLinear)(uint8_t src[], int stride, uin |
| 1897 | 1897 |
*/ |
| 1898 | 1898 |
static inline void RENAME(deInterlaceMedian)(uint8_t src[], int stride) |
| 1899 | 1899 |
{
|
| 1900 |
-#ifdef HAVE_MMX |
|
| 1900 |
+#ifd HAVE_MMX |
|
| 1901 | 1901 |
src+= 4*stride; |
| 1902 |
-#ifdef HAVE_MMX2 |
|
| 1902 |
+#if HAVE_MMX2 |
|
| 1903 | 1903 |
__asm__ volatile( |
| 1904 | 1904 |
"lea (%0, %1), %%"REG_a" \n\t" |
| 1905 | 1905 |
"lea (%%"REG_a", %1, 4), %%"REG_d" \n\t" |
| ... | ... |
@@ -2012,7 +2012,7 @@ MEDIAN((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8)) |
| 2012 | 2012 |
#endif //HAVE_MMX |
| 2013 | 2013 |
} |
| 2014 | 2014 |
|
| 2015 |
-#ifdef HAVE_MMX |
|
| 2015 |
+#if HAVE_MMX |
|
| 2016 | 2016 |
/** |
| 2017 | 2017 |
* transposes and shift the given 8x8 Block into dst1 and dst2 |
| 2018 | 2018 |
*/ |
| ... | ... |
@@ -2180,7 +2180,7 @@ static inline void RENAME(transpose2)(uint8_t *dst, int dstStride, uint8_t *src) |
| 2180 | 2180 |
#endif //HAVE_MMX |
| 2181 | 2181 |
//static long test=0; |
| 2182 | 2182 |
|
| 2183 |
-#ifndef HAVE_ALTIVEC |
|
| 2183 |
+#if !HAVE_ALTIVEC |
|
| 2184 | 2184 |
static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride, |
| 2185 | 2185 |
uint8_t *tempBlurred, uint32_t *tempBlurredPast, int *maxNoise) |
| 2186 | 2186 |
{
|
| ... | ... |
@@ -2191,7 +2191,7 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride, |
| 2191 | 2191 |
|
| 2192 | 2192 |
#define FAST_L2_DIFF |
| 2193 | 2193 |
//#define L1_DIFF //u should change the thresholds too if u try that one |
| 2194 |
-#if defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 2194 |
+#if HAVE_MMX2 || HAVE_3DNOW |
|
| 2195 | 2195 |
__asm__ volatile( |
| 2196 | 2196 |
"lea (%2, %2, 2), %%"REG_a" \n\t" // 3*stride |
| 2197 | 2197 |
"lea (%2, %2, 4), %%"REG_d" \n\t" // 5*stride |
| ... | ... |
@@ -2479,7 +2479,7 @@ L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc)) |
| 2479 | 2479 |
:: "r" (src), "r" (tempBlurred), "r"((x86_reg)stride), "m" (tempBlurredPast) |
| 2480 | 2480 |
: "%"REG_a, "%"REG_d, "%"REG_c, "memory" |
| 2481 | 2481 |
); |
| 2482 |
-#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 2482 |
+#else //HAVE_MMX2 || HAVE_3DNOW |
|
| 2483 | 2483 |
{
|
| 2484 | 2484 |
int y; |
| 2485 | 2485 |
int d=0; |
| ... | ... |
@@ -2562,11 +2562,11 @@ Switch between |
| 2562 | 2562 |
} |
| 2563 | 2563 |
} |
| 2564 | 2564 |
} |
| 2565 |
-#endif //defined (HAVE_MMX2) || defined (HAVE_3DNOW) |
|
| 2565 |
+#endif //HAVE_MMX2 || HAVE_3DNOW |
|
| 2566 | 2566 |
} |
| 2567 | 2567 |
#endif //HAVE_ALTIVEC |
| 2568 | 2568 |
|
| 2569 |
-#ifdef HAVE_MMX |
|
| 2569 |
+#if HAVE_MMX |
|
| 2570 | 2570 |
/** |
| 2571 | 2571 |
* accurate deblock filter |
| 2572 | 2572 |
*/ |
| ... | ... |
@@ -2970,7 +2970,7 @@ static av_always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int st |
| 2970 | 2970 |
"movq (%%"REG_c"), %%mm2 \n\t" // 2L0 - 5L1 + 5L2 - 2L3 |
| 2971 | 2971 |
"movq 8(%%"REG_c"), %%mm3 \n\t" // 2H0 - 5H1 + 5H2 - 2H3 |
| 2972 | 2972 |
|
| 2973 |
-#ifdef HAVE_MMX2 |
|
| 2973 |
+#if HAVE_MMX2 |
|
| 2974 | 2974 |
"movq %%mm7, %%mm6 \n\t" // 0 |
| 2975 | 2975 |
"psubw %%mm0, %%mm6 \n\t" |
| 2976 | 2976 |
"pmaxsw %%mm6, %%mm0 \n\t" // |2L4 - 5L5 + 5L6 - 2L7| |
| ... | ... |
@@ -3002,7 +3002,7 @@ static av_always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int st |
| 3002 | 3002 |
"psubw %%mm6, %%mm3 \n\t" // |2H0 - 5H1 + 5H2 - 2H3| |
| 3003 | 3003 |
#endif |
| 3004 | 3004 |
|
| 3005 |
-#ifdef HAVE_MMX2 |
|
| 3005 |
+#if HAVE_MMX2 |
|
| 3006 | 3006 |
"pminsw %%mm2, %%mm0 \n\t" |
| 3007 | 3007 |
"pminsw %%mm3, %%mm1 \n\t" |
| 3008 | 3008 |
#else |
| ... | ... |
@@ -3066,7 +3066,7 @@ static av_always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int st |
| 3066 | 3066 |
"pand %%mm2, %%mm4 \n\t" |
| 3067 | 3067 |
"pand %%mm3, %%mm5 \n\t" |
| 3068 | 3068 |
|
| 3069 |
-#ifdef HAVE_MMX2 |
|
| 3069 |
+#if HAVE_MMX2 |
|
| 3070 | 3070 |
"pminsw %%mm0, %%mm4 \n\t" |
| 3071 | 3071 |
"pminsw %%mm1, %%mm5 \n\t" |
| 3072 | 3072 |
#else |
| ... | ... |
@@ -3116,18 +3116,18 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3116 | 3116 |
static inline void RENAME(blockCopy)(uint8_t dst[], int dstStride, const uint8_t src[], int srcStride, |
| 3117 | 3117 |
int levelFix, int64_t *packedOffsetAndScale) |
| 3118 | 3118 |
{
|
| 3119 |
-#ifndef HAVE_MMX |
|
| 3119 |
+#if !HAVE_MMX |
|
| 3120 | 3120 |
int i; |
| 3121 | 3121 |
#endif |
| 3122 | 3122 |
if(levelFix){
|
| 3123 |
-#ifdef HAVE_MMX |
|
| 3123 |
+#if HAVE_MMX |
|
| 3124 | 3124 |
__asm__ volatile( |
| 3125 | 3125 |
"movq (%%"REG_a"), %%mm2 \n\t" // packedYOffset |
| 3126 | 3126 |
"movq 8(%%"REG_a"), %%mm3 \n\t" // packedYScale |
| 3127 | 3127 |
"lea (%2,%4), %%"REG_a" \n\t" |
| 3128 | 3128 |
"lea (%3,%5), %%"REG_d" \n\t" |
| 3129 | 3129 |
"pxor %%mm4, %%mm4 \n\t" |
| 3130 |
-#ifdef HAVE_MMX2 |
|
| 3130 |
+#if HAVE_MMX2 |
|
| 3131 | 3131 |
#define REAL_SCALED_CPY(src1, src2, dst1, dst2) \ |
| 3132 | 3132 |
"movq " #src1 ", %%mm0 \n\t"\ |
| 3133 | 3133 |
"movq " #src1 ", %%mm5 \n\t"\ |
| ... | ... |
@@ -3203,7 +3203,7 @@ SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2), (%%REGd, %5), (%%REGd, %5, 2)) |
| 3203 | 3203 |
&(src[srcStride*i]), BLOCK_SIZE); |
| 3204 | 3204 |
#endif //HAVE_MMX |
| 3205 | 3205 |
}else{
|
| 3206 |
-#ifdef HAVE_MMX |
|
| 3206 |
+#if HAVE_MMX |
|
| 3207 | 3207 |
__asm__ volatile( |
| 3208 | 3208 |
"lea (%0,%2), %%"REG_a" \n\t" |
| 3209 | 3209 |
"lea (%1,%3), %%"REG_d" \n\t" |
| ... | ... |
@@ -3243,7 +3243,7 @@ SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2), (%%REGd, %3), (%%REGd, %3, 2)) |
| 3243 | 3243 |
*/ |
| 3244 | 3244 |
static inline void RENAME(duplicate)(uint8_t src[], int stride) |
| 3245 | 3245 |
{
|
| 3246 |
-#ifdef HAVE_MMX |
|
| 3246 |
+#if HAVE_MMX |
|
| 3247 | 3247 |
__asm__ volatile( |
| 3248 | 3248 |
"movq (%0), %%mm0 \n\t" |
| 3249 | 3249 |
"add %1, %0 \n\t" |
| ... | ... |
@@ -3280,7 +3280,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3280 | 3280 |
int QPCorrecture= 256*256; |
| 3281 | 3281 |
|
| 3282 | 3282 |
int copyAhead; |
| 3283 |
-#ifdef HAVE_MMX |
|
| 3283 |
+#if HAVE_MMX |
|
| 3284 | 3284 |
int i; |
| 3285 | 3285 |
#endif |
| 3286 | 3286 |
|
| ... | ... |
@@ -3293,7 +3293,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3293 | 3293 |
uint8_t * const tempDst= dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride; |
| 3294 | 3294 |
//const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4; |
| 3295 | 3295 |
|
| 3296 |
-#ifdef HAVE_MMX |
|
| 3296 |
+#if HAVE_MMX |
|
| 3297 | 3297 |
for(i=0; i<57; i++){
|
| 3298 | 3298 |
int offset= ((i*c.ppMode.baseDcDiff)>>8) + 1; |
| 3299 | 3299 |
int threshold= offset*2 + 1; |
| ... | ... |
@@ -3351,7 +3351,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3351 | 3351 |
|
| 3352 | 3352 |
scale= (double)(c.ppMode.maxAllowedY - c.ppMode.minAllowedY) / (double)(white-black); |
| 3353 | 3353 |
|
| 3354 |
-#ifdef HAVE_MMX2 |
|
| 3354 |
+#if HAVE_MMX2 |
|
| 3355 | 3355 |
c.packedYScale= (uint16_t)(scale*256.0 + 0.5); |
| 3356 | 3356 |
c.packedYOffset= (((black*c.packedYScale)>>8) - c.ppMode.minAllowedY) & 0xFFFF; |
| 3357 | 3357 |
#else |
| ... | ... |
@@ -3384,7 +3384,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3384 | 3384 |
// with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing |
| 3385 | 3385 |
for(x=0; x<width; x+=BLOCK_SIZE){
|
| 3386 | 3386 |
|
| 3387 |
-#ifdef HAVE_MMX2 |
|
| 3387 |
+#if HAVE_MMX2 |
|
| 3388 | 3388 |
/* |
| 3389 | 3389 |
prefetchnta(srcBlock + (((x>>2)&6) + 5)*srcStride + 32); |
| 3390 | 3390 |
prefetchnta(srcBlock + (((x>>2)&6) + 6)*srcStride + 32); |
| ... | ... |
@@ -3411,7 +3411,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3411 | 3411 |
: "%"REG_a, "%"REG_d |
| 3412 | 3412 |
); |
| 3413 | 3413 |
|
| 3414 |
-#elif defined(HAVE_3DNOW) |
|
| 3414 |
+#elif HAVE_3DNOW |
|
| 3415 | 3415 |
//FIXME check if this is faster on an 3dnow chip or if it is faster without the prefetch or ... |
| 3416 | 3416 |
/* prefetch(srcBlock + (((x>>3)&3) + 5)*srcStride + 32); |
| 3417 | 3417 |
prefetch(srcBlock + (((x>>3)&3) + 9)*srcStride + 32); |
| ... | ... |
@@ -3457,7 +3457,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3457 | 3457 |
//1% speedup if these are here instead of the inner loop |
| 3458 | 3458 |
const uint8_t *srcBlock= &(src[y*srcStride]); |
| 3459 | 3459 |
uint8_t *dstBlock= &(dst[y*dstStride]); |
| 3460 |
-#ifdef HAVE_MMX |
|
| 3460 |
+#if HAVE_MMX |
|
| 3461 | 3461 |
uint8_t *tempBlock1= c.tempBlocks; |
| 3462 | 3462 |
uint8_t *tempBlock2= c.tempBlocks + 8; |
| 3463 | 3463 |
#endif |
| ... | ... |
@@ -3493,7 +3493,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3493 | 3493 |
// with the L1 Cache of the P4 ... or only a few blocks at a time or soemthing |
| 3494 | 3494 |
for(x=0; x<width; x+=BLOCK_SIZE){
|
| 3495 | 3495 |
const int stride= dstStride; |
| 3496 |
-#ifdef HAVE_MMX |
|
| 3496 |
+#if HAVE_MMX |
|
| 3497 | 3497 |
uint8_t *tmpXchg; |
| 3498 | 3498 |
#endif |
| 3499 | 3499 |
if(isColor){
|
| ... | ... |
@@ -3507,7 +3507,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3507 | 3507 |
yHistogram[ srcBlock[srcStride*12 + 4] ]++; |
| 3508 | 3508 |
} |
| 3509 | 3509 |
c.QP= QP; |
| 3510 |
-#ifdef HAVE_MMX |
|
| 3510 |
+#if HAVE_MMX |
|
| 3511 | 3511 |
__asm__ volatile( |
| 3512 | 3512 |
"movd %1, %%mm7 \n\t" |
| 3513 | 3513 |
"packuswb %%mm7, %%mm7 \n\t" // 0, 0, 0, QP, 0, 0, 0, QP |
| ... | ... |
@@ -3520,7 +3520,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3520 | 3520 |
#endif |
| 3521 | 3521 |
|
| 3522 | 3522 |
|
| 3523 |
-#ifdef HAVE_MMX2 |
|
| 3523 |
+#if HAVE_MMX2 |
|
| 3524 | 3524 |
/* |
| 3525 | 3525 |
prefetchnta(srcBlock + (((x>>2)&6) + 5)*srcStride + 32); |
| 3526 | 3526 |
prefetchnta(srcBlock + (((x>>2)&6) + 6)*srcStride + 32); |
| ... | ... |
@@ -3547,7 +3547,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3547 | 3547 |
: "%"REG_a, "%"REG_d |
| 3548 | 3548 |
); |
| 3549 | 3549 |
|
| 3550 |
-#elif defined(HAVE_3DNOW) |
|
| 3550 |
+#elif HAVE_3DNOW |
|
| 3551 | 3551 |
//FIXME check if this is faster on an 3dnow chip or if it is faster without the prefetch or ... |
| 3552 | 3552 |
/* prefetch(srcBlock + (((x>>3)&3) + 5)*srcStride + 32); |
| 3553 | 3553 |
prefetch(srcBlock + (((x>>3)&3) + 9)*srcStride + 32); |
| ... | ... |
@@ -3591,12 +3591,12 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3591 | 3591 |
} |
| 3592 | 3592 |
} |
| 3593 | 3593 |
|
| 3594 |
-#ifdef HAVE_MMX |
|
| 3594 |
+#if HAVE_MMX |
|
| 3595 | 3595 |
RENAME(transpose1)(tempBlock1, tempBlock2, dstBlock, dstStride); |
| 3596 | 3596 |
#endif |
| 3597 | 3597 |
/* check if we have a previous block to deblock it with dstBlock */ |
| 3598 | 3598 |
if(x - 8 >= 0){
|
| 3599 |
-#ifdef HAVE_MMX |
|
| 3599 |
+#if HAVE_MMX |
|
| 3600 | 3600 |
if(mode & H_X1_FILTER) |
| 3601 | 3601 |
RENAME(vertX1Filter)(tempBlock1, 16, &c); |
| 3602 | 3602 |
else if(mode & H_DEBLOCK){
|
| ... | ... |
@@ -3617,7 +3617,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3617 | 3617 |
if(mode & H_X1_FILTER) |
| 3618 | 3618 |
horizX1Filter(dstBlock-4, stride, QP); |
| 3619 | 3619 |
else if(mode & H_DEBLOCK){
|
| 3620 |
-#ifdef HAVE_ALTIVEC |
|
| 3620 |
+#if HAVE_ALTIVEC |
|
| 3621 | 3621 |
DECLARE_ALIGNED(16, unsigned char, tempBlock[272]); |
| 3622 | 3622 |
transpose_16x8_char_toPackedAlign_altivec(tempBlock, dstBlock - (4 + 1), stride); |
| 3623 | 3623 |
|
| ... | ... |
@@ -3659,7 +3659,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3659 | 3659 |
dstBlock+=8; |
| 3660 | 3660 |
srcBlock+=8; |
| 3661 | 3661 |
|
| 3662 |
-#ifdef HAVE_MMX |
|
| 3662 |
+#if HAVE_MMX |
|
| 3663 | 3663 |
tmpXchg= tempBlock1; |
| 3664 | 3664 |
tempBlock1= tempBlock2; |
| 3665 | 3665 |
tempBlock2 = tmpXchg; |
| ... | ... |
@@ -3699,9 +3699,9 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ |
| 3699 | 3699 |
+ dstBlock[x +14*dstStride] + dstBlock[x +15*dstStride]; |
| 3700 | 3700 |
}*/ |
| 3701 | 3701 |
} |
| 3702 |
-#ifdef HAVE_3DNOW |
|
| 3702 |
+#if HAVE_3DNOW |
|
| 3703 | 3703 |
__asm__ volatile("femms");
|
| 3704 |
-#elif defined (HAVE_MMX) |
|
| 3704 |
+#elif HAVE_MMX |
|
| 3705 | 3705 |
__asm__ volatile("emms");
|
| 3706 | 3706 |
#endif |
| 3707 | 3707 |
|