Jump to content


Photo

Washed out image using VMR9


  • Please log in to reply
92 replies to this topic

#1 RegWizard

RegWizard

    Admin

  • Admin
  • PipPipPipPipPip
  • 682 posts

Posted 29 January 2007 - 06:47 AM

When using VMR9 under certain system configuration, you may notice that your image doesn't look quite right. Blacks appear as drak greys and whites appear bright greys. Basically, you're not getting the full contrast range.

The cause of this problem lies with problematic display drivers not being able to convert the color range used in compressed formats (YUV) into the color range used by PC monitors/LCD/Plasma TVs (RGB).

There are several workarounds. Here is what NVIDIA had to say:

From NVIDIA Driver v93.71 release notes

Video color-space range for DVI-only* outputs is erroneously set to
standard mode (16-235) instead of extended mode (0-255).

A new detection feature to apply Standard CSC mode to TV outputs
(including NTSC, PAL, 480i, and 576i), included DVI-only outputs by
mistake.

Note:
The driver correctly applies extended mode to analog outputs, and
standard mode to TV outputs (including NTSC, PAL, 480i, and 576i).
A future driver release will correct this and apply the extended-mode color
space to DVI-only outputs.

You can work around this issue by forcing either standard or extended mode
as follows:
* "DVI-only" means only one display is connected, and it is to the DVI output.


1. Launch regedit and determine the current primary display card by looking in
"HKey_Local_Machine\Hardware\DeviceMap\Video"
and note the GUID (global unique identifier assigned by Windows),
which is the long string in brackets { } at the end of the entry
"\device\video0".
2. Look in
"HKey_Local_Machine\SYSTEM\CurrentControlSet\Control\Video\{GUID}000"
where {GUID} is the number derived from the previous step.
3. Open the "0000" directory and create a new DWORD called
"VMRCCCSStatus" and give it a value of
0x3 - to force use of the standard YUV range of 16-235
0x1 - to force use of the extended YUV range of 0-255


Supposedly, ATI fixed this problem with their drivers in Catalyst v7.1

However, as you may know, the NVIDIA 9x.xx series of drivers have quite a few outstanding bugs, so another alternative is to use a video decoder based workaround.

For example, if you're using FFDShow to decode your content, in the FFDShow configuration dialog (under Output), you can specify the output formats. By limiting the output format to RGB32 (and unchecking everything else) the problem is fixed. The downside is additional CPU usage (about 2-10% on modern CPUs) and the loss of hardware color calibration.

For DVD, DScaler can also output to RGB32.

#2 Mrkazador

Mrkazador

    Adept

  • Members
  • PipPipPip
  • 194 posts

Posted 29 January 2007 - 08:52 AM

Why would you want to map Vmr9 levels to Overlay?
I've been using Catalyst 6.5 for a while now because of that problem, Vmr9->Overlay. I just installed Catalyst 7.1 and now Vmr9 levels are being shown correctly(16-235) using YV12 output. If I switch to using YUY2 Vmr9 levels are mapped to Overlay.

Sapphire X800gt Catalyst 7.1

#3 RuudG

RuudG

    Greenhorn

  • Members
  • PipPip
  • 24 posts

Posted 29 January 2007 - 11:18 AM

The Nvidia 93.71 driver doesn't have the level bug anymore. The inclusion of the registryhack in the release notes was a mistake.

#4 aydc

aydc

    Greenhorn

  • Members
  • PipPip
  • 44 posts

Posted 03 February 2007 - 01:32 PM

No, I'm using the latest nvidia driver for XP: 97.92 and the problem still exists. You can see it clearly if you compare the colors between VMR9 and Haali Renderer. VMR9 is washed out.

The trick above still works, but you have to use 0x3, not 0x1. After using the 0x3 trick, color quality of VMR9 became equal to Haali's Renderer on my system.

#5 aydc

aydc

    Greenhorn

  • Members
  • PipPip
  • 44 posts

Posted 09 February 2007 - 08:50 AM

I can now confirm that the washed out colors in VMR9 bug still exists under Vista with the latest nvidia drivers (100.59).

What's worse, VMRCCCSStatus trick doesn't work. So far under Vista, I've not found a way to correct this problem other than using Haali's Renderer. So if you're wondering whether to upgrade to Vista or not, I advise you to hold on to XP for a while at least.

#6 Guest_Spooon69_*

Guest_Spooon69_*
  • Guests

Posted 15 February 2007 - 01:44 AM

The VMRCCCSStatus trick didn't work for me either (using 93.71 here), until I swapped what the release notes said and it worked! I had to use 0x3 for 0-255 instead of what the notes said, 0x1. Now VMR9 + PureVideo is finally possible.

