Log in

View Full Version : Subpicture pointers in navpacks


jsoto
5th September 2004, 22:17
In
http://dvd.sourceforge.net/dvdinfo/dsi_pkt.html
you can read


Sector: 5a9 sp_synca[0:31] length: 32*4

relative offset to 1st subpicture packet for this VOBU
the msb (bit 31) is used to denote the direction, 0=forward, 1=backward
00 00 00 00 indicates the subpicture does not exist
3f ff ff ff indicates no subpicture data for this VOBU
7f ff ff ff indicates the subpicture data is contained within this VOBU


But, I believe these pointers are different from audio ones. In this case, the relative offset is between this VOBU and the VOBU (nav pack) which has the subpicture packet.
Can anyone confirm this?

This is the related part of dvdauthor code, where these pointers are adjusted

for( j=0; j<va->numsubpicturetracks; j++ ) {
struct audchannel *ach=&p->audch[j|32];
int s;

if( ach->numaudpts ) {
int id=findspuidx(p,j|32,vi->sectpts[0]);

// if overlaps A, point to A
// else if (A before here or doesn't exist) and (B after here or doesn't exist), point to here
// else point to B

if( id>=0 &&
ach->audpts[id].pts[0]<vi->sectpts[1] &&
ach->audpts[id].pts[1]>=vi->sectpts[0] )
s=findvobubysect(p,ach->audpts[id].sect);
else if( (id<0 || ach->audpts[id].pts[1]<vi->sectpts[0]) &&
(id+1==ach->numaudpts || ach->audpts[id+1].pts[0]>=vi->sectpts[1]) )
s=i;
else
s=findvobubysect(p,ach->audpts[id+1].sect);
id=(s<i);
s=getsect(p,i,s,0,0x7fffffff)&0x7fffffff;
if(!s)
s=0x7fffffff;
if(s!=0x7fffffff && id)
s|=0x80000000;
} else
s=0;
write4(buf+0x5a9+j*4,s);
}


Can anyone explain me what is 'A' and 'B' in the comment?
And, is there a way to adjust them without calculate the pts1 (end of picture presentation time) value?

jsoto

mpucoder
8th September 2004, 03:07
Yes, the synci for subpictures points to the VOBU (NAV pack) that contains the subpictures for the current VOBU
(that's what happens when you read old information "archived" from another site)

jsoto
8th September 2004, 08:30
Thanks for your answer.
Yes, the synci for subpictures points to the VOBU (NAV pack) that contains the subpictures for the current VOBU
So, to adjust them, you need to know the subpicture starting time (pts0) and the ending time (pts1). No way to do it without knowing both values, isn't it?. The "problem" is how to get pts1. AFAIK, you need to decode the subs.

(that's what happens when you read old information "archived" from another site) I know, but your site is not free anymore.... (Don't get me wrong, the info of your site is very valuable, and, for sure, you can do whatever you want to protect it)

jsoto