Log in

View Full Version : Dehalo_Beta_Package: a fork of Dehalo_alpha and FineDehalo


DonCanjas
29th August 2022, 19:28
https://github.com/DonCanjas/Avisynth-Functions/tree/main/Dehalo_Beta_Package

Dehalo_Beta_Package consists of Dehalo_Beta, a fork of Dehalo_alpha; and FineBeta, a fork of FineDehalo.

It currenlty supports YUV[A] & Y 8-32 bit.



Dehalo_Beta

Instead of built-in scalers, Dehalo_Beta uses avsresize (https://forum.doom9.org/showthread.php?t=173986) and has the option to use libplacebo_resample (https://github.com/Asd-g/avslibplacebo) with useplacebo=True.


DGSource("haloed_clip.dgi")
ConvertBits(16)

src = last

DA = src.DeHalo_Alpha(darkstr=0)

DB = src.DeHalo_Beta()


https://i.ibb.co/SP16m5D/raw-DA-DB-015538.png (https://ibb.co/SP16m5D)



FineBeta

FineBeta is basically the same as FineDehalo, but uses Dehalo_Beta and by default it uses Kirsch to create an edgemask.
On top of that, you can choose between 3 different masktypes: kirsch, old, TEdge. Old uses FineDehalo's default mask, TEdge will use TEdgemask and kirsch uses ex_edge's kirsch.

You can also parse your own edgemask to FineBeta and, as in FineDehalo, input your own halo mask.


DGSource("haloed_clip.dgi")
ConvertBits(16)

src = last

FDH = src.FineDehalo(darkstr=0)

FB = src.FineBeta()


https://i.ibb.co/qCp05vY/raw-fdh-fb-015538.png (https://ibb.co/qCp05vY)


I'm planning on adding chroma dehaloing support for FineBeta. I'm thinking on using SSIM_downsample() to downscale luma's mask to chroma size and process every plane individually.

real.finder
10th September 2022, 05:35
so DeHalo_Beta should give same output as DeHalo_alpha_2BD?

DonCanjas
10th September 2022, 23:18
so DeHalo_Beta should give same output as DeHalo_alpha_2BD?

I forked it from Dehalo_alpha_mt2. It should have a similar output, tho you can see that it's not 1:1 when working with 16 bit video

coolgit
12th September 2022, 07:30
Here lies a problem.

Every time someone comes up with a plugin/script/whatever and post images showing suppose differences, I can't see where the differences are.

Any chance you could insert and arrow or something onto the images to show what the differences are?

StainlessS
13th September 2022, 01:46
CoolGit,

Maybe something like this [flip from even to odd frames]


DGSource("haloed_clip.dgi")
ConvertBits(16)

src = last

DA = src.DeHalo_Alpha(darkstr=0)

DB = src.DeHalo_Beta()

Interleave(DA,DB) # Even DA, Odd DB

Or similar for any other test script

EDIT: OR eg,

DGSource("haloed_clip.dgi")
ConvertBits(16)

src = last

DA = src.DeHalo_Alpha(darkstr=0)

DB = src.DeHalo_Beta()

Interleave(src.Subtitle("Src"), DA.Subtitle("DA"), DB.Subtitle("DB"))

Untested.
EDIT: or with Src adjacent to both DA and DB [group of 4]

Interleave(src.Subtitle("Src1"), DA.Subtitle("DA"), DB.Subtitle("DB"), src.Subtitle("Src2"))

Or,

StackVertical(StackHorizontal(src.Subtitle("Src"),DA.Subtitle("DA")),StackHorizontal(src.Subtitle("Src"),DB.Subtitle("DB")))

Or,

StackVertical(StackHorizontal(src.Subtitle("Src"),DA.Subtitle("DA")),StackHorizontal(Subtract(DA,DB).Subtitle("DA-DB"),DB.Subtitle("DB")))

Again Untested.

coolgit
19th September 2022, 13:01
How do I do that? I don't see haloed_clip.dgi uploaded anywhere.

StainlessS
19th September 2022, 15:36
I was just using example script in opening post,

DA, and DB, could be any 2 alternative results of any script.

takla
23rd September 2022, 08:54
Both give me this error:
There is no function named "m4_sh". Line 31 & 33

DonCanjas
23rd September 2022, 09:21
Both give me this error:
There is no function named "m4_sh". Line 31 & 33

I forgot to list Zs_RF_Shared.avsi as required. Should work if you download it:
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

tormento
15th October 2024, 18:17
Dehalo_Beta_Package consists of Dehalo_Beta, a fork of Dehalo_alpha; and FineBeta, a fork of FineDehalo.
Would be possible to have a updated version to work with AVS+ without the need of stacking?

Plus I can't find Retinex_MSRCP anywhere.

Thank you!

poisondeathray
15th October 2024, 20:48
Would be possible to have a updated version to work with AVS+ without the need of stacking?



Did you try this version ?
https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/DeHalo_alpha_mt2.avsi


# DeHalo_alpha with high bit support, need masktools 2.2.20 or up in avs26 and last avs+
# 2022.08.31




Plus I can't find Retinex_MSRCP anywhere.




https://github.com/Asd-g/AviSynth-Retinex


MSRCP (clip clip, float[] "sigma", float "lower_thr", float "upper_thr", bool "fulls", bool "fulld", float "chroma_protect")

tormento
15th October 2024, 21:03
Did you try this version?
Actually, it's one of the various dehalo that I tried.

FineBeta is way more effective and less prone to destroy details.
Retinex
I had to rename RETINEX_MSRCP to MSRCP in the script to make it work.

poisondeathray
15th October 2024, 21:48
I had to rename RETINEX_MSRCP to MSRCP in the script to make it work.

You should let the author know so he can update on github

tormento
15th October 2024, 21:57
You should let the author know so he can update on github
Did it.

tormento
16th October 2024, 11:49
Whenever I flag useplacebo=true, I get:

libplacebo_Resample: [error] vk->CreateDevice(vk->physd, &dinfo, PL_VK_ALLOC, &vk->dev): VK_ERROR_INITIALIZATION_FAILED (../src/vulkan/context.c:1299)
[fatal] Failed creating logical device!
[fatal] Failed initializing vulkan device

Avslibplacebo works fine as standalone filter on my computer.

Any idea?