#7 aydc

aydc

    Greenhorn

  • Members
  • PipPip
  • 44 posts

Posted 15 February 2007 - 03:00 PM

That's right. 0x3 works and 0x1 doesn't. That's for XP though. Under Vista, nothing works.

#8 Dirhael

Dirhael

    Greenhorn

  • Members
  • PipPip
  • 27 posts

Posted 16 February 2007 - 03:43 PM

I got tired of having to update my registry manually each time I installed a new driver for my Nvidia card, so I wrote a simple autohotkey script to do it for me. It simply finds the correct GUID in the registry, and adds the key.

Posted Image

Hope this simplifies things & makes it easier for someone :blush:

Attached Files



#9 aydc

aydc

    Greenhorn

  • Members
  • PipPip
  • 44 posts

Posted 16 February 2007 - 06:19 PM

Thank you dirhael. Works like a charm!

I'm a AutoHotkey fan myself. Could you post the source sometime?

#10 Dirhael

Dirhael

    Greenhorn

  • Members
  • PipPip
  • 27 posts

Posted 16 February 2007 - 07:49 PM

Thank you dirhael. Works like a charm!

I'm a AutoHotkey fan myself. Could you post the source sometime?


Happy to hear it worked for you :blush: The source? Sure, here you go:
;
; AutoHotkey Version: 1.x
; Language:	   English
; Platform:	   WinXP
; Author:		 Dirhael
;
;

#NoEnv; Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon
SendMode Input; Recommended for new scripts due to its superior speed and reliability.

MsgBox, 36, Nvidia VMR9 fix, Do you want to correct the video color-space range for the VMR9 surface (extended YUV range of 0-255, instead of 16-235)?`n`r`n`rMore details about this problem can be found here: http://forum.inmatrix.com/index.php?showtopic=5661
IfMsgBox, No
	Return

; Get the GUID from the registry
RegRead, OutputVar, HKEY_LOCAL_MACHINE, HARDWARE\DeviceMap\Video, \Device\Video0
if ErrorLevel
{
	MsgBox, 48, , Unable to locate the GUID key in your registry. Aborting...
	  ExitApp
}

RegExMatch(OutputVar, "{(.*)}", GUID)
	
; Write the new data to the registry
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Video\%GUID0, VMRCCCSStatus, 3
if ErrorLevel
{
	MsgBox, 48, , Unable to write to your registry. Aborting...
	  ExitApp
}
else
	MsgBox, 64, Nvidia VMR9 fix, Successfully updated your registry!`n`r`n`rYou may have to reboot your computer for the changes to take effect.


#11 ciphray

ciphray

    Greenhorn

  • Members
  • PipPip
  • 17 posts

Posted 09 March 2007 - 07:29 PM

this issue is also present in current nvidia vista drivers

Dirhael's script for fixing it worked fine on vista as well, and being as overlay doesn't work on vista at least with my nvidia card (gives a scrambled screen) i'm glad this workaround still works

#12 bLight

bLight

    Lead Developer

  • Admin
  • PipPipPipPipPip
  • 9496 posts

Posted 12 March 2007 - 01:35 AM

Good one Dirhael.

#13 hawky358

hawky358

    Greenhorn

  • Members
  • PipPip
  • 41 posts

Posted 19 March 2007 - 02:00 PM

Is this fix only for DVI or for any display?
After applying the registry entry the video is still the same washed out colour.
Any Ideas?

Little off topic: Is it possible to move vmr 9 video across displays like with overlay?

-Windows XP SP2
-Nvidia 93.71

#14 ciphray

ciphray

    Greenhorn

  • Members
  • PipPip
  • 17 posts

Posted 19 March 2007 - 06:44 PM

vrm 9 unlike overlay should show up on all of your screens at once if you clone it or like overlay if you sent it to the other screen

i've only tried it with dvi, and i noticed the difference immediately

you can also have ffdshow convert your color range from 15-235 to 0-255 if you set it that way in the levels control and use it as your decoder or post processor

#15 hawky358

hawky358

    Greenhorn

  • Members
  • PipPip
  • 41 posts

Posted 20 March 2007 - 08:38 AM

I got it working by forcing output to RGB32 using ffdshow. I'm not sure if this defies the purpose of the fix, but it works.

The moving to different dispay I was referring to was with dual view.
When I am playing on my primary I can move to secondary and it still plays (Overlay).

With VMR 9 when I move to secondary it gets that green screen and CPU 100%.
This, however only happens when using ffdshow. Using Xvid to decode works perfectly.

-Hawk

#16 RuudG

RuudG

    Greenhorn

  • Members
  • PipPip
  • 24 posts

