From patchwork Thu Oct 8 19:18:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22772 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:c650:0:0:0:0:0 with SMTP id k77csp1508403ybf; Thu, 8 Oct 2020 12:19:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlwAQRKFDEqclahHrN3sUaXPA2cvzpcb06cJWK4xxv7pjseh1/QjoHvR1e0794Mu3QbQwI X-Received: by 2002:a7b:c3d0:: with SMTP id t16mr2592120wmj.102.1602184746932; Thu, 08 Oct 2020 12:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602184746; cv=none; d=google.com; s=arc-20160816; b=AUd2/LEpC7OXIsYO2HkhGpGEMj1l+6Ol1ho4O98VPFsNHSP29ewGwXaiQ2fiwHt9Wb E1O8cdVx02BOXdwDeilCuuo7WaUFPp4TW6qLrh6q5okjExU83baRw/z4uwxXByUNmNxB sBR9/KKCmLwtUBcspDWieCPZOtLNWKebHpg2PhliOZFrMdVYA8NDLD+Lz5CPAWosYq8t YC0qdV3Su13PuCE9LD09RSPCWn0VBWQL3nN8vsKwhYZQqMipbZFHNpYDiJw1d8Y8oadR TEAESsiuvsh7CJvSRkdhGYnbXbJbd141uM2rtouGvMu5HfBqLcLSX9GUfoAYHfwrydCv P9Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=MuhgI7EFMDnYiEMPIdBXtI3DCr/RMe7lQs5ytJ3i/eU=; b=HnBGRJKj/jnmexXvOq91hw0MEB+W63NnQ2/5UR0C3Yi3PhBF7EXOGP5ogbbI7J6B+0 3g+m700YaTgOKXubbewxq2gZGnvEYtLrIGEwnyvOuWYWoybQYSL7Ci8vPHHmF8qdQlq3 qJPuaZmmWsZm+DCFXHi3QrNhHSRjh55KkJ7N/sccTy1bYsU6XEfBzvbUNKicTjM2mem4 Vl2HVJZwp6bcDht9TTHmKK+z3M6A1psb3PkNKa4x55IJQNhcBVwbYU3XWMCFB3Ums0wa 76H1hUjcElAN7hnZ0lDPAR+0aTYkbGV9TySDmUKIntARfAS6m1u9IiBHBIu2fYP64Sla NjkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=d4Bkz2DY; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o17si5613976wrv.515.2020.10.08.12.19.06; Thu, 08 Oct 2020 12:19:06 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=d4Bkz2DY; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7205568B2D1; Thu, 8 Oct 2020 22:19:02 +0300 (EEST) 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 95ED968B768 for ; Thu, 8 Oct 2020 22:18:55 +0300 (EEST) Received: by mail-wm1-f68.google.com with SMTP id q5so7630793wmq.0 for ; Thu, 08 Oct 2020 12:18:55 -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:reply-to:mime-version :content-transfer-encoding; bh=gtIKCgs0NyKWC7fUKMe/PWUdZGNhQ2qfJ7VtUkyfW1s=; b=d4Bkz2DYAAf3dwEGwfIOzhLvLbMLgPRa9CCjROkEDLVJF3IkLm0AqdXoQbrwgGPFKN svgtrShLYBOGA+CCL/ryOwsCAGP7bJjcAZqbyTkHjjE5c1KReSGq1Im0ZpqEutZs+HTG 27NPrUCSBXt4fIJT8Utezd84fZqGXnFKFz6GWAU8/Y9jq29Htka0nir4K9e7FL0kDFx2 8JSpg2avCKT8RIajkwTCfWrNTTnpMTQKXiUZveLFihbPrFpaeU7Gj24p52hXs7rNSqoO ZWzfbey+ratjf5mtTkyshWag4PRkAvVbDynzcAhRRRmJ8NMFgC0TAHJTIcANlwOWIYCd Ca6g== 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:reply-to :mime-version:content-transfer-encoding; bh=gtIKCgs0NyKWC7fUKMe/PWUdZGNhQ2qfJ7VtUkyfW1s=; b=arqv12qRBu0uVVUMSi1cWC+Y/OTcGpIyeedKuT24nzF9NaezgpER+VZ9rNHIg92JJB gcr4GqVO8z0WahJqHq1iFnrx2qijLXdPr3d+A9OjldEIQpEj35EONoiXMCYpTSYpsRH0 O2jjx9oggkMVrSfw83jFo+jW3C9TowofAyY1n16c/6NTu+ze9GrlBvzNXiywDxoJ1cVr ZGm3HrQfC9EPfShr/Lr2u0DSFDL1GdW/GBdMOwSIC3XRfFVbFDLpMlqa2lyqYbktPw9r 74+qytUANh4glkcMAV3yk48Exyu2AlRgjDg/0cm86uBTlQBwLm4IAofYqGlpOdWOXooo g7Zg== X-Gm-Message-State: AOAM530qlRcNAk9zAO60HGu5VZjAZT/Vh4RZXd4Kihxktcifsk0eo5TX x6O22w+519FB6wF08175mvlezi+B67c= X-Received: by 2002:a1c:6643:: with SMTP id a64mr10713086wmc.142.1602184734748; Thu, 08 Oct 2020 12:18:54 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u17sm9280316wri.45.2020.10.08.12.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 12:18:54 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Oct 2020 21:18:39 +0200 Message-Id: <20201008191842.385813-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/mjpegdec: Remove use_static from build_vlc() 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" X-TUID: H2VpT0eVUxsT Content-Length: 3380 It is always zero; it referred to the INIT_VLC_USE_STATIC flag which has been removed in 595324e143b57a52e2329eb47b84395c70f93087. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 0a5ef110d1..a56afc0fb7 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -67,7 +67,7 @@ static void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, static int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes, - int use_static, int is_ac) + int is_ac) { uint8_t huff_size[256] = { 0 }; uint16_t huff_code[256]; @@ -86,7 +86,7 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table, } return ff_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, - huff_code, 2, 2, huff_sym, 2, 2, use_static); + huff_code, 2, 2, huff_sym, 2, 2, 0); } static int init_default_huffman_tables(MJpegDecodeContext *s) @@ -116,7 +116,7 @@ static int init_default_huffman_tables(MJpegDecodeContext *s) for (i = 0; i < FF_ARRAY_ELEMS(ht); i++) { ret = build_vlc(&s->vlcs[ht[i].class][ht[i].index], ht[i].bits, ht[i].values, ht[i].length, - 0, ht[i].class == 1); + ht[i].class == 1); if (ret < 0) return ret; @@ -296,13 +296,13 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) av_log(s->avctx, AV_LOG_DEBUG, "class=%d index=%d nb_codes=%d\n", class, index, n); if ((ret = build_vlc(&s->vlcs[class][index], bits_table, val_table, - n, 0, class > 0)) < 0) + n, class > 0)) < 0) return ret; if (class > 0) { ff_free_vlc(&s->vlcs[2][index]); if ((ret = build_vlc(&s->vlcs[2][index], bits_table, val_table, - n, 0, 0)) < 0) + n, 0)) < 0) return ret; }