diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-07 21:23:45 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-07 21:23:45 +0000 |
commit | 9686abb8260c31be6c109d97f369aa84c46ff567 (patch) | |
tree | 11d9ca0e17d88f572529243242433be8e9e9e824 /libavcore/imgutils.c | |
parent | b163078fe309f15e4c7fecea9147ec8d8437623b (diff) | |
download | ffmpeg-streaming-9686abb8260c31be6c109d97f369aa84c46ff567.zip ffmpeg-streaming-9686abb8260c31be6c109d97f369aa84c46ff567.tar.gz |
Reimplement ff_img_copy_plane() as av_image_copy_plane() in libavcore,
and deprecate the old function.
Originally committed as revision 25064 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore/imgutils.c')
-rw-r--r-- | libavcore/imgutils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcore/imgutils.c b/libavcore/imgutils.c index b75413e..c891212 100644 --- a/libavcore/imgutils.c +++ b/libavcore/imgutils.c @@ -139,6 +139,19 @@ int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *lo return AVERROR(EINVAL); } +void av_image_copy_plane(uint8_t *dst, int dst_linesize, + const uint8_t *src, int src_linesize, + int bytewidth, int height) +{ + if (!dst || !src) + return; + for (;height > 0; height--) { + memcpy(dst, src, bytewidth); + dst += dst_linesize; + src += src_linesize; + } +} + #if FF_API_OLD_IMAGE_NAMES void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc) |