AviSynthPlus-Scripts icon indicating copy to clipboard operation
AviSynthPlus-Scripts copied to clipboard

VS plugin bore

Open tormento opened this issue 1 year ago • 4 comments

When you have some time, please have a look at bore.

It seems a nice plugin to have on AVS+ to fix edge issues with better quality than available scripts/plugins.

Thank you :)

tormento avatar Aug 12 '24 18:08 tormento

I tested it some time ago. For simple cases it could be handy (automated fixcr/fixbr). For more complex situations it requires tuning and doesn't provide benefits over bbmod. I didn't test the speed but usually this type of filtering is one the lightest part in the chain. When say better quality what did you use for the comparison?

Asd-g avatar Aug 12 '24 18:08 Asd-g

Sorry for my late reply.

I have tried to find a recent version of bbmod but I couldn't. I saw your bbmodY but it requires bbmod too.

Can you help me?

tormento avatar Sep 01 '24 16:09 tormento

You can find the latest bbmod here.

Asd-g avatar Sep 03 '24 16:09 Asd-g

I have tried bbmod but I can't get proper results for many old anime (zoom in 200% on edges), both with luma anomalies and black borders to be filled.

image

image

image

Any help is welcome.

tormento avatar Sep 14 '24 19:09 tormento

For filling black borders you should use FillBorders.

For dirty lines try something bbmod(xxx, thresh=16, blur=20). If it's ok, try with increasing blur until the results worsen.

Asd-g avatar Oct 03 '24 08:10 Asd-g

I tried many settings and many many different plugins in the mean time but they give smearing, blur, green lines and whatsoever. That is really evident with line art content, such as anime. I will try your hint too.

If you find any spare time, please consider porting the bore plugin.

tormento avatar Oct 03 '24 08:10 tormento

The images you shared, are they untouched? I'll try bbmod later with some of them.

AVS support for bore is WIP. I finished the avs implementing but not pushed yet. I have to add the building process.

Asd-g avatar Oct 03 '24 08:10 Asd-g

Yes, here are some more. I find the biggest difficulties with luma/chroma consistency and where diagonal lines touch the black border. Plus there is a brighter line close to the black border, probably the effect of bad resizing. Even reversing the kernel doesn't fix it.

I could upload a sample of the video raw file, if you need it.

image

image

image

tormento avatar Oct 03 '24 11:10 tormento

Thanks for the images.

I took a look at the first one only. This is the script I used:

ImageSource("373230079-aada5849-8a34-4bac-a86d-a2ec4a412672.png")
Crop(2, 6, -4, 0)
ConvertToPlanarRGB()
z_ConvertFormat(pixel_type="yv12", colorspace_op="rgb=>709", use_props=0)

# top
for (i = 10, 1, -1)
{
bbmody(row = i, ctop=1, blur=999)
bbmody(row = i, ctop=1, blur=50)
bbmody(row = i, ctop=1, blur=20)
}
bbmod(ctop=2, blur=50)

# left
for (i = 5, 1, -1)
{
bbmody(column = i, cleft=1)
}
bbmod(cleft=2)

# right
for (i = 4, 1, -1)
{
bbmody(column = Width() - i, cright=1)
}

testing000065

Btw bore is available on AviSynth too - https://github.com/OpusGang/bore/actions/runs/11332759458

Asd-g avatar Oct 18 '24 16:10 Asd-g

Thanks for the images. Thanks for you time.

I tried without cropping first, perhaps I was too hopeful.

I took a look at the first one only. This is the script I used:

Wow. Can you explain me the ratio you used to choose the x in

for (i = x, 1, -1)

and why the lines

bbmody(row = i, ctop=1, blur=999)
bbmody(row = i, ctop=1, blur=50)
bbmody(row = i, ctop=1, blur=20)

Btw bore is available on AviSynth too

Wow, I would never find it.

tormento avatar Oct 18 '24 16:10 tormento

I tried without cropping first, perhaps I was too hopeful.

Both the left and right edges don't have data. You can go without cropping but without full duplicating lines/interpolating, these lines will be patched when bbmod or similar filter (mainly aiming to adjust only area brightness) is used.

Wow. Can you explain me the ratio you used to choose the x in

for (i = x, 1, -1)

With this loop line by line is filtered instead all lines at ones. This is better way to filter when you have diagonal lines (like the hair here) and it's generally more safe. The filtering of the lines starts from the inner part of frame to the outer part of the frame. For e.g., you have for (i = 10, 1, -1) - the filtering starts from line 11 (bbmody(row/column=10), count starts from 0), then line 10, line 9 and so on to line 2 (inclusive).

and why the lines

bbmody(row = i, ctop=1, blur=999) bbmody(row = i, ctop=1, blur=50) bbmody(row = i, ctop=1, blur=20)

Calling bbmody 3 times - you filter the line 3 times (3-pass). You can try with only one/two call to see whats the difference and you can use whatever you like more.

Asd-g avatar Oct 19 '24 05:10 Asd-g