Browse code

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.

Originally committed as revision 24284 to svn://svn.ffmpeg.org/ffmpeg/trunk

S.N. Hemanth Meenakshisundaram authored on 2010/07/17 19:44:14
Showing 2 changed files
... ...
@@ -25,7 +25,7 @@
25 25
 #include "libavutil/avutil.h"
26 26
 
27 27
 #define LIBAVFILTER_VERSION_MAJOR  1
28
-#define LIBAVFILTER_VERSION_MINOR 23
28
+#define LIBAVFILTER_VERSION_MINOR 24
29 29
 #define LIBAVFILTER_VERSION_MICRO  0
30 30
 
31 31
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
... ...
@@ -67,7 +67,7 @@ typedef struct AVFilterPad     AVFilterPad;
67 67
  * should not store pointers to this structure directly, but instead use the
68 68
  * AVFilterPicRef structure below.
69 69
  */
70
-typedef struct AVFilterPic
70
+typedef struct AVFilterBuffer
71 71
 {
72 72
     uint8_t *data[4];           ///< picture data for each plane
73 73
     int linesize[4];            ///< number of bytes per line
... ...
@@ -83,13 +83,13 @@ typedef struct AVFilterPic
83 83
      * back into a memory pool to be reused later without the overhead of
84 84
      * reallocating it from scratch.
85 85
      */
86
-    void (*free)(struct AVFilterPic *pic);
86
+    void (*free)(struct AVFilterBuffer *pic);
87 87
 
88 88
     int w, h;                  ///< width and height of the allocated buffer
89
-} AVFilterPic;
89
+} AVFilterBuffer;
90 90
 
91 91
 /**
92
- * A reference to an AVFilterPic. Since filters can manipulate the origin of
92
+ * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
93 93
  * a picture to, for example, crop image without any memcpy, the picture origin
94 94
  * and dimensions are per-reference properties. Linesize is also useful for
95 95
  * image flipping, frame to field filters, etc, and so is also per-reference.
... ...
@@ -98,7 +98,7 @@ typedef struct AVFilterPic
98 98
  */
99 99
 typedef struct AVFilterPicRef
100 100
 {
101
-    AVFilterPic *pic;           ///< the picture that this is a reference to
101
+    AVFilterBuffer *pic;        ///< the picture that this is a reference to
102 102
     uint8_t *data[4];           ///< picture data for each plane
103 103
     int linesize[4];            ///< number of bytes per line
104 104
     int w;                      ///< image width
... ...
@@ -23,10 +23,10 @@
23 23
 #include "avfilter.h"
24 24
 
25 25
 /* TODO: buffer pool.  see comment for avfilter_default_get_video_buffer() */
26
-static void avfilter_default_free_video_buffer(AVFilterPic *pic)
26
+static void avfilter_default_free_buffer(AVFilterBuffer *ptr)
27 27
 {
28
-    av_free(pic->data[0]);
29
-    av_free(pic);
28
+    av_free(ptr->data[0]);
29
+    av_free(ptr);
30 30
 }
31 31
 
32 32
 /* TODO: set the buffer's priv member to a context structure for the whole
... ...
@@ -34,7 +34,7 @@ static void avfilter_default_free_video_buffer(AVFilterPic *pic)
34 34
  * alloc & free cycle currently implemented. */
35 35
 AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
36 36
 {
37
-    AVFilterPic *pic = av_mallocz(sizeof(AVFilterPic));
37
+    AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer));
38 38
     AVFilterPicRef *ref = av_mallocz(sizeof(AVFilterPicRef));
39 39
     int i, tempsize;
40 40
     char *buf;
... ...
@@ -48,7 +48,7 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms,
48 48
 
49 49
     pic->refcount = 1;
50 50
     pic->format   = link->format;
51
-    pic->free     = avfilter_default_free_video_buffer;
51
+    pic->free     = avfilter_default_free_buffer;
52 52
     ff_fill_linesize((AVPicture *)pic, pic->format, ref->w);
53 53
 
54 54
     for (i=0; i<4;i++)