PDA

View Full Version : Menu 4/3 pan-scan or 16/9 and Scenarist...


Kal
8th December 2003, 19:53
Hi everybody!

At the beginning, i wanted to make 2 menu. One for 16/9 TV and the other for 4/3 TV. Because 16/9 menu are resized by 4/3 tv and we needs to include another subpics for the resized menu (subpics arent resized by tv or media player).
So, i've got my two 16/9 menu associated to 2 different subpics (one for 16/9 tv and the other for 4/3 tv).
I've read that sprm 14 is modulo 1024 is aspect ratio of the tv is 16/9.

So my question is :

How can i know if sprm 14 is modulo 1024 in scenarist ? :eek:

Regards,
Kal

mpucoder
8th December 2003, 20:18
SPRM's are the same no matter what player or program you are using.
Bits 10 & 11, the quotient of division by 1024, are the preferred aspect ratio (user preference). The actual mode is in bits 8 & 9, which is what I guess you are referring to.
SPRM 14 modulo 1024 would then be:
0 = normal (either 4:3 on a 4:3 display or 16:9 on 16:9 display)
256 = Pan/Scan
512 = Letterboxed

You can also test these with the BC operator, since bits 8 & 9 cannot both be set.
if SPRM14 BC 256 ... test for Pan/Scan, etc.

mpucoder
9th December 2003, 03:08
These are in response to a PM, please see forum rule #10. Since others may be interested in the answers, I'll post this as a Q&A

Q: Well i cant see operator "BC" in scenarist. I don't know him in fact.
A: I keep forgetting about the two different mnemonics - in Scenarist the bitwise compare operator is '&' (the first operator in the compare listbox).

Q: So if the tv aspect ratio is the same that the video, we should have : sprm14 = 0. If the video is lettre boxed, i have sprm 14 =512 and must use another subpics.
A: That is correct modulo 1024, user preferences can add 3072 to SPRM14 (16:9 display is preferred)

Kal
9th December 2003, 16:09
Ok. So i've followed this script :
http://www.dvdstudiopro.ch/english/Advanced/SPRM/sprm5.html

I have :

MOV GPRM0,SPRM14
DIV GPRM0,256
And GPRM0,15 ; make bitwise and between GPRM0 and 15
if GPRM0==0 -> jump to menu_widescreen ; mean aspect ratio of tv is 16/9
if GPRM0==1 -> jump to menu_panscan; mean aspect ratio of tv is 4/3

This script works verry well when i test it in scenarist in panscan mode or wide mode. But normal mode return 0 as values to GPRM0 so wee jump to the menu_widescreen. Problem is that in normal mode, video is in panscan and not in wide si it jumps to the bad menu (menu which have subpicture for wide screen). When i test the project in power dvd, all is ok, but on my tv : not ok. It seems that my standalone dvd player launch dvd in normal mode :(. I think there's a solution by copying directly value of sprm14 in gprm 0 without make any operation on it. Am i on the good way ?

Regards,

Kal

mpucoder
9th December 2003, 17:28
As that script implies, there are values other than 0 or 1 that can be returned.

But let's make this less general:
1) Since you are concerned about which display mode, that means your menu AR is 16:9 (if it were 4:3 there would be no choices, 4:3 source is always displayed in normal mode), so "normal" means widescreen.
2) You seem to be concerned with only Pan/Scan or widescreen, which would mean you have not allowed or provided for letterboxed - this simplifies things even further.
3) The script also grabs the user display preference, which you really don't care about, so you could change the And GPRM0,15 to And GPRM0,3 to eliminate those bits from the decision.
That would leave only 0 indicating widescreen, and 1 indicating Pan/Scan

And, yes, that can be tested much easier, without division or Anding.
MOV GPRM0,SPRM14
if GPRM0&256 -> jump to menu_panscan
jump to menu_widescreen

Another thing I see is using Scenarist to test for "normal", this is not a possible display mode for 16:9 source (to Scenarist preview "normal" means 4:3 on a 4:3 display)

As for your standalone starting in normal mode, does it think there is a 16:9 display connected? Has any video played prior to these commands? If not, SPRM14 is not valid.

My last question is why do this at all? A menu can have up to three subpicture streams, one for each display mode. The player will choose the correct one for you.

Kal
9th December 2003, 20:01
Thank you for all this information.


Q: As for your standalone starting in normal mode, does it think there is a 16:9 display connected? Has any video played prior to these commands? If not, SPRM14 is not valid.
A: My Standalone dvd player works in 4/3 mode and my TV is in 4/3. First play in my dvd is in 4/3 pan-scan. So, there's no reason that sprm14 is valid ? Why ?

Q: My last question is why do this at all? A menu can have up to three subpicture streams, one for each display mode. The player will choose the correct one for you.
A: Well, i didnt know that trick! I've just tested it in scenarist and it seems that works ! We can say goodbye to operation on SPRM14 but it was, however, very interesting.

So now, when i create a 16/9 Menu, i will have 3 subpictures : one for widescreen which is the original, one for letter box and one for pan-scan.

Thank you again,

Kal

mpucoder
10th December 2003, 00:21
Always interesting to explore these areas.
What I was concerned about with the validity of SPRM14 was if no video had played prior to the commands (eg, pre-commands in the First Play PGC) then the display mode bits would not have been set by the rendering engine.