[FFmpeg-devel] [PATCH 1/3] avutil: rename av_mod_uintp2 to av_zero_extend

James Almer jamrial at gmail.com
Tue Jun 11 22:28:57 EEST 2024


On 6/11/2024 4:13 PM, Rémi Denis-Courmont wrote:
> Le tiistaina 11. kesäkuuta 2024, 21.52.30 EEST James Almer a écrit :
>> It's more descriptive of what it does.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavutil/common.h      | 16 +++++++++++++++-
>>   libavutil/version.h     |  1 +
>>   libavutil/x86/intmath.h |  6 +++---
>>   3 files changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/libavutil/common.h b/libavutil/common.h
>> index 3e4c339893..acd041fb67 100644
>> --- a/libavutil/common.h
>> +++ b/libavutil/common.h
>> @@ -42,6 +42,7 @@
>>   #include "attributes.h"
>>   #include "error.h"
>>   #include "macros.h"
>> +#include "version.h"
>>
>>   #ifdef HAVE_AV_CONFIG_H
>>   #   include "config.h"
>> @@ -122,9 +123,11 @@
>>   #ifndef av_clip_uintp2
>>   #   define av_clip_uintp2   av_clip_uintp2_c
>>   #endif
>> +#if FF_API_MOD_UINTP2
>>   #ifndef av_mod_uintp2
>>   #   define av_mod_uintp2    av_mod_uintp2_c
>>   #endif
>> +#endif
>>   #ifndef av_sat_add32
>>   #   define av_sat_add32     av_sat_add32_c
>>   #endif
>> @@ -149,6 +152,9 @@
>>   #ifndef av_clipd
>>   #   define av_clipd         av_clipd_c
>>   #endif
>> +#ifndef av_zero_extend
>> +#   define av_zero_extend   av_zero_extend_c
>> +#endif
>>   #ifndef av_popcount
>>   #   define av_popcount      av_popcount_c
>>   #endif
> 
> What's the breakdown between common and intmath and where should new functions
> be defined?

I don't know, but this being a clip function of sorts, x86/intmath.h for 
optimized forms is fine. There doesn't seem to be another header where 
this could fit.


More information about the ffmpeg-devel mailing list