From patchwork Tue Nov 3 17:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23363 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id AA87B44B434 for ; Tue, 3 Nov 2020 19:58:09 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9655368B688; Tue, 3 Nov 2020 19:58:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D105F68B607 for ; Tue, 3 Nov 2020 19:58:01 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id c9so175833wml.5 for ; Tue, 03 Nov 2020 09:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VlmNo6A6+D9sZy4BNsCQrcFzbrXUZBnIYnvUfwzgELo=; b=fVE3rkmvHgFGHOUdNwpuTPkPocKoJAj8kuhEMjpnxVF+ef/uPP6GPazLN/lyClJOMX hIZdjgLW/bmo7W0Lab07Zn8fjkKlSJYfH0b9z3LvVPnZtBxafP8BRMesDH5cI380EdCh 2HySj3Lx8+7ZHLvZ0by5zQcCsXriVnoiHcvFDq5RR+N0FDxHvIFdzwmTRhVKQUH8FwzH 8r6EYQ1ogYM7cq0PWUxi/pzzuaqS/I0CuCF//XNGaSGMB5rM3h1qfQM2O45RVvx2eFJj JC8zu9/81oF9YCKHy5usegJxWdOpJTALAm/G2BwQUPiKUsWvmjHVeEY/BZpHl7Ld5fgO Ru9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VlmNo6A6+D9sZy4BNsCQrcFzbrXUZBnIYnvUfwzgELo=; b=QflttiIq/QwCBo99h5Y/TCinsUld9b5p/fRfOJ8mAj5AE4thtCTg2JVUfgr4lHoXPB o20cpmMJwUq54mLEX2STSr/oW4oc6w8oqkvXe+Wu6MZQX7UzOKsRlDfkkdIDJ/vWZKnb eif8hFCzvif85IMDIvYvG100DznlWMMuHGf1OhThLvOeO7QhjaX8EqmPh8wl62HCvXt7 XO5pIduw7CGHfoqOAhc718jfhXowejpe+1AxuJ2Y6+VqzzguB2Yj6cjEV6QWhBkGRYV6 LwuNXByeSNuDxIkdpsHQhTyVrXJxqo8HVS5abnGAZ25s9uzcnDPsklOhu5BZrpxLvGGE zHXw== X-Gm-Message-State: AOAM532vE/IucaYXwrG0vrvc81zhDKmZibEehG080dCewCCaovRo0Sj7 WGzTrvVakQR6XeXsmDWiB9ehHHPcBfs= X-Google-Smtp-Source: ABdhPJzbQPAADB9yddytW7hy41qpsvfI/RX+sfrwoEv62+KC8EeC5/0VPCQaPE8T62L2na6fCh7F5Q== X-Received: by 2002:a7b:cf31:: with SMTP id m17mr361747wmg.62.1604426280987; Tue, 03 Nov 2020 09:58:00 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id n8sm3586453wmc.11.2020.11.03.09.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 09:58:00 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 3 Nov 2020 18:57:33 +0100 Message-Id: <20201103175735.170080-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103175735.170080-1-andreas.rheinhardt@gmail.com> References: <20201103175735.170080-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/truemotion2: Remove redundant initializations 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The codec's private context has already been zeroed generically. Signed-off-by: Andreas Rheinhardt --- libavcodec/truemotion2.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 51266e5744..1ae13bbf06 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -950,7 +950,7 @@ static int decode_frame(AVCodecContext *avctx, static av_cold int decode_init(AVCodecContext *avctx) { TM2Context * const l = avctx->priv_data; - int i, w = avctx->width, h = avctx->height; + int w = avctx->width, h = avctx->height; if ((avctx->width & 3) || (avctx->height & 3)) { av_log(avctx, AV_LOG_ERROR, "Width and height must be multiple of 4\n"); @@ -969,11 +969,6 @@ static av_cold int decode_init(AVCodecContext *avctx) l->last = av_malloc_array(w >> 2, 4 * sizeof(*l->last) ); l->clast = av_malloc_array(w >> 2, 4 * sizeof(*l->clast)); - for (i = 0; i < TM2_NUM_STREAMS; i++) { - l->tokens[i] = NULL; - l->tok_lens[i] = 0; - } - w += 8; h += 8; l->Y1_base = av_calloc(w * h, sizeof(*l->Y1_base)); @@ -986,7 +981,6 @@ static av_cold int decode_init(AVCodecContext *avctx) l->U2_base = av_calloc(w * h, sizeof(*l->U2_base)); l->V2_base = av_calloc(w * h, sizeof(*l->V1_base)); l->uv_stride = w; - l->cur = 0; if (!l->Y1_base || !l->Y2_base || !l->U1_base || !l->V1_base || !l->U2_base || !l->V2_base || !l->last || !l->clast) {