summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-30 11:20:07 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-30 11:20:07 +0000
commitbb790168516b4a864ee8743c5900f8a6e495e1ce (patch)
tree049cc0543cdcf16cd284f1adc84531a574b43dd6 /libavcodec/lcldec.c
parentff8c65f482d9daea458ab2f419db4b841d718c5c (diff)
Use memcpy instead of per-pixel copy loop for rgb lcl format
Originally committed as revision 18997 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index b69e265e16..6c97c6ba04 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -432,12 +432,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
case IMGTYPE_RGB24:
for (row = height - 1; row >= 0; row--) {
pixel_ptr = row * c->pic.linesize[0];
- for (col = 0; col < width; col++) {
- outptr[pixel_ptr++] = encoded[0];
- outptr[pixel_ptr++] = encoded[1];
- outptr[pixel_ptr++] = encoded[2];
- encoded += 3;
- }
+ memcpy(outptr + pixel_ptr, encoded, 3 * width);
+ encoded += 3 * width;
}
break;
case IMGTYPE_YUV411: