Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 7 Apr 2015, 17:05:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 76 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 77 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 78 #if HHI_CAM_PARA_K0052 79 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 80 #else 78 81 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 82 #endif 79 83 } 80 84 … … 91 95 m_firstReceivedPoc = -2; 92 96 97 #if HHI_CAM_PARA_K0052 98 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 99 { 100 Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 101 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps ); 102 } 103 104 assert( m_receivedIdc == NULL ); 105 m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 106 for (Int i = 0; i < m_vps->getNumViews(); i++) 107 { 108 m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 109 } 110 111 xResetReceivedIdc( true ); 112 113 for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 114 { 115 if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 116 { 117 for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 118 { 119 if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 120 { 121 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = -1; 122 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale (voiInVps) [ baseVoiInVps ]; 123 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset (voiInVps) [ baseVoiInVps ]; 124 125 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = -1; 126 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ]; 127 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ]; 128 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 129 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 130 } 131 } 132 } 133 } 134 } 135 136 #else 93 137 m_uiMaxViewIndex = -1; 94 138 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) … … 98 142 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ; 99 143 } 100 101 144 assert( m_receivedIdc == NULL ); 102 145 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; … … 131 174 } 132 175 176 #endif 177 178 179 133 180 Void 134 181 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 135 182 { 183 #if HHI_CAM_PARA_K0052 184 for (Int i = 0; i < m_vps->getNumViews(); i++) 185 { 186 for (Int j = 0; j < m_vps->getNumViews(); j++) 187 { 188 #else 136 189 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 137 190 { 138 191 for (Int j = 0; j <= m_uiMaxViewIndex; j++) 139 192 { 193 #endif 140 194 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 141 195 { … … 178 232 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 179 233 { 234 #if HHI_CAM_PARA_K0052 235 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 236 #else 180 237 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 238 #endif 181 239 Int iLog2DivChroma = iLog2DivLuma + 1; 182 240 … … 255 313 } 256 314 315 #if HHI_CAM_PARA_K0052 316 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 317 if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here 318 { 319 for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 320 { 321 if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 322 { 323 if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 ) 324 { 325 AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] ); 326 AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] ); 327 } 328 else 329 { 330 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = 1; 331 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedScale () [ baseVoiInVps ]; 332 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedOffset() [ baseVoiInVps ]; 333 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 334 } 335 if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 ) 336 { 337 AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale () [ baseVoiInVps ] ); 338 AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset () [ baseVoiInVps ] ); 339 } 340 else 341 { 342 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = 1; 343 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedScale () [ baseVoiInVps ]; 344 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedOffset () [ baseVoiInVps ]; 345 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 346 } 347 } 348 } 349 } 350 #else 257 351 UInt uiViewIndex = pcSlice->getViewIndex(); 258 352 if( m_vps->getCamParPresent( uiViewIndex ) ) … … 289 383 } 290 384 } 385 #endif 386 387 291 388 } 292 389 … … 311 408 if( iPOC == m_firstReceivedPoc ) 312 409 { 410 #if HHI_CAM_PARA_K0052 411 fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx ViewIdVal\n" ); 412 fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" ); 413 414 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 415 { 416 fprintf( m_pCodedScaleOffsetFile, "%13d %13d\n", m_vps->getViewOIdxList( voiInVps ), m_vps->getViewIdVal( m_vps->getViewOIdxList( voiInVps ) ) ); 417 } 418 fprintf( m_pCodedScaleOffsetFile, "\n\n"); 419 fprintf( m_pCodedScaleOffsetFile, "# StartFrame EndFrame TargetVOI BaseVOI CodedScale CodedOffset Precision\n" ); 420 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 421 } 422 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 423 { 424 Int iS = iPOC; 425 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 426 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 427 { 428 for( UInt baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 429 { 430 if( voiInVps != baseVoiInVps ) 431 { 432 if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 ) 433 { 434 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 435 iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 436 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 437 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() ); 438 #else 313 439 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 314 440 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); … … 325 451 Int iS = iPOC; 326 452 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 453 #if HHI_CAM_PARA_K0052 454 for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ ) 455 { 456 for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ ) 457 #else 327 458 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 328 459 { 329 460 for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ ) 461 #endif 330 462 { 331 463 if( uiViewIndex != uiBaseIndex ) … … 333 465 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 334 466 { 467 #if HHI_CAM_PARA_K0052 468 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 469 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() ); 470 #else 335 471 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 336 472 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 473 #endif 474 #endif 337 475 } 338 476 } … … 417 555 #if !H_MV 418 556 initROM(); 557 #endif 558 #if H_3D_ANNEX_SELECTION_FIX 559 m_cCavlcDecoder.setDecTop( this ); 419 560 #endif 420 561 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO ); … … 727 868 #endif 728 869 #if H_3D 870 #if !HHI_INTER_COMP_PRED_K0052 729 871 m_apcSlicePilot->init3dToolParameters(); 872 #endif 730 873 #endif 731 874 pps->setSPS(sps); … … 955 1098 xActivateParameterSets(); 956 1099 1100 #if SONY_MV_V_CONST_C0078 1101 //Check Multiview Main profile constraint in G.11.1.1 1102 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 1103 // for the layer with nuh_layer_id equal to i in subBitstream, 1104 // inter_view_mv_vert_constraint_flag shall be equal to 1 1105 // in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer. 1106 if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN 1107 && 1108 m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1 1109 ) 1110 { 1111 assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 ); 1112 } 1113 #endif 1114 957 1115 if (m_apcSlicePilot->isNextSlice()) 958 1116 { … … 1074 1232 #endif 1075 1233 #endif 1234 #if HHI_RES_PRED_K0052 1235 pcSlice->setIvPicLists( m_ivPicLists ); 1236 #endif 1237 1076 1238 if (bNextSlice) 1077 1239 { … … 1109 1271 1110 1272 #if H_3D 1273 #if !HHI_RES_PRED_K0052 1111 1274 pcSlice->setIvPicLists( m_ivPicLists ); 1275 #endif 1276 1277 #if HHI_INTER_COMP_PRED_K0052 1278 pcSlice->checkInCompPredRefLayers(); 1112 1279 #if H_3D_IV_MERGE 1113 1280 #if H_3D_FCO … … 1117 1284 #endif 1118 1285 #endif 1286 #else 1287 #if H_3D_IV_MERGE 1288 #if H_3D_FCO 1289 //assert( !getIsDepth() ); 1290 #else 1291 assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) ); 1292 #endif 1293 #endif 1294 #endif 1119 1295 #endif 1120 1296 #if H_MV
Note: See TracChangeset for help on using the changeset viewer.