Sorenson H.263 Stream Format

Sorenson H.263 VideoFormat: ( which be used in FLV File )
1.instruction:
Removed Part from Standard H.263 Format As Follows:
{
•   GOB(group of blocks)layer
•   Split-screen indicator
•   Document camera indicator
•   Picture freeze release
•   Syntax-based arithmetic coding
•   PB frames
•   Continuous-presence multipoint 
•   Overlapped block-motion compensation 
}

Added Part to Sorenson H.263 Format As Follows:
{
•  Disposable frames (difference frames with no future dependencies) 
•  Arbitrary picture width and height up to 65535 pixels 
•  Unrestricted motion vector support is always on 
•  A deblocking flag is available to suggest the use of a deblocking filter 
}

Sorenson H.263 video format uses different headers than Standard H.263 at both the picture layers and macroblock layer,
and the GOB layer is absent;
2. format:
1) Sorenson H.263VIDEOPACKET 
[PictureStartCode][17-bit] (0000 0000 0000 0000 1)
[Version] [5-bit] (0或1)
[TemporalReference-TR][8-bit] /* from H.263 */
[PictureSize] [3-bit]
{
if(PictureSize==000){
CustomWidth [8-bit]
CustomHeight [8-bit]
}else if( PictureSize==010){
CustomWidth [16-bit]
CustomHeight [16-bit]
}else if( PictureSize==010 ){/*CIF*/
CustomWidth=352
CustomHeight=288
}else if( PictureSize==011 ){/*QCIF*/
CustomWidth=176
CustomHeight=144
}else if( PictureSize==100 ){/*SQCIF*/
CustomWidth=128
CustomHeight=96
}else if( PictureSize==101 ){
CustomWidth=320
CustomHeight=240
}else if( PictureSize==110 ){
CustomWidth=160
CustomHeight=120
}else if( PictureSize==111 ){/* reserved */
}
}
[PictureType] [2-bit]
{
if( PictureType==00 ){keyFrame}
else if( PictureType==01 ){interFrame}
else if( PictureType==10 ){disposableInterFrame}
else if( PictureType==11 ){reserved}
}
[DeblockingFlag][1-bit] /* Requests use of deblocking filter , flash ignore this */
[Quantizer] [5-bit] /* from H.263 */
[ExtraInformationFlag/ExtraInformation] /* repeat untill ExtraInformationFlag=0 */
{
while( 1 ){
[ExtraInformationFlag][1-bit] /* from H.263 */
if( ExtraInformationFlag==1 ){
ExtraInformation[8-bit] /* from H.263 */
}else{
break;
}
}
}
[Macroblock] /* See following MACROBLOCK struct */
[PictureStuffing]/* from H.263 */

2) Macroblock
[CodedMacroblockFlag][1-bit] /* from H.263 if 1 Macroblock End */
[MacroblockType][varies] /* from H.263 */
[BlockPattern][varies] /* from H.263 */
[QuantizerInformation][2-bit] /* from H.263 00:-1 01:-2 10:+1 11:+2 */
[MotionVectorData][varies-2] /* from H.263 */
[ExtraMotionVectorData][varies-6] /* from H.263 */
[BlockData] [BLOCKDATA[6]] /* from H.263 */

3) BlockData
1.In version 0 of the Sorenson H.263 video format, this layer follows H.263 section 5.4 exactly.
2.In version 1 of the Sorenson H.263 video format, escape codes in transform coefficients(变化转换系数) are Encoded differently.
Like This:
if( ESCAPE code == 0000 011 ){
[format-layout-bit][1-bit] /* indicate LAST , RUN , LEVEL */
[LAST] [1-bit]
[RUN] [6-bit]
if(format-layout-bit==0){
[LEVEL] [7-bit]
}else if(format-layout-bit==1){
[LEVEL] [11-bit]
}
}
The 7-bit and 11-bit LEVEL tables, which replace table 14 in H.263, as the following table shows:


你可能感兴趣的:(flv,H.263,Sorenson)