diff mbox series

[FFmpeg-devel] lavu/cpu: Use av_cpu_ prefix

Message ID 4f02d982-c38c-8e67-e7b9-c0756300dfb9@mail.de
State Accepted
Headers show
Series [FFmpeg-devel] lavu/cpu: Use av_cpu_ prefix
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Thilo Borgmann July 19, 2021, 9:16 p.m. UTC
Hi,

$subject for the new force cpu count function.

Thanks,
Thilo
From aedfcef85560c38b32dc898c32caa4c42fca97db Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann@mail.de>
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(-)

Comments

Andreas Rheinhardt July 19, 2021, 9:19 p.m. UTC | #1
Thilo Borgmann:
> Hi,
> 
> $subject for the new force cpu count function.
> 
> Thanks,
> Thilo
> 

I just wanted to complain that you did not modify APIchanges as well;
but then I noticed that there is no entry there for this new function.
But there should be.

- Andreas
James Almer July 19, 2021, 9:20 p.m. UTC | #2
On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
> Thilo Borgmann:
>> Hi,
>>
>> $subject for the new force cpu count function.
>>
>> Thanks,
>> Thilo
>>
> 
> I just wanted to complain that you did not modify APIchanges as well;
> but then I noticed that there is no entry there for this new function.
> But there should be.

No version bump either, so this patch should definitely do both things.
Thilo Borgmann July 19, 2021, 9:47 p.m. UTC | #3
Am 19.07.21 um 23:20 schrieb James Almer:
> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>> Thilo Borgmann:
>>> Hi,
>>>
>>> $subject for the new force cpu count function.
>>>
>>> Thanks,
>>> Thilo
>>>
>>
>> I just wanted to complain that you did not modify APIchanges as well;
>> but then I noticed that there is no entry there for this new function.
>> But there should be.
> 
> No version bump either, so this patch should definitely do both things.

Ok, does the attached look better?

Also, is the commit hash meant be added in a separate commit later to doc/APIchanges?

Thanks!
-Thilo
From 6a7752acdc3c9c735ce35b3a80076d8463c4de1a Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann@mail.de>
Date: Mon, 19 Jul 2021 23:44:50 +0200
Subject: [PATCH] lavu/cpu: Use av_cpu_ prefix

---
 doc/APIchanges     | 3 +++
 fftools/cmdutils.c | 2 +-
 libavutil/cpu.c    | 2 +-
 libavutil/cpu.h    | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 91ded137f2..ecbb0a2ddf 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2021-04-27
 
 
 API changes, most recent first:
+2021-07-19 - xxxxxxxxxx - lavu 57.0.101 - cpu.h
+  Add av_cpu_force_count()
+
 2021-06-17 - xxxxxxxxxx - lavc 59.2.100 - packet.h
   Add AV_PKT_DATA_DYNAMIC_HDR10_PLUS
 
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.
James Almer July 19, 2021, 9:51 p.m. UTC | #4
On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
> Am 19.07.21 um 23:20 schrieb James Almer:
>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>> Thilo Borgmann:
>>>> Hi,
>>>>
>>>> $subject for the new force cpu count function.
>>>>
>>>> Thanks,
>>>> Thilo
>>>>
>>>
>>> I just wanted to complain that you did not modify APIchanges as well;
>>> but then I noticed that there is no entry there for this new function.
>>> But there should be.
>>
>> No version bump either, so this patch should definitely do both things.
> 
> Ok, does the attached look better?

You need to bump the library version when you add new API. Since you 
didn't when you first added the function, you can do it now.
And of course, the version you report in doc/APIchanges should be the 
one that introduced the new API.

> 
> Also, is the commit hash meant be added in a separate commit later to doc/APIchanges?

The hash is added later, once you know the hash of the commit you're 
pushing. We usually add many in batches.

