From patchwork Thu Oct 29 14:58:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23276 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 89D5E449819 for ; Thu, 29 Oct 2020 16:59:04 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7035E68B31D; Thu, 29 Oct 2020 16:59:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4BD8068A5A8 for ; Thu, 29 Oct 2020 16:58:57 +0200 (EET) Received: by mail-wr1-f67.google.com with SMTP id n18so3114449wrs.5 for ; Thu, 29 Oct 2020 07:58:57 -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=srsPFbguZJmVjrNZ8bYFGfPObcSHioT9eEkefRIJ8jE=; b=F6+PUCkUvQo04tJ0qzKTmIK5XTigUa9yMeWOlfhWp9FVjgQPOMkZK7Sfif6AS3q+rH quyZtt8CHE1brhWKMv5Jb7lgFTv9uB24WfvsiGL7XHYhXJ6XIylfNDX0+MrnEqt7hm5W YxHTQybFSCMiScE0DtAJTI2aAtpsIAGpBg07OEpwXYHE3BE1i24srsmArfRydv+CbIy4 9YDUu8eMNYKKhLkjdLDn0reH7zVvYtDA4ODWyN3susNzHPU5GX6KedcHJZULBObJYovV /HEP8MHUnJLdihfuEy2E0lvSt9fdKJHwTo0OMc+S1F+25KlaVhCle0/WSAo6+IquTFAT HyJA== 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=srsPFbguZJmVjrNZ8bYFGfPObcSHioT9eEkefRIJ8jE=; b=FA7rYFIEFdK5Fc9a8TRRKHTSwkeDSo9H3vqfkWPKx+6lHCJkz6/qh7VQom76+BWzsS z/PT5Z8WmbiBnI7G8X4a+IjEY2cH8aE4A0RN1IBTmrw22a4JzE9B2JOolMxAq3yGhIKI 7T8CN2resWFvy40u5DAVJyEYtrRfWkfNZwlW0IVnOWBcqiqB3VSS4p26MkTr/txI4MGA e9L99V8lHJgKOjTiB4WekbwOif6mqAKIXhveUYGi8ZLV14LCxkrPDo7DwD9WcTS5FKug zGHlT90+pbTeW7mboyMY7TKOs1B5iBZptJ82LMM/aL/wB287CkgWAKldJxXTvpPpNsn2 3WLw== X-Gm-Message-State: AOAM530CQCN9VxqeCtp9DslnMPzFZQo1nHPx8nN4q07yKDPa9P8dSFLb c1wrVCZtMIVC4ulCgB69X9W/0ZqQ8eY= X-Google-Smtp-Source: ABdhPJxhVX9F/UpzD2wYyaTkSPUrPRzfWJ5gIrSUeCDQxN/bu5dcfe/cjKyWO+VgTqa/AmyOAIEY1Q== X-Received: by 2002:adf:de0c:: with SMTP id b12mr6218546wrm.266.1603983536441; Thu, 29 Oct 2020 07:58:56 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o129sm181202wmb.25.2020.10.29.07.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 07:58:55 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Oct 2020 15:58:30 +0100 Message-Id: <20201029145830.444147-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201029145830.444147-1-andreas.rheinhardt@gmail.com> References: <20201029145830.444147-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/mimic: 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" Signed-off-by: Andreas Rheinhardt --- libavcodec/mimic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 2563a49d53..0f8103ef85 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -34,6 +34,7 @@ #include "thread.h" #define MIMIC_HEADER_SIZE 20 +#define MIMIC_VLC_BITS 11 typedef struct MimicContext { AVCodecContext *avctx; @@ -141,7 +142,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) ctx->prev_index = 0; ctx->cur_index = 15; - if ((ret = init_vlc(&ctx->vlc, 11, FF_ARRAY_ELEMS(huffbits), + if ((ret = init_vlc(&ctx->vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), huffbits, 1, 1, huffcodes, 4, 4, 0)) < 0) { av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n"); return ret; @@ -239,7 +240,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) int value; int coeff; - vlc = get_vlc2(&ctx->gb, ctx->vlc.table, ctx->vlc.bits, 3); + vlc = get_vlc2(&ctx->gb, ctx->vlc.table, MIMIC_VLC_BITS, 3); if (!vlc) /* end-of-block code */ return 0; if (vlc == -1)