From patchwork Sun Sep 13 02:57:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22322 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 1E820449E91 for ; Sun, 13 Sep 2020 05:58:40 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 039D068BBF1; Sun, 13 Sep 2020 05:58:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1447368BBC2 for ; Sun, 13 Sep 2020 05:58:31 +0300 (EEST) Received: by mail-wr1-f68.google.com with SMTP id k15so15044647wrn.10 for ; Sat, 12 Sep 2020 19:58:31 -0700 (PDT) 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=QCBDuCp40xgjhPLTA2JbIv5LWx0D+X/elreBRpsEbcA=; b=d0ZRZhlBBPxLCjEbh6MlX1f3PPHA10+lJPSrFfZHmUGPUnsDhPSy3rxRglweIETYEu gF26ya2t0xxV7lt0thAlw2Rm/1aKYYrWxhGzemwEAWlcXQAvBry1EWYugf3loU++yq2M saOZuoS0yNiT21PIk+dDWtZFo0ktpciCrf7qpS18chQjZw+US+SGJhbNxp7Tt1CyNmDI QwJMdZ0juvHzp7NPLYFI+i7O38Ik9UL+r1bLly7SeDmrJjnNjMZxSVPPxjbAlh1b8P8x 5VBBptPvmEXBuCbw08Cb/QQW4btrZUg658CH8+LxeVCrXj5sxXCQGajVdNkqNzT2qRsW Eacg== 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=QCBDuCp40xgjhPLTA2JbIv5LWx0D+X/elreBRpsEbcA=; b=ZAgYqOMDM05gEQQEGFL8s6mGEN7zgMj1taOWImloQWjEjm+a2IQgk5k2ANjhWfvpU7 2Y6H6UGNYM79hUfO4JVqlPPotgjPhqRVV+NP9vif7tCYKwVBFwO//E08bW1FpvajR5fJ ej2brR8V6vNIwb00eEK66d8vFhG/i2mO17Xlc6zrdKKKpwXpDu3lG2+imCcb2nkyCF41 WCR+8TVWdMzUmmYpMuXZTbq651JCGK10uafcKDf2hnihxIMO+lbUcpz5MeuIUo/y2dHh w+jZqp9s8ohoq0CsoofUg5VVBy9Xkl/0MFm1tV+ks2wAPTEIlQNdUdO9nwmzgDGsw+Lv uOzg== X-Gm-Message-State: AOAM53252JMVhkZ1IJpZ6KW0SCg5sPzf/tWzWI2RIki8eoBL2GQbxxhU W6gw9LbclKAVJ5WvpzHqjFFHiY7D1cQ= X-Google-Smtp-Source: ABdhPJyZ/5mBJgv3gOvFodIK2NOtR+i1SKeUBqeIOBj0tT8jlsS5sefCywverN+/V4UjXhpPDN7lwA== X-Received: by 2002:adf:f245:: with SMTP id b5mr9512662wrp.288.1599965910260; Sat, 12 Sep 2020 19:58:30 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id f3sm11883355wmb.35.2020.09.12.19.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 19:58:29 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Sep 2020 04:57:49 +0200 Message-Id: <20200913025753.274772-12-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> References: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/16] avcodec/svq3: Remove unused buffer 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/svq3.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 41a9bf2daa..0ac81364bd 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -75,10 +75,6 @@ typedef struct SVQ3Frame { AVBufferRef *mb_type_buf; uint32_t *mb_type; - - - AVBufferRef *ref_index_buf[2]; - int8_t *ref_index[2]; } SVQ3Frame; typedef struct SVQ3Context { @@ -1330,7 +1326,6 @@ static void free_picture(AVCodecContext *avctx, SVQ3Frame *pic) int i; for (i = 0; i < 2; i++) { av_buffer_unref(&pic->motion_val_buf[i]); - av_buffer_unref(&pic->ref_index_buf[i]); } av_buffer_unref(&pic->mb_type_buf); @@ -1341,7 +1336,6 @@ static int get_buffer(AVCodecContext *avctx, SVQ3Frame *pic) { SVQ3Context *s = avctx->priv_data; const int big_mb_num = s->mb_stride * (s->mb_height + 1) + 1; - const int mb_array_size = s->mb_stride * s->mb_height; const int b4_stride = s->mb_width * 4 + 1; const int b4_array_size = b4_stride * s->mb_height * 4; int ret; @@ -1356,14 +1350,12 @@ static int get_buffer(AVCodecContext *avctx, SVQ3Frame *pic) for (i = 0; i < 2; i++) { pic->motion_val_buf[i] = av_buffer_allocz(2 * (b4_array_size + 4) * sizeof(int16_t)); - pic->ref_index_buf[i] = av_buffer_allocz(4 * mb_array_size); - if (!pic->motion_val_buf[i] || !pic->ref_index_buf[i]) { + if (!pic->motion_val_buf[i]) { ret = AVERROR(ENOMEM); goto fail; } pic->motion_val[i] = (int16_t (*)[2])pic->motion_val_buf[i]->data + 4; - pic->ref_index[i] = pic->ref_index_buf[i]->data; } }