Commit b250f9c6 authored by Aurelien Jacobs's avatar Aurelien Jacobs

Change semantic of CONFIG_*, HAVE_* and ARCH_*.

They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 959da985
......@@ -30,19 +30,19 @@
#include "config.h"
#include "libavformat/avformat.h"
#ifdef CONFIG_AVFILTER
#if CONFIG_AVFILTER
#include "libavfilter/avfilter.h"
#endif
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#ifdef CONFIG_POSTPROC
#if CONFIG_POSTPROC
#include "libpostproc/postprocess.h"
#endif
#include "libavutil/avstring.h"
#include "libavcodec/opt.h"
#include "cmdutils.h"
#include "version.h"
#ifdef CONFIG_NETWORK
#if CONFIG_NETWORK
#include "libavformat/network.h"
#endif
......@@ -255,7 +255,7 @@ void print_error(const char *filename, int err)
case AVERROR(ENOENT):
fprintf(stderr, "%s: no such file or directory\n", filename);
break;
#ifdef CONFIG_NETWORK
#if CONFIG_NETWORK
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
break;
......@@ -279,13 +279,13 @@ static void print_all_lib_versions(FILE* outstream, int indent)
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent);
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
#ifdef CONFIG_AVFILTER
#if CONFIG_AVFILTER
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
#endif
#ifdef CONFIG_SWSCALE
#if CONFIG_SWSCALE
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent);
#endif
#ifdef CONFIG_POSTPROC
#if CONFIG_POSTPROC
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
#endif
}
......@@ -311,7 +311,7 @@ void show_version(void) {
void show_license(void)
{
#ifdef CONFIG_NONFREE
#if CONFIG_NONFREE
printf(
"This version of %s has nonfree parts compiled in.\n"
"Therefore it is not legally redistributable.\n",
......
......@@ -430,6 +430,7 @@ print_config(){
echo "#define ENABLE_${ucname} 1" >> $header
echo "${pfx}${ucname}=yes" >> $makefile
else
echo "#define ${pfx}${ucname} 0" >> $header
echo "#define ENABLE_${ucname} 0" >> $header
fi
done
......
......@@ -426,7 +426,7 @@ you need the debug information, used the *_g versions.
@section I do not like the LGPL, can I contribute code under the GPL instead?
Yes, as long as the code is optional and can easily and cleanly be placed
under #ifdef CONFIG_GPL without breaking anything. So for example a new codec
under #if CONFIG_GPL without breaking anything. So for example a new codec
or filter would be OK under GPL while a bug fix to LGPL code would not.
@section I want to compile xyz.c alone but my compiler produced many errors.
......
......@@ -41,23 +41,23 @@
#include "libavutil/avstring.h"
#include "libavformat/os_support.h"
#ifdef HAVE_SYS_RESOURCE_H
#if HAVE_SYS_RESOURCE_H
#include <sys/types.h>
#include <sys/resource.h>
#elif defined(HAVE_GETPROCESSTIMES)
#elif HAVE_GETPROCESSTIMES
#include <windows.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_TERMIOS_H
#if HAVE_TERMIOS_H
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
#elif defined(HAVE_CONIO_H)
#elif HAVE_CONIO_H
#include <conio.h>
#endif
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
......@@ -295,7 +295,7 @@ typedef struct AVInputFile {
int nb_streams; /* nb streams we are aware of */
} AVInputFile;
#ifdef HAVE_TERMIOS_H
#if HAVE_TERMIOS_H
/* init terminal so that we can grab keys */
static struct termios oldtty;
......@@ -303,7 +303,7 @@ static struct termios oldtty;
static void term_exit(void)
{
#ifdef HAVE_TERMIOS_H
#if HAVE_TERMIOS_H
tcsetattr (0, TCSANOW, &oldtty);
#endif
}
......@@ -319,7 +319,7 @@ sigterm_handler(int sig)
static void term_init(void)
{
#ifdef HAVE_TERMIOS_H
#if HAVE_TERMIOS_H
struct termios tty;
tcgetattr (0, &tty);
......@@ -344,7 +344,7 @@ static void term_init(void)
register a function to be called at normal program termination
*/
atexit(term_exit);
#ifdef CONFIG_BEOS_NETSERVER
#if CONFIG_BEOS_NETSERVER
fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
#endif
}
......@@ -352,10 +352,10 @@ static void term_init(void)
/* read a key without blocking */
static int read_key(void)
{
#if defined(HAVE_TERMIOS_H)
#if HAVE_TERMIOS_H
int n = 1;
unsigned char ch;
#ifndef CONFIG_BEOS_NETSERVER
#if !CONFIG_BEOS_NETSERVER
struct timeval tv;
fd_set rfds;
......@@ -372,7 +372,7 @@ static int read_key(void)
return n;
}
#elif defined(HAVE_CONIO_H)
#elif HAVE_CONIO_H
if(kbhit())
return(getch());
#endif
......@@ -427,7 +427,7 @@ static int av_exit(int ret)
av_free(video_standard);
#ifdef CONFIG_POWERPC_PERF
#if CONFIG_POWERPC_PERF
void powerpc_display_perf_report(void);
powerpc_display_perf_report();
#endif /* CONFIG_POWERPC_PERF */
......@@ -2553,7 +2553,7 @@ static void opt_top_field_first(const char *arg)
static int opt_thread_count(const char *opt, const char *arg)
{
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
#if !defined(HAVE_THREADS)
#if !HAVE_THREADS
if (verbose >= 0)
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
......@@ -2626,7 +2626,7 @@ static void opt_video_tag(const char *arg)
video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
}
#ifdef CONFIG_VHOOK
#if CONFIG_VHOOK
static void add_frame_hooker(const char *arg)
{
int argc = 0;
......@@ -3416,12 +3416,12 @@ static void opt_pass(const char *pass_str)
static int64_t getutime(void)
{
#ifdef HAVE_GETRUSAGE
#if HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
#elif defined(HAVE_GETPROCESSTIMES)
#elif HAVE_GETPROCESSTIMES
HANDLE proc;
FILETIME c, e, k, u;
proc = GetCurrentProcess();
......@@ -3828,7 +3828,7 @@ static const OptionDef options[] = {
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
#ifdef CONFIG_VHOOK
#if CONFIG_VHOOK
{ "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
#endif
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
......
......@@ -2019,7 +2019,7 @@ static int decode_thread(void *arg)
else
av_read_play(ic);
}
#if defined(CONFIG_RTSP_DEMUXER) || defined(CONFIG_MMSH_PROTOCOL)
#if CONFIG_RTSP_DEMUXER || CONFIG_MMSH_PROTOCOL
if (is->paused &&
(!strcmp(ic->iformat->name, "rtsp") ||
(ic->pb && !strcmp(url_fileno(ic->pb)->prot->name, "mmsh")))) {
......@@ -2467,7 +2467,7 @@ static int opt_vismv(const char *opt, const char *arg)
static int opt_thread_count(const char *opt, const char *arg)
{
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
#if !defined(HAVE_THREADS)
#if !HAVE_THREADS
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
return 0;
......@@ -2579,7 +2579,7 @@ int main(int argc, char **argv)
}
if (!display_disable) {
#ifdef HAVE_SDL_VIDEO_SIZE
#if HAVE_SDL_VIDEO_SIZE
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
fs_screen_width = vi->current_w;
fs_screen_height = vi->current_h;
......
......@@ -22,7 +22,7 @@
#define _XOPEN_SOURCE 600
#include "config.h"
#ifndef HAVE_CLOSESOCKET
#if !HAVE_CLOSESOCKET
#define closesocket close
#endif
#include <string.h>
......@@ -41,7 +41,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#ifdef HAVE_POLL_H
#if HAVE_POLL_H
#include <poll.h>
#endif
#include <errno.h>
......@@ -50,7 +50,7 @@
#include <time.h>
#include <sys/wait.h>
#include <signal.h>
#ifdef HAVE_DLFCN_H
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
......@@ -3709,7 +3709,7 @@ static enum CodecID opt_video_codec(const char *arg)
/* simplistic plugin support */
#ifdef HAVE_DLOPEN
#if HAVE_DLOPEN
static void load_module(const char *filename)
{
void *dll;
......@@ -4394,7 +4394,7 @@ static int parse_ffconfig(const char *filename)
}
} else if (!strcasecmp(cmd, "LoadModule")) {
get_arg(arg, sizeof(arg), &p);
#ifdef HAVE_DLOPEN
#if HAVE_DLOPEN
load_module(arg);
#else
fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n",
......
......@@ -435,7 +435,7 @@ static av_cold int aac_decode_init(AVCodecContext * avccontext) {
ac->sf_offset = 60;
}
#ifndef CONFIG_HARDCODED_TABLES
#if !CONFIG_HARDCODED_TABLES
for (i = 0; i < 428; i++)
ff_aac_pow2sf_tab[i] = pow(2, (i - 200)/4.);
#endif /* CONFIG_HARDCODED_TABLES */
......
......@@ -899,7 +899,7 @@ const float * const ff_aac_codebook_vectors[] = {
codebook_vector8, codebook_vector10,
};
#ifdef CONFIG_HARDCODED_TABLES
#if CONFIG_HARDCODED_TABLES
/**
* Table of pow(2, (i - 200)/4.) used for different purposes depending on the
......
......@@ -65,7 +65,7 @@ extern const uint16_t ff_aac_spectral_sizes[11];
extern const float *ff_aac_codebook_vectors[];
#ifdef CONFIG_HARDCODED_TABLES
#if CONFIG_HARDCODED_TABLES
extern const float ff_aac_pow2sf_tab[316];
#else
extern float ff_aac_pow2sf_tab[316];
......
......@@ -153,7 +153,7 @@ typedef struct ADPCMContext {
/* XXX: implement encoding */
#ifdef CONFIG_ENCODERS
#if CONFIG_ENCODERS
static int adpcm_encode_init(AVCodecContext *avctx)
{
if (avctx->channels > 2)
......@@ -1589,7 +1589,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
#ifdef CONFIG_ENCODERS
#if CONFIG_ENCODERS
#define ADPCM_ENCODER(id,name,long_name_) \
AVCodec name ## _encoder = { \
#name, \
......@@ -1607,7 +1607,7 @@ AVCodec name ## _encoder = { \
#define ADPCM_ENCODER(id,name,long_name_)
#endif
#ifdef CONFIG_DECODERS
#if CONFIG_DECODERS
#define ADPCM_DECODER(id,name,long_name_) \
AVCodec name ## _decoder = { \
#name, \
......
......@@ -53,7 +53,7 @@ put_pixels_axp_asm:
.frame sp, 0, ra
.prologue 0
#ifdef CONFIG_GPROF
#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
......@@ -150,7 +150,7 @@ put_pixels_clamped_mvi_asm:
.frame sp, 0, ra
.prologue 0
#ifdef CONFIG_GPROF
#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
......@@ -205,7 +205,7 @@ add_pixels_clamped_mvi_asm:
.frame sp, 0, ra
.prologue 0
#ifdef CONFIG_GPROF
#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
......
......@@ -55,7 +55,7 @@ pix_abs16x16_mvi_asm:
.frame sp, 0, ra, 0
.prologue 0
#ifdef CONFIG_GPROF
#if CONFIG_GPROF
lda AT, _mcount
jsr AT, (AT), _mcount
#endif
......
......@@ -38,7 +38,7 @@
.endm
.macro movrel rd, val
#if defined(HAVE_ARMV6T2) && !defined(CONFIG_SHARED)
#if HAVE_ARMV6T2 && !CONFIG_SHARED
movw \rd, #:lower16:\val
movt \rd, #:upper16:\val
#else
......
......@@ -20,7 +20,7 @@
*/
#include "libavcodec/dsputil.h"
#ifdef HAVE_IPP
#if HAVE_IPP
#include <ipp.h>
#endif
......@@ -93,7 +93,7 @@ static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block)
ff_add_pixels_clamped(block, dest, line_size);
}
#ifdef HAVE_IPP
#if HAVE_IPP
static void simple_idct_ipp(DCTELEM *block)
{
ippiDCT8x8Inv_Video_16s_C1I(block);
......@@ -108,7 +108,7 @@ void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_s
static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
{
ippiDCT8x8Inv_Video_16s_C1I(block);
#ifdef HAVE_IWMMXT
#if HAVE_IWMMXT
add_pixels_clamped_iwmmxt(block, dest, line_size);
#else
ff_add_pixels_clamped_ARM(block, dest, line_size);
......@@ -130,13 +130,13 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
if (avctx->lowres == 0) {
if(idct_algo == FF_IDCT_AUTO){
#if defined(HAVE_IPP)
#if HAVE_IPP
idct_algo = FF_IDCT_IPP;
#elif defined(HAVE_NEON)
#elif HAVE_NEON
idct_algo = FF_IDCT_SIMPLENEON;
#elif defined(HAVE_ARMV6)
#elif HAVE_ARMV6
idct_algo = FF_IDCT_SIMPLEARMV6;
#elif defined(HAVE_ARMV5TE)
#elif HAVE_ARMV5TE
idct_algo = FF_IDCT_SIMPLEARMV5TE;
#else
idct_algo = FF_IDCT_ARM;
......@@ -153,28 +153,28 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
c->idct_add= simple_idct_ARM_add;
c->idct = simple_idct_ARM;
c->idct_permutation_type= FF_NO_IDCT_PERM;
#ifdef HAVE_ARMV6
#if HAVE_ARMV6
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
c->idct_put= ff_simple_idct_put_armv6;
c->idct_add= ff_simple_idct_add_armv6;
c->idct = ff_simple_idct_armv6;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
#endif
#ifdef HAVE_ARMV5TE
#if HAVE_ARMV5TE
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
c->idct_put= simple_idct_put_armv5te;
c->idct_add= simple_idct_add_armv5te;
c->idct = simple_idct_armv5te;
c->idct_permutation_type = FF_NO_IDCT_PERM;
#endif
#ifdef HAVE_IPP
#if HAVE_IPP
} else if (idct_algo==FF_IDCT_IPP){
c->idct_put= simple_idct_ipp_put;
c->idct_add= simple_idct_ipp_add;
c->idct = simple_idct_ipp;
c->idct_permutation_type= FF_NO_IDCT_PERM;
#endif
#ifdef HAVE_NEON
#if HAVE_NEON
} else if (idct_algo==FF_IDCT_SIMPLENEON){
c->idct_put= ff_simple_idct_put_neon;
c->idct_add= ff_simple_idct_add_neon;
......@@ -201,17 +201,17 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm;
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;
#ifdef HAVE_ARMV5TE
#if HAVE_ARMV5TE
c->prefetch = ff_prefetch_arm;
#endif
#ifdef HAVE_IWMMXT
#if HAVE_IWMMXT
dsputil_init_iwmmxt(c, avctx);
#endif
#ifdef HAVE_ARMVFP
#if HAVE_ARMVFP
ff_float_init_arm_vfp(c, avctx);
#endif
#ifdef HAVE_NEON
#if HAVE_NEON
ff_dsputil_init_neon(c, avctx);
#endif
}
......@@ -24,12 +24,12 @@
preserve8
#ifndef HAVE_PLD
#if !HAVE_PLD
.macro pld reg
.endm
#endif
#ifdef HAVE_ARMV5TE
#if HAVE_ARMV5TE
function ff_prefetch_arm, export=1
subs r2, r2, #1
pld [r0]
......
......@@ -133,7 +133,7 @@ function ff_vector_fmul_reverse_vfp, export=1
bx lr
.endfunc
#ifdef HAVE_ARMV6
#if HAVE_ARMV6
/**
* ARM VFP optimized float to int16 conversion.
* Assume that len is a positive number and is multiple of 8, destination
......
......@@ -29,7 +29,7 @@ void ff_float_init_arm_vfp(DSPContext* c, AVCodecContext *avctx)
{
c->vector_fmul = ff_vector_fmul_vfp;
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
#ifdef HAVE_ARMV6
#if HAVE_ARMV6
c->float_to_int16 = ff_float_to_int16_vfp;
#endif
}
......@@ -38,7 +38,7 @@ static inline av_const int MULL(int a, int b, unsigned shift)
}
#define MULH MULH
#ifdef HAVE_ARMV6
#if HAVE_ARMV6
static inline av_const int MULH(int a, int b)
{
int r;
......@@ -73,7 +73,7 @@ static inline av_const int64_t MAC64(int64_t d, int a, int b)
#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
#define MLS64(d, a, b) MAC64(d, -(a), b)
#if defined(HAVE_ARMV5TE)
#if HAVE_ARMV5TE
/* signed 16x16 -> 32 multiply add accumulate */
# define MAC16(rt, ra, rb) \
......
......@@ -31,10 +31,10 @@ void MPV_common_init_arm(MpegEncContext *s)
* allow optimized functions for armv5te unless
* a better iwmmxt function exists
*/
#ifdef HAVE_ARMV5TE
#if HAVE_ARMV5TE
MPV_common_init_armv5te(s);
#endif
#ifdef HAVE_IWMMXT
#if HAVE_IWMMXT
MPV_common_init_iwmmxt(s);
#endif
}
......@@ -465,7 +465,7 @@ for(i=0; i<s->avctx->extradata_size; i++){
return (get_bits_count(&a->gb)+31)/32*4;
}
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
ASV1Context * const a = avctx->priv_data;
AVFrame *pict = data;
......@@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
return size*4;
}
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
static av_cold void common_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
......@@ -569,7 +569,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
return 0;
}
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
#if CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER
static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
int i;
......@@ -593,7 +593,7 @@ static av_cold int encode_init(AVCodecContext *avctx){
return 0;
}
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
#endif /* CONFIG_ASV1_ENCODER || CONFIG_ASV2_ENCODER */
static av_cold int decode_end(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
......@@ -631,7 +631,7 @@ AVCodec asv2_decoder = {
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
};
#ifdef CONFIG_ASV1_ENCODER
#if CONFIG_ASV1_ENCODER
AVCodec asv1_encoder = {
"asv1",
CODEC_TYPE_VIDEO,
......@@ -645,7 +645,7 @@ AVCodec asv1_encoder = {
};
#endif
#ifdef CONFIG_ASV2_ENCODER
#if CONFIG_ASV2_ENCODER
AVCodec asv2_encoder = {
"asv2",
CODEC_TYPE_VIDEO,
......
......@@ -22,7 +22,7 @@
#ifndef AVCODEC_BFIN_MATHOPS_H
#define AVCODEC_BFIN_MATHOPS_H
#ifdef CONFIG_MPEGAUDIO_HP
#if CONFIG_MPEGAUDIO_HP
#define MULH(X,Y) ({ int xxo; \
__asm__ ( \
"a1 = %2.L * %1.L (FU);\n\t" \
......
......@@ -41,7 +41,7 @@
//#define ALT_BITSTREAM_WRITER
//#define ALIGNED_BITSTREAM_WRITER
#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER)
# ifdef ARCH_ARM
# if ARCH_ARM
# define A32_BITSTREAM_READER
# else
# define ALT_BITSTREAM_READER
......@@ -52,7 +52,7 @@
extern const uint8_t ff_reverse[256];
#if defined(ARCH_X86)
#if ARCH_X86
// avoid +32 for shift optimization (gcc should do that ...)
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
__asm__ ("sarl %1, %0\n\t"
......@@ -196,7 +196,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
#ifdef BITSTREAM_WRITER_LE
bit_buf |= value << (32 - bit_left);
if (n >= bit_left) {
#ifndef HAVE_FAST_UNALIGNED
#if !HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf ;
s->buf_ptr[1] = bit_buf >> 8;
......@@ -217,7 +217,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
} else {
bit_buf<<=bit_left;
bit_buf |= value >> (n - bit_left);
#ifndef HAVE_FAST_UNALIGNED
#if !HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf >> 24;
s->buf_ptr[1] = bit_buf >> 16;
......@@ -243,7 +243,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
{
# ifdef ALIGNED_BITSTREAM_WRITER
# if defined(ARCH_X86)
# if ARCH_X86
__asm__ volatile(
"movl %0, %%ecx \n\t"
"xorl %%eax, %%eax \n\t"
......@@ -274,7 +274,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
s->index= index;
# endif
# else //ALIGNED_BITSTREAM_WRITER
# if defined(ARCH_X86)
# if ARCH_X86
__asm__ volatile(