Re: question about CHECK_VALUE for PCGI_UT->LU->exists
H}kan Hjort <[email protected]> Thu, 19 Feb 2004 22:24:37 +0100
| Newsgroups | gmane.comp.video.ogle.devel |
|---|---|
| Message-ID | <[email protected]> |
Thu Feb 19 2004, Yi-Shin Li wrote:
> Please help clarify the following comment from line# 1768 to 1779 of
> ifo_read.c,
> ifoRead_PGCI_UT(ifo_handle_t *ifofile):
>
> for(i = 0; i < pgci_ut->nr_of_lus; i++) {
> // Maybe this is only defined for v1.1 and later titles?
> /* If the bits in 'lu[i].exists' are enumerated abcd efgh then:
> VTS_x_yy.IFO VIDEO_TS.IFO
> a == 0x83 "Root" 0x82 "Title"
> b == 0x84 "Subpicture"
> c == 0x85 "Audio"
> d == 0x86 "Angle"
> e == 0x87 "PTT"
> */
> CHECK_VALUE((pgci_ut->lu[i].exists & 0x07) == 0);
> }
>
LU_SRP #1 - #LU_Ns Language Unit Search Pointer
for(n=0, m=8; n < number of PGCI_LUs; n++, m+=8) {
[(m+0)-(m+1)] Menu Language Code
[(m+2)] --
[(m+3)] Menu Existence mask
(VMGM Maks bits 'Ayyy yyyy': A == Title menu(2)
VTSM Mask bits 'ABCD Eyyy':
A == Root menu(3) B == Sub-picture menu(4)
C == Audio menu(5) D == Angle menu(6)
E == PTT menu(7) )
[(m+4)-(m+7)] Language start byte
}
PGCI_SRP #1 - #PGCI_SRP_Ns PGCI Search Pointer
for(n=0, m=8; n < number of PGCI_SRP; n++, m+=8) {
[(m+0)-(m_4) PGCI Category
[(m+0)] PGC #(n+1)'s Category Menu mask bits 'Xyyy zzzz'
(X==entry, 0: not an entry PGC, 1: an entry PGC
VMGM zzzz==Menu ID, 0010: Title
VTSM zzzz==Menu ID, 0011: Root, 0100: subpic, etc.
VTS yyyzzzz==VTS Title number)
...
The comment isn't very clear (perhaps even missplaced one could claim).
The 'exists' field is just a bit mask, where bit 'a' indicates the
existance (i.e. presens among the pgcs in this title set) of the "root"
menu, that has code 3 (and sice menu pgcs are 'entry' pgcs it has the
high bit set) so the entry_id byte (in pgic_srp_t) will be 0x83.
Also code is shared between VTSM and VMGM event though there are sligh
differences.
> Per http://dvd.sourceforge.net/dvdinfo/ifo_vmg.html#pgciut, the
> pcgi_ut->lu[i].exists
> stands for "Menu existence flag", which is 0x80 for titles. It make
> sence for the
> CHECK_VALUE statement.
>
> However, if the comment above is *true*, the CHECK_VALUE will always
> generate
> error messages. Am I right?
>
No since the low bits i.e. fgh are unused, the CHECK_VALUE checks that
they are indeed always 0. Most of these was just help for us during
development and debuging.
> I don't have a copy of DVD-VIDEO spec on my hand. So, I can't confirm this.
> Would anybody please clarify this question? Thanks in advance!!
>
Very few of us do...
It would have helped us a lot when writing the code though ;-)
/HÃ¥kan