summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/avutil.h16
-rw-r--r--libavutil/error.h6
-rw-r--r--libavutil/file.c3
-rw-r--r--libavutil/imgutils.c29
-rw-r--r--libavutil/imgutils.h19
-rw-r--r--libavutil/log.c5
-rw-r--r--libavutil/mem.c6
-rw-r--r--libavutil/mem.h14
8 files changed, 12 insertions, 86 deletions
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index e44a2b7c6f..307a585290 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -39,9 +39,9 @@
#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
-#define LIBAVUTIL_VERSION_MAJOR 50
-#define LIBAVUTIL_VERSION_MINOR 40
-#define LIBAVUTIL_VERSION_MICRO 1
+#define LIBAVUTIL_VERSION_MAJOR 51
+#define LIBAVUTIL_VERSION_MINOR 0
+#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
@@ -58,7 +58,7 @@
* They may change, break or disappear at any time.
*/
#ifndef FF_API_OLD_EVAL_NAMES
-#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 51)
+#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 52)
#endif
/**
@@ -97,14 +97,6 @@ enum AVMediaType {
#define AV_TIME_BASE 1000000
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
-/**
- * Those FF_API_* defines are not part of public API.
- * They may change, break or disappear at any time.
- */
-#ifndef FF_API_OLD_IMAGE_NAMES
-#define FF_API_OLD_IMAGE_NAMES (LIBAVUTIL_VERSION_MAJOR < 51)
-#endif
-
#include "common.h"
#include "error.h"
#include "mathematics.h"
diff --git a/libavutil/error.h b/libavutil/error.h
index 0d475664c7..d371e6b0fe 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -37,25 +37,19 @@
#define AVUNERROR(e) (e)
#endif
-#if LIBAVUTIL_VERSION_MAJOR < 51
-#define AVERROR_INVALIDDATA AVERROR(EINVAL) ///< Invalid data found when processing input
#define AVERROR_IO AVERROR(EIO) ///< I/O error
#define AVERROR_NOENT AVERROR(ENOENT) ///< No such file or directory
#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format
#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory
#define AVERROR_NOTSUPP AVERROR(ENOSYS) ///< Operation not supported
-#define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename
#define AVERROR_UNKNOWN AVERROR(EINVAL) ///< Unknown error
-#endif
#define AVERROR_EOF AVERROR(EPIPE) ///< End of file
#define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
-#if LIBAVUTIL_VERSION_MAJOR > 50
#define AVERROR_INVALIDDATA (-MKTAG('I','N','D','A')) ///< Invalid data found when processing input
#define AVERROR_NUMEXPECTED (-MKTAG('N','U','E','X')) ///< Number syntax expected in filename
-#endif
#define AVERROR_DEMUXER_NOT_FOUND (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found
#define AVERROR_MUXER_NOT_FOUND (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found
diff --git a/libavutil/file.c b/libavutil/file.c
index c79f68aab3..b2d380df9d 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -47,7 +47,6 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
av_unused void *ptr;
off_t off_size;
char errbuf[128];
- size_t max_size = HAVE_MMAP ? SIZE_MAX : FF_INTERNAL_MEM_TYPE_MAX_VALUE;
*bufptr = NULL;
if (fd < 0) {
@@ -66,7 +65,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
}
off_size = st.st_size;
- if (off_size > max_size) {
+ if (off_size > SIZE_MAX) {
av_log(&file_log_ctx, AV_LOG_ERROR,
"File size for file '%s' is too big\n", filename);
close(fd);
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 0f449ff427..8eefa4d494 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -266,32 +266,3 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
}
}
}
-
-#if FF_API_OLD_IMAGE_NAMES
-void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
- const AVPixFmtDescriptor *pixdesc)
-{
- av_image_fill_max_pixsteps(max_pixsteps, max_pixstep_comps, pixdesc);
-}
-
-int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane)
-{
- return av_image_get_linesize(pix_fmt, width, plane);
-}
-
-int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width)
-{
- return av_image_fill_linesizes(linesizes, pix_fmt, width);
-}
-
-int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
- uint8_t *ptr, const int linesizes[4])
-{
- return av_image_fill_pointers(data, pix_fmt, height, ptr, linesizes);
-}
-
-int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
-{
- return av_image_check_size(w, h, log_offset, log_ctx);
-}
-#endif
diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
index c181863579..7a714d1f2d 100644
--- a/libavutil/imgutils.h
+++ b/libavutil/imgutils.h
@@ -127,23 +127,4 @@ int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *lo
int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt);
-#if FF_API_OLD_IMAGE_NAMES
-attribute_deprecated
-void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
- const AVPixFmtDescriptor *pixdesc);
-
-attribute_deprecated
-int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane);
-
-attribute_deprecated
-int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width);
-
-attribute_deprecated
-int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
- uint8_t *ptr, const int linesizes[4]);
-
-attribute_deprecated
-int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
-#endif
-
#endif /* AVUTIL_IMGUTILS_H */
diff --git a/libavutil/log.c b/libavutil/log.c
index abf939d65e..d7daaa2706 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -29,10 +29,7 @@
#include "avutil.h"
#include "log.h"
-#if LIBAVUTIL_VERSION_MAJOR > 50
-static
-#endif
-int av_log_level = AV_LOG_INFO;
+static int av_log_level = AV_LOG_INFO;
static int flags;
#if defined(_WIN32) && !defined(__MINGW32CE__)
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 7ffd6cba9b..7e07fd2596 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -61,7 +61,7 @@ void free(void *ptr);
memory allocator. You do not need to suppress this file because the
linker will do it automatically. */
-void *av_malloc(FF_INTERNAL_MEM_TYPE size)
+void *av_malloc(size_t size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
@@ -116,7 +116,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size)
return ptr;
}
-void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size)
+void *av_realloc(void *ptr, size_t size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
@@ -153,7 +153,7 @@ void av_freep(void *arg)
*ptr = NULL;
}
-void *av_mallocz(FF_INTERNAL_MEM_TYPE size)
+void *av_mallocz(size_t size)
{
void *ptr = av_malloc(size);
if (ptr)
diff --git a/libavutil/mem.h b/libavutil/mem.h
index 2bfbd0eac5..7aab706e7d 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -62,14 +62,6 @@
#define av_alloc_size(n)
#endif
-#if LIBAVUTIL_VERSION_MAJOR < 51
-# define FF_INTERNAL_MEM_TYPE unsigned int
-# define FF_INTERNAL_MEM_TYPE_MAX_VALUE UINT_MAX
-#else
-# define FF_INTERNAL_MEM_TYPE size_t
-# define FF_INTERNAL_MEM_TYPE_MAX_VALUE SIZE_MAX
-#endif
-
/**
* Allocate a block of size bytes with alignment suitable for all
* memory accesses (including vectors if available on the CPU).
@@ -78,7 +70,7 @@
* be allocated.
* @see av_mallocz()
*/
-void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
+void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1);
/**
* Allocate or reallocate a block of memory.
@@ -92,7 +84,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
* cannot be reallocated or the function is used to free the memory block.
* @see av_fast_realloc()
*/
-void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2);
+void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
/**
* Free a memory block which has been allocated with av_malloc(z)() or
@@ -112,7 +104,7 @@ void av_free(void *ptr);
* @return Pointer to the allocated block, NULL if it cannot be allocated.
* @see av_malloc()
*/
-void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
+void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
/**
* Duplicate the string s.