> 
> Thanks!
> -Thilo
> 
> 
> _______________________________________________
> 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".
>
Andreas Rheinhardt July 19, 2021, 9:58 p.m. UTC | #5
Thilo Borgmann:
> Am 19.07.21 um 23:20 schrieb James Almer:
>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>> Thilo Borgmann:
>>>> Hi,
>>>>
>>>> $subject for the new force cpu count function.
>>>>
>>>> Thanks,
>>>> Thilo
>>>>
>>>
>>> I just wanted to complain that you did not modify APIchanges as well;
>>> but then I noticed that there is no entry there for this new function.
>>> But there should be.
>>
>> No version bump either, so this patch should definitely do both things.
> 
> Ok, does the attached look better?
> 

Missing version bump.

> Also, is the commit hash meant be added in a separate commit later to doc/APIchanges?
> 

The commit hash is meant to be the hash of the commit that
added/removed/deprecated said API. In this case it is either 87951dcbe7
or the hash of your fixup commit. In the latter case (and also in the
ordinary case where a new API is added in one commit without a later
fixup) said hash is not known in advance, therefore the placeholder
xxxxxxxxxx is used. These placeholders are replaced by the real hashes
before every release.

- Andreas
Thilo Borgmann July 19, 2021, 9:59 p.m. UTC | #6
Am 19.07.21 um 23:51 schrieb James Almer:
> On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
>> Am 19.07.21 um 23:20 schrieb James Almer:
>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>> Thilo Borgmann:
>>>>> Hi,
>>>>>
>>>>> $subject for the new force cpu count function.
>>>>>
>>>>> Thanks,
>>>>> Thilo
>>>>>
>>>>
>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>> but then I noticed that there is no entry there for this new function.
>>>> But there should be.
>>>
>>> No version bump either, so this patch should definitely do both things.
>>
>> Ok, does the attached look better?
> 
> You need to bump the library version when you add new API. Since you didn't when you first added the function, you can do it now.
> And of course, the version you report in doc/APIchanges should be the one that introduced the new API.

Hopefully compliant patch attached.


>> Also, is the commit hash meant be added in a separate commit later to doc/APIchanges?
> 
> The hash is added later, once you know the hash of the commit you're pushing. We usually add many in batches.


Thanks,
Thilo
From feda7cd8201632ee89e4473abbe7a68646c48dd9 Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann@mail.de>
Date: Mon, 19 Jul 2021 23:58:01 +0200
Subject: [PATCH] lavu/cpu: Use av_cpu_ prefix

---
 doc/APIchanges      | 3 +++
 fftools/cmdutils.c  | 2 +-
 libavutil/cpu.c     | 2 +-
 libavutil/cpu.h     | 2 +-
 libavutil/version.h | 4 ++--
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 91ded137f2..308e2d5061 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2021-04-27
 
 
 API changes, most recent first:
