XenevaOS
Loading...
Searching...
No Matches
h264bsd_slice_header.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 The Android Open Source Project
3 * Modified for use by h264bsd standalone library
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*------------------------------------------------------------------------------
19
20 Table of contents
21
22 1. Include headers
23 2. Module defines
24 3. Data types
25 4. Function prototypes
26
27------------------------------------------------------------------------------*/
28
29#ifndef H264SWDEC_SLICE_HEADER_H
30#define H264SWDEC_SLICE_HEADER_H
31
32/*------------------------------------------------------------------------------
33 1. Include headers
34------------------------------------------------------------------------------*/
35
36#include "basetype.h"
37#include "h264bsd_stream.h"
38#include "h264bsd_cfg.h"
41#include "h264bsd_nal_unit.h"
42
43/*------------------------------------------------------------------------------
44 2. Module defines
45------------------------------------------------------------------------------*/
46
47enum {
49 I_SLICE = 2
50};
51
53
54/* macro to determine if slice is an inter slice, sliceTypes 0 and 5 */
55#define IS_P_SLICE(sliceType) (((sliceType) == P_SLICE) || \
56 ((sliceType) == P_SLICE + 5))
57
58/* macro to determine if slice is an intra slice, sliceTypes 2 and 7 */
59#define IS_I_SLICE(sliceType) (((sliceType) == I_SLICE) || \
60 ((sliceType) == I_SLICE + 5))
61
62/*------------------------------------------------------------------------------
63 3. Data types
64------------------------------------------------------------------------------*/
65
66/* structure to store data of one reference picture list reordering operation */
73
74/* structure to store reference picture list reordering operations */
80
81/* structure to store data of one DPB memory management control operation */
90
91/* worst case scenario: all MAX_NUM_REF_PICS pictures in the buffer are
92 * short term pictures, each one of them is first marked as long term
93 * reference picture which is then marked as unused for reference.
94 * Additionally, max long-term frame index is set and current picture is
95 * marked as long term reference picture. Last position reserved for
96 * end memory_management_control_operation command */
97#define MAX_NUM_MMC_OPERATIONS (2*MAX_NUM_REF_PICS+2+1)
98
99/* structure to store decoded reference picture marking data */
107
108/* structure to store slice header data decoded from the stream */
130
131/*------------------------------------------------------------------------------
132 4. Function prototypes
133------------------------------------------------------------------------------*/
134
136 sliceHeader_t *pSliceHeader,
137 seqParamSet_t *pSeqParamSet,
138 picParamSet_t *pPicParamSet,
139 nalUnit_t *pNalUnit);
140
141u32 h264bsdCheckPpsId(strmData_t *pStrmData, u32 *ppsId);
142
144 strmData_t *pStrmData,
145 u32 maxFrameNum,
146 u32 *frameNum);
147
149 strmData_t *pStrmData,
150 u32 maxFrameNum,
151 nalUnitType_e nalUnitType,
152 u32 *idrPicId);
153
155 strmData_t *pStrmData,
156 seqParamSet_t *pSeqParamSet,
157 nalUnitType_e nalUnitType,
158 u32 *picOrderCntLsb);
159
161 strmData_t *pStrmData,
162 seqParamSet_t *pSeqParamSet,
163 nalUnitType_e nalUnitType,
164 i32 *deltaPicOrderCntBottom);
165
167 strmData_t *pStrmData,
168 seqParamSet_t *pSeqParamSet,
169 nalUnitType_e nalUnitType,
170 u32 picOrderPresentFlag,
171 i32 *deltaPicOrderCnt);
172
174 strmData_t *pStrmData,
175 seqParamSet_t *pSeqParamSet,
176 picParamSet_t *pPicParamSet,
177 nalUnitType_e nalUnitType,
178 u32 *redundantPicCnt);
179
180u32 h264bsdCheckPriorPicsFlag(u32 * noOutputOfPriorPicsFlag,
181 const strmData_t * pStrmData,
182 const seqParamSet_t * pSeqParamSet,
183 const picParamSet_t * pPicParamSet,
184 nalUnitType_e nalUnitType);
185
186#endif /* #ifdef H264SWDEC_SLICE_HEADER_H */
187
signed int i32
Definition basetype.h:34
#define MAX_NUM_REF_PICS
Definition h264bsd_cfg.h:47
nalUnitType_e
Definition h264bsd_nal_unit.h:51
@ I_SLICE
Definition h264bsd_slice_header.h:49
@ P_SLICE
Definition h264bsd_slice_header.h:48
u32 h264bsdCheckPicOrderCntLsb(strmData_t *pStrmData, seqParamSet_t *pSeqParamSet, nalUnitType_e nalUnitType, u32 *picOrderCntLsb)
Definition h264bsd_slice_header.c:951
u32 h264bsdCheckIdrPicId(strmData_t *pStrmData, u32 maxFrameNum, nalUnitType_e nalUnitType, u32 *idrPicId)
Definition h264bsd_slice_header.c:866
u32 h264bsdCheckRedundantPicCnt(strmData_t *pStrmData, seqParamSet_t *pSeqParamSet, picParamSet_t *pPicParamSet, nalUnitType_e nalUnitType, u32 *redundantPicCnt)
Definition h264bsd_slice_header.c:1262
u32 h264bsdCheckDeltaPicOrderCnt(strmData_t *pStrmData, seqParamSet_t *pSeqParamSet, nalUnitType_e nalUnitType, u32 picOrderPresentFlag, i32 *deltaPicOrderCnt)
Definition h264bsd_slice_header.c:1158
u32 h264bsdCheckFrameNum(strmData_t *pStrmData, u32 maxFrameNum, u32 *frameNum)
Definition h264bsd_slice_header.c:791
u32 h264bsdDecodeSliceHeader(strmData_t *pStrmData, sliceHeader_t *pSliceHeader, seqParamSet_t *pSeqParamSet, picParamSet_t *pPicParamSet, nalUnit_t *pNalUnit)
Definition h264bsd_slice_header.c:96
u32 h264bsdCheckPriorPicsFlag(u32 *noOutputOfPriorPicsFlag, const strmData_t *pStrmData, const seqParamSet_t *pSeqParamSet, const picParamSet_t *pPicParamSet, nalUnitType_e nalUnitType)
Definition h264bsd_slice_header.c:1400
u32 h264bsdCheckPpsId(strmData_t *pStrmData, u32 *ppsId)
Definition h264bsd_slice_header.c:731
@ NO_LONG_TERM_FRAME_INDICES
Definition h264bsd_slice_header.h:52
#define MAX_NUM_MMC_OPERATIONS
Definition h264bsd_slice_header.h:97
u32 h264bsdCheckDeltaPicOrderCntBottom(strmData_t *pStrmData, seqParamSet_t *pSeqParamSet, nalUnitType_e nalUnitType, i32 *deltaPicOrderCntBottom)
Definition h264bsd_slice_header.c:1051
uint32_t u32
Definition kernel.h:16
Definition h264bsd_slice_header.h:101
u32 noOutputOfPriorPicsFlag
Definition h264bsd_slice_header.h:102
u32 longTermReferenceFlag
Definition h264bsd_slice_header.h:103
u32 adaptiveRefPicMarkingModeFlag
Definition h264bsd_slice_header.h:104
Definition h264bsd_slice_header.h:83
u32 longTermFrameIdx
Definition h264bsd_slice_header.h:87
u32 differenceOfPicNums
Definition h264bsd_slice_header.h:85
u32 maxLongTermFrameIdx
Definition h264bsd_slice_header.h:88
u32 longTermPicNum
Definition h264bsd_slice_header.h:86
u32 memoryManagementControlOperation
Definition h264bsd_slice_header.h:84
Definition h264bsd_nal_unit.h:65
Definition h264bsd_pic_param_set.h:49
Definition h264bsd_slice_header.h:68
u32 reorderingOfPicNumsIdc
Definition h264bsd_slice_header.h:69
u32 longTermPicNum
Definition h264bsd_slice_header.h:71
u32 absDiffPicNum
Definition h264bsd_slice_header.h:70
Definition h264bsd_slice_header.h:76
u32 refPicListReorderingFlagL0
Definition h264bsd_slice_header.h:77
Definition h264bsd_seq_param_set.h:51
Definition h264bsd_slice_header.h:110
u32 idrPicId
Definition h264bsd_slice_header.h:115
i32 deltaPicOrderCntBottom
Definition h264bsd_slice_header.h:117
u32 firstMbInSlice
Definition h264bsd_slice_header.h:111
u32 frameNum
Definition h264bsd_slice_header.h:114
decRefPicMarking_t decRefPicMarking
Definition h264bsd_slice_header.h:128
u32 sliceGroupChangeCycle
Definition h264bsd_slice_header.h:126
u32 picParameterSetId
Definition h264bsd_slice_header.h:113
i32 sliceAlphaC0Offset
Definition h264bsd_slice_header.h:124
i32 sliceBetaOffset
Definition h264bsd_slice_header.h:125
u32 numRefIdxActiveOverrideFlag
Definition h264bsd_slice_header.h:120
u32 sliceType
Definition h264bsd_slice_header.h:112
u32 numRefIdxL0Active
Definition h264bsd_slice_header.h:121
u32 picOrderCntLsb
Definition h264bsd_slice_header.h:116
i32 sliceQpDelta
Definition h264bsd_slice_header.h:122
u32 disableDeblockingFilterIdc
Definition h264bsd_slice_header.h:123
u32 redundantPicCnt
Definition h264bsd_slice_header.h:119
refPicListReordering_t refPicListReordering
Definition h264bsd_slice_header.h:127
Definition h264bsd_stream.h:47