Changeset 200 in 3DVCSoftware for branches/HTM-5.0-Nokia/source/App/TAppDecoder


Ignore:
Timestamp:
3 Dec 2012, 16:57:58 (12 years ago)
Author:
nokia
Message:

Reintegration of Flexible Coding Order to 3DV-HTM v5.1
To enable following params are required:
FCO : 1
FCOCodingOrder : T0D0D1D2T1T2
VSOConfig: [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][ox2 B(cc1) I(s1.25 s1.5 s1.75)]

Location:
branches/HTM-5.0-Nokia/source/App/TAppDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.0-Nokia/source/App/TAppDecoder/TAppDecTop.cpp

    r195 r200  
    8888#endif
    8989 
     90#if FLEX_CODING_ORDER
     91  Int iDepthViewIdx = 0;
     92  Int iTextureViewIdx=0;
     93  Bool first_frame=1;
     94  Bool viewid_zero=true;
     95  Int FCO_index=0;  //when the current frame is not first frame,use FCO_index stand for viewDepth.
     96#endif
     97
    9098#if SONY_COLPIC_AVAILABILITY
    9199  m_tDecTop[0]->setViewOrderIdx(0);
     
    102110    pcListPic[i] = NULL;
    103111    newPicture[i] = false;
     112#if FLEX_CODING_ORDER
     113    FCO_Order[i]=NULL;
     114#endif
     115
    104116  }
    105117
     
    161173        depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId);
    162174      }
    163       viewDepthId = nalu.m_layerId;   // coding order T0D0T1D1T2D2
     175#if FLEX_CODING_ORDER
     176      if (viewId>0)
     177      {
     178        viewid_zero=false;
     179      }
     180      if (viewid_zero==false&&viewId==0)
     181      {
     182        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
     183      }
     184      if (first_frame)
     185      { // if the current view is first frame, we set the viewDepthId as texture plus depth and get the FCO order
     186        viewDepthId = iDepthViewIdx+iTextureViewIdx;
     187        FCO_viewDepthId=viewDepthId;
     188      }
     189      else
     190      {//if current view is not first frame, we set the viewDepthId depended on the FCO order
     191        viewDepthId=0;
     192        if (depth)
     193        {
     194          for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ )
     195          {
     196            if (FCO_Order[FCO_index]=='D')
     197            {
     198              if (viewId==viewDepthId)
     199                break;
     200              else
     201                viewDepthId++;
     202            }
     203          }
     204        }
     205        else
     206        {
     207          for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ )
     208          {
     209            if (FCO_Order[FCO_index]=='T')
     210            {
     211              if (viewId==viewDepthId)
     212                break;
     213              else
     214                viewDepthId++;
     215            }
     216          }
     217        }
     218
     219        viewDepthId=FCO_index;
     220
     221      }
     222
     223
     224#else
     225       viewDepthId = nalu.m_layerId;   // coding order T0D0T1D1T2D2
     226#endif
     227   
    164228#else
    165229      Int viewId = nalu.m_viewId;
    166230      Int depth = nalu.m_isDepth ? 1 : 0;
    167       viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
     231#if FLEX_CODING_ORDER
     232      if (viewId>0)
     233      {
     234        viewid_zero=false;
     235      }
     236      if (viewid_zero==false&&viewId==0)
     237      {
     238        first_frame=0;
     239      }
     240      if (first_frame)
     241      {
     242        viewDepthId = iDepthViewIdx+iTextureViewIdx;
     243        FCO_viewDepthId=viewDepthId;
     244      }
     245      else
     246      {
     247        viewDepthId=0;
     248        if (depth)
     249        {
     250          for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ )
     251          {
     252            if (FCO_Order[FCO_index]=='D')
     253            {
     254              if (viewId==viewDepthId)
     255                break;
     256              else
     257                viewDepthId++;
     258            }
     259          }
     260        }
     261        else
     262        {
     263          for (FCO_index=0;FCO_index<2*MAX_VIEW_NUM;FCO_index++ )
     264          {
     265            if (FCO_Order[FCO_index]=='T')
     266            {
     267              if (viewId==viewDepthId)
     268                break;
     269              else
     270                viewDepthId++;
     271            }
     272          }
     273        }
     274
     275        viewDepthId=FCO_index;
     276
     277      }
     278#else
     279  viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
     280#endif
     281     
    168282#endif
    169283#endif     
     
    224338        {
    225339          previousPictureDecoded = true;
     340#if FLEX_CODING_ORDER
     341          if (first_frame)
     342          {
     343            if (depth)
     344            {
     345                iDepthViewIdx++;
     346                FCO_Order[viewDepthId]='D';
     347            }
     348            else
     349           {
     350                iTextureViewIdx++;
     351                FCO_Order[viewDepthId]='T';
     352           }
     353          }
     354
     355#endif
    226356        }
    227357      }
     
    527657TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth )
    528658{
     659#if FLEX_CODING_ORDER
     660  Int viewnumber=0;
     661  Int i=0;
     662  Bool FCO_flag=0;
     663  if (viewId>FCO_viewDepthId)
     664  {
     665    return NULL;
     666  }
     667  else
     668  {
     669    if (isDepth)
     670   {
     671      for ( i=0; i<=FCO_viewDepthId;i++)
     672      {
     673         if (FCO_Order[i]=='D')
     674         {
     675           if (viewnumber==viewId)
     676           {
     677             FCO_flag=1;
     678             break;
     679           }
     680           else
     681             viewnumber++;
     682         }
     683      }
     684    }
     685    else
     686    {
     687      for ( i=0; i<=FCO_viewDepthId;i++)
     688      {
     689        if (FCO_Order[i]=='T')
     690        {
     691          if (viewnumber==viewId)
     692          {
     693            FCO_flag=1;
     694            break;
     695          }
     696          else
     697            viewnumber++;
     698        }
     699      }
     700    }
     701    if (FCO_flag)
     702    {
     703      return m_tDecTop[i];
     704    }
     705    else
     706      return NULL;
     707   
     708  }
     709
     710    // coding order T0D0T1D1T2D2
     711#else
    529712  return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2];  // coding order T0D0T1D1T2D2
     713#endif
     714 
    530715}
    531716
     
    546731  assert( ( viewId >= 0 ) );
    547732
     733#if FLEX_CODING_ORDER
     734if (getTDecTop(viewId,isDepth))
     735{
     736   TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic();
     737   TComPic* pcPic = NULL;
     738   for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ )
     739   {
     740     if( (*it)->getPOC() == poc )
     741     {
     742       pcPic = *it;
     743       break;
     744     }
     745   }
     746   return pcPic;
     747}
     748else
     749  return NULL;
     750#else
     751
    548752  TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic();
    549753  TComPic* pcPic = NULL;
     
    557761  }
    558762  return pcPic;
     763#endif
    559764}
    560765//! \}
  • branches/HTM-5.0-Nokia/source/App/TAppDecoder/TAppDecTop.h

    r195 r200  
    7171  Bool                            m_useDepth;
    7272
     73#if FLEX_CODING_ORDER
     74  Int  FCO_viewDepthId;
     75  Char FCO_Order[MAX_VIEW_NUM*2];
     76#endif
     77
    7378  FILE*                           m_pScaleOffsetFile;
    7479  CamParsCollector                m_cCamParsCollector;
Note: See TracChangeset for help on using the changeset viewer.