VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Hi guys. I ran into a weird problem. If I scale a video down or keep it at the original height (480, DVD source) the color is fine, but if I scale it up the colors shift. Reds take on a yellow or greenish tint, skin tones take on a purplish tint, blues turn greenish. Here's some screenshots to show you what I mean. It's from the DVD music video featuring Yoko (Gurren Lagann). Each shot was taken then resized to 848x480 to make it easier to see the colors. Look at her hair and shirt, skin color, even the clouds.

    http://www.mediafire.com/?98qdw49729z6u

    There's also an example of why I'm trying my hand at upscaling (the two screens comparing the .vob blown up and the result after it's filtered). Since the upscale looks pretty good in my eyes I'd like to solve this issue with the colors if possible. I've eliminated the filters as the cause, and it's not the resizing method either, they all do it. If I play the .vob itself and scale it up while playing the colors change, so it's not the encoder.

    While I'm here I have a related question about avisynth. Some filters run incredibly slow (0.4fps) which appears to be because they're not multi-threaded. Is there a way to make them use all the cores? Something like the 64-bit avisynth or something? I've read somewhere that it can use more than one core, but I don't know how it all works.
    Last edited by star099; 13th Mar 2011 at 04:14.
    Quote Quote  
  2. many media players will display using rec709 instead of rec601 if width>1024 . The standard is to use rec709 for HD content , rec601 for SD content. It's going to depend on many variables and how you have your graphics card, media player etc,, set up . You will see a slight shift in colors if Y'CbCr material is displayed (i.e converted to RGB for display) with the wrong matrix

    So to upscale from sd source, you would use colormatrix(mode="rec.601->rec.709",clamp=0) . This alters the actual data, not like setting a flag in the bitstream (e.g. if you used x264). Some media players ignore color matrix flags, but you cannot ignore actual data so this is what you should be doing (it still won't hurt to set the rec.709 flag in x264 VUI )

    for multithreading you can try MT , but some filters may crash , or you may get inconsistent results (frames in the wrong place)
    http://avisynth.org/mediawiki/MT
    Quote Quote  
  3. Thanks. I'll give that a try and see how it turns out.
    Quote Quote  
  4. Played around with it some more and it turns out it's not the player or the setting, it's the video card. I'm guessing that means there's nothing I can do to change it, right? If I play it with DXVA on the colors will be like that. (my card, if it matters is an ATI Radeon 4850).

    On the other issue, the MT thing seems a little too much for my skills. But I noticed that the filters I used already had something like it in there. It has a "setmtmode(2)". Does that mean it's already trying to multithread but it isn't working or something?

    Aside from the LoadPlugins and Imports, this is what the avs script looks like:

    Code:
    MPEG2Source("C:\KIRAMEKI_YOKO_BOX\VIDEO_TS\vob cut2.index\vob cut2.d2v",cpu=0,info=3)
    ConvertToYV12(interlaced = true)
    
    TFM(order=-1).TDecimate(hybrid=1)
    
    
    setmtmode(2)
    setmemorymax(768)
    
    toon(0.2) 
    
    asharp(3.0,3.0,0.25,hqbf=true)
    Warpsharp(depth=90)
    
    maa()
    
    source = last
    preNR = source.fft3dfilter(bw=32,bh=32,ow=16,oh=16,bt=5,sigma=2.5,sigma2=1.8,sigma3=1.5,sigma4=1.2,plane=0)
    preNR_super = preNR.MSuper(pel=2, sharp=2, rfilter=2)
    source_super = source.MSuper(pel=2, sharp=2, levels=1)
    vb2 = MAnalyse(preNR_super, isb=true, truemotion=true, delta=2, blksize=8, overlap=4, lambda=1000, search=3)
    vb1 = MAnalyse(preNR_super, isb=true, truemotion=true, delta=1, blksize=8, overlap=4, lambda=1000, search=3)
    vf1 = MAnalyse(preNR_super,isb=false, truemotion=true, delta=1, blksize=8, overlap=4, lambda=1000, search=3)
    vf2 = MAnalyse(preNR_super,isb=false, truemotion=true, delta=2, blksize=8, overlap=4, lambda=1000, search=3)
    maskp1 = MMask(vf1, kind=1, ysc=255).UtoY()
    maskp2 = MMask(vf2, kind=1).UtoY()
    maskp3 = MMask(vb1, kind=1, ysc=255).UtoY()
    maskp4 = MMask(vb2, kind=1).UtoY()
    maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)
    source2 = mt_merge(source,preNR,maskf)
    source2.MDegrain2(source_super,vb1,vf1,vb2,vf2,thSAD=180,thSCD1=240,thSCD2=115,limit=200)
    LSFmod(defaults="slow",strength=100).HQDering()
    Gradfun2dbmod(thr=1.4,thrC=1.8,str=0.8,strC=0.2,temp=60,adapt=64)
    I tried setmtmode(4) to see if it had any effect but it didn't. The process running is avs4x264.exe, and it still only uses the one core (25% of the CPU on a quad core system). I tried a different encoder and got the same thing, avs2yuv.exe only using 25%.

    Thanks for the help so far. At least I'm closer to understanding what's going on.
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by star099 View Post
    On the other issue, the MT thing seems a little too much for my skills. But I noticed that the filters I used already had something like it in there. It has a "setmtmode(2)". Does that mean it's already trying to multithread but it isn't working or something?
    It shows you must be running the multithreading version of Avisynth - otherwise you would get an error on that line. However, for multithreading to kick in, the (first) call to setmtmode must come before any filters are invoked.

    Source filters normally require mode 5, so add setmtmode(5) as the first line of your script, before calling MPEG2Source. (Keep your later setmtmode(2) too.)

    If adding setmtmode(5) still does not work, try adding a call to Distributor() at the end of the script as well. Some encoders require this for multithreading to work.
    Quote Quote  
  6. It's working! I wonder why it isn't automatically set to use more cores. At least now it's getting over 1fps. All that's left I guess is to figure out if there's any parts of the filters I can do without. I imagine some just are that slow. So unless you know which parts are particularly sluggish (it's mostly premade so that's why I don't know what exactly does what) I think that answers my questions. Thanks guys!
    Quote Quote  
  7. Originally Posted by star099 View Post
    Played around with it some more and it turns out it's not the player or the setting, it's the video card. I'm guessing that means there's nothing I can do to change it, right?
    Have you tried changing the video proc amp settings?
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Have you tried changing the video proc amp settings?
    Hmm, how would I do that? (Google wasn't much help) The thing is, I noticed this happening on more than one video card. My last computer did the same. I was using the 9600GT in that one. If you just mean adjusting the tint and such in a video card control panel, I've tried adjusting a screenshot without success. I'm pretty sure it's not just the tint. If I get the reds back away from being too orangey the skin color is off. If I get the clouds back to blueish instead of green everything else is off. That's why I don't quite understand just what the shift is.
    Quote Quote  
  9. Originally Posted by star099 View Post
    Originally Posted by jagabo View Post
    Have you tried changing the video proc amp settings?
    Hmm, how would I do that?
    Yes via the graphics card's setup applet. Make sure you change the video proc amp, not the Desktop proc amp. You don't want your Desktop getting funny colors.

    In my experience AMD, NVIDIA and Intel can all have problems with video. Be sure you turn off all the image enhancement options (auto contrast, color, denoise, edge enhancement, etc.). That goes for your monitor too, if it has such options. All they do is screw up the picture. You should also try using different output devices -- Overlay Mixer, VMR7, VMR9, EVR, etc. Maybe you can find one that works right.
    Quote Quote  
  10. Originally Posted by jagabo View Post
    Yes via the graphics card's setup applet. Make sure you change the video proc amp, not the Desktop proc amp. You don't want your Desktop getting funny colors.

    In my experience AMD, NVIDIA and Intel can all have problems with video. Be sure you turn off all the image enhancement options (auto contrast, color, denoise, edge enhancement, etc.). That goes for your monitor too, if it has such options. All they do is screw up the picture. You should also try using different output devices -- Overlay Mixer, VMR7, VMR9, EVR, etc. Maybe you can find one that works right.
    The color problem exists on both my plasma TV and my monitor, so I'm certain it must be the cards. I just got this one less than a week ago as well, so far I haven't found any detailed options for it. Only some useless basic ones (using the "advanced" mode of the ATI Catalyst Control Center). The NVIDA cards have a much more accessible control panel. I'm using Windows 7, in case anyone knows where to find options for my card. Assuming I do find it though, what would I change? The tint doesn't work. I'll turn of any auto-settings I come across. I can live with it though. But I'll try the different overlay options in Media Player Classic, since I bet those will make a difference. Thanks again.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!