[FFmpeg-devel] [PATCH] Separate video specific BufferRef properties into VideoProps
Michael Niedermayer
michaelni
Mon Aug 9 15:34:02 CEST 2010
On Sat, Aug 07, 2010 at 06:23:22PM -0700, S.N. Hemanth Meenakshisundaram wrote:
[...]
> --- a/libavfilter/avfilter.h
> +++ b/libavfilter/avfilter.h
> @@ -37,6 +37,7 @@
> #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
>
> #include <stddef.h>
> +#include <assert.h>
> #include "libavcodec/avcodec.h"
>
> /**
> @@ -89,6 +90,21 @@ typedef struct AVFilterBuffer
> #define AV_PERM_REUSE2 0x10 ///< can output the buffer multiple times, modified each time
>
> /**
> + * Video specific properties in a reference to an AVFilterBuffer. Since
> + * AVFilterBufferRef is common to different media formats, video specific
> + * per reference properties must be separated out.
> + */
> +
> +typedef struct AVFilterBufferRefVideoProps
> +{
> + AVRational pixel_aspect; ///< pixel aspect ratio
> + int w; ///< image width
> + int h; ///< image height
> + int interlaced; ///< is frame interlaced
> + int top_field_first; ///< field order
> +} AVFilterBufferRefVideoProps;
> +
> +/**
> * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
> * a buffer to, for example, crop image without any memcpy, the buffer origin
> * and dimensions are per-reference properties. Linesize is also useful for
> @@ -101,34 +117,41 @@ typedef struct AVFilterBufferRef
> AVFilterBuffer *buf; ///< the buffer 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
> - int h; ///< image height
> int format; ///< media format
>
> int64_t pts; ///< presentation timestamp in units of 1/AV_TIME_BASE
> int64_t pos; ///< byte position in stream, -1 if unknown
>
> - AVRational pixel_aspect; ///< pixel aspect ratio
> -
> int perms; ///< permissions, see the AV_PERM_* flags
>
> - int interlaced; ///< is frame interlaced
> - int top_field_first;
> + enum AVMediaType type; ///< media type of buffer data
> + void *props; ///< media specific properties, cast to right type
AVFilterBufferRefVideoProps *vid;
AVFilterBufferRefAudioProps *aud;
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100809/7022dd92/attachment.pgp>
More information about the ffmpeg-devel
mailing list