summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-24 02:54:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-24 03:07:04 +0200
commit686959e87e377c0494da636640e36779dd985c30 (patch)
tree8c4674c56f291638686e6bc3efafe0ef2b921327 /libavutil
parentffc6c8a4305d25db8a5af72389a2453b17f43646 (diff)
parentadbfc605f6bbe87b292c82cd1f5d4d974fa6b73c (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: doxygen: Consistently use '@' instead of '\' for Doxygen markup. Use av_printf_format to check the usage of printf style functions Add av_printf_format, for marking printf style format strings and their parameters ARM: enable thumb for Cortex-M* CPUs nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). build: remove SRC_PATH_BARE variable build: move basic rules and variables to main Makefile build: move special targets to end of main Makefile lavdev: improve feedback in case of invalid frame rate/size vfwcap: prefer "framerate_q" over "fps" in vfw_read_header() v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters() fbdev: prefer "framerate_q" over "fps" in device context bktr: prefer "framerate" over "fps" for grab_read_header() ALSA: implement channel layout for playback. alsa: support unsigned variants of already supported signed formats. alsa: add support for more formats. ARM: allow building in Thumb2 mode Conflicts: common.mak doc/APIchanges libavcodec/vdpau.h libavdevice/alsa-audio-common.c libavdevice/fbdev.c libavdevice/libdc1394.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/arm/intmath.h2
-rw-r--r--libavutil/attributes.h2
-rw-r--r--libavutil/avstring.h3
-rw-r--r--libavutil/avutil.h4
-rw-r--r--libavutil/common.h20
-rw-r--r--libavutil/des.c2
-rw-r--r--libavutil/des.h18
-rw-r--r--libavutil/log.h7
-rw-r--r--libavutil/lzo.c22
-rw-r--r--libavutil/lzo.h22
-rw-r--r--libavutil/rc4.h18
11 files changed, 61 insertions, 59 deletions
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 4130177549..efe3915350 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -36,6 +36,7 @@ static av_always_inline av_const int FASTDIV(int a, int b)
int r;
__asm__ ("cmp %2, #2 \n\t"
"ldr %0, [%3, %2, lsl #2] \n\t"
+ "ite le \n\t"
"lsrle %0, %1, #1 \n\t"
"smmulgt %0, %0, %1 \n\t"
: "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc");
@@ -101,6 +102,7 @@ static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
{
int x, y;
__asm__ ("adds %1, %R2, %Q2, lsr #31 \n\t"
+ "itet ne \n\t"
"mvnne %1, #1<<31 \n\t"
"moveq %0, %Q2 \n\t"
"eorne %0, %1, %R2, asr #31 \n\t"
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 517b129f37..e97fdfd466 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -127,8 +127,10 @@
#ifdef __GNUC__
# define av_builtin_constant_p __builtin_constant_p
+# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
#else
# define av_builtin_constant_p(x) 0
+# define av_printf_format(fmtpos, attrpos)
#endif
#endif /* AVUTIL_ATTRIBUTES_H */
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index 04d1197386..662af6b70d 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -22,6 +22,7 @@
#define AVUTIL_AVSTRING_H
#include <stddef.h>
+#include "attributes.h"
/**
* Return non-zero if pfx is a prefix of str. If it is, *ptr is set to
@@ -107,7 +108,7 @@ size_t av_strlcat(char *dst, const char *src, size_t size);
* @return the length of the string that would have been generated
* if enough space had been available
*/
-size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...);
+size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4);
/**
* Convert a number to a av_malloced string.
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 4d6ef66003..33eacc7fae 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -40,8 +40,8 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 9
-#define LIBAVUTIL_VERSION_MICRO 1
+#define LIBAVUTIL_VERSION_MINOR 10
+#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
diff --git a/libavutil/common.h b/libavutil/common.h
index 1cd2de2909..d60e8638a5 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -270,16 +270,16 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
}\
}\
-/*!
- * \def PUT_UTF8(val, tmp, PUT_BYTE)
+/**
+ * @def PUT_UTF8(val, tmp, PUT_BYTE)
* Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
- * \param val is an input-only argument and should be of type uint32_t. It holds
+ * @param val is an input-only argument and should be of type uint32_t. It holds
* a UCS-4 encoded Unicode character that is to be converted to UTF-8. If
* val is given as a function it is executed only once.
- * \param tmp is a temporary variable and should be of type uint8_t. It
+ * @param tmp is a temporary variable and should be of type uint8_t. It
* represents an intermediate value during conversion that is to be
* output by PUT_BYTE.
- * \param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
+ * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
* It could be a function or a statement, and uses tmp as the input byte.
* For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
* executed up to 4 times for values in the valid UTF-8 range and up to
@@ -306,16 +306,16 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
}\
}
-/*!
- * \def PUT_UTF16(val, tmp, PUT_16BIT)
+/**
+ * @def PUT_UTF16(val, tmp, PUT_16BIT)
* Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).
- * \param val is an input-only argument and should be of type uint32_t. It holds
+ * @param val is an input-only argument and should be of type uint32_t. It holds
* a UCS-4 encoded Unicode character that is to be converted to UTF-16. If
* val is given as a function it is executed only once.
- * \param tmp is a temporary variable and should be of type uint16_t. It
+ * @param tmp is a temporary variable and should be of type uint16_t. It
* represents an intermediate value during conversion that is to be
* output by PUT_16BIT.
- * \param PUT_16BIT writes the converted UTF-16 data to any proper destination
+ * @param PUT_16BIT writes the converted UTF-16 data to any proper destination
* in desired endianness. It could be a function or a statement, and uses tmp
* as the input byte. For example, PUT_BYTE could be "*output++ = tmp;"
* PUT_BYTE will be executed 1 or 2 times depending on input character.
diff --git a/libavutil/des.c b/libavutil/des.c
index 9c1a530666..f3482aebd6 100644
--- a/libavutil/des.c
+++ b/libavutil/des.c
@@ -240,7 +240,7 @@ static uint32_t f_func(uint32_t r, uint64_t k) {
}
/**
- * \brief rotate the two halves of the expanded 56 bit key each 1 bit left
+ * @brief rotate the two halves of the expanded 56 bit key each 1 bit left
*
* Note: the specification calls this "shift", so I kept it although
* it is confusing.
diff --git a/libavutil/des.h b/libavutil/des.h
index e80bdd3e69..dd670869b2 100644
--- a/libavutil/des.h
+++ b/libavutil/des.h
@@ -30,22 +30,22 @@ struct AVDES {
};
/**
- * \brief Initializes an AVDES context.
+ * @brief Initializes an AVDES context.
*
- * \param key_bits must be 64 or 192
- * \param decrypt 0 for encryption, 1 for decryption
+ * @param key_bits must be 64 or 192
+ * @param decrypt 0 for encryption, 1 for decryption
*/
int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);
/**
- * \brief Encrypts / decrypts using the DES algorithm.
+ * @brief Encrypts / decrypts using the DES algorithm.
*
- * \param count number of 8 byte blocks
- * \param dst destination array, can be equal to src, must be 8-byte aligned
- * \param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
- * \param iv initialization vector for CBC mode, if NULL then ECB will be used,
+ * @param count number of 8 byte blocks
+ * @param dst destination array, can be equal to src, must be 8-byte aligned
+ * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
+ * @param iv initialization vector for CBC mode, if NULL then ECB will be used,
* must be 8-byte aligned
- * \param decrypt 0 for encryption, 1 for decryption
+ * @param decrypt 0 for encryption, 1 for decryption
*/
void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
diff --git a/libavutil/log.h b/libavutil/log.h
index 53c8aa0f67..046d19920e 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -23,6 +23,7 @@
#include <stdarg.h>
#include "avutil.h"
+#include "attributes.h"
/**
* Describe the class of an AVClass context structure. That is an
@@ -129,11 +130,7 @@ typedef struct {
* subsequent arguments are converted to output.
* @see av_vlog
*/
-#ifdef __GNUC__
-void av_log(void *avcl, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
-#else
-void av_log(void *avcl, int level, const char *fmt, ...);
-#endif
+void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
void av_vlog(void *avcl, int level, const char *fmt, va_list);
int av_log_get_level(void);
diff --git a/libavutil/lzo.c b/libavutil/lzo.c
index 40a41a424d..bac762ecc3 100644
--- a/libavutil/lzo.c
+++ b/libavutil/lzo.c
@@ -37,8 +37,8 @@ typedef struct LZOContext {
} LZOContext;
/**
- * \brief Reads one byte from the input buffer, avoiding an overrun.
- * \return byte read
+ * @brief Reads one byte from the input buffer, avoiding an overrun.
+ * @return byte read
*/
static inline int get_byte(LZOContext *c) {
if (c->in < c->in_end)
@@ -54,10 +54,10 @@ static inline int get_byte(LZOContext *c) {
#endif
/**
- * \brief Decodes a length value in the coding used by lzo.
- * \param x previous byte value
- * \param mask bits used from x
- * \return decoded length value
+ * @brief Decodes a length value in the coding used by lzo.
+ * @param x previous byte value
+ * @param mask bits used from x
+ * @return decoded length value
*/
static inline int get_len(LZOContext *c, int x, int mask) {
int cnt = x & mask;
@@ -82,8 +82,8 @@ static inline int get_len(LZOContext *c, int x, int mask) {
#endif
/**
- * \brief Copies bytes from input to output buffer with checking.
- * \param cnt number of bytes to copy, must be >= 0
+ * @brief Copies bytes from input to output buffer with checking.
+ * @param cnt number of bytes to copy, must be >= 0
*/
static inline void copy(LZOContext *c, int cnt) {
register const uint8_t *src = c->in;
@@ -111,9 +111,9 @@ static inline void copy(LZOContext *c, int cnt) {
static inline void memcpy_backptr(uint8_t *dst, int back, int cnt);
/**
- * \brief Copies previously decoded bytes to current position.
- * \param back how many bytes back we start
- * \param cnt number of bytes to copy, must be >= 0
+ * @brief Copies previously decoded bytes to current position.
+ * @param back how many bytes back we start
+ * @param cnt number of bytes to copy, must be >= 0
*
* cnt > back is valid, this will copy the bytes we just copied,
* thus creating a repeating pattern with a period length of back.
diff --git a/libavutil/lzo.h b/libavutil/lzo.h
index 6788054bff..d1b8fa73ba 100644
--- a/libavutil/lzo.h
+++ b/libavutil/lzo.h
@@ -24,7 +24,7 @@
#include <stdint.h>
-/** \defgroup errflags Error flags returned by av_lzo1x_decode
+/** @defgroup errflags Error flags returned by av_lzo1x_decode
* \{ */
//! end of the input buffer reached before decoding finished
#define AV_LZO_INPUT_DEPLETED 1
@@ -40,12 +40,12 @@
#define AV_LZO_OUTPUT_PADDING 12
/**
- * \brief Decodes LZO 1x compressed data.
- * \param out output buffer
- * \param outlen size of output buffer, number of bytes left are returned here
- * \param in input buffer
- * \param inlen size of input buffer, number of bytes left are returned here
- * \return 0 on success, otherwise a combination of the error flags above
+ * @brief Decodes LZO 1x compressed data.
+ * @param out output buffer
+ * @param outlen size of output buffer, number of bytes left are returned here
+ * @param in input buffer
+ * @param inlen size of input buffer, number of bytes left are returned here
+ * @return 0 on success, otherwise a combination of the error flags above
*
* Make sure all buffers are appropriately padded, in must provide
* AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
@@ -53,10 +53,10 @@
int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
/**
- * \brief deliberately overlapping memcpy implementation
- * \param dst destination buffer; must be padded with 12 additional bytes
- * \param back how many bytes back we start (the initial size of the overlapping window)
- * \param cnt number of bytes to copy, must be >= 0
+ * @brief deliberately overlapping memcpy implementation
+ * @param dst destination buffer; must be padded with 12 additional bytes
+ * @param back how many bytes back we start (the initial size of the overlapping window)
+ * @param cnt number of bytes to copy, must be >= 0
*
* cnt > back is valid, this will copy the bytes we just copied,
* thus creating a repeating pattern with a period length of back.
diff --git a/libavutil/rc4.h b/libavutil/rc4.h
index 07223a5c9e..9362fd8880 100644
--- a/libavutil/rc4.h
+++ b/libavutil/rc4.h
@@ -29,21 +29,21 @@ struct AVRC4 {
};
/**
- * \brief Initializes an AVRC4 context.
+ * @brief Initializes an AVRC4 context.
*
- * \param key_bits must be a multiple of 8
- * \param decrypt 0 for encryption, 1 for decryption, currently has no effect
+ * @param key_bits must be a multiple of 8
+ * @param decrypt 0 for encryption, 1 for decryption, currently has no effect
*/
int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt);
/**
- * \brief Encrypts / decrypts using the RC4 algorithm.
+ * @brief Encrypts / decrypts using the RC4 algorithm.
*
- * \param count number of bytes
- * \param dst destination array, can be equal to src
- * \param src source array, can be equal to dst, may be NULL
- * \param iv not (yet) used for RC4, should be NULL
- * \param decrypt 0 for encryption, 1 for decryption, not (yet) used
+ * @param count number of bytes
+ * @param dst destination array, can be equal to src
+ * @param src source array, can be equal to dst, may be NULL
+ * @param iv not (yet) used for RC4, should be NULL
+ * @param decrypt 0 for encryption, 1 for decryption, not (yet) used
*/
void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);