Forum Index


Support myDVDEdit

Register Register
Log in Log in

Search Search
FAQ FAQ



--- Links ---
MacEtVideo
VideoHelp
Forum Mac-Video
 
Button is not highlighted
Forum Index -> Questions
Reply to topic
View previous topic :: View next topic  
Author Message
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Mon 09 Feb 2009, 22:23 Reply with quote

Hi!

I'm not sure whether or not someone can help here. I created a DVD Image using Sizzle, which is a front end to dvdauthor.

It works quite well, except for one issue. The first button is never highlighted.

I could't find any difference between the 5 buttons I have and I'm wondering where to look for the source of the problem.

I also don't understand how the frames around non-highlighted buttons are created. When look at the menu in myDVDEdit, there are no frames, but when I test the DVD, there are black frames. So something in the structure of the DVD makes DVD Player draw the borders.

Does someone have a link where I can read more about how buttons and menus on DVDs work?
Back to top
View user's profile Send private message
Jerome
Administrator
Administrator   



Joined: 18 Jul 2005
Posts: 465
Location: France

PostPosted: Tue 10 Feb 2009, 10:30 Reply with quote

Maybe should you read myDVDEdit overview, chapter 7

Jerome
Back to top
View user's profile Send private message Visit poster's website
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Tue 10 Feb 2009, 23:02 Reply with quote

Thanks Jéromê! It helped a bit.

Do I understand correct: When a button is not selected nor activated, it's drawn with the colors shown on the "Subpictres" tab, using the Opacity shown there? Is there any way I can change the values shown there?
Back to top
View user's profile Send private message
Jerome
Administrator
Administrator   



Joined: 18 Jul 2005
Posts: 465
Location: France

PostPosted: Thu 12 Feb 2009, 16:28 Reply with quote

Yes

1) You have a subpicture coded with 2 bits by pixel. Generaly, with menus, all colors are set with opacity 0 (transparent)
2) You have a button table. each button have a rectangulare area and 2 tables of colors. One color table for the selected mode, one color table for the activated mode.

When a button is selected or activated, only the zone in the subpicture corresponding with the button area is displayed and using the corresponding state color table.

If you want to change the color
- You can change the color in the palette tab.
- You can change the color table of each button for each mode.

But you cannot change the color table of the subpicture.

Jerome
Back to top
View user's profile Send private message Visit poster's website
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Thu 12 Feb 2009, 16:52 Reply with quote

Jérôme wrote:
Yes
[...]
But you cannot change the color table of the subpicture.

Because myDVDEdit doesn't allow me to, right? Can you give me a hint where in the file those informations are stored? I have no problem using a hex editor, if I only knew where to patch.
Back to top
View user's profile Send private message
Jerome
Administrator
Administrator   



Joined: 18 Jul 2005
Posts: 465
Location: France

PostPosted: Thu 12 Feb 2009, 18:09 Reply with quote

As you can read it in my overview, the DVD structure is not really simple, and the subpicture stream format follow this rule.

I cannot give you any adress or offset because this information is lost in a very complicated dynamic structure.

it is describe here

but first you have to find the subpicture stream sector. To do that:
- Select the object with the subpicture
- Leave the mouse on the the screen position text (just above the screen). A tooltip must apeare that give you the file name and the sector offset of this object
- clic on the little screen icon above the screen, on the right of the 16:9 icon. The screen must pass the the data format
- look for the first Subpicture stream Pack and add it position to the offset you already have.

Now you have the sector offset of the subpicture stream. As a sector is 2048 bytes, you have now the offset of the stream from the begin of the file.

- jump the mpeg header describe here now you really have the subpicture data.

- Jump to the SPUH structure
- Jump to the first SP_DCSQT table
- Continue to the next SP_DCSQT table until you find the SET_COLOR and the SET_CONTR tables.
- Congratulation, you get it.

Warning. a sector is only 2048 bytes. if a jump is bigger that this size, you have to continue in the next sector (with also a MPEG header) that is not necessarily the following sector, and in the same file. You have to get the next subpicture pack offset in the pack table shown previously.

Good luck, you'll need it.

Jerome
Back to top
View user's profile Send private message Visit poster's website
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Thu 12 Feb 2009, 20:32 Reply with quote

Luck didn't help me Wink

Let's see whether or not I got it right.

This is the popup:


This is the data view. There is no subpicture stream pack. Did you mean a Video Pack?


If so, the offset is 0 and this should be the Hexview:


There we have an MPEG PACK Header (00 00 01 BA) But where is the SPUH structure?

P.S.: I hope the pictures will stay online for a while.
Back to top
View user's profile Send private message
Jerome
Administrator
Administrator   



Joined: 18 Jul 2005
Posts: 465
Location: France

PostPosted: Thu 12 Feb 2009, 22:12 Reply with quote

no no

1st step => sector 0 OK
2d step => the subpicture 0 pack offset is 2

0 + 2 = 2
2 * 2048 = 4096
the subpicture pack have the byte offset 4096 (adress $00001000 in hexa)

You should find
00001000: 00 00 01 BA - Pack header + 10 bytes
0000100E: 00 00 01 BD - Private Stream 1
00001014: 07 EC - PES length (2048 - previous bytes length)
00001016: xx xx lg - extension

