Mercurial > libavcore.hg
diff imgutils.c @ 23:478992775cf8 libavcore
Reimplement ff_img_copy_plane() as av_image_copy_plane() in libavcore,
and deprecate the old function.
author | stefano |
---|---|
date | Tue, 07 Sep 2010 21:23:45 +0000 |
parents | 0899fc09d43c |
children | c063c88b1309 |
line wrap: on
line diff
--- a/imgutils.c Tue Sep 07 19:15:17 2010 +0000 +++ b/imgutils.c Tue Sep 07 21:23:45 2010 +0000 @@ -139,6 +139,19 @@ 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)