From patchwork Thu Dec 10 11:16:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24490 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 180AD44BB21 for ; Thu, 10 Dec 2020 13:22:13 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D256768A6BD; Thu, 10 Dec 2020 13:19:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8163D68A56E for ; Thu, 10 Dec 2020 13:19:06 +0200 (EET) Received: by mail-wm1-f66.google.com with SMTP id a6so4308820wmc.2 for ; Thu, 10 Dec 2020 03:19:06 -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=9IpgT36gNGsKoIdVfsVTyQZzzYMe87sShExYpaRFZ14=; b=MfUH7T1ciyqHnc+XYoiihcoSlMLHtuGFXnzkNIgKN65AtFJ5tyx0u8ecZEkxOQp2C/ dFJRDCzoICop30cq8kW5KOlrVCS4ElPq2BCmdvGxDQ8xnc38XvPnMB4/LBNCR0F65lNw dcMzbpJEdAEIans75A5aKePtW1oJScHrd8RfnlvPtg4PYjKdQakBSYTtg4igDfaoZgM3 SpEycilsUTBCaQkdwbnEnKXhTWj1dSQGpOofOm91gksVXV5Gcizdw6ob7Fw9y0s7Q/iV G9xViSf1lvVaO7KCA07anX76daH1T/cp0o7R1wHxhkJHAJgB15oK3k/Q8VVPliLx4pha XlkQ== 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=9IpgT36gNGsKoIdVfsVTyQZzzYMe87sShExYpaRFZ14=; b=iT/5X6wpl8jzLRda599LPphgJzIzhIyBYsExdTdeyN2s5CmqrnJMiiGAXTTNmZr6yy 0eUAbVvmsu8GH1F4/Y/y4Kwx8SxVgkwpt3pVBMZiwEw30GRKPQes2GAzV8G/JFVnJY9M 5e6dljPJidFUEDSHgBItJhdbVQK17P9RWL4hGidRCPl/5+U2tVHKEoT0mffXt+zG+o/B KkHAukynXs41IxM1RECuGhDABv2EwNAF0BXUjHqkV4/5+VxTO+R4Ljvp6jx+xfOCzwla rwl7MPmFGEGneMGohKHy6sa/f4CGMJ5cvp7/GVc7ldQHWVatjakEJt7A8zBE5pzb5ufa V4JQ== X-Gm-Message-State: AOAM5326xihpXxHZ3FGS7HnaHaLoOZmCx7CkWXp3qSbmVmS1vBSYHbB3 R/0q6iq716Gf6xEtrU21g57ftO36OIEWuw== X-Google-Smtp-Source: ABdhPJyxsqVqBjs3s+XGJAg51j6R+8HsD+FJszAcPT1exI0ATys4DEXUj4zJNcRpAz3lKSx9V5N2KQ== X-Received: by 2002:a7b:ca47:: with SMTP id m7mr7528054wml.153.1607599145835; Thu, 10 Dec 2020 03:19:05 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id s133sm8942330wmf.38.2020.12.10.03.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 03:19:05 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 10 Dec 2020 12:16:38 +0100 Message-Id: <20201210111657.2276739-21-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201210111657.2276739-1-andreas.rheinhardt@gmail.com> References: <20201210111657.2276739-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 20/39] avcodec/h261dec: Don't initialize unused part of RLTable 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 H.261 decoder only uses an RLTable's VLC table, yet it also initializes its index_run, max_level and max_run. This commit stops doing so; it will also simplify making this decoder init-threadsafe, as the H.261 decoder and encoder now initialize disjoint parts of their common RLTable. Signed-off-by: Andreas Rheinhardt --- The earlier patchset instead guarded ff_h261_common_init() by an AVOnce. libavcodec/h261dec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 2dc2fb30f2..6b680a862d 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -81,7 +81,6 @@ static av_cold int h261_decode_init(AVCodecContext *avctx) s->low_delay = 1; avctx->pix_fmt = AV_PIX_FMT_YUV420P; - ff_h261_common_init(); h261_decode_init_vlc(h); h->gob_start_code_skipped = 0;