|
From: | Simon Morlat |
Subject: | Re: [Linphone-users] [linphone-develpers]questions on mediastreamer rfc 2190 generated packets |
Date: | Fri, 22 May 2009 22:46:03 +0200 |
User-agent: | KMail/1.11.2 (Linux/2.6.29-1-amd64; KDE/4.2.2; x86_64; ; ) |
Hi Tian, > Hi > > I'm now studying the RTP packetlization for H.263-1995 frame in linphone. I > saw mediastreamer use the mode A in rfc2190 to split the frame, which means > that the bitstream will be packetlized on a GOB boundary or a picture > boundary. In the function get_gbsc(), the following code is used to split > the frame: > > for (i = 2; i < len-4; i++) { > buf = *((uint32_t *)(psc+i)); > for (j = 0; j < 8; j++) { > if (((buf >> j) & 0x00FCFFFF) == 0x00800000) {/*PSC*/ > printf("-------%s: PSC, i=%d, j=%d, buf=%x\n", __func__, i, > j, buf); > i += 2; > k=i; > break; > } else if (((buf >> j) & 0x0080FFFF) == 0x00800000) {/*GBSC*/ > printf("-------%s: GBSC,i=%d, j=%d, buf=%x\n", __func__, i, > j, buf); > i += 2; > k = i; > break; > } > } > } > > I know the picture start code of H.263 is 0000 0000 0000 0000 100000 in 22 > bits and GSBC start code is 0000 0000 0000 0000 1 in 17 bit, why do > get_gbsc() use the mask 0x00FCFFFF and 0x0080FFFF here to pick out the PSC > and GSBC header? How does it identify? > > Thanks > Best Regards > Y.T. |
[Prev in Thread] | Current Thread | [Next in Thread] |