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 B9E724AAF0 for ; Fri, 12 Jul 2024 17:48:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 466A368DAFB; Fri, 12 Jul 2024 20:48:18 +0300 (EEST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B50768DA6F for ; Fri, 12 Jul 2024 20:48:07 +0300 (EEST) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-595856e2332so2919674a12.1 for ; Fri, 12 Jul 2024 10:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720806487; x=1721411287; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=jgzIURVQ5zMsvMpqDNbr9Ind0jcs+h/aQP0olGBUff0=; b=eJlmCXM7Mu1xGPiMnbl+H6kECXlmbj8t8y2mbIjvZlVlQI2KrF7j761boExzIXaLjl WbgxNEc/ps0A3HqxAeze2COuOZkQVA5cLo92EeApZBglatd1qnnFh60vpbUZNcKONjSZ EopUKlvKRiBZIEh6X3AV5p6nVBFuqVhLiU02CL/UHbFDYLJ4BWLfy4HlX2mVTDYOJxRy FW7StBivWuLapD5n3DZkhE00Tq9aswVdzGggZhxc2mwlOoQglWNR/DP3fsQAf2YfhJSQ B/TGQFWHmCTZpNuWTw0v2c0tOV2aCmBK6NRZu5edGhPsjl2aOcWFaca5J0jKdRzyqgRY G1ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720806487; x=1721411287; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jgzIURVQ5zMsvMpqDNbr9Ind0jcs+h/aQP0olGBUff0=; b=ootuP09LOVM2LDgs/kilJoHvTMB5MCt88pDWTRcv57+J8DQZSHiPT071/wSvbGlbDY zjylz6P9iVxaCXQeGGvlEJ6D9UDmmp6kTHk/aQiGo45RDgvpgyFxE0i1/0aYJrIFWBA2 JsD5pP9q7pX3RlhSl1JOSNiYypvbpl3/YWR/pGSja4/OXswPvyWildZ+wJBVSUFWg8td b361zC14fvZ10gycV8pA6rT7Xcnft7tEIKH6QgMYe/YVIWZvY0HfEaJ3ziSifjUJ5TXe /dGLXiSm+gPeMdLvqDf20dBpaHHAaui1fXk2VO/tkmOuIrendxH0MzvA+oTMh09HzQrL p8iA== X-Gm-Message-State: AOJu0YwWpABsui6fShkECm8/Gh4/+/YaHWUiL4scPTlFhKuIBC1o+Ref uvBfL8vtjsLUvtwEzcxassmrhmCKC+Lsn4W38Afq4eWlOn48r6eOusAmIQ== X-Google-Smtp-Source: AGHT+IGQStHjsUjwokJzjjeIeRNgK30SueCDtZY0nlMCsO1f5sMSOUrERMOqSvPnW9Uh9C8btT+2pw== X-Received: by 2002:a05:6402:5256:b0:58d:eca:b9bf with SMTP id 4fb4d7f45d1cf-594bcab156emr8627142a12.37.1720806486729; Fri, 12 Jul 2024 10:48:06 -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.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jul 2024 10:48:06 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Fri, 12 Jul 2024 18:17:35 +0200 Subject: [FFmpeg-devel] [PATCH 05/11] lavfi/metal: fix mixed declaration and 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: Fix a "mixing declarations and code is incompatible with standards before C99" warning. --- libavfilter/metal/utils.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m index f365d3ceea..d5c85e619d 100644 --- a/libavfilter/metal/utils.m +++ b/libavfilter/metal/utils.m @@ -24,11 +24,15 @@ void ff_metal_compute_encoder_dispatch(id device, id encoder, NSUInteger width, NSUInteger height) { - [encoder setComputePipelineState:pipeline]; - NSUInteger w = pipeline.threadExecutionWidth; - NSUInteger h = pipeline.maxTotalThreadsPerThreadgroup / w; - MTLSize threadsPerThreadgroup = MTLSizeMake(w, h, 1); BOOL fallback = YES; + MTLSize threadsPerThreadgroup; + NSUInteger w, h; + + [encoder setComputePipelineState:pipeline]; + w = pipeline.threadExecutionWidth; + h = pipeline.maxTotalThreadsPerThreadgroup / w; + threadsPerThreadgroup = MTLSizeMake(w, h, 1); + // MAC_OS_X_VERSION_10_15 is only defined on SDKs new enough to include its functionality (including iOS, tvOS, etc) #ifdef MAC_OS_X_VERSION_10_15 if (@available(macOS 10.15, iOS 11, tvOS 14.5, *)) { -- 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".