Mercurial > libavcore.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
22:0899fc09d43c | 23:478992775cf8 |
---|---|
137 | 137 |
138 av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h); | 138 av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h); |
139 return AVERROR(EINVAL); | 139 return AVERROR(EINVAL); |
140 } | 140 } |
141 | 141 |
142 void av_image_copy_plane(uint8_t *dst, int dst_linesize, | |
143 const uint8_t *src, int src_linesize, | |
144 int bytewidth, int height) | |
145 { | |
146 if (!dst || !src) | |
147 return; | |
148 for (;height > 0; height--) { | |
149 memcpy(dst, src, bytewidth); | |
150 dst += dst_linesize; | |
151 src += src_linesize; | |
152 } | |
153 } | |
154 | |
142 #if FF_API_OLD_IMAGE_NAMES | 155 #if FF_API_OLD_IMAGE_NAMES |
143 void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], | 156 void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], |
144 const AVPixFmtDescriptor *pixdesc) | 157 const AVPixFmtDescriptor *pixdesc) |
145 { | 158 { |
146 av_image_fill_max_pixsteps(max_pixsteps, max_pixstep_comps, pixdesc); | 159 av_image_fill_max_pixsteps(max_pixsteps, max_pixstep_comps, pixdesc); |