From patchwork Tue Oct 13 09:10:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22922 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:3414:0:0:0:0:0 with SMTP id b20csp1645177yba; Tue, 13 Oct 2020 02:11:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0zFGzQWMabYujfhXfvbgdQUxD22Yj5ogiqjl18PtceNxvJiFAaO1PMNvuEkmLfv/HtOvQ X-Received: by 2002:a1c:4e1a:: with SMTP id g26mr14637706wmh.98.1602580299501; Tue, 13 Oct 2020 02:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602580299; cv=none; d=google.com; s=arc-20160816; b=cfT38rT7ykw0HMTdSaAyTfa1oRdRdbmBg76WoxS9U/wkmg54KBzQBhWm3JPeZjGny9 14i917XBcADDLJiWdoDtDqHjguiMrtTWceHaLOiM7DpfwMmZkzWgc5ACJ/SNvZTp6iZ6 v/AJ0qdaEdC52KxXsJGT1dqjm/lZOBSOs3pOFW+YGe4S3/raqPDOfYXWPpCRfdzMmfs3 brmlNaaB7Cb+ZQCcnkSWSspdRcVvTxmsIve+k9SdlnWVuJuqUyM/8RifthKPmo/zHQPj FawMBSRw7Bghrnvn2I779IA8/mJfrvzu98RebxXBzy6mkI5a9jyGgtXlHbxPWWjMvVuR 58pA== 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=l7wtaRd6Djt9AP6ymhxKzBDuV4gCvM/KYELYSV7Dv78=; b=jhVNf2ZLVO6BU8De/EB8ED3c14ed8WX67S4Rny847i5+9HLGCPArfJGiHFRVBHbDgC M1mc0KUO9kKZx/mesiM+zu4d1oiUWuLrrANZ4QQOfRGE6UJNc+gkBAGiQIlXPTM6Fz4A aMWLPRyx/a8SvtGlbTLhFZMF10T9wNqt9HMhgsfKtAQsffbY9LNwkRuPGcZb/3cKgnnN 3AjoJHMBTwLd+NcwuiasILJU9DmTA+JcOcGwTP2cbyWT3q4QtZUgCHc3A+WMfh2SzMi+ Q664FqoXEPNqBiQ4y6/wlk5qGepb9woer6JbNe4ZHC6iGOiwq0bJPknwYRpiZZkozCdD 0DqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=jV13ttyW; 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 z11si17096270wrp.347.2020.10.13.02.11.39; Tue, 13 Oct 2020 02:11:39 -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=jV13ttyW; 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 6834268BBC4; Tue, 13 Oct 2020 12:11:04 +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 C985D68BB54 for ; Tue, 13 Oct 2020 12:11:00 +0300 (EEST) Received: by mail-wr1-f68.google.com with SMTP id h7so23097103wre.4 for ; Tue, 13 Oct 2020 02:11:00 -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=c2qm5RwSu5zmAZ3dPwCaG2aamd/FLnuz1a4WCeiMr6M=; b=jV13ttyWJek76cDGPVFDcuBJ36eBmeWYmHUst/t6eOcMZAsd3+/umO/Sf09moDuTUq YwpHvmpPrNbkA0ORYlacW7jkMapM5P2o68an0urvmesBJqtD1T/dM6/tA8xgAnwATfUU 2Di/xpOaZ+KZEaNqKxn41SHj9LgLR2HG8JwUotGc4c/1PDB7CBM8msBwor7TqoEtFkb7 SJ9K31fku/bdl/6bqAffzNXCX/runUVwcx21PAqYlen5h/2nPmNb1fqkksSj45RFcBvz ah0q709vAz3hR/PrUqMczk7a34p0y+Okt2Z3KGFjUPU6NqmCGSNIe+IFc23wkpxjSqUe tLOw== 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=c2qm5RwSu5zmAZ3dPwCaG2aamd/FLnuz1a4WCeiMr6M=; b=SbBXnGPhJ3JFwX31J/oLZTBw7mpQre6Y80R1wipCnsE09fDl+aUMNfdLh62ENAHLNY Jhb7yl9ZkDY/jtmL3tTRqda2wdc4MbZ1FbiH7YmZWh2NurD+70b5VT4UY88k09Frca6r mHfq6lMUan7TjHSb6TgQuzWPSVye+zo9Qr2zx6NSMnXDS65XvK1iBTzAxN0vGPpOkV+J SalgATKW/TSpe0V1QbaeFXAv0R/i8riQ79byqgZhOhr5GkwGIH0sIL/VcXXjEedyqR9I H0Y2Bcl7jKIJjUNOgivKFhSdmfpYc9fcTAP2wrTUZbir3/0WnKR8qauXTNY3DzMvuURA 0Spg== X-Gm-Message-State: AOAM533qgS8xlwdESlv6ipNtklT7at0wCB9LKK+KTdCJxve6O7FEWdhp X+1f6Bhvfx3tVACxfAmu1MiBHaDluw4= X-Received: by 2002:adf:ee44:: with SMTP id w4mr1922328wro.114.1602580259881; Tue, 13 Oct 2020 02:10:59 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id g83sm25913159wmf.15.2020.10.13.02.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 02:10:59 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 13 Oct 2020 11:10:17 +0200 Message-Id: <20201013091017.1899676-9-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201013091017.1899676-1-andreas.rheinhardt@gmail.com> References: <20201013091017.1899676-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 9/9] avcodec/ylc: Inline constants 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: cYVrLJ69SRsD Content-Length: 2387 Signed-off-by: Andreas Rheinhardt --- libavcodec/ylc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c index 2afe3fc9d5..ecfecc0292 100644 --- a/libavcodec/ylc.c +++ b/libavcodec/ylc.c @@ -371,7 +371,7 @@ static int decode_frame(AVCodecContext *avctx, return AVERROR_INVALIDDATA; if (get_bits1(&gb)) { - int val = get_vlc2(&gb, s->vlc[0].table, s->vlc[0].bits, 3); + int val = get_vlc2(&gb, s->vlc[0].table, 10, 3); if (val < 0) { return AVERROR_INVALIDDATA; } else if (val < 0xE1) { @@ -394,10 +394,10 @@ static int decode_frame(AVCodecContext *avctx, } else { int y1, y2, u, v; - y1 = get_vlc2(&gb, s->vlc[1].table, s->vlc[1].bits, 3); - u = get_vlc2(&gb, s->vlc[2].table, s->vlc[2].bits, 3); - y2 = get_vlc2(&gb, s->vlc[1].table, s->vlc[1].bits, 3); - v = get_vlc2(&gb, s->vlc[3].table, s->vlc[3].bits, 3); + y1 = get_vlc2(&gb, s->vlc[1].table, 10, 3); + u = get_vlc2(&gb, s->vlc[2].table, 10, 3); + y2 = get_vlc2(&gb, s->vlc[1].table, 10, 3); + v = get_vlc2(&gb, s->vlc[3].table, 10, 3); if (y1 < 0 || y2 < 0 || u < 0 || v < 0) return AVERROR_INVALIDDATA; dst[x ] = y1;