lg give you the lengh of the extension, jump the lg next bytes

00001019 + lg: privateId = 0x20 + subpicture Id

for subpicture 0, this byte must be 0x20

OK. Here is the start of the subpicture data
+0 : SPDSZ - the size of the subpicture data
+2 : offset to the first SP_DCSQT

this offset can be bigger than the size of the rest of the sector (0x0800 - first byte offset of the subpicture data). In this case, you must subtract this value from this offset and find the byte in the next subpicture pack
ex:
if the subpicture data start at address 0x00001020, and at this address the next bytes are
00001020 11 B2 11 99
the total subpicture data length is 0x11B2 (4530 bytes) and the offset is 0x1199
as this pack finish at address 00001800, 0x1800 - 0x1020 = 0x07E0
0x1199 is bigger then 0x07E0
the first SP_DCSQT is 0x1199 - 0x07E0 = 0x09B9
go to the next subpicture pack.
you will find the Pack header, the private1 header but generaly with a short extension
the subpicture data continuation address is generaly packAddr + 0x0018
0x0800 - 0x0018 = 0x07E8
the offset stay bigger. Here we go again

0x09B9 - 0x07E8 = 0x01D1 ok, this must be good this time
go to the next subpicture pack
jump all the headers + the SP_DCSQT offset
ex: if the start pack address is 0x00003000
0x00003018 + 0x01D1 = 0x000031E9

SP_DCSQT
+ 0 : xx xx - delay to wait before executing these commands
+ 2 : nn nn - offset within the Sub-Picture Unit to the next SP_DCSQ (oh yes, from the first byte of the subpicture data), If this offset is the offset to itself, it's the last SP_DCSQ

the rest can change, depending of your subpicture
ex:
+4 : 00 - Forced Start Display
+5 : 03 (e2 e1) (p b) - Colors (3 bytes) each nibble (4 bits values) is the color index in the palette for each 2 bits/pixel combinaison (Emphasis1, Emphasis 2, Pattern and Background)
+8 : 04 (e2 e1) (p b) - Contrast (or transparency), each nibble is the contrast level 0= transparent, 0xF = opaque
...

I hope I have been clear.
Back to top
View user's profile Send private message Visit poster's website
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Thu 12 Feb 2009, 22:54 Reply with quote

You're a miracle Wink Thanks for the extensive explanation, I think I get it now.

Slight correction: It's not 1014 but 1012 where I find the 07 EC. So 1014 is where the xx xx is (bytes to ignore, right?). and then there is 08 in my cae, meaning the subpicture starts at 101f.

I'll try to find the rest later. It's a bit late now. Thank you again!
Back to top
View user's profile Send private message
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Sat 14 Feb 2009, 18:35 Reply with quote

I got it thanks to your fabulous help.

Again I made some snapshots! Could you please copy the images to your server? Currently they are hostet at apfeltalk.de and I don't know, whether or not they will keep them up for long.

The next 2 snapshots explain a bit what I did.

As you already said, in the data view (Snapshot some posts above) we see that the 2nd and 3rd entry are subpictures, meaning these packs start at offsets 1000 and 1800 in the file (0800*2 and 0800*3).

This is the snapshot of 1000:

In red we see the mpg headers.

the blue 08 is the lg you meantioned and I skipped the following 8 bytes (blue underline)

The following 20 is the start of subpicture 0.

Green are SPDZ (0c2e) and the offset of SP_DCSQT (0c16).

The "PostIt" show the arithmetics, I did, following your example: 1800 (end of this pack) - 1020 (start of data) gives the remaining length in this pack: 07e0.

subtracted from the offset 0c16, we get the offset 0436 in the next pack, which is in the next sector.

Already shown is the next step, adding the offset to the actual start (1818).

Here is the snapshot of the next pack:


The delay to wait is 0000 (green)

Next SP_DCSQ is at 0c16, meaning, it's this one, so it marks the end.

In orange we se 00, the FSTA_DSP - Forced Start Display

in red we see command 03 SET_COLOR with it's 2 argument bytes.

following in blue my target! Comamnd 04 SET_CONTR

I changed
04 ff f0
to
04 ff 00
and voila! My frames around the buttons, when not selected, nor active are gone!

Coud you implement this feature in the next release of myDVDEdit, please?
Back to top
View user's profile Send private message
Jerome
Administrator
Administrator   



Joined: 18 Jul 2005
Posts: 465
Location: France

PostPosted: Sun 15 Feb 2009, 00:59 Reply with quote

Not on the next one
I'm working hard on it and I have a lot of things to do before having a release version.
I will try to think about it for the next after this one.

Jerome
Back to top
View user's profile Send private message Visit poster's website
Skeeve
Beta tester
Beta tester   



Joined: 29 Dec 2008
Posts: 99

PostPosted: Sun 15 Feb 2009, 11:30 Reply with quote

Jérôme wrote:
Not on the next one
I'm working hard on it and I have a lot of things to do before having a release version.

Okay. Sorry to hear that, but good to hear there is a new version in the pipe.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Forum Index -> Questions Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

Powered by phpBB © 2001, 2017 phpBB Group