From patchwork Sun Aug 5 20:29:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9901 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp2540386jad; Sun, 5 Aug 2018 13:31:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdE5MllgmL+gg1hcPQ8oslEpHsRlL2yi8EQGgKwgfGF9AfCgNeRRPC+/yVzn9mfl2lzoG3+ X-Received: by 2002:a1c:cf05:: with SMTP id f5-v6mr9975806wmg.64.1533501062755; Sun, 05 Aug 2018 13:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533501062; cv=none; d=google.com; s=arc-20160816; b=PlWFNt4XC5+qZkMGoWGR6a+8/C/98vlTDsLVHcspEDss/SOK4VS4Hs8XNZacBAN4Bv R7hKYyHSdBqG5nSoxJ710CnZDGokLkp8D/fFQfmEiSVfN8SKQqbQ4z59EeUyBspDyL6a 33vOaswz9RMCrNgZ8lzY9hBKnUEJxfLf02fLO/K/6nvZ183mhKCpXshTZK9WYY82W2Oz LmL4D6tYC68SusugBp07c9tQUKeFtrzo1Kl+dDT3FO7H7z9TUDI/r4+aI9uwvtZ4cCVm e+fu+YIvegdsP5szRAwgylsTc9n2JyeILIU37/wxmlusg4X7XsusAc6a8iNdMCMp57Ni dt8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=iWuhfuc6Z+oDE9vRPPNPVAnQ1zIMwSjd1xqx6L0EGuY=; b=G8Ykd4IxpdEdypWh4Ne8erJAJkjJLO/fsPWoIyuDT0WU5glphlOCYBkCuIPNz94YP4 Bqu1U1FZ05PF5KGLQJMbJbP3FyvYqdlmnwvHLU4bb26oG8Xp4C1lr5dN/m+rNIBDA1ze Fvfhon49FXhoMeuVOZmV0XFPSvyhY+qn/x2/W3ZCFXS2WmOjEQ2bLiMHuRz2TnccBjDi F7x+DS8hV5oal4GTZE6rRRzTZMhPyzLKU+S8rC0RY0GMxP+WHaBbzoD6lBJfmw3ekWh5 fpJSl0mxRmDglxEurlB+tfCYzJhJwM4wW7W1A4o1yyqkMrB96RPtdCsAlf6A+iDR/RoZ m9kQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h29-v6si8155822wrb.80.2018.08.05.13.31.02; Sun, 05 Aug 2018 13:31:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A588968A47A; Sun, 5 Aug 2018 23:30:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe07-1.mx.upcmail.net (vie01a-dmta-pe07-1.mx.upcmail.net [84.116.36.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 99003680758 for ; Sun, 5 Aug 2018 23:30:06 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe07.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fmPfW-0005do-1U for ffmpeg-devel@ffmpeg.org; Sun, 05 Aug 2018 22:30:26 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id KYWH1y01X0S5wYM01YWJVd; Sun, 05 Aug 2018 22:30:18 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 5 Aug 2018 22:29:35 +0200 Message-Id: <20180805202937.7563-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180805202937.7563-1-michael@niedermayer.cc> References: <20180805202937.7563-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 7/9] avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavcodec/gdv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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];