PDA

View Full Version : edit DVDAuthor-created menu overlay colors?


FredThompson
6th March 2004, 01:20
Does anyone know how to change the selection overlay colors in VIDEO_TS.IFO for DVD Author-created IFO sets?

I've got an app which makes white text menus with a red selection overlay. However, this doesn't always work, especially on backgrounds with lots of red.

This is a non-commercial product created by me so I can certainly provide the IFO and VOB if anyone thinks they can help.

violao
9th March 2004, 16:13
Originally posted by FredThompson
Does anyone know how to change the selection overlay colors in VIDEO_TS.IFO for DVD Author-created IFO sets?


This should not be difficult. Just edit the right value in color palette section of VTS_PGCITI/VTS_PGC_X of a PGC #X where your menu resides.

If you are talking about freeware dvdauthor application and you use spumux then all colors from your bitmaps will be automatically pased to dvdauthor. Alternatively you can specify your own palette with a parameter in xml control file for <pgc> tag, palette="file.txt", where file.txt is a text file representation of YCrCb palette, or alternatively colors can be entered in RGB format in which case the file's extension must be .rgb

FredThompson
9th March 2004, 22:16
I see the color tables in VIDEO_TS.IFO but can't seem to figure out how to determine a color value given an RGB "pick" from a paint ap. Any ideas on that?

Might you know where to get good docs for DVDAuthor 0.6.9? The "home" site doesn't really have much to explain what's changed.

2COOL
9th March 2004, 22:28
Originally posted by FredThompson
Does anyone know how to change the selection overlay colors in VIDEO_TS.IFO for DVD Author-created IFO sets?You might want to look into MenuEdit. Since version 2.2.0, a feature to edit the button color table index has been implemented. http://menuedit.dimad.net/news.html

There's no guide on this so I can't tell you what the values mean. Sorry, I for one don't have the need to use this feature yet.

violao
10th March 2004, 16:43
Originally posted by FredThompson
I see the color tables in VIDEO_TS.IFO but can't seem to figure out how to determine a color value given an RGB "pick" from a paint ap. Any ideas on that?

Might you know where to get good docs for DVDAuthor 0.6.9? The "home" site doesn't really have much to explain what's changed.

Unfortunately no, but there is a mailing list dvdauthor-users@lists.sourceforge.net where it's author often responds to questions.

