From patchwork Fri Nov 20 07:33:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23911 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 4621944AD6B for ; Fri, 20 Nov 2020 09:55:10 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50F5D68BDE1; Fri, 20 Nov 2020 09:35:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E492B68BCF8 for ; Fri, 20 Nov 2020 09:35:05 +0200 (EET) Received: by mail-ej1-f66.google.com with SMTP id f23so11550619ejk.2 for ; Thu, 19 Nov 2020 23:35:05 -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:reply-to :mime-version:content-transfer-encoding; bh=PUrVP9CiOAZI2iiAv84l0Qgorn4VRc/eT4EOdGXXF5s=; b=qsjCD/GRveNlPLMxVOOPRh+jdv7q8f8zW6b1LVJ++07NBRx/v3qk16h1fNyYUL3ZC6 pOz9Trku2RCglSsIYZE+mYLyrk2X5Ug1fRNQRMY+k93BMS4zRi23GeAn8Z4/mz8QyDq/ +r+spCGtNvrFkCl8OBVM6uYn+7eBpcMLYEFzQ+dolHiz71jPaUFUIrJ6y5Edvqql6B5s 9l9YtynG5Lj2XTEwXWM7JYKOpXQC7hDpSmPVLsdDDnMcI4oBnL1uSDFtmhYyzChpl6jG MrDj3qT6eeSuah+CSe6EZmT40Rqh65T5IepBlgFg5tmYPwK5hoYEi2QEHco/MDbZUct5 5BKQ== 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:reply-to:mime-version:content-transfer-encoding; bh=PUrVP9CiOAZI2iiAv84l0Qgorn4VRc/eT4EOdGXXF5s=; b=TXzKpmvYvgSZxJvAL7NYX+CT0ebwDeTuRdrmu8l1Rngvb9Vqmx/B7oLb/QK9bL96Sr kF+PXzBujDQyxAZRTPfaNxbq3g8IPTn4ACMhI6IehpW4/N1vh5oWs5ARLBQmuuelcD+5 UK8G39Oea4F+I7+8np5RQw5+3g4n39Tu6W3cj6yZJm/1KNTvDHOcE9G/1d7y/7T2GZqv L0lXBEFpgszcr/+VBUDu7NbmC6a85Gwd8WGg4c2ax2ZhaKkRLWg1DOQ/H1zkabDroFut MxGOpXahSONR21hpH+w5AIO488fimufZs1IXwoSw/Ulonx2Q0gIGqtn0cmu9NYBt+00A fnPQ== X-Gm-Message-State: AOAM532ifgZnybXhzyoNNFpFx2BWm2wQmexh+ey4dL5JDwePlfLASFjL ZVKPFP9Q0AW4YcV594uPuoqDEc2pzUnGfg== X-Google-Smtp-Source: ABdhPJzfz/FHoJLoMVcu9YyIP3Uh7sBLRnxw9YMtDjvmODIIgdOSXWAZQkBykemgX7C+dDuUDvL48w== X-Received: by 2002:a17:906:b292:: with SMTP id q18mr31022873ejz.93.1605857705116; Thu, 19 Nov 2020 23:35:05 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id i13sm769110ejv.84.2020.11.19.23.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 23:35:04 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 Nov 2020 08:33:25 +0100 Message-Id: <20201120073327.820745-61-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> References: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 160/162] avcodec/mpegaudio_tablegen: Don't inappropriately use static array 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" Each invocation of this function is only entered once, so using a static array makes no sense (and given that the whole array is reinitialized at the beginning of this function, it wouldn't even make sense if the function were called multiple times). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudio_tablegen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h index c78d5b5d7c..1a92bb4de6 100644 --- a/libavcodec/mpegaudio_tablegen.h +++ b/libavcodec/mpegaudio_tablegen.h @@ -59,7 +59,7 @@ static av_cold void mpegaudio_tableinit(void) M_SQRT2 , /* 2 ^ (2 * 0.25) */ 1.68179283050742908606, /* 2 ^ (3 * 0.25) */ }; - static double pow43_lut[16]; + double pow43_lut[16]; double exp2_base = 2.11758236813575084767080625169910490512847900390625e-22; // 2^(-72) double exp2_val; double pow43_val = 0;