+2021-07-19 - xxxxxxxxxx - lavu 57.1.100 - cpu.h
+  Add av_cpu_force_count()
+
 2021-06-17 - xxxxxxxxxx - lavc 59.2.100 - packet.h
   Add AV_PKT_DATA_DYNAMIC_HDR10_PLUS
 
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.
diff --git a/libavutil/version.h b/libavutil/version.h
index 8312727aca..34b83112de 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,8 +79,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  57
-#define LIBAVUTIL_VERSION_MINOR   0
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR   1
+#define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \
James Almer July 19, 2021, 10 p.m. UTC | #7
On 7/19/2021 6:58 PM, Andreas Rheinhardt wrote:
> Thilo Borgmann:
>> Am 19.07.21 um 23:20 schrieb James Almer:
>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>> Thilo Borgmann:
>>>>> Hi,
>>>>>
>>>>> $subject for the new force cpu count function.
>>>>>
>>>>> Thanks,
>>>>> Thilo
>>>>>
>>>>
>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>> but then I noticed that there is no entry there for this new function.
>>>> But there should be.
>>>
>>> No version bump either, so this patch should definitely do both things.
>>
>> Ok, does the attached look better?
>>
> 
> Missing version bump.
> 
>> Also, is the commit hash meant be added in a separate commit later to doc/APIchanges?
>>
> 
> The commit hash is meant to be the hash of the commit that
> added/removed/deprecated said API. In this case it is either 87951dcbe7
> or the hash of your fixup commit. In the latter case (and also in the

The hash of this fixup should be used, since it will both be linked to 
the version bump, and actually feature the new av_cpu namespaced symbol. 
So the xxxx placeholder is good.

> ordinary case where a new API is added in one commit without a later
> fixup) said hash is not known in advance, therefore the placeholder
> xxxxxxxxxx is used. These placeholders are replaced by the real hashes
> before every release.
> 
> - Andreas
> _______________________________________________
> 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".
>
Andreas Rheinhardt July 19, 2021, 10:27 p.m. UTC | #8
Thilo Borgmann:
> Am 19.07.21 um 23:51 schrieb James Almer:
>> On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
>>> Am 19.07.21 um 23:20 schrieb James Almer:
>>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>>> Thilo Borgmann:
>>>>>> Hi,
>>>>>>
>>>>>> $subject for the new force cpu count function.
>>>>>>
>>>>>> Thanks,
>>>>>> Thilo
>>>>>>
>>>>>
>>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>>> but then I noticed that there is no entry there for this new function.
>>>>> But there should be.
>>>>
>>>> No version bump either, so this patch should definitely do both things.
>>>
>>> Ok, does the attached look better?
>>
>> You need to bump the library version when you add new API. Since you didn't when you first added the function, you can do it now.
>> And of course, the version you report in doc/APIchanges should be the one that introduced the new API.
> 
> Hopefully compliant patch attached.



