Changeset 42 in 3DVCSoftware for trunk/source/App/TAppDecoder
- Timestamp:
- 26 Mar 2012, 18:05:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r21 r42 126 126 NalUnitType eNalUnitType; 127 127 128 #if FLEX_CODING_ORDER 129 Int iDepthViewIdx = 0; 130 Bool bCountDepthViewIdx = false; // a flag which avoid repeating assign a value to iDepthViewIdx 131 Bool bNewPictureType =true; 132 Bool bFirstDepth = false; 133 #endif 128 134 129 135 while ( !bEos ) … … 136 142 if( bIsDepth ) 137 143 { 144 #if FLEX_CODING_ORDER 145 if (!bFirstSliceDecoded) m_acTDecDepthTopList[iDepthViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iDepthViewIdx] ,bNewPictureType); 146 m_acTDecDepthTopList[iDepthViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iDepthViewIdx]); 147 148 #else 138 149 if (!bFirstSliceDecoded) m_acTDecDepthTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iViewIdx] ); 139 150 m_acTDecDepthTopList[iViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iViewIdx]); 151 #endif 140 152 } 141 153 else 142 154 { 155 #if FLEX_CODING_ORDER 156 if (!bFirstSliceDecoded) m_acTDecTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx], bNewPictureType); 157 #else 143 158 if (!bFirstSliceDecoded) m_acTDecTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx] ); 144 m_acTDecTopList[iViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx]); 159 #endif 160 m_acTDecTopList[iViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx]); 145 161 } 146 162 if( pcListPic ) … … 156 172 Bool bNewPicture; 157 173 if( bIsDepth ) 174 #if FLEX_CODING_ORDER 175 bNewPicture = m_acTDecDepthTopList[iDepthViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iDepthViewIdx], bNewPictureType); 176 #else 158 177 bNewPicture = m_acTDecDepthTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iViewIdx] ); 178 #endif 159 179 else 180 #if FLEX_CODING_ORDER 181 bNewPicture = m_acTDecTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx], bNewPictureType ); 182 #else 160 183 bNewPicture = m_acTDecTopList[iViewIdx]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx] ); 184 #endif 161 185 bFirstSliceDecoded = true; 186 187 #if FLEX_CODING_ORDER 188 if (eNalUnitType == NAL_UNIT_SPS) 189 { 190 if( cComSPS.isDepth() && (m_bUsingDepth==false) ) // expected not using depth, but bitstream are using depth 191 { // know from sps 192 assert( cComSPS.getViewId() == 0 && iDepthViewIdx == 0 && !bIsDepth ); 193 startUsingDepth() ; 194 } 195 if (cComSPS.isDepth()) 196 { 197 if (cComSPS.getViewId() >= m_acTVideoIOYuvDepthReconFileList.size()) 198 { 199 assert( cComSPS.getViewId() == m_acTVideoIOYuvReconFileList.size() ); 200 increaseNumberOfViews(cComSPS.getViewId()+1); 201 } 202 203 m_acTDecDepthTopList[cComSPS.getViewId()]->setSPS(cComSPS); 204 } 205 else 206 { 207 if (cComSPS.getViewId() >= m_acTVideoIOYuvReconFileList.size()) 208 { 209 assert( cComSPS.getViewId() == m_acTVideoIOYuvReconFileList.size() ); 210 increaseNumberOfViews(cComSPS.getViewId()+1); 211 } 212 m_acTDecTopList[cComSPS.getViewId()]->setSPS(cComSPS); 213 } 214 bEos = m_cTVideoIOBitstreamFile.readBits( pcBitstream ); 215 assert( !bEos); 216 if( cComSPS.isDepth() ) 217 m_acTDecDepthTopList[cComSPS.getViewId()]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiDepthPOCLastDisplayList[cComSPS.getViewId()], bNewPictureType); // decode PPS 218 else 219 m_acTDecTopList[cComSPS.getViewId()]->decode( bEos, pcBitstream, uiPOC, pcListPic, eNalUnitType, cComSPS, m_iSkipFrame, m_aiPOCLastDisplayList[cComSPS.getViewId()], bNewPictureType); // decode PPS 220 assert( eNalUnitType == NAL_UNIT_PPS ); 221 } 222 #else 162 223 163 224 if( eNalUnitType == NAL_UNIT_SPS ) … … 188 249 assert( eNalUnitType == NAL_UNIT_PPS ); 189 250 } 251 252 #endif 190 253 assert( eNalUnitType != NAL_UNIT_SEI ); // not yet supported for MVC 191 254 if (bNewPicture) 192 255 { 193 256 if( bIsDepth ) 257 #if FLEX_CODING_ORDER 258 m_acTDecDepthTopList[iDepthViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iDepthViewIdx]); 259 #else 194 260 m_acTDecDepthTopList[iViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiDepthPOCLastDisplayList[iViewIdx]); 261 #endif 195 262 else 196 263 m_acTDecTopList[iViewIdx]->executeDeblockAndAlf( bEos, pcBitstream, uiPOC, pcListPic, m_iSkipFrame, m_aiPOCLastDisplayList[iViewIdx]); … … 199 266 bFirstSliceDecoded = false; 200 267 201 if( m_bUsingDepth && !bIsDepth ) 202 { 203 bIsDepth = true; 268 #if FLEX_CODING_ORDER 269 if (m_bUsingDepth) 270 { 271 bIsDepth = bNewPictureType; 272 273 } 274 if (bCountDepthViewIdx == false ) 275 { 276 bCountDepthViewIdx = true; 277 if (bIsDepth == true) 278 { 279 bFirstDepth = true; 280 bCountDepthViewIdx = true; 281 } 282 if (!bFirstDepth && !bIsDepth) 283 { 284 iViewIdx++; 285 bCountDepthViewIdx = false; 286 } 287 204 288 } 205 289 else 206 290 { 207 bIsDepth = false; 208 if( iViewIdx<m_acTDecTopList.size()-1) 209 { 210 iViewIdx++ ; 291 if (bIsDepth) 292 { 293 iDepthViewIdx++; 211 294 } 212 295 else 213 296 { 297 iViewIdx ++; 298 } 299 300 if (iViewIdx >= m_acTDecTopList.size() || iDepthViewIdx >= m_acTDecDepthTopList.size()) 301 { 302 bFirstDepth = false; 214 303 iViewIdx = 0; 215 304 iDepthViewIdx = 0; 305 bCountDepthViewIdx = false; 216 306 // end of access unit: delete extra pic buffers 217 307 Int iNumViews = (Int)m_acTVideoIOYuvReconFileList.size(); … … 244 334 } 245 335 } 336 337 #else 338 339 if( m_bUsingDepth && !bIsDepth ) 340 { 341 bIsDepth = true; 342 } 343 else 344 { 345 bIsDepth = false; 346 if( iViewIdx<m_acTDecTopList.size()-1) 347 { 348 iViewIdx++ ; 349 } 350 else 351 { 352 iViewIdx = 0; 353 354 // end of access unit: delete extra pic buffers 355 Int iNumViews = (Int)m_acTVideoIOYuvReconFileList.size(); 356 for( Int iVId = 0; iVId < iNumViews; iVId++ ) 357 { 358 if( iVId < (Int)m_acTDecTopList.size() && m_acTDecTopList[iVId] ) 359 { 360 m_acTDecTopList[iVId]->deleteExtraPicBuffers( (Int)uiPOC ); 361 } 362 if( iVId < (Int)m_acTDecDepthTopList.size() && m_acTDecDepthTopList[iVId] ) 363 { 364 m_acTDecDepthTopList[iVId]->deleteExtraPicBuffers( (Int)uiPOC ); 365 } 366 } 367 368 #if AMVP_BUFFERCOMPRESS 369 // compress motion for entire access unit 370 for( Int iVId = 0; iVId < iNumViews; iVId++ ) 371 { 372 if( iVId < (Int)m_acTDecTopList.size() && m_acTDecTopList[iVId] ) 373 { 374 m_acTDecTopList[iVId]->compressMotion( (Int)uiPOC ); 375 } 376 if( iVId < (Int)m_acTDecDepthTopList.size() && m_acTDecDepthTopList[iVId] ) 377 { 378 m_acTDecDepthTopList[iVId]->compressMotion( (Int)uiPOC ); 379 } 380 } 381 #endif 382 } 383 } 384 #endif 246 385 } 247 386 #else … … 506 645 m_acTDecDepthTopList.back()->create() ; 507 646 m_acTDecDepthTopList.back()->init( this, false ); 508 m_acTDecDepthTopList.back()->setViewIdx((Int)m_acTDecTopList.size()-1); 647 #if FLEX_CODING_ORDER 648 Int iNumofgen = (Int)m_acTDecDepthTopList.size(); 649 m_acTDecDepthTopList.back()->setViewIdx(iNumofgen-1); 650 #else 651 m_acTDecDepthTopList.back()->setViewIdx((Int)m_acTDecTopList.size()-1); 652 #endif 653 509 654 m_acTDecDepthTopList.back()->setPictureDigestEnabled(m_pictureDigestEnabled); 510 655 m_acTDecDepthTopList.back()->setToDepth( true );
Note: See TracChangeset for help on using the changeset viewer.