Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread Clément Bœsch
On Fri, Feb 01, 2019 at 05:50:37PM +0800, myp...@gmail.com wrote: [...] > > Ok, makes sense. Would you mind updating the comment to something like: > > > > /* Note: WEIGHT_LUT_SIZE must be larger than max_meaningful_diff > > * (log(255)*max(h)^2, which is approximately 50 with the curr

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread myp...@gmail.com
On Fri, Feb 1, 2019 at 5:43 PM Clément Bœsch wrote: > On Fri, Feb 01, 2019 at 05:19:53PM +0800, myp...@gmail.com wrote: > > On Fri, Feb 1, 2019 at 5:11 PM Clément Bœsch wrote: > > > > > > On Fri, Feb 01, 2019 at 04:57:37PM +0800, myp...@gmail.com wrote: > > > [...] > > > > > > -#define WEIGHT_LU

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread Clément Bœsch
On Fri, Feb 01, 2019 at 05:19:53PM +0800, myp...@gmail.com wrote: > On Fri, Feb 1, 2019 at 5:11 PM Clément Bœsch wrote: > > > > On Fri, Feb 01, 2019 at 04:57:37PM +0800, myp...@gmail.com wrote: > > [...] > > > > > -#define WEIGHT_LUT_NBITS 9 > > > > > -#define WEIGHT_LUT_SIZE (1< > > > > +#define

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread myp...@gmail.com
On Fri, Feb 1, 2019 at 5:11 PM Clément Bœsch wrote: > > On Fri, Feb 01, 2019 at 04:57:37PM +0800, myp...@gmail.com wrote: > [...] > > > > -#define WEIGHT_LUT_NBITS 9 > > > > -#define WEIGHT_LUT_SIZE (1< > > > +#define WEIGHT_LUT_SIZE (80) // need to > 300 * 300 * log(255) > > > > > > So the

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread Clément Bœsch
On Fri, Feb 01, 2019 at 04:57:37PM +0800, myp...@gmail.com wrote: [...] > > > -#define WEIGHT_LUT_NBITS 9 > > > -#define WEIGHT_LUT_SIZE (1< > > +#define WEIGHT_LUT_SIZE (80) // need to > 300 * 300 * log(255) > > > > So the LUT is now 3.2MB? > > > > Why 300? 300*300*log(255) is closer to 500

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread myp...@gmail.com
On Fri, Feb 1, 2019 at 4:29 PM Clément Bœsch wrote: > > On Fri, Feb 01, 2019 at 10:45:24AM +0800, Jun Zhao wrote: > > Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size > > from 2^9 to 80, this change will avoid using pdiff_lut_scale in > > nlmeans_slice() for weight_lut

Re: [FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-02-01 Thread Clément Bœsch
On Fri, Feb 01, 2019 at 10:45:24AM +0800, Jun Zhao wrote: > Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size > from 2^9 to 80, this change will avoid using pdiff_lut_scale in > nlmeans_slice() for weight_lut table search, it's will improve the > performance about 12%. (i

[FFmpeg-devel] [PATCH V2] lavfi/vf_nlmeans: Improve the performance for nlmeans

2019-01-31 Thread Jun Zhao
Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size from 2^9 to 80, this change will avoid using pdiff_lut_scale in nlmeans_slice() for weight_lut table search, it's will improve the performance about 12%. (in 1080P size picture case). Use the profiling command like: perf