Is this what's bothering you:
R = Y + (1.4075 * (V - 128));
G = Y - (0.3455 * (U - 128) - (0.7169 * (V - 128));
B = Y + (1.7790 * (U - 128);

Y=Y
U=Cb
V=Cr

FredThompson
10th March 2004, 17:50
Whoa, that's cool. Thanks. Yes, I'd like to be able to take the set of existing values, see what the colors are and convert to/from RGB. This might just be the ticket. Thanks.

FredThompson
16th March 2004, 02:20
A couple of those have missing closing parenthesis. Are these correct?

R = Y + (1.4075 * (V - 128))
G = Y - (0.3455 * (U - 128)) - (0.7169 * (V - 128))
B = Y + (1.7790 * (U - 128))

What are the inverse formulas, YUV->RGB?

(yeah, yeah, I know, solving for multiple variables. I tried. My brain's too old for that.)

violao
16th March 2004, 11:22
Actually there are too many of them:

R = Y + 1.4075 * (V - 128);
G = Y - 0.3455 * (U - 128) - 0.7169 * (V - 128);
B = Y + 1.7790 * (U - 128);

Y = R * 0.299 + G * 0.587 + B * 0.114;
U = R * (-0.169) + G * (-0.332) + B * 0.500 + 128;
V = R * 0.500 + G * (-0.419) + B * -(0.0813) + 128;

FredThompson
16th March 2004, 13:59
The parentesis enforce precedence so I'd like to leave them in. There's a risk of improper results depending on how a language is written.

Are these correct?

R = Y + (1.4075 * (V - 128))
G = Y - (0.3455 * (U - 128)) - (0.7169 * (V - 128))
B = Y + (1.7790 * (U - 128))

Y = (R * 0.299) + (G * 0.587) + (B * 0.114)
U = (R * (-0.169)) + (G * (-0.332)) + (B * 0.500) + 128
V = (R * 0.500) + (G * (-0.419)) + (B * -(0.0813)) + 128

Those are a little sloppy, too, not exactly proper but probably good for programming.

I've just put together an Excel spreadsheet to help with IfoEdit modification of overlay colors. This will help a lot.

Maybe there's a way to use the RGB values to set the color of a cell. That would be great.

Will post the spreadsheet as soon as that part is working.

2COOL
22nd March 2004, 06:18
@FredThompson

I found this thread (http://www.dvd-replica.com/DVD/color.php) and this should help you greatly with your quest. ;)

FredThompson
22nd March 2004, 07:24
Thanks

FredThompson
22nd March 2004, 23:18
Well, I've tried that page and the formulas are incorrect. Additionally, the linked reference doesn't work.

If you want to see what I mean, try these values in the calculator: Y=0 Cr=128 Cb=0

According to the formulas, the returns should be R=0 G=0 B=0

Something isn't correct with that page.

Sigh...

dnetzero
27th March 2004, 00:32
1. I just checked the ITU link, it works fine. ITU gives you two *free* articles, so get the appropriate guides, if you can.
2. The precedence of * is higher than + and - so the parentheses are not necessary.
3. Y=0, Cr=128, Cb=128 yields R=0, G=0, B=0. Your computation is incorrect (Y=0, Cr=128, Cb=0).
4. RGB color space is smaller than YCrCb color space.
Conversions between the two color spaces are approximations. YCrCb to RGB produces more errors. Use the display color as your guide. If the display color is okay, the conversion is working. Please double check your computation before making an assertion that something is wrong.

FredThompson
27th March 2004, 03:12
Clicking on the ITU links goes to a logon page. I don't see anything about free downloads.

The formulas are not proper because they're written with common computer programming language precedence, not proper math formulas. That's not explained nor is any aspect of subset restrictions. Type the formulas into Excel and see what happens.

B = Y + 1.7710 * (Cb-128)

is equivalent to:

B = Y + (1.7710 * (Cb-128))

With these values: Y=0, Cr=128, Cb=0

B = 0 + (1.7710 * (0-128))

B = 0 + (1.7710 * (-128))

B = 0 + (-226.688)

B = -226.688

That's not a legal value for B.

What evidence do you have I didn't go through this a number of times? If I've missed something, point it out to me, don't be condescending.

dnetzero
27th March 2004, 04:27
Okay, Fred, I wrote the reply in such a hurry so I did not realize the short notes created such a bad effect that makes you feel bad.

My apologies to you in this case since I absolutely have no such intention. Another problem on my part is that I am not a regular contributor to this forum which may amplify this misunderstanding!

I came from a heavy C/C++ background so I did not realize either that the parentheses are needed for non-C folks. The pages have been out for a few good months with good visitors and no major complaints, so I assume that we are doing okay (explaining, that is).

Since the YCrCb color space is larger than RGB, some values during the conversion may be greater than 255 or become smaller than 0. In this case the conversion formula needs to clip the values at 0 or 255 accordingly. Because of this problem, converting back and forth between color spaces induce errors. The picture also appears brighter in the RGB color space. YCrCb images containing values which cannot be represented in RGB creates blurred artifacts if clipping is excessive (this is a fairly complex topic).

I do hope that you feel better and get this formula working for you.
Best Regards,

FredThompson
27th March 2004, 04:58
Ah, I understand now.

I didn't think you were intentionally being brusk.

I've been working on an Excel spreadsheet to do the color conversions with 16 values. The idea is it would be helpful for manual editing of DVD overlays and the "live" updates of Excel are quite nice.

Those pages are wonderful, btw. It's a great reference site.