Blu-ray + UHD/4K + Streaming

A community for authoring Blu-ray, 4K/UHD and more!

Hey!


I have learned that in PSRs there can be a lot of values stored which sometimes need to be masked before doing operations with them. And I think I am running into at least two problems while using the PSR 2 which holds the current subtitle track activated.

What I am trying to do is, setting the correct button highlight in the subtitle submenu - so I have an autoactivated button which does the following:

Move [2] {2}
SetButtonPage Button:[2]

This is working as expected - when I have a subtitle track which is from 1-9 this is doing fine. But it is not when the subtitle track is greater than 9. I suppose I need to do some masking as I have learned from using the PSR 19 where we have to mask the output of the country code {19} with a bitwise AND operation. Do I need to consider this for this as well?

My Subtitles 10-14 are all "OFF" subtitles (in DVD we would probably call this 'captions' - so 'forced subtitles') and the button that needs to be highlighted is the same for them. So I tried this:

Move [2] {2}
If [2] > 9

SetButtonPage Button:10
SetButtonPage Button:[2]

But somehow this comparison is always true (so I will end up having the OFF button highlighted at all times). I have also tried to do it the 'dumb' way with if conditions for all the values - no success. And I have also tried if the [2] > x actually works - and it seems like it doesn't (tried it with values 1-9 and it became true all the time as well..)

So actually two issues: Values above 9 inside PSR 2 won't get recognized by my if statements (if [2] == 10 then ..) and all of my comparisons don't work.

Maybe someone has an idea how to manage this problem.

Kind regards,

Jan

Views: 141

Reply to This

Replies to This Discussion

Hi Jan,

I never had more than 9 sub languages in a project but masking is a good idea with PSR {2}. See example below.

Regarding:

Move [2] {2}
If [2] > 9

SetButtonPage Button:10
SetButtonPage Button:[2]

It seems the last line is always executed no matter what.

Try working with Labels to avoid that.

Move [2] {2}

And [2] 0xFFF

If [2] > 9

Goto Label0

Setbuttonpage Button:[2] 

Goto Label1

Label_0:

Setbuttonpage button:10

Label_1:

........

However, in this example you haven't accounted for the case when a user switches the subtitles off completely via the subtitle button on his remote. This needs addional addressing for the off button to be highlighted in such a case (Display flag on/of)

I suggest you have a look at Sony's hdmv example project provided on their website It's a very good starting point for dealing with the masking, subs-off case scenario and multiple buttons in bogs for proper audio/subtitle highlighting etc.

Thanks for your answer/advice, Peter!

How do you know it's 0xFFF? I have tried to find a list of PSRs and their stored values / lengths but without any luck.

So far I know:

PSR10 0xFFFF

PSR11 0xFF

PSR2 0xFFF

PSR19 0xFFFF

Seems to be top-secret knowledge... Maybe we could manage to make a list with all 'important' PSRs - that'd be nice!



Peter B said:

Hi Jan,

I never had more than 9 sub languages in a project but masking is a good idea with PSR {2}. See example below.

Regarding:

Move [2] {2}
If [2] > 9

SetButtonPage Button:10
SetButtonPage Button:[2]

It seems the last line is always executed no matter what.

Try working with Labels to avoid that.

Move [2] {2}

And [2] 0xFFF

If [2] > 9

Goto Label0

Setbuttonpage Button:[2] 

Goto Label1

Label_0:

Setbuttonpage button:10

Label_1:

........

However, in this example you haven't accounted for the case when a user switches the subtitles off completely via the subtitle button on his remote. This needs addional addressing for the off button to be highlighted in such a case (Display flag on/of)

I suggest you have a look at Sony's hdmv example project provided on their website It's a very good starting point for dealing with the masking, subs-off case scenario and multiple buttons in bogs for proper audio/subtitle highlighting etc.

Hi Jan,

again, I recommend the Sony EX example project. It is a good starting point for more complex hdmv programming. It also contains explanations and notes along with the project file. The masking info re psr2 can be found in there.

Peter

Reply to Discussion

RSS

Latest Activity

Brad Larson replied to Jan's discussion Resume to Time in Playlist - how to do it correctly?
"Hello, I'm having problems with this function and can't seem to figure it out. Pretty…"
1 hour ago
Denny and Rob posted a blog post

BDA: 4K Ultra HD Blu-ray Format Making Big Strides

The Blu-ray Disc market has a new star, 4K Ultra HD.“Hollywood really got behind the format last…See More
Saturday
Matt Stoddart replied to Marc Morris's discussion DoStudio 3 - Unhandled Exception error / Invalid Content
"I loaded up Build 3.0.85b, I think 3.080 might have been on before. That shouldn't make a…"
Dec 20, 2017
Rob Aubey replied to Marc Morris's discussion DoStudio 3 - Unhandled Exception error / Invalid Content
"I'm starting to think I should go down the route of modding the W7 install disc with USB3…"
Dec 20, 2017

© 2018   Created by Denny and Rob.   Powered by

Badges  |  Report an Issue  |  Terms of Service