Mercurial > libavcodec.hg
changeset 9738:d5929e456b07 libavcodec
Use memcpy instead of per-pixel copy loop for rgb lcl format
author | reimar |
---|---|
date | Sat, 30 May 2009 11:20:07 +0000 |
parents | f9769330c214 |
children | 96e6cab7470a |
files | lcldec.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lcldec.c Sat May 30 10:04:09 2009 +0000 +++ b/lcldec.c Sat May 30 11:20:07 2009 +0000 @@ -432,12 +432,8 @@ 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: