From patchwork Sat Sep 22 16:14:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10442 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:1286:0:0:0:0:0 with SMTP id 6-v6csp717739jap; Sat, 22 Sep 2018 09:15:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Cj8BGmJ4rzdJpSKEE5NxbeNqSYiNcrFoRJG13+SRppO06P2YupIL1Jf+ieZMuWjea8M4b X-Received: by 2002:adf:f8cd:: with SMTP id f13-v6mr2538484wrq.237.1537632920963; Sat, 22 Sep 2018 09:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537632920; cv=none; d=google.com; s=arc-20160816; b=jM1ZZo3y+EH1kMrkJ5LGqYu5mdHK60n0FwjRQDJdziIUz2J7Hu58eoJyQ05vbYqvkY GqO1sbBhn/73IuxgMxyfGsnf650N6wHz7ufW+gqkHSo2zeaJuo+GL5XuSX537wVO2t2F WyU/dQ8DD0/2wTK5weO8cjU7y3ETsbVoraioG9HztWsFdUS89S+Q6WLFWxHsFYLclKwq LTSYLQDUGbdhrkIxQaf2JVnJRvpL8FeZ/IT2eSyXEWEqWjHC+rLT46WQQLzHsN1W5KWm IWLejifvrkEoEiKK+VBdnW7X0yJMrwuirnSXBTuiIxU2wlhEj8wePR+PQOCermmbg7yl HPbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=38C3xcuKFW46sceZrLA01I3+R92IpYxEpe+Coi6Rf3E=; b=ilrJnYPoDrrpeFsMMa1WVdfVtlPZsogxTc6cZM1VtMAHYeTHWl0dWbW+XW5C8JBRmJ ZzjUGLfBxMRYvHJDAfMUlAMeISW+rsj0raSnkLFSp/QtQyAKdNbebzgUg+SQdpS+H6XX RGxFBCFzHY25ws1fRkky7FUIGADKf8ZqCcNyf/MceT1Vu3dcyTav+O+OtDsM9cHGr86K 5ZXgOJb7bA/DKL1LHRXM4UMo4d9fO7ejm/9RBc+9TnDQrb5WCfmO8DNd6FIAcHYGQrcL AZvmof+8wChxKN+eR2NoSY1HeJ5y8FC9H/IEcIo2LN/SS+Fddg2NqzJr3ZhfhmMxiIEh 8DzA== 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 b18-v6si4150888wrq.96.2018.09.22.09.15.20; Sat, 22 Sep 2018 09:15:20 -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 986C268A558; Sat, 22 Sep 2018 19:14:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-3.mx.upcmail.net (vie01a-dmta-pe04-3.mx.upcmail.net [62.179.121.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7139368A2BB for ; Sat, 22 Sep 2018 19:14:48 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g3kYg-0007oD-Sn for ffmpeg-devel@ffmpeg.org; Sat, 22 Sep 2018 18:15:02 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id egF11y01B0S5wYM01gF2gH; Sat, 22 Sep 2018 18:15:02 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 22 Sep 2018 18:14:03 +0200 Message-Id: <20180922161408.22052-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180922161408.22052-1-michael@niedermayer.cc> References: <20180922161408.22052-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/11] avcodec/prosumer: mark src as const 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavcodec/prosumer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index b7e417aa0b..9eb3c18cae 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -132,7 +132,7 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui return 0; } -static void do_shift(uint32_t *dst, int offset, uint32_t *src, int stride, int height) +static void do_shift(uint32_t *dst, int offset, const uint32_t *src, int stride, int height) { uint32_t x = (0x7F7F7F7F >> 1) & 0x7F7F7F7F; @@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, uint8_t *y = &frame->data[0][i * frame->linesize[0]]; uint8_t *u = &frame->data[1][i * frame->linesize[1]]; uint8_t *v = &frame->data[2][i * frame->linesize[2]]; - uint8_t *src = s->decbuffer + (avctx->height - 1 - i) * s->stride; + const uint8_t *src = s->decbuffer + (avctx->height - 1 - i) * s->stride; for (int j = 0; j < avctx->width; j += 8) { *(u++) = *src++;