VapourSynth-BM3DCUDA
VapourSynth-BM3DCUDA copied to clipboard
RGB2OPP with radius?
With radius=0, I can give a RGB clip that auto-gets converted to OPP format. With radiu=1, it fails. If I try to manually convert with RGB2OPP, it throws: "Python exception: BM3D_RTC: only constant format 32bit float input supported"
Is it possible to run in OPP format with radius=1?
Yes. Please set sample=1
in bm3d.RGB2OPP
.
Now I see that I was using ref incorrectly, and running only 1 pass instead of 2 passes.
I was running this which runs fine
clean = core.bm3dcuda.BM3D(clean, chroma=radius>0 and chroma, sigma=sigma, ref=ref, block_step=block_step, bm_range=bm_range, ps_range=ps_range, radius=radius)
but the doc on 'ref' is wrong. You say
vbasic = core.{bm3d...}.BM3D(src, radius=radius_nonzero).bm3d.VAggregate(radius=radius_nonzero)
vfinal = core.{bm3d...}.BM3D(src, ref=vbasic, radius=r).bm3d.VAggregate(radius=r)
VAggregate without sample=1 feeds the final pass with a clip that is not 32-bit
Yet this isn't working either...
basic = core.bm3dcuda_rtc.BM3D(clean, chroma=True, sigma=sigma, device_id=gpuid, fast=bm3d_fast, radius=radius, block_step=4, bm_range=12, ps_range=5) #, block_step=block_step, bm_range=bm_range, ps_range=ps_range)
basic = clean.bm3d.VAggregate(radius=radius, sample=1) if radius > 0 else basic
clean = core.bm3dcuda_rtc.BM3D(basic, ref=ref, chroma=True, sigma=sigma, device_id=gpuid, fast=bm3d_fast, radius=radius, block_step=3, bm_range=12, ps_range=6) #, block_step=block_step, bm_range=bm_range, ps_range=ps_range)
It says: "ref" must be of the same dimensions as "clip"
Thanks for pointing out the problem. The doc is updated.
The last line of your code should be BM3D(clean, ref=basic)
.