summaryrefslogtreecommitdiff
path: root/apps/codecs/libwmapro/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libwmapro/libavutil')
-rw-r--r--apps/codecs/libwmapro/libavutil/avutil.h2
-rw-r--r--apps/codecs/libwmapro/libavutil/bswap.h13
-rw-r--r--apps/codecs/libwmapro/libavutil/internal.h19
-rw-r--r--apps/codecs/libwmapro/libavutil/intreadwrite.h18
-rw-r--r--apps/codecs/libwmapro/libavutil/log.c9
-rw-r--r--apps/codecs/libwmapro/libavutil/log.h2
-rw-r--r--apps/codecs/libwmapro/libavutil/mathematics.c4
7 files changed, 25 insertions, 42 deletions
diff --git a/apps/codecs/libwmapro/libavutil/avutil.h b/apps/codecs/libwmapro/libavutil/avutil.h
index 1b858f1fe6..fd6e313b59 100644
--- a/apps/codecs/libwmapro/libavutil/avutil.h
+++ b/apps/codecs/libwmapro/libavutil/avutil.h
@@ -79,7 +79,7 @@ enum AVMediaType {
79}; 79};
80 80
81#include "common.h" 81#include "common.h"
82#include "error.h" 82//#include "error.h"
83#include "mathematics.h" 83#include "mathematics.h"
84//#include "rational.h" 84//#include "rational.h"
85//#include "intfloat_readwrite.h" 85//#include "intfloat_readwrite.h"
diff --git a/apps/codecs/libwmapro/libavutil/bswap.h b/apps/codecs/libwmapro/libavutil/bswap.h
index 5743e126b8..e15501778b 100644
--- a/apps/codecs/libwmapro/libavutil/bswap.h
+++ b/apps/codecs/libwmapro/libavutil/bswap.h
@@ -30,18 +30,6 @@
30//#include "config.h" 30//#include "config.h"
31#include "attributes.h" 31#include "attributes.h"
32 32
33#if ARCH_ARM
34# include "arm/bswap.h"
35#elif ARCH_AVR32
36# include "avr32/bswap.h"
37#elif ARCH_BFIN
38# include "bfin/bswap.h"
39#elif ARCH_SH4
40# include "sh4/bswap.h"
41#elif ARCH_X86
42# include "x86/bswap.h"
43#endif
44
45#ifndef bswap_16 33#ifndef bswap_16
46static av_always_inline av_const uint16_t bswap_16(uint16_t x) 34static av_always_inline av_const uint16_t bswap_16(uint16_t x)
47{ 35{
@@ -82,6 +70,7 @@ static inline uint64_t av_const bswap_64(uint64_t x)
82// be2me ... big-endian to machine-endian 70// be2me ... big-endian to machine-endian
83// le2me ... little-endian to machine-endian 71// le2me ... little-endian to machine-endian
84 72
73#define HAVE_BIGENDIAN 0
85#if HAVE_BIGENDIAN 74#if HAVE_BIGENDIAN
86#define be2me_16(x) (x) 75#define be2me_16(x) (x)
87#define be2me_32(x) (x) 76#define be2me_32(x) (x)
diff --git a/apps/codecs/libwmapro/libavutil/internal.h b/apps/codecs/libwmapro/libavutil/internal.h
index 97087e462a..87a4d3ec10 100644
--- a/apps/codecs/libwmapro/libavutil/internal.h
+++ b/apps/codecs/libwmapro/libavutil/internal.h
@@ -55,7 +55,8 @@
55#endif 55#endif
56 56
57#ifndef av_alias 57#ifndef av_alias
58#if HAVE_ATTRIBUTE_MAY_ALIAS && (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(3,3) 58//#if HAVE_ATTRIBUTE_MAY_ALIAS && (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(3,3)
59#if 0
59# define av_alias __attribute__((may_alias)) 60# define av_alias __attribute__((may_alias))
60#else 61#else
61# define av_alias 62# define av_alias
@@ -106,7 +107,8 @@
106#define LABEL_MANGLE(a) EXTERN_PREFIX #a 107#define LABEL_MANGLE(a) EXTERN_PREFIX #a
107 108
108// Use rip-relative addressing if compiling PIC code on x86-64. 109// Use rip-relative addressing if compiling PIC code on x86-64.
109#if ARCH_X86_64 && defined(PIC) 110//#if ARCH_X86_64 && defined(PIC)
111#if 0
110# define LOCAL_MANGLE(a) #a "(%%rip)" 112# define LOCAL_MANGLE(a) #a "(%%rip)"
111#else 113#else
112# define LOCAL_MANGLE(a) #a 114# define LOCAL_MANGLE(a) #a
@@ -127,7 +129,8 @@
127 129
128/* math */ 130/* math */
129 131
130#if ARCH_X86 132//#if ARCH_X86
133#if 0
131#define MASK_ABS(mask, level)\ 134#define MASK_ABS(mask, level)\
132 __asm__ volatile(\ 135 __asm__ volatile(\
133 "cltd \n\t"\ 136 "cltd \n\t"\
@@ -198,10 +201,10 @@
198 * without modification. Used to disable the definition of strings 201 * without modification. Used to disable the definition of strings
199 * (for example AVCodec long_names). 202 * (for example AVCodec long_names).
200 */ 203 */
201#if CONFIG_SMALL 204//#if CONFIG_SMALL
202# define NULL_IF_CONFIG_SMALL(x) NULL 205//# define NULL_IF_CONFIG_SMALL(x) NULL
203#else 206//#else
204# define NULL_IF_CONFIG_SMALL(x) x 207//# define NULL_IF_CONFIG_SMALL(x) x
205#endif 208//#endif
206 209
207#endif /* AVUTIL_INTERNAL_H */ 210#endif /* AVUTIL_INTERNAL_H */
diff --git a/apps/codecs/libwmapro/libavutil/intreadwrite.h b/apps/codecs/libwmapro/libavutil/intreadwrite.h
index 87098d707d..a88ffa80f6 100644
--- a/apps/codecs/libwmapro/libavutil/intreadwrite.h
+++ b/apps/codecs/libwmapro/libavutil/intreadwrite.h
@@ -52,24 +52,10 @@ typedef union {
52 * as inline functions. 52 * as inline functions.
53 */ 53 */
54 54
55#if ARCH_ARM
56# include "arm/intreadwrite.h"
57#elif ARCH_AVR32
58# include "avr32/intreadwrite.h"
59#elif ARCH_MIPS
60# include "mips/intreadwrite.h"
61#elif ARCH_PPC
62# include "ppc/intreadwrite.h"
63#elif ARCH_TOMI
64# include "tomi/intreadwrite.h"
65#elif ARCH_X86
66# include "x86/intreadwrite.h"
67#endif
68
69/* 55/*
70 * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers. 56 * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers.
71 */ 57 */
72 58#define HAVE_BIGENDIAN 0
73#if HAVE_BIGENDIAN 59#if HAVE_BIGENDIAN
74 60
75# if defined(AV_RN16) && !defined(AV_RB16) 61# if defined(AV_RN16) && !defined(AV_RB16)
@@ -172,6 +158,8 @@ typedef union {
172 158
173#endif /* !HAVE_BIGENDIAN */ 159#endif /* !HAVE_BIGENDIAN */
174 160
161#define HAVE_ATTRIBUTE_PACKED 0
162#define HAVE_FAST_UNALIGNED 0
175/* 163/*
176 * Define AV_[RW]N helper macros to simplify definitions not provided 164 * Define AV_[RW]N helper macros to simplify definitions not provided
177 * by per-arch headers. 165 * by per-arch headers.
diff --git a/apps/codecs/libwmapro/libavutil/log.c b/apps/codecs/libwmapro/libavutil/log.c
index 6cbe0da8b8..f93a0d6677 100644
--- a/apps/codecs/libwmapro/libavutil/log.c
+++ b/apps/codecs/libwmapro/libavutil/log.c
@@ -26,13 +26,16 @@
26 26
27#include "avutil.h" 27#include "avutil.h"
28#include "log.h" 28#include "log.h"
29/* disable sprintf functions */
30#define snprintf(...)
31#define vsnprintf snprintf
29 32
30#if LIBAVUTIL_VERSION_MAJOR > 50 33#if LIBAVUTIL_VERSION_MAJOR > 50
31static 34static
32#endif 35#endif
33int av_log_level = AV_LOG_INFO; 36int av_log_level = AV_LOG_INFO;
34 37
35void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) 38void av_log_default_callback(void* ptr, int level)
36{ 39{
37 static int print_prefix=1; 40 static int print_prefix=1;
38 static int count; 41 static int count;
@@ -61,9 +64,9 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
61 strcpy(prev, line); 64 strcpy(prev, line);
62} 65}
63 66
64static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback; 67static void (*av_log_callback)(void*, int = av_log_default_callback;
65 68
66void av_log(void* avcl, int level, const char *fmt, ...) 69void av_log(void* avcl, int level)
67{ 70{
68 va_list vl; 71 va_list vl;
69 va_start(vl, fmt); 72 va_start(vl, fmt);
diff --git a/apps/codecs/libwmapro/libavutil/log.h b/apps/codecs/libwmapro/libavutil/log.h
index b0a1493607..43228e4985 100644
--- a/apps/codecs/libwmapro/libavutil/log.h
+++ b/apps/codecs/libwmapro/libavutil/log.h
@@ -110,6 +110,6 @@ void av_vlog(void*, int level, const char *fmt, va_list);
110int av_log_get_level(void); 110int av_log_get_level(void);
111void av_log_set_level(int); 111void av_log_set_level(int);
112void av_log_set_callback(void (*)(void*, int, const char*, va_list)); 112void av_log_set_callback(void (*)(void*, int, const char*, va_list));
113void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl); 113void av_log_default_callback(void* ptr, int level);
114 114
115#endif /* AVUTIL_LOG_H */ 115#endif /* AVUTIL_LOG_H */
diff --git a/apps/codecs/libwmapro/libavutil/mathematics.c b/apps/codecs/libwmapro/libavutil/mathematics.c
index 7af0104516..f607d68b6e 100644
--- a/apps/codecs/libwmapro/libavutil/mathematics.c
+++ b/apps/codecs/libwmapro/libavutil/mathematics.c
@@ -103,13 +103,13 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
103 a0 = a0*b0 + t1a; 103 a0 = a0*b0 + t1a;
104 a1 = a1*b1 + (t1>>32) + (a0<t1a); 104 a1 = a1*b1 + (t1>>32) + (a0<t1a);
105 a0 += r; 105 a0 += r;
106 a1 += a0<r; 106 a1 += a0<(unsigned)r;
107 107
108 for(i=63; i>=0; i--){ 108 for(i=63; i>=0; i--){
109// int o= a1 & 0x8000000000000000ULL; 109// int o= a1 & 0x8000000000000000ULL;
110 a1+= a1 + ((a0>>i)&1); 110 a1+= a1 + ((a0>>i)&1);
111 t1+=t1; 111 t1+=t1;
112 if(/*o || */c <= a1){ 112 if(/*o || */(unsigned)c <= a1){
113 a1 -= c; 113 a1 -= c;
114 t1++; 114 t1++;
115 } 115 }