Differences between h263 @ FLV and h263 @ 3GP

Source: Internet
Author: User

Although codecid2 in FLV and most 3GP files use h263-based encoding, the two are still very different, so pay attention to it. There are three main differences. When decoding, you must note that the Video Encoding Based on h263 in the 3GP file is implemented according to the Public h263 technical White Paper, however, the h263 encoding in FLV has made some minor changes on the standard.
(1) different identification codes
H263 (3GP) is a 22-bit value, followed by 0x0020 is an 8-bit (temporal reference) Value
H263 (FLV) is a 17-bit value, followed by 0x0001 is a 5-bit format information value.
(2) Different Image Information Headers

H263 (3GP) refer to standard image Headers
The h263 (FLV) image information header includes the following information:
Picture type: 5 (image format information, mainly used to determine the escape coefficient processing method)
Picture number: 8 (image number)
Picture Code Type: 3 (image encoding information)
Obtain the image width and height based on different picture code types from the following table.
Value Image Width Image Height
0 width: 8 Height: 8
1 width: 16 Height: 16
2352288
3176144
412896
5320240
6160120

Frame Type: 2 (I frame or P frame)
Skip bit: 1 (not clear)
Quant: 5 (quantified value)
Pei: 1 (refer to the standard documentation)
(3) handling different escape codes in coefficient decoding Codes
The escape code processing method in h263 (3GP) is as follows:
Last: 1 (least is the last non-zero coefficient)
Run: 6 (number of the first 0 values)
Level: 8 (the amplitude of the coefficient. The highest bit is the symbol bit. If it is 0, level = level. If it is 1, level =-(256-level ))
H263 (FLV)
If the picture type is greater than 0
In this case, one more person must be judged.
Longescape: 1 (do not use long esacpe encoding)
Longesapce = 0
Last: 1 (least is the last non-zero coefficient)
Run: 6 (number of the first 0 values)
Level: 7 (magnitude of the coefficient. The highest bit is the symbol bit. If it is 0, level = level. If it is 1, level =-(128-level ))
Longesapce = 1
Last: 1 (least is the last non-zero coefficient)
Run: 6 (number of the first 0 values)
Level: 11 (magnitude of the coefficient. The highest bit is the symbol bit. If it is 0, level = level. If it is 1, level =-(2048-level ))
After this problem is handled, codec can be processed normally.

This article comes from the podcast http://xinsync.xju.edu.cn on the iceberg, the original address: http://xinsync.xju.edu.cn/index.php/archives/1168

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.