diff options
Diffstat (limited to 'libaf')
-rw-r--r-- | libaf/af_format.c | 4 | ||||
-rw-r--r-- | libaf/af_format.h | 4 | ||||
-rw-r--r-- | libaf/af_lavcac3enc.c | 2 | ||||
-rw-r--r-- | libaf/reorder_ch.c | 6 |
4 files changed, 11 insertions, 5 deletions
diff --git a/libaf/af_format.c b/libaf/af_format.c index faeae02efc..64acbbb9b6 100644 --- a/libaf/af_format.c +++ b/libaf/af_format.c @@ -332,7 +332,7 @@ af_info_t af_info_format = { }; static inline uint32_t load24bit(void* data, int pos) { -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN return (((uint32_t)((uint8_t*)data)[3*pos])<<24) | (((uint32_t)((uint8_t*)data)[3*pos+1])<<16) | (((uint32_t)((uint8_t*)data)[3*pos+2])<<8); @@ -344,7 +344,7 @@ static inline uint32_t load24bit(void* data, int pos) { } static inline void store24bit(void* data, int pos, uint32_t expanded_value) { -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN ((uint8_t*)data)[3*pos]=expanded_value>>24; ((uint8_t*)data)[3*pos+1]=expanded_value>>16; ((uint8_t*)data)[3*pos+2]=expanded_value>>8; diff --git a/libaf/af_format.h b/libaf/af_format.h index 553d18d962..66a74c901e 100644 --- a/libaf/af_format.h +++ b/libaf/af_format.h @@ -30,7 +30,7 @@ #define AF_FORMAT_LE (1<<0) // Little Endian #define AF_FORMAT_END_MASK (1<<0) -#ifdef WORDS_BIGENDIAN // Native endian of cpu +#if HAVE_BIGENDIAN // Native endian of cpu #define AF_FORMAT_NE AF_FORMAT_BE #else #define AF_FORMAT_NE AF_FORMAT_LE @@ -83,7 +83,7 @@ #define AF_FORMAT_FLOAT_LE (AF_FORMAT_F|AF_FORMAT_32BIT|AF_FORMAT_LE) #define AF_FORMAT_FLOAT_BE (AF_FORMAT_F|AF_FORMAT_32BIT|AF_FORMAT_BE) -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN #define AF_FORMAT_U16_NE AF_FORMAT_U16_BE #define AF_FORMAT_S16_NE AF_FORMAT_S16_BE #define AF_FORMAT_U24_NE AF_FORMAT_U24_BE diff --git a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c index 761debec01..e217ffc86c 100644 --- a/libaf/af_lavcac3enc.c +++ b/libaf/af_lavcac3enc.c @@ -238,7 +238,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) int16_t *out = (int16_t *)buf; int bsmod = dest[5] & 0x7; -#ifndef WORDS_BIGENDIAN +#if !HAVE_BIGENDIAN int i; char tmp; for (i = 0; i < len; i += 2) { diff --git a/libaf/reorder_ch.c b/libaf/reorder_ch.c index 2cbedb8146..88b1aa21dc 100644 --- a/libaf/reorder_ch.c +++ b/libaf/reorder_ch.c @@ -453,6 +453,7 @@ static int reorder_self_3(void *src, unsigned int samples, src_8[i+s2*3+1] = tmp1; src_8[i+s2*3+2] = tmp2; } + break; } case 4: { @@ -547,6 +548,7 @@ static int reorder_self_4_step_1(void *src, unsigned int samples, src_8[i+s3*3+1] = tmp1; src_8[i+s3*3+2] = tmp2; } + break; } case 4: { @@ -695,6 +697,7 @@ static int reorder_self_5_step_1(void *src, unsigned int samples, src_8[i+s4*3+1] = tmp1; src_8[i+s4*3+2] = tmp2; } + break; } case 4: { @@ -787,6 +790,7 @@ static int reorder_self_2_3(void *src, unsigned int samples, src_8[i+s4*3+1] = tmp1; src_8[i+s4*3+2] = tmp2; } + break; } case 4: { @@ -873,6 +877,7 @@ static int reorder_self_3_3(void *src, unsigned int samples, src_8[i+s5*3+1] = tmp1; src_8[i+s5*3+2] = tmp2; } + break; } case 4: { @@ -959,6 +964,7 @@ static int reorder_self_2_4(void *src, unsigned int samples, src_8[i+s5*3+1] = tmp1; src_8[i+s5*3+2] = tmp2; } + break; } case 4: { |