[FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans
Clément Bœsch
u at pkh.me
Fri Feb 1 11:11:29 EET 2019
On Fri, Feb 01, 2019 at 04:57:37PM +0800, mypopy at gmail.com wrote:
[...]
> > > -#define WEIGHT_LUT_NBITS 9
> > > -#define WEIGHT_LUT_SIZE (1<<WEIGHT_LUT_NBITS)
> > > +#define WEIGHT_LUT_SIZE (800000) // need to > 300 * 300 * log(255)
> >
> > So the LUT is now 3.2MB?
> >
> > Why 300? 300*300*log(255) is closer to 500 000 than 800 000
> I just seleted a value > 300*300*log(255) (500 000 more precise) for
> this case at liberty in fact , the other option is use a dynamic
> allocation memory for weight_lut table size base on the
> max_meaningful_diff :), but maybe seems pretty obvious, I think 3M is
> not a big burden for nlmeans
It's probably fine yes, I'm just confused at the comment: why does it
*needs* to be > 300 * 300 * log(255)?
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190201/bea852b3/attachment.sig>
More information about the ffmpeg-devel
mailing list