Make avpicture_fill() directly call av_fill_image_linesizes() and
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 30 Jul 2010 08:42:08 +0000 (08:42 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 30 Jul 2010 08:42:08 +0000 (08:42 +0000)
av_fill_image_pointers() rather than their wrappers ff_fill_linesize()
and ff_fill_pointer().

Improve performance.

Originally committed as revision 24587 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/imgconvert.c

index 70e6c0b..d0fc1ce 100644 (file)
@@ -509,10 +509,10 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr,
     if(avcodec_check_dimensions(NULL, width, height))
         return -1;
 
     if(avcodec_check_dimensions(NULL, width, height))
         return -1;
 
-    if (ff_fill_linesize(picture, pix_fmt, width))
+    if (av_fill_image_linesizes(picture->linesize, pix_fmt, width))
         return -1;
 
         return -1;
 
-    return ff_fill_pointer(picture, ptr, pix_fmt, height);
+    return av_fill_image_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
 }
 
 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
 }
 
 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,