[FFmpeg-devel,7/9] avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()

Submitted by Michael Niedermayer on Aug. 5, 2018, 8:29 p.m.

Details

Message ID 20180805202937.7563-7-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Aug. 5, 2018, 8:29 p.m.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/gdv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index aea15a88ef..1623febd1a 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -479,9 +479,7 @@  static int gdv_decode_frame(AVCodecContext *avctx, void *data,
 
         for (y = 0; y < avctx->height; y++) {
             if (!gdv->scale_v) {
-                for (x = 0; x < avctx->width; x++) {
-                    dst[didx + x] = gdv->frame[sidx + x];
-                }
+                memcpy(dst + didx, gdv->frame + sidx, avctx->width);
             } else {
                 for (x = 0; x < avctx->width; x++) {
                     dst[didx + x] = gdv->frame[sidx + x/2];