[FFmpeg-devel] [PATCH] Add av_picture_data_copy and reimplement av_picture_copy as a wrapper
Michael Niedermayer
michaelni
Mon Aug 9 14:07:17 CEST 2010
On Wed, Aug 04, 2010 at 10:23:51PM -0700, S.N. Hemanth Meenakshisundaram wrote:
>
> This patch goes on top of "Separate video specific BufferRef properties
> into VideoProps" and is required for lavfi audio changes since
> vsrc_buffer.c uses av_picture_copy but AVFilterBufferRef's data pointer
> and linesize arrays need to be resized to 8 and shared with audio.
>
> I can move av_picture_data_copy to libavcore/imgutils.c if necessary.
> Also, I did not separate out the src picture into data and linesize
> pointers since the name says 'avfilter_picture...'.
>
> This is on top of mainline SVN and passes make lavfitest and make test.
>
> ---
> libavcodec/avcodec.h | 8 +++++++-
> libavcodec/imgconvert.c | 16 +++++++++++-----
> 2 files changed, 18 insertions(+), 6 deletions(-)
>
>
>
> avcodec.h | 8 +++++++-
> imgconvert.c | 16 +++++++++++-----
> 2 files changed, 18 insertions(+), 6 deletions(-)
> 1dce9dd7c1b8493cbbfe0177074564bacd661844 0001-Add-av_picture_data_copy-and-reimplement-av_picture_.patch
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index a38b630..fb6efc5 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3938,7 +3938,13 @@ void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size);
> void av_fast_malloc(void *ptr, unsigned int *size, unsigned int min_size);
>
> /**
> - * Copy image 'src' to 'dst'.
> + * Copy image data in 'src' to 'dst_data' adapting it to 'dst_linesize'.
> + */
> +void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], const AVPicture *src,
> + enum PixelFormat pix_fmt, int width, int height);
src should be split between data/linesize too
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/31540eef/attachment.pgp>
More information about the ffmpeg-devel
mailing list