From patchwork Mon Jul 19 21:16:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thilo Borgmann X-Patchwork-Id: 28976 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp4745531ios; Mon, 19 Jul 2021 14:16:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6ff9iB2wDUZi7ChUk77TCSIHtMN6FYlZmf6izAVSpCSrNTuU8qbjbyJKXC7Ga0GfAzGU+ X-Received: by 2002:aa7:db50:: with SMTP id n16mr37101295edt.298.1626729386849; Mon, 19 Jul 2021 14:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626729386; cv=none; d=google.com; s=arc-20160816; b=Th/t4zvCrynQjWfS39RaZsWCQ2pY8IOJtRSyqRCJyDoCuFzh6/u5o2b2Zp3jQrp7Fj n4soeLIP+nG92Dqr/+36wvghYUmWHxS5lnTGj8PpzTgXCtSBXL/4iDxj1rz+8xTrUm0x fCz+/6LoO57X+gNKxfdZiOmblJpEIU2zfOpKHgcAdHsfKAv4FkpnB34wSMNKj7Aldhj0 fZ45xrSJ16keTPu0n7k1TPY00RRgCoXWMJI1tyVn0hxpW6asVpVEwFQ98WkiZfRjRgs8 FywYumeeIjlAfsbgC/1GUtgI1aWOhEmq5p8MZ8W+KUIrHfJ+uHEc/Ki27Su21CW5jVDD oC8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:mime-version:date:message-id:from:to :dkim-signature:delivered-to; bh=8YYKIfVVo8dxJ8kw1+c8hgnn16e4DUdsZ80Jqa96y44=; b=aDukeGf+lQKVdWI7bezPJNz1o/MLS3tPASz4+HB5GgFDAH/k5x3PJIRtTeHm42Dx+E rNNyiIvEU3puWuSMy7PJeG19kdqk3GIlkCPkumYbBTo7rj2hkbAH61Tqlu2LTRuJWnHm aPENkBK/ePooQD2w+NcvWp/RJQl6jrgQqJHgh/EH4nBSb9m5z0XMBjCdGYS23maT3sIQ cuYbLaHH9C4vUeLrBxYmFUbXSnFsQWnCqDT0c1pfbhebPhqFVEpTPvaWoKBtfo5lE0Qt en29xDAbjrrNuFCjSGGjpBHi/+SVjXLxtgA04kx0ZihTrapByXnh29mv3nfGZsFTU03u pRSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@mail.de header.s=mailde202009 header.b=vfrLzcNt; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mail.de Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y9si21892260eju.362.2021.07.19.14.16.26; Mon, 19 Jul 2021 14:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@mail.de header.s=mailde202009 header.b=vfrLzcNt; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mail.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E583C68A841; Tue, 20 Jul 2021 00:16:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from shout02.mail.de (shout02.mail.de [62.201.172.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C4347689F19 for ; Tue, 20 Jul 2021 00:16:17 +0300 (EEST) Received: from postfix01.mail.de (postfix03.bt.mail.de [10.0.121.127]) by shout02.mail.de (Postfix) with ESMTP id 62A02C0280 for ; Mon, 19 Jul 2021 23:16:17 +0200 (CEST) Received: from smtp04.mail.de (smtp04.bt.mail.de [10.0.121.214]) by postfix01.mail.de (Postfix) with ESMTP id 4AF59801EC for ; Mon, 19 Jul 2021 23:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mailde202009; t=1626729377; bh=FdJ4gJDnXYrtmpSlo8NUn6vAO4vkHkMdRxWdF9Uo7Mo=; h=To:From:Subject:Date:From; b=vfrLzcNtsvVxm4u7tUbGgqwoCo9+MBSNZgzfXEfKuMV/bLA09dXsBgN1m+EOQx1hI SSakgIFNSKwS3TbkjIVATf5E0DSfpHkw1PJsGX1MAkgrecBumm0x59cxyIXhbGswK6 83YAG6DcKd+XDBX9JbkleFZgXtH95/3IebPNcx+sZ1SWXf8oOFv1oQwXm+GwviSp1k ZLYSpIsactXZIxEWujrfQ63r8gwywKJRTFe73YhnH2f4szBLuRraO2WMo9Kev2DF+Z 9ES0dVAkNRfaYScNSuEwyZhpjSVb3oHdrho6v/79CFDUG6NiAKAHizAAhWqcaTQr8g 3v/fW8kMk3g7g== Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp04.mail.de (Postfix) with ESMTPSA id 1EDE5C009C for ; Mon, 19 Jul 2021 23:16:17 +0200 (CEST) To: FFmpeg development discussions and patches From: Thilo Borgmann Message-ID: <4f02d982-c38c-8e67-e7b9-c0756300dfb9@mail.de> Date: Mon, 19 Jul 2021 23:16:16 +0200 MIME-Version: 1.0 Content-Language: en-US X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 2689 X-purgate-ID: 154282::1626729377-00006678-1B206EF6/0/0 Subject: [FFmpeg-devel] [PATCH] lavu/cpu: Use av_cpu_ prefix 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ol/LMS9Ni3to Hi, $subject for the new force cpu count function. Thanks, Thilo From aedfcef85560c38b32dc898c32caa4c42fca97db Mon Sep 17 00:00:00 2001 From: Thilo Borgmann Date: Mon, 19 Jul 2021 23:11:58 +0200 Subject: [PATCH] lavu/cpu: Use av_cpu_ prefix --- fftools/cmdutils.c | 2 +- libavutil/cpu.c | 2 +- libavutil/cpu.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 6e875104fd..18bcfb065a 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -874,7 +874,7 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg) ret = av_opt_eval_int(&pclass, opts, arg, &count); if (!ret) { - av_force_cpu_count(count); + av_cpu_force_count(count); } return ret; diff --git a/libavutil/cpu.c b/libavutil/cpu.c index eae1485f36..2c40d40239 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -236,7 +236,7 @@ int av_cpu_count(void) return nb_cpus; } -void av_force_cpu_count(int count){ +void av_cpu_force_count(int count){ atomic_store_explicit(&cpu_count, count, memory_order_relaxed); } diff --git a/libavutil/cpu.h b/libavutil/cpu.h index c069076439..afea0640b4 100644 --- a/libavutil/cpu.h +++ b/libavutil/cpu.h @@ -102,7 +102,7 @@ int av_cpu_count(void); * Overrides cpu count detection and forces the specified count. * Count < 1 disables forcing of specific count. */ -void av_force_cpu_count(int count); +void av_cpu_force_count(int count); /** * Get the maximum data alignment that may be required by FFmpeg.