Posted 20 March 2007 - 11:06 PM

I really don't understand it. The level bug is solved for me in v93.71, using VMR9 and a display calibrated for the 16-235 range. Why others still experience the bug beats me. I don't use the registry hack or ffdshow, just plain defaults.... ?????

#17 DanX

DanX

    Adept

  • Members
  • PipPipPip
  • 69 posts

Posted 22 March 2007 - 01:07 PM

Correct me if I'm wrong, but in applying that fix you would be crushin BTB and WTW information right ? (Blacker than black/Whiter than white)

This shouldn't be done, you should always have the full range and calibrate your DISPLAY to only show 16-235.
So the reason that the colors look "wrong" on your pc is because the source material is assuming you are watching it on a 16-235 calibrated display ( and not on a 0-255 range calibrated display as your PC ) which would make everything look washed out.

Clipping or expanding 0-255 levels is bad!
There is information there (mostly in WTW) that some people would want to keep by calibrating your display to show a little above 235 for example.

#18 ciphray

ciphray

    Greenhorn

  • Members
  • PipPip
  • 17 posts

Posted 25 March 2007 - 04:11 PM

Danx if you meant me then

as i understand it, if I had content that was designed for pc color levels that would be the case, but everything i watch uses tv levels, so displaying that on a pc level (0-255) means something that's black as it would be on a tv is going to be a bit gray and vice versa with white, what i'm doing is just expanding 15-235 into 0-255. i've compared it quite a bit to see if i was losing detail and using this level i have yet to see any lost, yet if i go even slightly higher then detail in blacks starts to vanish (every type of tv level calibration disc i've run has had me make blacker then black and whiter then white invisible compared to black and white so i can't see how anything in that area would be intended to be viewed unless i was misunderstanding the instructions)

#19 aydc

aydc

    Greenhorn

  • Members
  • PipPip
  • 44 posts

Posted 27 March 2007 - 11:56 AM

you should always have the full range and calibrate your DISPLAY to only show 16-235.


Dan, I'd be grateful if you could give a few tips on how we can do that. Could you post a few links on how we can achieve that?

#20 DanX

DanX

    Adept

  • Members
  • PipPipPip
  • 69 posts

Posted 27 March 2007 - 10:17 PM

To start with one must know if you are trying to calibrate levels for watching videos etc. on your PC display (CRT/LCD) or on a TV ( CRT/LCD/PLASMA etc.)

Since these are two very different takes on getting the "right" image.

If you're for example as me are using a htpc to drive a TV, you should either decide if the expanded level range on Overlay mixer bothers you enough to go VMR9 or not.

Expanded leves crush WTW/BTB information. (wtw is short for "whiter then white" and btb is short for "blacker then black )
But overlay is very fast and even though it crushes wtw/btb I prefer it to the very buggy vmr9.

If you go vmr9 with "TV" you SHOULD have the "washed out colors" effect.
This is infact not a bug or some error in brightness, vmr9 is simply displaying the full range but it's assuming you have a display calibrated to "VIDEO LEVEL" !

Video levels assume you have black at 16 and white at 235 ( + wtw/btb information for headroom ).
So when displaying this "greished washed out image on your "TV" you should use a calibration disk to adjust the settings on your TV!! so that it doesn't display anything below 16 or above 235 ( actually a little above 235 is ok since there is little more image information in wtw ) in doing this the image will look just as it was ment to.
No longer "washed out"

Now if you're watching all your videos etc. on your PC display/computer than you can use all the tricks and fiddle with all filters etc. to get the correct range on your PC ;)
Or just use Overlay since it always expands video levels to pc levels resulting in "correct" blacks and whites on your PC screen. ( But in doing so know that you "may" loose some "small" bit of vide informtation that was stored in the range that was below blac ( 16 ) or above peak white ( 235 ).

Most of those "fixes" and reg entries are made to expand the levels in vmr9 to show a "correct" image on a PC screen ( no washed out image ). but that "washed out" image is actually the correct one speaking in video levels ! ( it just doesn't look right because it needs your display to be calibrated to video levels )

Hope this clears it up a bit :)


>aydc

You need an calibration disk that displays patterns between 0-255.
Such disks are AVIA,GetGray etc. you could also use the THX calibration found on several DVD's, where you adjust you brightness so that you can only see 6 ( or was it 7? ) dark squares. ( instructions are provided )
Also you should have some testpatterns that help you adjust white level ( contrast ).
Basically you adjust your contrast/brightness on your display untill the picture only displays video levels.


Links:

Basic HTPC calibration guide
Brightness / Contrast calibration

Calibration disks:

AVIA's site
GetGray
DigitalVideoEssentials