[FFmpeg-cvslog] r24284 - in trunk/libavfilter: avfilter.h defaults.c

stefano subversion
Sat Jul 17 12:44:14 CEST 2010


Author: stefano
Date: Sat Jul 17 12:44:14 2010
New Revision: 24284

Log:
Rename AVFilterPic to AVFilterBuffer.

The struct is going to be used for audio data as well, so the new name
is less misleading.

Patch by S.N. Hemanth Meenakshisundaram smeenaks AT ucsd DOT edu.

Modified:
   trunk/libavfilter/avfilter.h
   trunk/libavfilter/defaults.c

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Sat Jul 17 12:43:42 2010	(r24283)
+++ trunk/libavfilter/avfilter.h	Sat Jul 17 12:44:14 2010	(r24284)
@@ -25,7 +25,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  1
-#define LIBAVFILTER_VERSION_MINOR 23
+#define LIBAVFILTER_VERSION_MINOR 24
 #define LIBAVFILTER_VERSION_MICRO  0
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -67,7 +67,7 @@ typedef struct AVFilterPad     AVFilterP
  * should not store pointers to this structure directly, but instead use the
  * AVFilterPicRef structure below.
  */
-typedef struct AVFilterPic
+typedef struct AVFilterBuffer
 {
     uint8_t *data[4];           ///< picture data for each plane
     int linesize[4];            ///< number of bytes per line
@@ -83,13 +83,13 @@ typedef struct AVFilterPic
      * back into a memory pool to be reused later without the overhead of
      * reallocating it from scratch.
      */
-    void (*free)(struct AVFilterPic *pic);
+    void (*free)(struct AVFilterBuffer *pic);
 
     int w, h;                  ///< width and height of the allocated buffer
-} AVFilterPic;
+} AVFilterBuffer;
 
 /**
- * A reference to an AVFilterPic. Since filters can manipulate the origin of
+ * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
  * a picture to, for example, crop image without any memcpy, the picture origin
  * and dimensions are per-reference properties. Linesize is also useful for
  * image flipping, frame to field filters, etc, and so is also per-reference.
@@ -98,7 +98,7 @@ typedef struct AVFilterPic
  */
 typedef struct AVFilterPicRef
 {
-    AVFilterPic *pic;           ///< the picture that this is a reference to
+    AVFilterBuffer *pic;        ///< the picture that this is a reference to
     uint8_t *data[4];           ///< picture data for each plane
     int linesize[4];            ///< number of bytes per line
     int w;                      ///< image width

Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c	Sat Jul 17 12:43:42 2010	(r24283)
+++ trunk/libavfilter/defaults.c	Sat Jul 17 12:44:14 2010	(r24284)
@@ -23,10 +23,10 @@
 #include "avfilter.h"
 
 /* TODO: buffer pool.  see comment for avfilter_default_get_video_buffer() */
-static void avfilter_default_free_video_buffer(AVFilterPic *pic)
+static void avfilter_default_free_buffer(AVFilterBuffer *ptr)
 {
-    av_free(pic->data[0]);
-    av_free(pic);
+    av_free(ptr->data[0]);
+    av_free(ptr);
 }
 
 /* TODO: set the buffer's priv member to a context structure for the whole
@@ -34,7 +34,7 @@ static void avfilter_default_free_video_
  * alloc & free cycle currently implemented. */
 AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
 {
-    AVFilterPic *pic = av_mallocz(sizeof(AVFilterPic));
+    AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer));
     AVFilterPicRef *ref = av_mallocz(sizeof(AVFilterPicRef));
     int i, tempsize;
     char *buf;
@@ -48,7 +48,7 @@ AVFilterPicRef *avfilter_default_get_vid
 
     pic->refcount = 1;
     pic->format   = link->format;
-    pic->free     = avfilter_default_free_video_buffer;
+    pic->free     = avfilter_default_free_buffer;
     ff_fill_linesize((AVPicture *)pic, pic->format, ref->w);
 
     for (i=0; i<4;i++)



More information about the ffmpeg-cvslog mailing list