diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-13 00:29:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-13 00:39:48 +0100 |
commit | 8bc7fe4daf5c26555d77e2261c96ee14a800fad4 (patch) | |
tree | 71999a1eb8bacb609b5789b34de369ed4b049cd4 /libavutil | |
parent | c83ef636a665b2e17f1b6745a98ec7a5719264df (diff) | |
parent | 58c42af722cebecd86e340dc3ed9ec44b1fe4a55 (diff) | |
download | ffmpeg-8bc7fe4daf5c26555d77e2261c96ee14a800fad4.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
doxygen: misc consistency, spelling and wording fixes
vcr1: drop unnecessary emms_c() calls without MMX code
Replace all uses of av_close_input_file() with avformat_close_input().
lavf: add avformat_close_input().
lavf: deprecate av_close_input_stream().
lavf doxy: add some basic demuxing documentation.
lavf doxy: add some general lavf information.
lavf doxy: add misc utility functions to a group.
lavf doxy: add av_guess_codec/format to the encoding group.
lavf doxy: add core functions to a doxy group.
Add basic libavdevice documentation.
lavc: convert error_recognition to err_recognition.
avconv: update -map option help text
x86: Require 7 registers for the cabac asm
x86: bswap: remove test for bswap instruction
bswap: make generic implementation more compiler-friendly
h264: remove useless cast
proresdec: fix decode_slice() prototype
Conflicts:
configure
doc/APIchanges
ffprobe.c
libavcodec/avcodec.h
libavcodec/celp_math.h
libavcodec/h264.c
libavfilter/src_movie.c
libavformat/anm.c
libavformat/avformat.h
libavformat/version.h
libavutil/avstring.h
libavutil/bswap.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/arm/bswap.h | 2 | ||||
-rw-r--r-- | libavutil/avstring.h | 8 | ||||
-rw-r--r-- | libavutil/avutil.h | 1 | ||||
-rw-r--r-- | libavutil/bswap.h | 19 | ||||
-rw-r--r-- | libavutil/internal.h | 2 | ||||
-rw-r--r-- | libavutil/parseutils.h | 2 | ||||
-rw-r--r-- | libavutil/x86/bswap.h | 11 |
7 files changed, 15 insertions, 30 deletions
diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h index c5e74cc6d5..fd18e0d221 100644 --- a/libavutil/arm/bswap.h +++ b/libavutil/arm/bswap.h @@ -51,6 +51,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x) } #endif +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { @@ -66,6 +67,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x) #endif /* HAVE_ARMV6 */ return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* __ARMCC_VERSION */ diff --git a/libavutil/avstring.h b/libavutil/avstring.h index 147d7acbe5..f73d6e7420 100644 --- a/libavutil/avstring.h +++ b/libavutil/avstring.h @@ -171,7 +171,7 @@ char *av_get_token(const char **buf, const char *term); char *av_strtok(char *s, const char *delim, char **saveptr); /** - * Locale independent conversion of ASCII characters to upper case. + * Locale-independent conversion of ASCII characters to uppercase. */ static inline int av_toupper(int c) { @@ -181,7 +181,7 @@ static inline int av_toupper(int c) } /** - * Locale independent conversion of ASCII characters to lower case. + * Locale-independent conversion of ASCII characters to lowercase. */ static inline int av_tolower(int c) { @@ -191,13 +191,13 @@ static inline int av_tolower(int c) } /** - * Locale independent case-insensitive compare. + * Locale-independent case-insensitive compare. * @note This means only ASCII-range characters are case-insensitive */ int av_strcasecmp(const char *a, const char *b); /** - * Locale independent case-insensitive compare. + * Locale-independent case-insensitive compare. * @note This means only ASCII-range characters are case-insensitive */ int av_strncasecmp(const char *a, const char *b, size_t n); diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 9900263556..8b13fbba43 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -37,6 +37,7 @@ * @li @ref libavc "libavcodec" encoding/decoding library * @li @subpage libavfilter graph based frame editing library * @li @ref libavf "libavformat" I/O and muxing/demuxing library + * @li @ref lavd "libavdevice" special devices muxing/demuxing library * @li @ref lavu "libavutil" common utility library * @li @subpage libpostproc post processing library * @li @subpage libswscale color conversion and scaling library diff --git a/libavutil/bswap.h b/libavutil/bswap.h index 303bcf3532..06f654816d 100644 --- a/libavutil/bswap.h +++ b/libavutil/bswap.h @@ -65,29 +65,14 @@ static av_always_inline av_const uint16_t av_bswap16(uint16_t x) #ifndef av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { - x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF); - x= (x>>16) | (x<<16); - return x; + return AV_BSWAP32C(x); } #endif #ifndef av_bswap64 static inline uint64_t av_const av_bswap64(uint64_t x) { -#if 0 - x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL); - x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL); - return (x>>32) | (x<<32); -#else - union { - uint64_t ll; - uint32_t l[2]; - } w, r; - w.ll = x; - r.l[0] = av_bswap32 (w.l[1]); - r.l[1] = av_bswap32 (w.l[0]); - return r.ll; -#endif + return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32); } #endif diff --git a/libavutil/internal.h b/libavutil/internal.h index 46a05e124c..5d37da7b45 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -221,7 +221,7 @@ struct AVDictionary { #endif /** - * Returns NULL if a threading library has not been enabled. + * Return NULL if a threading library has not been enabled. * Used to disable threading functions in AVCodec definitions * when not needed. */ diff --git a/libavutil/parseutils.h b/libavutil/parseutils.h index 353e9a710e..2a74a060f2 100644 --- a/libavutil/parseutils.h +++ b/libavutil/parseutils.h @@ -75,7 +75,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, void *log_ctx); /** - * Parses timestr and returns in *time a corresponding number of + * Parse timestr and return in *time a corresponding number of * microseconds. * * @param timeval puts here the number of microseconds corresponding diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h index b0d62b248a..52ffb4dbf8 100644 --- a/libavutil/x86/bswap.h +++ b/libavutil/x86/bswap.h @@ -28,24 +28,20 @@ #include "config.h" #include "libavutil/attributes.h" +#if !AV_GCC_VERSION_AT_LEAST(4,1) #define av_bswap16 av_bswap16 static av_always_inline av_const unsigned av_bswap16(unsigned x) { __asm__("rorw $8, %w0" : "+r"(x)); return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,1) */ +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { -#if HAVE_BSWAP __asm__("bswap %0" : "+r" (x)); -#else - __asm__("rorw $8, %w0 \n\t" - "rorl $16, %0 \n\t" - "rorw $8, %w0" - : "+r"(x)); -#endif return x; } @@ -57,5 +53,6 @@ static inline uint64_t av_const av_bswap64(uint64_t x) return x; } #endif +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* AVUTIL_X86_BSWAP_H */ |