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 64E644CAB2 for ; Tue, 13 Aug 2024 19:20:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 33C0368DAE4; Tue, 13 Aug 2024 22:20:27 +0300 (EEST) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6E4068D60A for ; Tue, 13 Aug 2024 22:20:20 +0300 (EEST) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-66526e430e0so55678007b3.2 for ; Tue, 13 Aug 2024 12:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723576819; x=1724181619; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=86gTYnmjkN9Vz+BGrk0odReJ13vuXIMYUzGt9fNz1So=; b=kPqTH2EdEtzK/xCHOQt+XpOVVZ6Ba63pAzZoY8/uf9OMRkz1k1HwdrhC2b02php+6s +H1BzwCOe9n5TSP7Wele7iZBqYT7Ej3WJjC5fhocv6pVU9l9bmiixl2CxlHdLLW6zYUT 2ruBevJ7mZS18+3lLABFDbIVB5+XD7Qh2lkDfZ8rAUJpSsnU41O5pMalobBKVWNJe4NE l2xaduXkGSui7B8d6cIf5FywUKIkzqK1Jpaud9yuwCbIsY6hoAOzNQKdy6ufgneuO98u +VOlVzX00yP3edaMHRgQ5DpxUtHyXFSkvWnDp1luNlZFyAVPzbnyrKGj4/qVYT5eoPCn Z1Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723576819; x=1724181619; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=86gTYnmjkN9Vz+BGrk0odReJ13vuXIMYUzGt9fNz1So=; b=gtd+ecTky9Qo1Alxi3eVYjU+FT+RsaRp9QOSzXnvzwsXzCgFQCRG/nuK1jGy+aadV3 6+4XUlUyYDYFWYirkmJoS/50Z8bKOEqGoJfL9wwUTe1at6rfcKDG12WdnYXy/Rc5Hrp2 r8oqOOHnP3lc/lHQm7+OK2MNHzi0dSEJtI75TWf2mSUkmz0EW9l7bonJzTnrHVyLRsKO 0dyhFTrN6+1jtB0r7NODvPC2zzc7P/pJlc7YrRJNER62YCeB/aExGiYp8Y/3ic810T72 cco3R3EcKdE1t0Sorb3ip4qtRXY6HDqY+ujEVzHPs5FAD1F35LITmzpmqNsMeH56PhFD OM8g== X-Gm-Message-State: AOJu0YxDkbumV/iBqmr5A31Xw0YO3CIfAKa4fA+GVEcwCKTMCXmzPl20 02hM/wR0n0QP8sNocQVFGU8tuxODTGPD6wSYE0tjNf48wRdlUukVSGBs/g== X-Google-Smtp-Source: AGHT+IHkqraWgBjDIjHrSZavIpu6b4zkggmUojl089FhBuqYfo8Lm7CLWdzNtQgL7w8qpYN3IwTyHg== X-Received: by 2002:a05:690c:2e83:b0:64b:5fcb:6847 with SMTP id 00721157ae682-6ac96313fdcmr5312577b3.16.1723576818695; Tue, 13 Aug 2024 12:20:18 -0700 (PDT) Received: from [192.168.1.20] (syn-173-170-140-230.res.spectrum.com. [173.170.140.230]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6a9346724ecsm5273797b3.146.2024.08.13.12.20.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 12:20:18 -0700 (PDT) Message-ID: Date: Tue, 13 Aug 2024 15:20:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches References: <20240729044340.17459-1-qyot27@gmail.com> Content-Language: en-US From: Stephen Hutchinson In-Reply-To: <20240729044340.17459-1-qyot27@gmail.com> Subject: Re: [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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/29/24 12:43 AM, Stephen Hutchinson wrote: > 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; Pushed. _______________________________________________ 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".