[Mp4-tech] Re:[Video]SCR calculation
Geetha U
ugeetha tataelxsi.co.in
Mon Jun 14 12:32:27 EDT 2004
Hi,
I have a problem in reading SCR value from Mpeg2 stream. I get the pack
start code and then,
if( (ps->ps_data[4] & 0xC0) == 0x40 )
{
/* MPEG-2 */
ps->scr = ((u64)(ps->ps_data[4] & 0x38) << 27) |
((u64)(ps->ps_data[4] & 0x3) << 28) |
((u64)(ps->ps_data[5] & 0xff) << 20) |
((u64)(ps->ps_data[6] & 0xf8) << 12) |
((u64)(ps->ps_data[6] & 0x3) << 13) |
((u64)(ps->ps_data[7] & 0xff) << 5) |
((u64)(ps->ps_data[8] & 0xf8) >> 3);
}
Is this code correct. I want the value to be of type short.
Will anyone help me in getting SCR value of short type?
Thanks in advance,
Geetha
More information about the Mp4-tech
mailing list