> -void av_force_cpu_count(int count){
> +void av_cpu_force_count(int count){
>      atomic_store_explicit(&cpu_count, count, memory_order_relaxed);
>  }

While just at it, you can put the '{' on a line of its own as we do for
opening brackets of functions.

- Andreas
Thilo Borgmann July 20, 2021, 7:34 a.m. UTC | #9
Am 20.07.21 um 00:27 schrieb Andreas Rheinhardt:
> Thilo Borgmann:
>> Am 19.07.21 um 23:51 schrieb James Almer:
>>> On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
>>>> Am 19.07.21 um 23:20 schrieb James Almer:
>>>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>>>> Thilo Borgmann:
>>>>>>> Hi,
>>>>>>>
>>>>>>> $subject for the new force cpu count function.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Thilo
>>>>>>>
>>>>>>
>>>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>>>> but then I noticed that there is no entry there for this new function.
>>>>>> But there should be.
>>>>>
>>>>> No version bump either, so this patch should definitely do both things.
>>>>
>>>> Ok, does the attached look better?
>>>
>>> You need to bump the library version when you add new API. Since you didn't when you first added the function, you can do it now.
>>> And of course, the version you report in doc/APIchanges should be the one that introduced the new API.
>>
>> Hopefully compliant patch attached.
> 
> 
> 
>> -void av_force_cpu_count(int count){
>> +void av_cpu_force_count(int count){
>>      atomic_store_explicit(&cpu_count, count, memory_order_relaxed);
>>  }
> 
> While just at it, you can put the '{' on a line of its own as we do for
> opening brackets of functions.

Attached.

Thanks,
Thilo
From 8dfb048b69e493e54dec4da179afcfe259cee79d Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann@mail.de>
Date: Tue, 20 Jul 2021 09:33:47 +0200
Subject: [PATCH] lavu/cpu: Use av_cpu_ prefix

---
 doc/APIchanges      | 3 +++
 fftools/cmdutils.c  | 2 +-
 libavutil/cpu.c     | 3 ++-
 libavutil/cpu.h     | 2 +-
 libavutil/version.h | 4 ++--
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 91ded137f2..308e2d5061 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2021-04-27
 
 
 API changes, most recent first:
+2021-07-19 - xxxxxxxxxx - lavu 57.1.100 - cpu.h
+  Add av_cpu_force_count()
+
 2021-06-17 - xxxxxxxxxx - lavc 59.2.100 - packet.h
   Add AV_PKT_DATA_DYNAMIC_HDR10_PLUS
 
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..4627af4f23 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -236,7 +236,8 @@ 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.
diff --git a/libavutil/version.h b/libavutil/version.h
index 8312727aca..34b83112de 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,8 +79,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  57
-#define LIBAVUTIL_VERSION_MINOR   0
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR   1
+#define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \
Andreas Rheinhardt July 20, 2021, 8:28 a.m. UTC | #10
Thilo Borgmann:
> Am 20.07.21 um 00:27 schrieb Andreas Rheinhardt:
>> Thilo Borgmann:
>>> Am 19.07.21 um 23:51 schrieb James Almer:
>>>> On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
>>>>> Am 19.07.21 um 23:20 schrieb James Almer:
>>>>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>>>>> Thilo Borgmann:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> $subject for the new force cpu count function.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Thilo
>>>>>>>>
>>>>>>>
>>>>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>>>>> but then I noticed that there is no entry there for this new function.
>>>>>>> But there should be.
>>>>>>
>>>>>> No version bump either, so this patch should definitely do both things.
>>>>>
>>>>> Ok, does the attached look better?
>>>>
>>>> You need to bump the library version when you add new API. Since you didn't when you first added the function, you can do it now.
>>>> And of course, the version you report in doc/APIchanges should be the one that introduced the new API.
>>>
>>> Hopefully compliant patch attached.
>>
>>
>>
>>> -void av_force_cpu_count(int count){
>>> +void av_cpu_force_count(int count){
>>>      atomic_store_explicit(&cpu_count, count, memory_order_relaxed);
>>>  }
>>
>> While just at it, you can put the '{' on a line of its own as we do for
>> opening brackets of functions.
> 
> Attached.
> 
No objection from me for this version.

- Andreas
Thilo Borgmann July 20, 2021, 8:32 a.m. UTC | #11
Am 20.07.21 um 10:28 schrieb Andreas Rheinhardt:
> Thilo Borgmann:
>> Am 20.07.21 um 00:27 schrieb Andreas Rheinhardt:
>>> Thilo Borgmann:
>>>> Am 19.07.21 um 23:51 schrieb James Almer:
>>>>> On 7/19/2021 6:47 PM, Thilo Borgmann wrote:
>>>>>> Am 19.07.21 um 23:20 schrieb James Almer:
>>>>>>> On 7/19/2021 6:19 PM, Andreas Rheinhardt wrote:
>>>>>>>> Thilo Borgmann:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> $subject for the new force cpu count function.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Thilo
>>>>>>>>>
>>>>>>>>
>>>>>>>> I just wanted to complain that you did not modify APIchanges as well;
>>>>>>>> but then I noticed that there is no entry there for this new function.
>>>>>>>> But there should be.
>>>>>>>
>>>>>>> No version bump either, so this patch should definitely do both things.
>>>>>>
>>>>>> Ok, does the attached look better?
>>>>>
>>>>> You need to bump the library version when you add new API. Since you didn't when you first added the function, you can do it now.
>>>>> And of course, the version you report in doc/APIchanges should be the one that introduced the new API.
>>>>
>>>> Hopefully compliant patch attached.
>>>
>>>
>>>
>>>> -void av_force_cpu_count(int count){
>>>> +void av_cpu_force_count(int count){
>>>>      atomic_store_explicit(&cpu_count, count, memory_order_relaxed);
>>>>  }
>>>
>>> While just at it, you can put the '{' on a line of its own as we do for
>>> opening brackets of functions.
>>
>> Attached.
>>
> No objection from me for this version.

Pushed. Thank you!

-Thilo
diff mbox series

Patch

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.