[FFmpeg-devel] [PATCH 07/10] avfilter/vf_nlmeans: Move ff_nlmeans_init into a header

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri May 13 11:27:25 EEST 2022


Soft Works:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
>> Andreas Rheinhardt
>> Sent: Tuesday, May 3, 2022 8:38 AM
>> To: ffmpeg-devel at ffmpeg.org
>> Cc: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
>> Subject: [FFmpeg-devel] [PATCH 07/10] avfilter/vf_nlmeans: Move
>> ff_nlmeans_init into a header
>>
>> This removes a dependency of checkasm on lavfi/vf_nlmeans.o
>> and also allows to inline ff_nlmeans_init() irrespectively of
>> interposing.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
>> ---
> 
> [..]
> 
>> +
>> +static av_unused void ff_nlmeans_init(NLMeansDSPContext *dsp)
>> +{
>> +    dsp->compute_safe_ssd_integral_image =
>> compute_safe_ssd_integral_image_c;
>> +    dsp->compute_weights_line = compute_weights_line_c;
>> +
>> +    if (ARCH_AARCH64)
>> +        ff_nlmeans_init_aarch64(dsp);
> 
> Hi Andreas,
> 
> the above breaks compilation for me:
> 
> 1>libavfilterd.lib(libavfilter_vf_nlmeans.obj) : error LNK2019: unresolved external symbol ff_nlmeans_init_aarch64 referenced in function ff_nlmeans_init
> 
> The reason is that I'm (obviously) not compiling stuff from the 
> libavfilter\aarch64 subfolder.
> 
> It might need an #ifdef ?
> 
> I haven't taken a deeper look at it, though.
> 
> Thanks,
> softworkz
> 
> 

That surprises me: The earlier code did exactly the same; in fact, using
if (ARCH_*) is our typical check for arches in dsp-init code.
Is this the only place where this happens?
#ifdef is certainly wrong: All ARCH_* are always defined; they are just
0 or 1.
Anyway, will send a patch with #if.

- Andreas


More information about the ffmpeg-devel mailing list