From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6178846AB2 for ; Mon, 29 Jul 2024 04:43:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 34F4F68D535; Mon, 29 Jul 2024 07:43:51 +0300 (EEST) Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4145568D4AF for ; Mon, 29 Jul 2024 07:43:45 +0300 (EEST) Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-4f6bc491759so880895e0c.0 for ; Sun, 28 Jul 2024 21:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722228223; x=1722833023; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5MxBBHidEsjbCOYcDVBkTp/J6BvX5qBaNOwG77LOhQs=; b=FVGhbW5msCZMNvxcY6AJYSNnf4Og4CiF49zLJMQQVd8owEO+UZWIb8gX4Zu4mSxW1J VzXyGULiU3++FWw91Zt8chx9wTcSTwgq97PuxpyfEFuuahjQcixfingdBihXa4WHrDDv YIf3ZuR14+jkCr0DYKczaf5TdG3UyPXQwNcaujAnFEgFbodzUDhOGyRT2l/5hOGImqG3 1j97atD/LqeVrRc2zfYQBEwpn5fT1x48/CscVzhI4Or5Rl+1WHYFMPzW71f3LvJxUFk1 Q00Nd6DkxBo3absByrVI5X9AICn0m317NtidUhzH4QTHoDCrvE2lFlryk5e6swKHMbvy 2SHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722228223; x=1722833023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5MxBBHidEsjbCOYcDVBkTp/J6BvX5qBaNOwG77LOhQs=; b=Gvql820ndpfoZ1vlhLeMDFT2wnVYpqbOOMnVs+SFlt5EUFsoxHSMKzcIEpj9c2QxCD 8mmXORnhU5jRorhti0GHJ+aMJxZsS08Np9Z5W9qwvKau/nFuM3UaOiOMrVruIhWIHJBK IDakPVsaFZGgWKdst5jyC81NhHRvj8oLrfw1GSorbQjUhVxpo3oqNNZlxgwriIfJ1EZU faSmYgaAvNhwdS/LHIA+5H+x/YqOdL6er0Vqe2HLeucLE2NNfcrdWyFcH/3HmhBesxML bY8MbJY6Zjgba0q0xJr6OrX/zr7EOPr6D5u7bKpyh6AjQpEj/ysCgz6/uRN4K7H3Tyuc H6Mw== X-Gm-Message-State: AOJu0Yzb5pKugjfsoKgjNW+Fy0cToDxncU5Ghzamq+mSfCY9+YONFrKY 1jzo8xTUGDJFwT/Q6NXP6woJMn5/tTFVA+CGkkZnVPsN0gy8NLFvt2iiiQ== X-Google-Smtp-Source: AGHT+IFOXpkIidSyhDeZEuLzW4poglV9o7QV74rf+7Ycp83NfplN1XukbdtOx9IgbwHrtWoE0tMuog== X-Received: by 2002:a05:6122:4693:b0:4f5:2276:1366 with SMTP id 71dfb90a1353d-4f6e68b1738mr2823441e0c.3.1722228222911; Sun, 28 Jul 2024 21:43:42 -0700 (PDT) Received: from cappuccino.. (syn-173-170-140-230.res.spectrum.com. [173.170.140.230]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-4f6c86c8cecsm1023913e0c.32.2024.07.28.21.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jul 2024 21:43:42 -0700 (PDT) From: Stephen Hutchinson To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Jul 2024 00:43:40 -0400 Message-ID: <20240729044340.17459-1-qyot27@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avformat/avisynth: move avs_planes* consts into relevant function X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Stephen Hutchinson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: These consts are only used in the switch(planar) case located in avisynth_create_stream_video and nowhere else in the demuxer, so move them into that function directly. Signed-off-by: Stephen Hutchinson --- libavformat/avisynth.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index b91d77b8d8..cb2be10925 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -118,17 +118,6 @@ typedef struct AviSynthContext { struct AviSynthLibrary avs_library; } AviSynthContext; -static const int avs_planes_packed[1] = { 0 }; -static const int avs_planes_grey[1] = { AVS_PLANAR_Y }; -static const int avs_planes_yuv[3] = { AVS_PLANAR_Y, AVS_PLANAR_U, - AVS_PLANAR_V }; -static const int avs_planes_rgb[3] = { AVS_PLANAR_G, AVS_PLANAR_B, - AVS_PLANAR_R }; -static const int avs_planes_yuva[4] = { AVS_PLANAR_Y, AVS_PLANAR_U, - AVS_PLANAR_V, AVS_PLANAR_A }; -static const int avs_planes_rgba[4] = { AVS_PLANAR_G, AVS_PLANAR_B, - AVS_PLANAR_R, AVS_PLANAR_A }; - static av_cold int avisynth_load_library(AviSynthContext *avs) { avs->avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_LOCAL); @@ -225,6 +214,17 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) int sar_num = 1; int sar_den = 1; + static const int avs_planes_packed[1] = { 0 }; + static const int avs_planes_grey[1] = { AVS_PLANAR_Y }; + static const int avs_planes_yuv[3] = { AVS_PLANAR_Y, AVS_PLANAR_U, + AVS_PLANAR_V }; + static const int avs_planes_rgb[3] = { AVS_PLANAR_G, AVS_PLANAR_B, + AVS_PLANAR_R }; + static const int avs_planes_yuva[4] = { AVS_PLANAR_Y, AVS_PLANAR_U, + AVS_PLANAR_V, AVS_PLANAR_A }; + static const int avs_planes_rgba[4] = { AVS_PLANAR_G, AVS_PLANAR_B, + AVS_PLANAR_R, AVS_PLANAR_A }; + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; st->codecpar->width = avs->vi->width; -- 2.43.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".