Changeset 1412 in 3DVCSoftware for branches/HTM-16.2-dev/source/App/TAppEncoder/TAppEncTop.h
- Timestamp:
- 12 Apr 2018, 11:12:21 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.2-dev/source/App/TAppEncoder/TAppEncTop.h
r1405 r1412 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 6, ITU/ISO/IEC6 * Copyright (c) 2010-2017, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 73 73 74 74 std::vector<Int> m_frameRcvd; ///< number of received frames 75 76 75 TComPicLists m_ivPicLists; ///< picture buffers of encoder instances 76 77 ParameterSetMap<TComSPS> m_spsMap; 78 ParameterSetMap<TComPPS> m_ppsMap; 79 80 IntAry1d m_parameterSetId; 81 BoolAry1d m_sendParameterSets; 82 83 77 84 #if NH_MV 78 85 TComVPS* m_vps; ///< vps … … 147 154 Void xSetCamPara ( TComVPS& vps ); 148 155 #endif 149 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 156 157 Void xDeriveParameterSetIds( TComVPS& vps ) 158 { 159 160 m_parameterSetId .clear(); 161 m_sendParameterSets.clear(); 162 163 m_parameterSetId .resize( m_numberOfLayers, -1 ); 164 m_sendParameterSets.resize( m_numberOfLayers, false ); 165 if ( !m_shareParameterSets ) 166 { 167 AOT( m_numberOfLayers > 16 ); 168 for (Int curVpsLayerId = 0; curVpsLayerId < m_numberOfLayers; curVpsLayerId++ ) 169 { 170 m_parameterSetId [curVpsLayerId] = curVpsLayerId; 171 m_sendParameterSets[curVpsLayerId] = true ; 172 } 173 } 174 else 175 { 176 // The spec requires e.g.: 177 // - It is a requirement of bitstream conformance that, when present, the value of chroma_format_idc shall be less than or equal to chroma_format_vps_idc 178 // of the vps_rep_format_idx[ j ]-th rep_format( ) syntax structure in the active VPS, where j is equal to LayerIdxInVps[ layerIdCurr ]. 179 180 // Consequently, a depth layer with chorma format 4:0:0 cannot refer to a base layer SPS with chroma format 4:2:0 181 182 // Furthermore, it is required that 183 // - the SPS RBSP shall have nuh_layer_id equal to 0, nuhLayerId, or IdRefLayer[ nuhLayerId ][ i ] with any value of i in the range of 0 to NumRefLayers[ nuhLayerId ] - 1, inclusive. 184 185 // Because of these requirements and when parameter set sharing is enabled, HTM sends the parameter sets for a current layer in its smallest reference layer having the same representation format. 186 187 188 Int curPsId = 0; 189 190 // Loop all layers 191 for (Int curVpsLayerId = 0; curVpsLayerId < m_numberOfLayers; curVpsLayerId++ ) 192 { 193 // Get smallest reference layer with same rep format idx 194 Int curNuhLayerId = vps.getLayerIdInNuh(curVpsLayerId); 195 Int smallestRefNuhLIdSameRepFmt = curNuhLayerId; 196 197 Int curRepFormatIdx = m_layerIdxInVpsToRepFormatIdx[ curVpsLayerId ]; 198 199 for (Int j = 0; j < vps.getNumRefLayers( curNuhLayerId ); j++ ) 200 { 201 Int refNuhLayerId = vps.getIdRefLayer( curNuhLayerId, j ); 202 Int refVpsLayerId = vps.getLayerIdInVps( refNuhLayerId ); 203 204 if ( smallestRefNuhLIdSameRepFmt > refNuhLayerId && m_layerIdxInVpsToRepFormatIdx[refVpsLayerId] == curRepFormatIdx ) 205 { 206 smallestRefNuhLIdSameRepFmt = refNuhLayerId; 207 } 208 } 209 210 Int smallestRefVpsLIdSameRepFmt = vps.getLayerIdInVps( smallestRefNuhLIdSameRepFmt ); 211 212 if (smallestRefVpsLIdSameRepFmt == curVpsLayerId ) 213 { 214 m_sendParameterSets[ curVpsLayerId ] = true; 215 m_parameterSetId [ curVpsLayerId ] = curPsId; 216 curPsId++; 217 AOT( curPsId > 15 ); 218 } 219 else 220 { 221 AOT( m_parameterSetId [ smallestRefVpsLIdSameRepFmt ] == -1 ); 222 m_parameterSetId [ curVpsLayerId ] = m_parameterSetId [ smallestRefVpsLIdSameRepFmt ]; 223 } 224 225 226 } 227 } 228 } 229 150 230 Int xGetMax( std::vector<Int>& vec); 151 231 Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId ); 152 232 #endif 153 #if NH_3D _DLT233 #if NH_3D 154 234 Void xDeriveDltArray( TComVPS& vps, TComDLT* dlt ); 155 235 Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt); … … 165 245 #else 166 246 TEncTop& getTEncTop () { return m_cTEncTop; } ///< return encoder class pointer reference 167 #endif 247 248 #endif 249 private: 250 168 251 };// END CLASS DEFINITION TAppEncTop 169 252
Note: See TracChangeset for help on using the changeset viewer.