digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Capture, Record, Transfer (https://www.digitalfaq.com/forum/video-capture/)
-   -   Pal signal and hanover bars (https://www.digitalfaq.com/forum/video-capture/10244-pal-signal-hanover.html)

jjdd 01-11-2020 12:06 AM

Pal signal and hanover bars
 
Hi when i capture PAL signal with s-video i have noticed that that all my Ati all in wonder capture card and even my Matrox marvel G400 have hanover bars on the captured files i have done but i can not see it so good first but if i try to pump up the saturation to extrem i start to see hanover bars very easy but on some captures i do not need to pump the saturation at all to see them

my Ati all in wonder "9000" and "9200" and "2006 edition pci-e" are PAL i mean they have PAL tuners

ati usb wonder 2.0n have the worst hanover bars i do not even need to pump up the saturation to see them

but on NTSC signal all Ati all in wonder capture card have perfect quality even ati usb wonder 2.0n have perfect quality :)

hmm with blackmagic intensity shuttle usb3 and s-video works best for me on PAL signal no hanover bars at all even if i pump the saturation to max on the captured files

and to get stable capture with blackmagic intensity shuttle usb3 i did read that you need a powered usb3 hub so i did buy external usb3 powered hub this one https://www.amazon.com/StarTech-com-.../dp/B004DVEWH4 i have to say it works very stable no frame drops or inserted frames when i capture with Virtual Dub
the motherboard i have is a asus p6x58d premium and it does have USB 3.0 but i guess blackmagic intensity shuttle usb3 is very power hungry so it needs external usb3 hub and external power to the hub to
before the usb3 hub i did not get frame drops but i did get inserted frames


to fix the hanover bars on the ati all in wonder captures this function did work best for me

Code:

#######################################
## try to remove horizontal chroma stripes
##
## @ top - number of pixels (from top) to process (default 160)
## @ blur - vertical chroma blur radius (default 12)
## @ thresh - ignore smaller chroma changes (default 6)
##
## v0.42.02 16-Nov-2015 support YV24, YV16 and YUY2
##
function ChromaDestripe(clip C, int "top", int "blur", int "thresh")
{
    Assert(C.IsYV12 || C.IsYV24 || C.IsYV16 || C.IsYUY2,
    \  "ChromaDestripe: source must be YV12, YV24, YV16 or YUY2")

    top    = Max(0, Default(top, 160))
    blur  = Min(Max(2, Default(blur,  12)), 16)
    thresh = Min(Max(0, Default(thresh, 6)), 32)
    isYV12 = C.IsYV12

    U = C.UToY8
    V = C.VToY8
    Y = C.ConvertToY8
#return U

    tw = V.Width
    th = V.Height

    ## X = (highpass blurred anti-signal)

    xh = Max(1, Round(th / (isYV12 ? 4 : 16)))
    XU=U.BilinearResize(tw, xh, src_top=1, src_height=(th-2))
    \  .BilinearResize(tw, th)
    XV=V.BilinearResize(tw, xh, src_top=1, src_height=(th-2))
    \  .BilinearResize(tw, th)
#return XU

    ## H = highpass - find bold horizontal U & V edges

    HU=U.Subtract(XU).Invert.ColorYUV(cont_y=98)
    HV=V.Subtract(XV).Invert.ColorYUV(cont_y=98)
#return HU.Histogram

    ## M = mask - pass only areas with bold hor. U & V edges

    MU=HU.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ")
    MV=HV.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ")
#return MU

    MU=MU.mt_expand
    \    .BilinearResize(tw/4, th/4)
    \    .mt_expand.mt_expand
    \    .BilinearResize(tw, th)
    MV=MV.mt_expand
    \    .BilinearResize(tw/4, th/4)
    \    .mt_expand.mt_expand
    \    .BilinearResize(tw, th)
#return MU

    ## restrict mask to "top" pixels

    top = (isYV12 ? top / 2 : top)
    MU = (top<=0 || top>=th)
    \      ? MU
    \      : MU.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top)) 
    MV = (top<=0 || top>=th)
    \      ? MV
    \      : MV.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top))
#return MU

    ## B = chroma blur

    nh = Max(1, Round(th / blur))  / (isYV12 ? 1 : 2)
    BU=U.BilinearResize(tw, nh, src_top=1, src_height=(th-2))
    \  .BilinearResize(tw, th)
    BV=V.BilinearResize(tw, nh, src_top=1, src_height=(th-2))
    \  .BilinearResize(tw, th)
#return BU

    ## use blurred chroma in areas of high variation

    U=U.Overlay(BU, mode="blend", opacity=1.0, mask=MU)
#return U
    V=V.Overlay(BV, mode="blend", opacity=1.0, mask=MV)

    YToUV(U, V, Y)
    return (C.IsYUY2) ? ConvertToYUY2 : Last
}

and to call the function

ChromaDestripe(top=576, blur=1)


All times are GMT -5. The time now is 06:45 PM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.