[FFmpeg-devel] [PATCH 1/1] Reimplement ff_img_copy_plane() as av_img_copy_plane() in libavcore, and deprecate the old function.

Michael Niedermayer michaelni
Wed Aug 25 10:10:17 CEST 2010


On Wed, Aug 25, 2010 at 12:30:38AM +0200, Stefano Sabatini wrote:
[...]
> @@ -120,3 +120,16 @@ int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *lo
>      av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h);
>      return AVERROR(EINVAL);
>  }
> +
> +void av_copy_image_plane(uint8_t       *dst, int dst_linesize,
> +                         const uint8_t *src, int src_linesize,
> +                         int width, int height)
> +{
> +    if (!dst || !src)
> +        return;
> +    for (;height > 0; height--) {
> +        memcpy(dst, src, width);
> +        dst += dst_linesize;
> +        src += src_linesize;
> +    }
> +}

thats definitly not working with half of the pixel formats and i would
expect that you test code like this.
have the other functions you added to libavcore been tested at all?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100825/b7fbf9fa/attachment.pgp>



More information about the ffmpeg-devel mailing list