[FFmpeg-cvslog] r24620 - in trunk/libavcodec: imgconvert.c imgconvert.h utils.c

stefano subversion
Sat Jul 31 18:46:20 CEST 2010


Author: stefano
Date: Sat Jul 31 18:46:20 2010
New Revision: 24620

Log:
Use av_fill_image_pointers/linesizes in place of ff_fill_pointer/linesize,
and drop the the ff_ variants at the next major bump.

Modified:
   trunk/libavcodec/imgconvert.c
   trunk/libavcodec/imgconvert.h
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sat Jul 31 18:37:23 2010	(r24619)
+++ trunk/libavcodec/imgconvert.c	Sat Jul 31 18:46:20 2010	(r24620)
@@ -498,6 +498,7 @@ int ff_set_systematic_pal(uint32_t pal[2
     return 0;
 }
 
+#if LIBAVCODEC_VERSION_MAJOR < 53
 int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width)
 {
     return av_fill_image_linesizes(picture->linesize, pix_fmt, width);
@@ -508,6 +509,7 @@ int ff_fill_pointer(AVPicture *picture, 
 {
     return av_fill_image_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
 }
+#endif
 
 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
                    enum PixelFormat pix_fmt, int width, int height)

Modified: trunk/libavcodec/imgconvert.h
==============================================================================
--- trunk/libavcodec/imgconvert.h	Sat Jul 31 18:37:23 2010	(r24619)
+++ trunk/libavcodec/imgconvert.h	Sat Jul 31 18:46:20 2010	(r24620)
@@ -27,9 +27,13 @@
 #include <stdint.h>
 #include "avcodec.h"
 
+#if LIBAVCODEC_VERSION_MAJOR < 53
+attribute_deprecated
 int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width);
 
+attribute_deprecated
 int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, int height);
+#endif
 
 int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane);
 

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Sat Jul 31 18:37:23 2010	(r24619)
+++ trunk/libavcodec/utils.c	Sat Jul 31 18:46:20 2010	(r24620)
@@ -29,6 +29,7 @@
 #include "libavutil/integer.h"
 #include "libavutil/crc.h"
 #include "libavutil/pixdesc.h"
+#include "libavcore/imgutils.h"
 #include "avcodec.h"
 #include "dsputil.h"
 #include "opt.h"
@@ -284,7 +285,7 @@ int avcodec_default_get_buffer(AVCodecCo
         do {
             // NOTE: do not align linesizes individually, this breaks e.g. assumptions
             // that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2
-            ff_fill_linesize(&picture, s->pix_fmt, w);
+            av_fill_image_linesizes(picture.linesize, s->pix_fmt, w);
             // increase alignment of w for next try (rhs gives the lowest bit set in w)
             w += w & ~(w-1);
 
@@ -294,7 +295,7 @@ int avcodec_default_get_buffer(AVCodecCo
             }
         } while (unaligned);
 
-        tmpsize = ff_fill_pointer(&picture, NULL, s->pix_fmt, h);
+        tmpsize = av_fill_image_pointers(picture.data, s->pix_fmt, h, NULL, picture.linesize);
         if (tmpsize < 0)
             return -1;
 



More information about the ffmpeg-cvslog mailing list