[FFmpeg-devel] [PATCH v1] lavfi: add nlmeans CUDA filter

Timo Rothenpieler timo at rothenpieler.org
Sat Aug 28 02:07:45 EEST 2021


There still are some issues in the C side of this filter:

You're allocating a lot of stuff on init (integral_img, ...) but never 
free it. So the filter leaks those.

You define a list of supported formats at the top, listing practically 
all formats that can be in a CUDA frame as of right now.
But then later infilter_frame you have a switch-case that returns 
AVERROR_BUG if it's anything else than NV12.
So, either add support for all the other formats or don't claim support 
for more than NV12.

I'm also not sure if not taking an internal reference to the 
hw_frames_ctx is valid.
It might, but I'm not sure about the lifetime on the one on the output.
Typically, filters also hold an internal reference and unref it on uninit.


Generally:

There's a bunch of trailing whitespaces everywhere, please tell your 
editor to not do that.

Also, when bumping minor version, the patch version drops back to 100.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4494 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210828/c85aeab8/attachment.bin>


More information about the ffmpeg-devel mailing list