History

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 committed 16 years ago

Commit f0d77b21 parent 0c733da2 files · +11 −11Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.h +6 −6
  2. libavfilter/defaults.c +5 −5
libavfilter/avfilter.h+6−6
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/avutil.h"
2626
2727 #define LIBAVFILTER_VERSION_MAJOR 1
28−#define LIBAVFILTER_VERSION_MINOR 23
28+#define LIBAVFILTER_VERSION_MINOR 24
2929 #define LIBAVFILTER_VERSION_MICRO 0
3030
3131 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -67,7 +67,7 @@ typedef struct AVFilterPad AVFilterPad; · 35 unmodified lines
6767 * should not store pointers to this structure directly, but instead use the
6868 * AVFilterPicRef structure below.
6969 */
70−typedef struct AVFilterPic
70+typedef struct AVFilterBuffer
7171 {
7272 uint8_t *data[4]; ///< picture data for each plane
7373 int linesize[4]; ///< number of bytes per line
@@ -83,13 +83,13 @@ typedef struct AVFilterPic · 9 unmodified lines
8383 * back into a memory pool to be reused later without the overhead of
8484 * reallocating it from scratch.
8585 */
86− void (*free)(struct AVFilterPic *pic);
86+ void (*free)(struct AVFilterBuffer *pic);
8787
8888 int w, h; ///< width and height of the allocated buffer
89−} AVFilterPic;
89+} AVFilterBuffer;
9090
9191 /**
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
9393 * a picture to, for example, crop image without any memcpy, the picture origin
9494 * and dimensions are per-reference properties. Linesize is also useful for
9595 * image flipping, frame to field filters, etc, and so is also per-reference.
@@ -98,7 +98,7 @@ typedef struct AVFilterPic · 2 unmodified lines
9898 */
9999 typedef struct AVFilterPicRef
100100 {
101− AVFilterPic *pic; ///< the picture that this is a reference to
101+ AVFilterBuffer *pic; ///< the picture that this is a reference to
102102 uint8_t *data[4]; ///< picture data for each plane
103103 int linesize[4]; ///< number of bytes per line
104104 int w; ///< image width
libavfilter/defaults.c+5−5
@@ -23,10 +23,10 @@ · 22 unmodified lines
2323 #include "avfilter.h"
2424
2525 /* 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)
2727 {
28− av_free(pic->data[0]);
29− av_free(pic);
28+ av_free(ptr->data[0]);
29+ av_free(ptr);
3030 }
3131
3232 /* 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) · 1 unmodified line
3434 * alloc & free cycle currently implemented. */
3535 AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
3636 {
37− AVFilterPic *pic = av_mallocz(sizeof(AVFilterPic));
37+ AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer));
3838 AVFilterPicRef *ref = av_mallocz(sizeof(AVFilterPicRef));
3939 int i, tempsize;
4040 char *buf;
@@ -48,7 +48,7 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, · 7 unmodified lines
4848
4949 pic->refcount = 1;
5050 pic->format = link->format;
51− pic->free = avfilter_default_free_video_buffer;
51+ pic->free = avfilter_default_free_buffer;
5252 ff_fill_linesize((AVPicture *)pic, pic->format, ref->w);
5353
5454 for (i=0; i<4;i++)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t