]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/mem.h
swscale: remove duplicate conversion routine in swScale().
[ffmpeg] / libavutil / mem.h
index 33ab48f895db17c84c1871b5be44965407b220d4..5dea49202143770cf3592dedd0bde9dccced9f3a 100644 (file)
@@ -1,20 +1,20 @@
 /*
  * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
     #define av_malloc_attrib
 #endif
 
-#if (!defined(__ICC) || __ICC > 1200) && AV_GCC_VERSION_AT_LEAST(4,3)
+#if AV_GCC_VERSION_AT_LEAST(4,3)
     #define av_alloc_size(n) __attribute__((alloc_size(n)))
 #else
     #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.