• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 #ifndef H264_PAYLOAD_PARSER_MACROS_H
19 #define H264_PAYLOAD_PARSER_MACROS_H
20 
21 
22 /////////////////////////////////////////////////////////////////////////////////
23 ///////////////////// macros defintion //////////////////////////////////////////
24 /////////////////////////////////////////////////////////////////////////////////
25 
26 // NAL type
27 #define H264_RTP_PAYLOAD_SPS        7
28 #define H264_RTP_PAYLOAD_PPS        8
29 
30 #define H264_RTP_PAYLOAD_STAP_A     24
31 #define H264_RTP_PAYLOAD_STAP_B     25
32 #define H264_RTP_PAYLOAD_MTAP16     26
33 #define H264_RTP_PAYLOAD_MTAP24     27
34 #define H264_RTP_PAYLOAD_FU_A       28
35 #define H264_RTP_PAYLOAD_FU_B       29
36 
37 // Bit mask
38 #define NAL_TYPE_BIT_MASK           0x1f
39 #define NAL_F_NRI_BIT_MASK          0xe0
40 #define FU_S_BIT_MASK               0x80
41 #define FU_E_BIT_MASK               0x40
42 #define BIT_SHIFT_FOR_FU_COUNTER    11
43 
44 
45 // others
46 #define H264_RTP_PAYLOAD_MIN_TYPE_NUM    4
47 #define H264_RTP_PAYLOAD_MEMFRAG_POOLNUM 32         // this macro can be tunable
48 #define H264_RTP_PAYLOAD_DEFAULT_INTERLEAVE_DEPTH 8 // this macro can be tunable
49 
50 
51 
52 #endif // H264_PAYLOAD_PARSER_MACROS_H
53 
54