How to view JM code in combination with H.264 standards

Source: Internet
Author: User

How to integrate with H.264 standardsCodeThis Web file should be available to everyone. However, the Web document is "H. 264 Park "group chat content, so it is not very convenient to see ...... when I started school, I made some summary and hope to share it with you! Correct the error!

 

1. How many PPS are there after one SPS?
This is mainly determined by the encoder, but the JM Code only has one

 

2. What does C in the second column of the standard mean?
See Standard 7.2-classification (marked as "c" in the table), which indicates that data is divided into three types of data. Slice data Class A Segmentation contains all the two types of syntax elements. B-class split of slice data contains all three types of syntax elements. Slice data class C split contains all four types of syntax elements. The meanings of values of other types of syntax elements are not specified. For some syntax elements, a vertical line is used to indicate that they contain two types of syntax elements. In this case, the classification value used by the syntax element is further determined in the text.

3. Does a NALU correspond to a piece?
This statement is not accurate. NALU includes a piece, SPS, PPS, SEI, etc.

 

4. decode_one_frame () includes I, P, and B.

 

5. Case nalu_type_slice:
Case nalu_type_idr:
Case nalu_type_dpa
Case nalu_type_dpb:
Case nalu_type_dpc
Case nalu_type_sei:
Case nalu_type_pps
Case nalu_type_sps
Case nalu_type_aud:
Case nalu_type_eoseq:
Case nalu_type_eostream:
Case nalu_type_fill
Question: When to enter and what is the descriptionArticleOr books?
A: The case to enter is determined by the nalu_type decoded from the NALU header.

 

6. The error code hiding in the decoder is only useful for packet loss. After packet loss, the serial number of the packet is not continuous. Once the decoder detects that the serial number of the packet is not continuous, the ei_flag in the non-continuous position is set to 1.

 

7. What are the differences between the byte stream format and the RTP code stream? Where are the related materials?
The byte stream format is mainly used for file storage. Therefore, there is only one starting prefix before the NALU in the bitstream format. The RTP bitstream requires network transmission, so there is a lot of auxiliary information before the nalu

 

8. Does the RTP format Add a header before the byte stream?
No, byte stream = start prefix + nalu, but RTP does not start prefix

 

9. There is no starting prefix in RTP. Why do we need to insert 03?
Prevents pseudo start codes and RTP from unnecessary start codes. Maybe it is to be consistent with the byte stream format.

 

10. NALU is an encapsulation of rbsp. RTP and others are encapsulation of NALU.

 

11. Why should I split the ABC film?
-- ABC is used to protect data with different importance levels.

 

12. Is there no Data Division for baseline?
Baseline is only about how to generate rbsp and how to encapsulate NALU. The specific transmission method is RTP, and file copy is also a method. How many reference frames does baseline have at most? Any.

 

13. What should I do after decoding profile_idc? For example, if baseline does not support cabac, then the corresponding entropy_coding_mode_flag does not exist. If yes, what should we do?
Of course, the cabac code will not be executed. If the encoder uses the baseline encoding, there will naturally be no syntax elements related to cabac in the code stream, such as entropy_coding_mode_flag. After the decoder decodes SPS and learns that the code stream is baseline, naturally, it will not call the decoding sequence related to cabac, and it will not make an error. Profile_idc is baseline, and active_pps-> entropy_coding_mode_flag is not cabac. Whether the bitstream is baseline is determined by the number of reference frames

 

14. When JM is performing the cavlc encoding, escape suffix is used for level = 8. I modified the code to describe the level = 8 using the unsigned number, the code stream produced by the result encoding is exactly the same as that not modified.

Appendix: Differences and connections between rbsp, sodb, and ebsp!
sodb: the most primitive encoding data, no additional data
rbsp: based on sodb, rbsp_stop_ont_bit (bit value: 1) is added and 0 is aligned by byte.
ebsp: Based on rbsp, the anti-pseudo start code byte (0x03) is added.

1. frame data can be divided into multiple slice instances.
2. Data in each slice, intra-Frame Prediction only uses the data of your own slice, which has no dependency with other slice data.
3. nal is used to pack the encoded data. For example, each slice data can be stored in the nal package.
4. I frame. it is independently encoded and independent from other frames. data.
P frame. Depends on I frame. Data.
B frame. depends on I frame, P frame. or other B frame. data.

A frame can be divided into multiple slice codes, while a slice code is packaged into a nal unit. However, in addition to the slice code stream, the nal Unit, it can also accommodate other data, such as the sequence parameter set SPs.

 

15. NAL, slice and frame meanings and Their Relationships

NAL refers to the network extraction layer, which contains some network-related information.
Slice means slice. In 264, the image is divided into one frame or two fields, and the frame can be divided into one or several slilce ); A piece consists of a macro block (MB. Macro Block is the basic unit for encoding.

 

16. 1 (encoding band of non-IDR image), 2 (encoding Band Data Segment A), and 3 (encoding band data segment B) in nal nal_unit_type) 4 (encoding band data split Block C), 5 (IDR image encoding band) and slice encoding modes: five Types in I _slice, p_slice, and B _slice nal nal_unit_type indicate what information is next and how to partition the data. I _slice, p_slice, and B _slice indicate I-type slice, p-type slice, and B-type slice. here, I _slice is the intra-frame prediction mode encoding; p_slice is the unidirectional prediction encoding or intra-frame mode; B _slice is the bidirectional prediction or intra-frame mode.

 

17. Are there three types of frames: I frame, P frame, and B frame?
The differences between I frame, P frame, and B frame are as follows: I _slice, p_slice, B _slice, slice, and frame, which are already known in question 1.

 

18. At last, what frames are 6 (SEI), 7 (SPS), and 8 (PPS) in nal nal_unit_type?
NAL nal_unit_type is a sequence parameter set (SPS), image parameter set (PPS), and enhancement information (SEI. It indicates that the subsequent data information includes the sequence parameter set (SPS), image parameter set (PPS), and enhancement information (SEI ).

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.