From patchwork Fri Nov 20 07:19:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23956 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:c00a:0:0:0:0:0 with SMTP id c10csp952636ybf; Thu, 19 Nov 2020 23:31:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwymIHOBrtrRA0IvxkMwuUTugbols8P2+bgHnVloC7zexoAfn50SYr20kT7U3KGcTE69gvG X-Received: by 2002:a5d:6692:: with SMTP id l18mr13542701wru.44.1605857519375; Thu, 19 Nov 2020 23:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605857519; cv=none; d=google.com; s=arc-20160816; b=YuUXEk6O9hLds4mxVXZ2fX6NRKe0Po+V/SyPPLLi7f0Fz4o4vGTXVr5nELlJAvSiKl JDDv32UMnO5lOksJcok9X+3W3682X9Kqa6cpk8qujUC+aNG9A15DQFY0V0bSzpS4g/XX miYUO28tzddoHXIjApDeL/7xE9Pm1T01CcZTVtfGWmuKRYQAYAahzAZlUm7GMomdadlW Dz+IeUVtLAqMa+CkYPkXhZ7CjLJJlurFvgcxQAu4SGtLEqnU+y/kWeAQT4STU0nluqwo 478pUNGQnXGlR8MkwH/Aosl1MWW6Sg2n+sa+O10vY1mp8J/K4pjhKXWZgIQqbcINofT8 2kcQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=D1LCTU64CpVYUTrNO5UXqn3mqW1HSh4SjOynWtqVW7o=; b=xtKExW628ZcoormTuLXqv4WqagIYCBXhqJzDPptibLlSXTV9siIhEJR/5wDcRoL2Q5 Aw9ofvS+RXiLxjmvI+l/sUiz8B1Mvzd7GImSLcJbXUFnbqVEmlMq7MuhMShtqEtvRjBZ MFipABd9q07GG+x7w/iOfhK1mm3CgY+PM3LlIBmEucEzufG1yWXnp2e6KNH4Av7/h6Ul VC29jmWc2Sx+SvqQ5fxVkOzxVNHTTYgG3/2Kk322HSDe392mmkRY08uWAdUbeFEFa++N h6NzORE7lpOsIJIMydGK0XQk1BUGMtmRTeD923mKHTeHsKFwluqC2NJXkET2q9Kr+Dca jXng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=PjteFTTc; 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 j127si2221983wmj.74.2020.11.19.23.31.58; Thu, 19 Nov 2020 23:31:59 -0800 (PST) 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=PjteFTTc; 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 D7E7168BA6A; Fri, 20 Nov 2020 09:25:05 +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 784B768B9E9 for ; Fri, 20 Nov 2020 09:24:53 +0200 (EET) Received: by mail-ej1-f66.google.com with SMTP id k27so11454067ejs.10 for ; Thu, 19 Nov 2020 23:24:53 -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=2/IFLCyEeWmbl8ycvYjex9zNCQEceBHcvIRlS5YSCgU=; b=PjteFTTcW19FLfttkv+gPzvvCdzb1dgS18w/jEth1Z0lbDd9rqEzoJxIIbZtWlqnH+ 01xDuHGrZUK52Dg+fo4Mh56gFdel9gqf0qHbXrBKdke9SkIU3Gar2l2decPbHyGC1kan SECAc9fUhMysNZIuDTIzzmpEh845nEdC4mSizQFR5B4F7LPx5Dps/Lh1V5X5qJwe0eXt 7iyZ2Hs1pNFEjzdF3v4lAYlF1A+iXblxuAUkscTk609fndKbb1W+Nb0qp4qPPOaimqbY 0RqRmKvg+a9TtMCJdf5pQE/XdZiXUhibITAxhDwedkRCRqBeU4gOOuTpivEIRpht1Xlg SmwA== 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=2/IFLCyEeWmbl8ycvYjex9zNCQEceBHcvIRlS5YSCgU=; b=TcStEkPW5VDHM+ZAiPrSmXBfpJj5LNjrJ4PKSktgnW5Bn7IZok+2I/mZuToMBhvSSA Tzu4oW12RrjAdmJxHVNw/8FzQx1tUYZ84zAgUELixu5LRnstIjmbbWH+f34FswPqgRBq xjnThZbQeZYPI2/x7bqYx1zqbXxXi/1i6wotc9RAuAY0HpUsD3B3ad1AsSyDzM2Zx7Nl +/pPLoO/sTc3dq33fpPCH+oR+reeokQ6XJCAwdYqn5VzC3C9OZjPwj4tNojQibcsfb5+ yt4SgJbXUya804NEbGjs9NJUGA2bOIln/c+/M5dxqyC2ZRyXORw6JNKduKsmeGQ6V6vB jkKg== X-Gm-Message-State: AOAM530U1g9uZ0ODoZeJcgwEoCBIxTtYUxg9MFxy/x59yU8jpkdewyWr mynJHmZHHoxh5CYlxkL97GLN6AfFFKBw6A== X-Received: by 2002:a17:906:b14e:: with SMTP id bt14mr743068ejb.226.1605857092734; Thu, 19 Nov 2020 23:24:52 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id lz27sm779419ejb.39.2020.11.19.23.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 23:24:52 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 Nov 2020 08:19:15 +0100 Message-Id: <20201120072116.818090-43-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 042/162] avcodec/motionpixels: Don't check for complete 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: 83qCGK1GVNrS Content-Length: 1273 The algorithm used here always creates a complete VLC, so it is unnecessary to check this again. Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 4b9830fbed..a65250efe5 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -195,8 +195,6 @@ static av_always_inline int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *g int i; i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); - if (i < 0) - return i; return mp->codes[i].delta; }