diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2008-02-25 05:46:53 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2008-02-25 05:46:53 +0000 |
commit | bd58e7f730b45e893df2065cd1cf7af3b545e2bf (patch) | |
tree | 9ef30bf04f0052e5a2ebc3daa4fd5dc0b9a21ea2 | |
parent | 8af9090f4f35b9f1a3f6d27d48cd77e7300c7de8 (diff) | |
download | ffmpeg-bd58e7f730b45e893df2065cd1cf7af3b545e2bf.tar.gz |
remove a memcpy
Originally committed as revision 12193 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/pngdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 1afadd936f..abff1da77b 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -262,8 +262,8 @@ static void png_handle_row(PNGDecContext *s) if (s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1, s->last_row, s->row_size, s->bpp); - memcpy(s->last_row, s->tmp_row, s->row_size); convert_to_rgb32(ptr, s->tmp_row, s->width); + FFSWAP(uint8_t*, s->last_row, s->tmp_row); } else { /* in normal case, we avoid one copy */ if (s->y == 0) @@ -289,7 +289,7 @@ static void png_handle_row(PNGDecContext *s) break; png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1, s->last_row, s->pass_row_size, s->bpp); - memcpy(s->last_row, s->tmp_row, s->pass_row_size); + FFSWAP(uint8_t*, s->last_row, s->tmp_row); got_line = 1; } if ((png_pass_dsp_ymask[s->pass] << (s->y & 7)) & 0x80) { |