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
oldabi
S.N. Hemanth Meenakshisundaram 15 years ago committed by Stefano Sabatini
parent 0c733da8e2
commit f0d77b2085
  1. 12
      libavfilter/avfilter.h
  2. 10
      libavfilter/defaults.c

@ -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 AVFilterPad;
* 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

@ -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_buffer(AVFilterPic *pic)
* 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_video_buffer(AVFilterLink *link, int perms,
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++)

Loading…
Cancel
Save