Changeset 139 in 3DVCSoftware for branches/HTM-4.0-Nokia/source/App/TAppDecoder
- Timestamp:
- 24 Sep 2012, 14:08:01 (12 years ago)
- Location:
- branches/HTM-4.0-Nokia/source/App/TAppDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0-Nokia/source/App/TAppDecoder/TAppDecTop.cpp
r105 r139 87 87 increaseNumberOfViews( 1 ); 88 88 #endif 89 89 #if FLEX_CODING_ORDER 90 Int iDepthViewIdx = 0; 91 Int iTextureViewIdx=0; 92 Bool first_frame=1; 93 Bool viewid_zero=true; 94 Int FCO_index=0; //when the current frame is not first frame,use FCO_index stand for viewDepth. 95 #endif 96 90 97 #if SONY_COLPIC_AVAILABILITY 91 98 m_tDecTop[0]->setViewOrderIdx(0); 92 99 #endif 100 93 101 Int viewDepthId = 0; 94 102 Int previousViewDepthId = 0; … … 102 110 pcListPic[i] = NULL; 103 111 newPicture[i] = false; 112 #if FLEX_CODING_ORDER 113 FCO_Order[i]=NULL; 114 #endif 104 115 } 105 116 … … 156 167 depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId); 157 168 } 158 viewDepthId = nalu.m_layerId; // coding order T0D0T1D1T2D2 169 #if FLEX_CODING_ORDER 170 if (viewId>0) 171 { 172 viewid_zero=false; 173 } 174 if (viewid_zero==false&&viewId==0) 175 { 176 first_frame=0; //if viewId has been more than zero and now it set to zero again, we can see that it is not the first view 177 } 178 if (first_frame) 179 { // if the current view is first frame, we set the viewDepthId as texture plus depth and get the FCO order 180 viewDepthId = iDepthViewIdx+iTextureViewIdx; 181 FCO_viewDepthId=viewDepthId; 182 } 183 else 184 {//if current view is not first frame, we set the viewDepthId depended on the FCO order 185 viewDepthId=0; 186 if (depth) 187 { 188 for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ ) 189 { 190 if (FCO_Order[FCO_index]=='D') 191 { 192 if (viewId==viewDepthId) 193 break; 194 else 195 viewDepthId++; 196 } 197 } 198 } 199 else 200 { 201 for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ ) 202 { 203 if (FCO_Order[FCO_index]=='T') 204 { 205 if (viewId==viewDepthId) 206 break; 207 else 208 viewDepthId++; 209 } 210 } 211 } 212 213 viewDepthId=FCO_index; 214 215 } 216 217 218 #else 219 viewDepthId = nalu.m_layerId; // coding order T0D0T1D1T2D2 220 #endif 221 159 222 #else 160 223 Int viewId = nalu.m_viewId; 161 224 Int depth = nalu.m_isDepth ? 1 : 0; 162 viewDepthId = viewId * 2 + depth; // coding order T0D0T1D1T2D2 225 #if FLEX_CODING_ORDER 226 if (viewId>0) 227 { 228 viewid_zero=false; 229 } 230 if (viewid_zero==false&&viewId==0) 231 { 232 first_frame=0; 233 } 234 if (first_frame) 235 { 236 viewDepthId = iDepthViewIdx+iTextureViewIdx; 237 FCO_viewDepthId=viewDepthId; 238 } 239 else 240 { 241 viewDepthId=0; 242 if (depth) 243 { 244 for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ ) 245 { 246 if (FCO_Order[FCO_index]=='D') 247 { 248 if (viewId==viewDepthId) 249 break; 250 else 251 viewDepthId++; 252 } 253 } 254 } 255 else 256 { 257 for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ ) 258 { 259 if (FCO_Order[FCO_index]=='T') 260 { 261 if (viewId==viewDepthId) 262 break; 263 else 264 viewDepthId++; 265 } 266 } 267 } 268 269 viewDepthId=FCO_index; 270 271 } 272 #else 273 viewDepthId = viewId * 2 + depth; // coding order T0D0T1D1T2D2 274 #endif 275 163 276 #endif 164 277 … … 190 303 for( Int i = 0; i < m_tDecTop.size(); i++ ) 191 304 { 305 //#if FLEX_CODING_ORDER 306 // FCO_Order[i]=NULL; 307 //#endif 192 308 m_tDecTop[i]->compressMotion( uiPOC[i] ); 193 309 } … … 209 325 { 210 326 previousPictureDecoded = true; 327 #if FLEX_CODING_ORDER 328 if (first_frame) 329 { 330 if (depth) 331 { 332 iDepthViewIdx++; 333 FCO_Order[viewDepthId]='D'; 334 } 335 else 336 { 337 iTextureViewIdx++; 338 FCO_Order[viewDepthId]='T'; 339 } 340 } 341 342 343 344 #endif 211 345 } 212 346 } … … 215 349 { 216 350 m_tDecTop[viewDepthId]->executeDeblockAndAlf(uiPOC[viewDepthId], pcListPic[viewDepthId], m_iSkipFrame, m_pocLastDisplay[viewDepthId]); 351 217 352 } 218 353 if( pcListPic[viewDepthId] ) … … 234 369 previousViewDepthId = viewDepthId; 235 370 } 371 372 373 374 375 236 376 if( m_cCamParsCollector.isInitialized() ) 237 377 { … … 502 642 TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth ) 503 643 { 644 #if FLEX_CODING_ORDER 645 Int viewnumber=0; 646 Int i=0; 647 Bool FCO_flag=0; 648 if (viewId>FCO_viewDepthId) 649 { 650 return NULL; 651 } 652 else 653 { 654 if (isDepth) 655 { 656 for ( i=0; i<=FCO_viewDepthId;i++) 657 { 658 if (FCO_Order[i]=='D') 659 { 660 if (viewnumber==viewId) 661 { 662 FCO_flag=1; 663 break; 664 } 665 else 666 viewnumber++; 667 } 668 } 669 } 670 else 671 { 672 for ( i=0; i<=FCO_viewDepthId;i++) 673 { 674 if (FCO_Order[i]=='T') 675 { 676 if (viewnumber==viewId) 677 { 678 FCO_flag=1; 679 break; 680 } 681 else 682 viewnumber++; 683 } 684 } 685 } 686 if (FCO_flag) 687 { 688 return m_tDecTop[i]; 689 } 690 else 691 return NULL; 692 693 } 694 695 // coding order T0D0T1D1T2D2 696 #else 504 697 return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2]; // coding order T0D0T1D1T2D2 698 #endif 699 /* 700 //original code 701 return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2]; // coding order T0D0T1D1T2D2 702 */ 505 703 } 506 704 … … 520 718 { 521 719 assert( ( viewId >= 0 ) ); 522 720 #if FLEX_CODING_ORDER 721 if (getTDecTop(viewId,isDepth)) 722 { 723 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 724 TComPic* pcPic = NULL; 725 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 726 { 727 if( (*it)->getPOC() == poc ) 728 { 729 pcPic = *it; 730 break; 731 } 732 } 733 return pcPic; 734 } 735 else 736 return NULL; 737 #else 523 738 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 524 739 TComPic* pcPic = NULL; … … 532 747 } 533 748 return pcPic; 749 #endif 750 751 534 752 } 535 753 //! \} -
branches/HTM-4.0-Nokia/source/App/TAppDecoder/TAppDecTop.h
r100 r139 70 70 std::vector<Int> m_pocLastDisplay; ///< last POC in display order 71 71 Bool m_useDepth; 72 72 #if FLEX_CODING_ORDER 73 Int FCO_viewDepthId; 74 Char FCO_Order[MAX_VIEW_NUM*2]; 75 #endif 73 76 FILE* m_pScaleOffsetFile; 74 77 CamParsCollector m_cCamParsCollector;
Note: See TracChangeset for help on using the changeset viewer.