Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th July 2021, 02:27   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Weird pink stuff

What is this down to,

Code:
Avisource("SH_2_secs.avi.avi")
ConvertToYV24
#ConvertToRGB24
O=Last

G=GeneralConvolution(0, "
1 0 1
2 4 2
1 0 1
")

B=O.Blur(1.58,-1.0)           # H-BLUR, V-SHARP

AMP=TRUE
D1=ClipDelta(G,O,amp=AMP)
D2=ClipDelta(B,O,amp=AMP)
StackVertical(D1,D2)
Return last

# Return Clip Difference of input clips (amp==true = Amplified, show==true = show background)
Function ClipDelta(clip clip1,clip clip2,bool "amp",bool "show") {
    amp=Default(amp,false)
    show=Default(show,false)
    c2=clip1.levels(128-32,1.0,128+32,128-32,128+32).greyscale()
    c1=clip1.subtract(clip2)
    c1=(amp)?c1.levels(127,1.0,129,0,255):c1
    return (show)?c1.Merge(c2):c1
}
click Me


Something to do with MPEG-2 chroma placement, or sharpen bug, or other ???
EDIT: All diffs are amp'ed to max, but still it seems a bit weird.

EDIT:
Above
Code:
B=O.Blur(1.58,-1.0)           # H-BLUR, V-SHARP
below
Code:
B=O.Blur(1.58,-0.99)           # H-BLUR, V-SHARP


Looks like avs+ bug

EDIT: below is pink
Code:
B=O.Blur(1.58,-0.999)           # H-BLUR, V-SHARP
EDIT: Think its probably my fault. Also maybe should have switched off coring, investigating.
Code:
# Removing Show stuff
Function ClipDelta(clip clip1,clip clip2,bool "amp") {
    amp=Default(amp,false)
    # Y centered on TV levels mid point [Round(((16+235)/2.0)) = 126]
    c1=clip1.subtract(clip2)
    return (amp) ? c1.levels(125,1.0,127,0,255,coring=false) : c1
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 29th July 2021 at 07:26.
StainlessS is offline   Reply With Quote
Old 29th July 2021, 06:07   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
This here pink stuff is defo a bit wrong.
Code:
Colorbars(Pixel_type="YV12")
convertBits(32)
return  ColorYUV(levels="TV->PC").ConvertToRGB32


EDIT: Added ConvertToRGB32 at end of script, still does it in both Vdub2 and Potplayer.

EDIT: Switched to PC->TV
Code:
Colorbars(Pixel_type="YV12")
convertBits(32)
GreyScale
ColorYUV(levels="PC->TV")
Return Last.ConvertToRGB32

Maybe old code where chroma gray was 0.5.

EDIT: as first one with Greyscale before ColoYUV
Code:
Colorbars(Pixel_type="YV12")
convertBits(32)
GreyScale
ColorYUV(levels="TV->PC")
#ColorYUV(levels="PC->TV")
Return Last.ConvertToRGB32
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 29th July 2021 at 07:45.
StainlessS is offline   Reply With Quote
Old 29th July 2021, 07:59   #3  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by StainlessS View Post
This here pink stuff is defo a bit wrong.
Code:
Colorbars(Pixel_type="YV12")
convertBits(32)
return  ColorYUV(levels="TV->PC").ConvertToRGB32
The culprit is ColorYUV, the wiki kinda mentions it supports it but I'm not sure. If you remove ColorYUV(levels="TV->PC") then the output is correct. It's also correct if you change to convertBits(16).
Reel.Deel is offline   Reply With Quote
Old 29th July 2021, 09:59   #4  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Something similar as discussed here?
https://forum.doom9.org/showthread.p...29#post1947029
Sharc is offline   Reply With Quote
Old 29th July 2021, 16:23   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanks guys, I shoulda pointed out that only affects 32 bit ColorYUV.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.