realfinder / AVS-Stuff

avs/avs+ Stuff
GNU General Public License v2.0
61 stars 15 forks source link

FixChromaBleedingMod #149

Closed TbtBI closed 3 years ago

TbtBI commented 3 years ago

Hi,

The result of 8-bit and 16-bit is different. Test:

colorbars(pixel_type="yuv420p16") #colorbars(pixel_type="yv12")
FixChromaBleedingMod(-200)
ExtractV()
realfinder commented 3 years ago

it's YLevels problem, I did update for it

TbtBI commented 3 years ago

Now the results are ok. I tested it against this older version and the results are different.

colorbars(pixel_type="yuv420p8")
FixChromaBleedingMod(-200, xysh=true)
ExtractV()
realfinder commented 3 years ago

same thing I think, Levels

you can get same as old ouput in avs 2.5, I don't think it's wrong now or anything, just how YLevels work

Ylevels() is a simple replacement for Avisynth's internal levels() command, with a few neat differences:

  • processes only luma --> faster, better preservation of color saturation
  • no clipping: Ylevels(40,1.0,220, 40, 220) will not clip the output to [40,220] as levels() does. Values below 40 / above 220 will be scaled accordingly to the correct vales. This means, one can use any values for IN_LOW, IN_HIGH as "control points" without getting the input clipped at those values.
realfinder commented 3 years ago

but maybe it need some tweaking, I will see about that

realfinder commented 3 years ago

see last update of FixChromaBleedingMod

TbtBI commented 3 years ago

There are few Levelss calls that should be Levels.

There is obvious difference between 8-bit and 16-bit results.

There is some artifact for 8-bit - https://imgaa.com/image/60e567879884d063673670

realfinder commented 3 years ago

the new FixChromaBleedingMod is same as old FixChromaBleedingMod now (at least in 8bit) for me as you asked https://github.com/realfinder/AVS-Stuff/issues/149#issuecomment-873940134 , so what is the problem now?

I don't see much difference in 16 vs 8 bit (and I think it come from something else this time not Levels)

realfinder commented 3 years ago

There are few Levelss calls that should be Levels.

they didn't, https://github.com/raffriff42/AvisynthPlusUtilities/blob/73a0c78692fa4182d5131064b712f373980817f5/Utils-r41.avsi#L2499 seems you didn't read this https://github.com/realfinder/AVS-Stuff/blob/842e04e8905ce1a3206fc59e82c8c5f2a59923f2/avs%202.5%20and%20up/FixChromaBleedingMod.avsi#L2

TbtBI commented 3 years ago

My bad, I didn't read about the new requirement.

The latest version is the same as the old version I pointed out. It seems the old version (respectively the last one too) produces some artifacts (https://imgaa.com/image/60e567879884d063673670) - note the small black and white lines of few pixels. I found another version. Testing with the following code, you can see the artifacts:


colorbars(pixel_type="yuv420p8")
FixChromaBleedingMod(-200, xysh=true) #FixChromaBleedingMod(-200) for the other version from gitlab 
ExtractV()
realfinder commented 3 years ago

that not bug, it's how original FixChromaBleeding was made, anyway FixChromaBleedingMod(-200, 0, noexpand=true) in last update seems do better in this case

TbtBI commented 3 years ago

Yes, it looks better.

Thanks.