It is currently Mon Nov 20, 2017 11:33 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Fri May 30, 2014 10:22 am 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
Drag wrote:
If I can dig up the PAL definitions of RGBW and add YUV decoding, I can hypothetically create a PAL palette generator too, but I'd have no way to compare it against a real TV.
The PAL definitions (among many others) are helpfully included in the H.264 specification, annex E, section E.2. Table E-3 contains the RGBW coordinates, table E-4 contains the gamma conversion functions, and table E-5 contains the YUV/RGB transformation coefficients. Of course, you have to know which version of NTSC/PAL you're implementing, since many of those values were redefined over the years... (edit: these may also be helpful.)

I'm kind of surprised you don't already have YUV decoding as an option; most analog (and all digital) NTSC televisions use YUV decoders.


Last edited by Joe on Fri May 30, 2014 11:02 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri May 30, 2014 10:54 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
I think for solid colors, YUV and YIQ decoding are equivalent.


Top
 Profile  
 
PostPosted: Sat May 31, 2014 10:13 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Palette generator updated. Now includes the ability to save your palette to a file, hopefully.

Older version with the stuff I removed in the newer version is still available here for ~historical~ purposes. :D


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 1:06 am 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
After playing around with this a bit, I found that the default settings, but with sat = 0.9, bri = -0.18, and con = 1.18, gives me a palette that's extremely close to my TV, just with less saturation in certain colors (but that's really unavoidable).

I dunno, try it out, this works for me, but may not work for everyone else. :P

You actually don't need to touch the gam setting, it looks like the gamma is somehow correct even without adjusting it.

Edit: Updated again, there was a small bug with the contrast setting.


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 3:36 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Another update.

I found out that one of my older color clipping methods actually matched my TV a lot better than the desaturate setting. I also needed to apply some kind of clipping to the RGB that comes out of the YIQ->RGB equation because having an unbounded positive range is technically incorrect. Either way, with these changes, the setting {darken, -0.25 hue, 0.7 sat, -0.2 bri, 1.2 con, 1.0 gam, fcc} looks nearly identical to my TV, especially since the colors don't wash out now. The best example of this is the SMB title screen, on my TV, the sky is a lot darker than the white text, although much more colorful.

Edit: Just needed one more tweak to the hue setting.


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 4:45 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
Real cool.


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 9:04 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Just wanted to say I appreciate the work you're doing on this! :mrgreen:


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 10:15 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Thanks guys!

I added another colorimetry option where it's FCC's color primaries and sRGB's white point. This seems to be a closer match for my TV. I'm torn between darken and desaturate; darken preserves the hue, but the relationship between the colors is wonky. desaturate preserves contrast at the expense of lightening certain colors. I guess without any way to literally make the colors more vibrant, this will have to do.


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 11:57 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
One last update for tonight, you can toggle the text on and off, and I changed the default parameters to the ones that work best for me personally, just so people don't blindly open up my palette generator and use the godawful baseline parameters thinking it's a good palette. :P

Do RGB monitors (like ones in coin-ops) use similar primaries to the FCC spec, or something different? I was just thinking that I could use the same math to generate RGB palettes, or LUTs for them anyway. Hell, this is even one tweak away from also generating Atari 2600 palettes, hypothetically. :P


Top
 Profile  
 
PostPosted: Tue Jun 03, 2014 2:29 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Just made some UI updates, you can hide the CIE graph if it takes up too much space, and now there are +/- buttons beside the tuning controls.


Top
 Profile  
 
PostPosted: Tue Jun 03, 2014 2:31 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6447
Location: UK (temporarily)
Drag wrote:
Do RGB monitors (like ones in coin-ops) use similar primaries to the FCC spec, or something different?
Yeah, it's the same phosphors as an ordinary television, so the X,Y should be the same.


Top
 Profile  
 
PostPosted: Tue Jun 03, 2014 5:48 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Perfect. Thank you! :D


Top
 Profile  
 
PostPosted: Tue Jun 03, 2014 6:58 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
I have a couple of suggestions now:
{-0.25, 0.7, -0.2, 1.2, 1.0} (default settings when you first open the palette generator)
This is very very close to my own TV's output. This is pretty good for just playing games and every day casual use.

{-0.25, 0.8, -0.2, 1.0, 1.0}
This is a slightly darker palette, but represents the colors a lot more faithfully, for instance, I can actually tell what hues the lightest colors are, just like I can with my TV. If you're looking to design some graphics and you really need an accurate representation of the colors and how they contrast against each other, this is what I'd recommend. Even though I said this palette is darker, you don't even notice unless you have something BRIGHT WHITE open next to your emulator.

{0, 0.7, -0.1, 1.1, 1.0}
This is something BMF came up with when he compared against an old 1982 composite monitor. Since said monitor is so old and designed for computers and not for TV signals, you could argue that it follows the FCC standard a bit more strictly, which is evidenced by the fact that a hue adjustment of 0 looked correct.

Finally, I think my TV does some kind of flesh tone boosting. Not only do I need a -0.25 hue tweak to get the colors to look right, a lot of the non-green/blue colors are really warm and reddish.


Top
 Profile  
 
PostPosted: Tue Jun 10, 2014 6:52 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
You can now specify a custom colorimetry instead of the four that I put in. Changing the color primaries doesn't appear to be as useful as changing the white point is. I think my TV uses a different white point because gray looks different compared to what gray looks like on my screen here. Specifically, gray on my screen looks bluer than gray on my TV, which looks more yellowy. Using D55 seems to be an improvement, but I don't want to say anything until I actually compare some games. I'm pretty sure the white point varies between TVs because I also have a small Sony Trinitron that is extremely yellow, like warmer than D50.

By the way, changing the white point between D50, D55, D65, and D75 is kinda like changing the color temperature on your monitor.

Edit: I just checked, D55 indeed gives me some stronger reds and better grays that aren't as bluish. Also, in case anyone has no clue what I'm talking about, I'm using the coordinates from here for the white points. C is the standard for the original FCC, D65 is what everyone uses nowadays.


Top
 Profile  
 
PostPosted: Sat Jul 05, 2014 6:33 pm 
Offline
User avatar

Joined: Fri May 21, 2010 4:10 pm
Posts: 279
This is all very interesting drag! Thanks for everything you have put in.

One question, i tried your settings of:

{-0.25, 0.8, -0.2, 1.0, 1.0}
This is a slightly darker palette, but represents the colors a lot more faithfully, for instance, I can actually tell what hues the lightest colors are, just like I can with my TV. If you're looking to design some graphics and you really need an accurate representation of the colors and how they contrast against each other, this is what I'd recommend. Even though I said this palette is darker, you don't even notice unless you have something BRIGHT WHITE open next to your emulator.

i tried using this palette on my tv, as i play through a console emulator, and was wondering, the saturation seemed perfect to me with this setting, but it was very very dark on the tv. Anything i can try to have some sort of heavy saturation with the darker colors i remember nes having, but in some way be able to be able to have everything a little brighter, it was just a little too dark and some things on the screen were hard to see.

anyways, great work man! :beer:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group