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 62B9F4AAF0 for ; Fri, 12 Jul 2024 17:49:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4EC6668DB28; Fri, 12 Jul 2024 20:48:22 +0300 (EEST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6966F68DAE7 for ; Fri, 12 Jul 2024 20:48:10 +0300 (EEST) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-58c947a6692so3027791a12.0 for ; Fri, 12 Jul 2024 10:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720806489; x=1721411289; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=ASUdObaICANV31Nwe4+w7+fkh4Aoci7OwkS7rVUzGEA=; b=gfJK7+hZZvqj4MK7utTJHVT7ZYOnkvRhCKowygGiaqyOrVhJ6RNQppOF1QaNKbqb8q R7kw2Wwgc3WSq775zCoq+L1WHy8SUGKvosu/khOL/OuuVw+GPg/kTjh74/GotwycZz7p NdV0nDhohM9+D4TKZpvmN5vu4sYpy2jh87+xd4Pq35xcXa5v6M37q8zEcQ4reheAoOU7 LDHH/aiLKe+Vk9nT7JEVrgHbD8X7SI7IwUA1O3pBop32ODCcN6IWA0icfGVMpXajlEwh jxUBZwvEotu4VQSJqTsSb4/2d4liw5jqPJ0Hpid+pq2ORFGXCCDKvuRn1tOOQAgEj4iZ dytQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720806489; x=1721411289; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ASUdObaICANV31Nwe4+w7+fkh4Aoci7OwkS7rVUzGEA=; b=Nc7cb1pHijg7OHZWsWqolERTJIX2bVvJVXV5+gvzWlE/Ca1qtOIaUf/ciJI6QX8LSG a0bwfhLEQIdB7I9SHaBaBWeuX5u7HtaJxew0p/aE7fDZbjNcinJMEludc2yWkRIW/CzL udqpu09+sU7j71Tumm2lb9Z9ntVX2aiTHTwJmKAlygIEXK7rMiy93qq8iwf0BJbXMhSE WKw/wXCAyMur2v2KELS1Ald6ayro25XnE8vhAxRtZqUl8TJc1Ht3JpSWNphrBsapfzuJ 8V6owBIGGZxeUxTyQoVwncPmO4TWd1xr1O6dQDYpxR0Ao8MVoP0AcXz+A7IdOXsAq19w QA/w== X-Gm-Message-State: AOJu0YwmVLO6YW/VV3oscWq5gm9nX3wf1D6ePmbKN6teR2WD0m+fUUiC Qz7o2UzzfBD8R7FRDlq0cBCZQ6kzYLXp4/2wRBN00gm/yB15h7Gvqs1Cnw== X-Google-Smtp-Source: AGHT+IGZZwM9AbVlZcsFQ26TDT8ZDT/YGNymvDh8GIQLif/H2FXoXAGv5g3KZ999ReJQUnAz+xJxUg== X-Received: by 2002:a05:6402:234b:b0:58c:909f:3d46 with SMTP id 4fb4d7f45d1cf-594ba0cbe63mr9903875a12.10.1720806489372; Fri, 12 Jul 2024 10:48:09 -0700 (PDT) Received: from localhost (p200300cccf1e25001072fbc25e6664b9.dip0.t-ipconnect.de. [2003:cc:cf1e:2500:1072:fbc2:5e66:64b9]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-594bd45a1b6sm4753150a12.60.2024.07.12.10.48.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jul 2024 10:48:08 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Fri, 12 Jul 2024 19:19:37 +0200 Subject: [FFmpeg-devel] [PATCH 08/11] avfilter/vf_coreimage: simplify list_filters code 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 MIME-Version: 1.0 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: Use fast-enumeration and get rid of unnecessary intermediate variables. --- libavfilter/vf_coreimage.m | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index bfc17764b5..38355414bd 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -102,18 +102,13 @@ static void list_filters(CoreImageContext *ctx) filter_categories = [NSArray arrayWithObjects:kCICategoryGenerator, nil]; } - NSArray *filter_names = [CIFilter filterNamesInCategories:filter_categories]; - NSEnumerator *filters = [filter_names objectEnumerator]; - - NSString *filter_name; - while (filter_name = [filters nextObject]) { - CIFilter *filter = [CIFilter filterWithName:filter_name]; - NSDictionary *filter_attribs = [filter attributes]; // - NSArray *filter_inputs = [filter inputKeys]; // + for (NSString *filter_name in [CIFilter filterNamesInCategories:filter_categories]) { + CIFilter *filter = [CIFilter filterWithName:filter_name]; + NSDictionary *filter_attribs = [filter attributes]; av_log(ctx, AV_LOG_INFO, "Filter: %s\n", [filter_name UTF8String]); - for (NSString *input in filter_inputs) { + for (NSString *input in [filter inputKeys]) { NSDictionary *input_attribs = [filter_attribs valueForKey:input]; NSString *input_class = [input_attribs valueForKey:kCIAttributeClass]; if ([input_class isEqualToString:@"NSNumber"]) { -- 2.39.3 (Apple Git-146) _______________________________________________ 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".