XenevaOS
Loading...
Searching...
No Matches
h264bsd_storage.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_STORAGE_H
30#define H264SWDEC_STORAGE_H
31
32/*------------------------------------------------------------------------------
33 1. Include headers
34------------------------------------------------------------------------------*/
35
36#include "basetype.h"
37#include "h264bsd_cfg.h"
41#include "h264bsd_nal_unit.h"
44#include "h264bsd_dpb.h"
46
47/*------------------------------------------------------------------------------
48 2. Module defines
49------------------------------------------------------------------------------*/
50
51/*------------------------------------------------------------------------------
52 3. Data types
53------------------------------------------------------------------------------*/
54
61
62/* structure to store parameters needed for access unit boundary checking */
73
74/* storage data structure, holds all data of a decoder instance */
75typedef struct storage
76{
77 /* active paramet set ids and pointers */
85
86 /* current slice group map, recomputed for each slice */
88
90
91 /* this flag is set after all macroblocks of a picture successfully
92 * decoded -> redundant slices not decoded */
95
96 /* flag to indicate if current access unit contains any valid slices */
98
99 /* store information needed for handling of slice decoding */
101
102 /* number of concealed macroblocks in the current image */
104
105 /* picId given by application */
107
108 /* macroblock specific storages, size determined by image dimensions */
110
111 /* flag to store noOutputReordering flag set by the application */
113
114 /* DPB */
116
117 /* structure to store picture order count related information */
119
120 /* access unit boundary checking related data */
122
123 /* current processed image */
125
126 /* last valid NAL unit header is stored here */
128
129 /* slice header, second structure used as a temporary storage while
130 * decoding slice header, first one stores last successfully decoded
131 * slice header */
133
134 /* fields to store old stream buffer pointers, needed when only part of
135 * a stream buffer is processed by h264bsdDecode function */
140
141 /* macroblock layer structure, there is no need to store this but it
142 * would have increased the stack size excessively and needed to be
143 * allocated from head -> easiest to put it here */
145
146 u32 pendingActivation; /* Activate parameter sets after returning
147 HEADERS_RDY to the user */
148 u32 intraConcealmentFlag; /* 0 gray picture for corrupted intra
149 1 previous frame used if available */
150 u32* conversionBuffer; // used to perform yuv conversion
153
154/*------------------------------------------------------------------------------
155 4. Function prototypes
156------------------------------------------------------------------------------*/
157
158void h264bsdInitStorage(storage_t *pStorage);
159void h264bsdResetStorage(storage_t *pStorage);
162u32 h264bsdStoreSeqParamSet(storage_t *pStorage, seqParamSet_t *pSeqParamSet);
163u32 h264bsdStorePicParamSet(storage_t *pStorage, picParamSet_t *pPicParamSet);
164u32 h264bsdActivateParamSets(storage_t *pStorage, u32 ppsId, u32 isIdr);
166 u32 sliceGroupChangeCycle);
167
169 strmData_t *strm,
170 nalUnit_t *nuNext,
172 u32 *accessUnitBoundaryFlag);
173
175
176#endif /* #ifdef H264SWDEC_STORAGE_H */
177
signed int i32
Definition basetype.h:34
#define MAX_NUM_PIC_PARAM_SETS
Definition h264bsd_cfg.h:50
#define MAX_NUM_SEQ_PARAM_SETS
Definition h264bsd_cfg.h:49
u32 h264bsdStorePicParamSet(storage_t *pStorage, picParamSet_t *pPicParamSet)
Definition h264bsd_storage.c:210
u32 h264bsdStoreSeqParamSet(storage_t *pStorage, seqParamSet_t *pSeqParamSet)
Definition h264bsd_storage.c:127
u32 h264bsdValidParamSets(storage_t *pStorage)
Definition h264bsd_storage.c:863
void h264bsdResetStorage(storage_t *pStorage)
Definition h264bsd_storage.c:441
void h264bsdInitStorage(storage_t *pStorage)
Definition h264bsd_storage.c:87
u32 h264bsdIsEndOfPicture(storage_t *pStorage)
Definition h264bsd_storage.c:528
u32 h264bsdIsStartOfPicture(storage_t *pStorage)
Definition h264bsd_storage.c:486
struct storage storage_t
u32 h264bsdActivateParamSets(storage_t *pStorage, u32 ppsId, u32 isIdr)
Definition h264bsd_storage.c:297
u32 h264bsdCheckAccessUnitBoundary(strmData_t *strm, nalUnit_t *nuNext, storage_t *storage, u32 *accessUnitBoundaryFlag)
Definition h264bsd_storage.c:626
void h264bsdComputeSliceGroupMap(storage_t *pStorage, u32 sliceGroupChangeCycle)
Definition h264bsd_storage.c:576
uint8_t u8
Definition kernel.h:14
uint32_t u32
Definition kernel.h:16
Definition h264bsd_storage.h:64
u32 prevPicOrderCntLsb
Definition h264bsd_storage.h:68
i32 prevDeltaPicOrderCntBottom
Definition h264bsd_storage.h:69
u32 prevFrameNum
Definition h264bsd_storage.h:66
u32 prevIdrPicId
Definition h264bsd_storage.h:67
u32 firstCallFlag
Definition h264bsd_storage.h:71
Definition h264bsd_dpb.h:79
Definition h264bsd_image.h:47
Definition h264bsd_macroblock_layer.h:153
Definition h264bsd_macroblock_layer.h:163
Definition h264bsd_nal_unit.h:65
Definition h264bsd_pic_param_set.h:49
Definition h264bsd_pic_order_cnt.h:54
Definition h264bsd_seq_param_set.h:51
Definition h264bsd_slice_header.h:110
Definition h264bsd_storage.h:56
u32 numDecodedMbs
Definition h264bsd_storage.h:58
u32 lastMbAddr
Definition h264bsd_storage.h:59
u32 sliceId
Definition h264bsd_storage.h:57
Definition h264bsd_storage.h:76
u32 * conversionBuffer
Definition h264bsd_storage.h:150
nalUnit_t prevNalUnit[1]
Definition h264bsd_storage.h:127
u32 skipRedundantSlices
Definition h264bsd_storage.h:93
u32 pendingActivation
Definition h264bsd_storage.h:146
u32 oldSpsId
Definition h264bsd_storage.h:78
image_t currImage[1]
Definition h264bsd_storage.h:124
aubCheck_t aub[1]
Definition h264bsd_storage.h:121
u32 validSliceInAccessUnit
Definition h264bsd_storage.h:97
sliceHeader_t sliceHeader[2]
Definition h264bsd_storage.h:132
u32 activePpsId
Definition h264bsd_storage.h:79
u32 currentPicId
Definition h264bsd_storage.h:106
sliceStorage_t slice[1]
Definition h264bsd_storage.h:100
u32 prevBufNotFinished
Definition h264bsd_storage.h:136
u32 picSizeInMbs
Definition h264bsd_storage.h:89
u32 noReordering
Definition h264bsd_storage.h:112
u32 prevBytesConsumed
Definition h264bsd_storage.h:138
macroblockLayer_t * mbLayer
Definition h264bsd_storage.h:144
u32 * sliceGroupMap
Definition h264bsd_storage.h:87
u32 numConcealedMbs
Definition h264bsd_storage.h:103
strmData_t strm[1]
Definition h264bsd_storage.h:139
u32 picStarted
Definition h264bsd_storage.h:94
dpbStorage_t dpb[1]
Definition h264bsd_storage.h:115
picParamSet_t * pps[MAX_NUM_PIC_PARAM_SETS]
Definition h264bsd_storage.h:84
picParamSet_t * activePps
Definition h264bsd_storage.h:81
u32 activeSpsId
Definition h264bsd_storage.h:80
pocStorage_t poc[1]
Definition h264bsd_storage.h:118
seqParamSet_t * sps[MAX_NUM_SEQ_PARAM_SETS]
Definition h264bsd_storage.h:83
size_t conversionBufferSize
Definition h264bsd_storage.h:151
u8 * prevBufPointer
Definition h264bsd_storage.h:137
u32 intraConcealmentFlag
Definition h264bsd_storage.h:148
seqParamSet_t * activeSps
Definition h264bsd_storage.h:82
mbStorage_t * mb
Definition h264bsd_storage.h:109
Definition h264bsd_stream.h:47