Changeset 1173 in 3DVCSoftware


Ignore:
Timestamp:
5 Apr 2015, 23:05:17 (9 years ago)
Author:
tech
Message:

K0052: Moved Dppb_flag and sdc_flag

Location:
branches/HTM-13.1-dev0
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r1164 r1173  
    781781  // segmentation of texture block --> mask IDs
    782782  Pel*  pDepthBlockStart      = pDepthPels;
    783  
     783
    784784  // first compute average of depth block for thresholding
    785785  Int iSumDepth = 0;
     
    790790  uiMaxDepth = pDepthPels[ 0 ];
    791791  iSumDepth  = pDepthPels[ 0 ];
    792     UInt t=0;
     792  UInt t=0;
    793793  Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth();
    794794  Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 
     
    796796  if( pcCU->getSlice()->getDepthRefinementFlag(  ) )
    797797  {
    798       cDv.setVer(0);
     798    cDv.setVer(0);
    799799  }
    800800  Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);
    801801  Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);
    802 if (iBlkX>(Int)(iPictureWidth - uiWidth))
    803 {
    804   iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ];
    805   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
    806   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
    807 }
    808 else
    809 {
    810   iSumDepth += pDepthPels[ uiWidth - 1 ];
    811   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);
    812   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);
    813 }
    814 if (iBlkY>(Int)(iPictureHeight - uiHeight))
    815 {
    816   iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ];
    817   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
    818   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
    819 }
    820 else
    821 {
    822   iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];
    823   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
    824   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
    825 }
    826 if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth))
    827 {
    828   iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ];
    829   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
    830   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
    831 }
    832 else if (iBlkY>(Int)(iPictureHeight - uiHeight))
    833 {
    834   iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ];
    835   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
    836   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
    837 }
    838 else if (iBlkX>(Int)(iPictureWidth - uiWidth))
    839 {
    840   iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ];
    841   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
    842   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
    843 }
    844 else
    845 {
    846   iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];
    847   uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
    848   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
    849 }
     802  if (iBlkX>(Int)(iPictureWidth - uiWidth))
     803  {
     804    iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ];
     805    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
     806    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
     807  }
     808  else
     809  {
     810    iSumDepth += pDepthPels[ uiWidth - 1 ];
     811    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);
     812    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);
     813  }
     814  if (iBlkY>(Int)(iPictureHeight - uiHeight))
     815  {
     816    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ];
     817    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
     818    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
     819  }
     820  else
     821  {
     822    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];
     823    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
     824    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
     825  }
     826  if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth))
     827  {
     828    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ];
     829    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
     830    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
     831  }
     832  else if (iBlkY>(Int)(iPictureHeight - uiHeight))
     833  {
     834    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ];
     835    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
     836    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
     837  }
     838  else if (iBlkX>(Int)(iPictureWidth - uiWidth))
     839  {
     840    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ];
     841    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
     842    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
     843  }
     844  else
     845  {
     846    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];
     847    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
     848    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
     849  }
    850850#else
    851851  iSumDepth  = pDepthPels[ 0 ];
     
    864864  uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
    865865#endif
    866  
     866
    867867  // don't generate mask for blocks with small depth range (encoder decision)
    868868  if( uiMaxDepth - uiMinDepth < 10 )
     
    870870    return false;
    871871  }
    872  
     872
    873873  AOF(uiWidth==uiHeight);
    874874  Int iMean = iSumDepth >> 2;
    875  
     875
    876876  // start again for segmentation
    877877  pDepthPels = pDepthBlockStart;
    878  
     878
    879879  Bool bInvertMask = pDepthPels[0]>iMean; // top-left segment needs to be mapped to partIdx 0
    880  
     880
    881881  // generate mask
    882882  UInt uiSumPix[2] = {0,0};
     
    894894      {
    895895        depthPel = pDepthPels[x];
    896          t=x;
     896        t=x;
    897897      }
    898898#else
    899899      Int depthPel = pDepthPels[x];
    900900#endif
    901      
     901
    902902      // decide which segment this pixel belongs to
    903903      Int ucSegment = (Int)(depthPel>iMean);
    904      
     904
    905905      if( bInvertMask )
    906906      {
    907907        ucSegment = 1-ucSegment;
    908908      }
    909      
     909
    910910      // count pixels for each segment
    911911      uiSumPix[ucSegment]++;
    912      
     912
    913913      // set mask value
    914914      pMask[x] = (Bool)ucSegment;
    915915    }
    916    
     916
    917917    // next row
    918918#if HS_DBBP_CLEAN_K0048
    919919    if (!(iBlkY+y+1>iPictureHeight))
    920920#endif
    921     pDepthPels += uiDepthStride;
     921      pDepthPels += uiDepthStride;
    922922    pMask += MAX_CU_SIZE;
    923923  }
    924  
     924
    925925  // don't generate valid mask for tiny segments (encoder decision)
    926926  // each segment needs to cover at least 1/8th of block
     
    930930    return false;
    931931  }
    932  
     932
    933933  // all good
    934934  return true;
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.cpp

    r1172 r1173  
    391391Bool g_tracePU = false;
    392392Bool g_traceTU = false;
    393 Bool g_disableNumbering = true;
     393Bool g_disableNumbering = false;
    394394Bool g_disableHLSTrace = false;
    395 UInt64 g_stopAtCounter       = 0;
     395UInt64 g_stopAtCounter       = 937234;
    396396Bool g_traceCopyBack         = false;
    397397Bool g_decTraceDispDer       = false;
    398398Bool g_decTraceMvFromMerge   = false;
    399399Bool g_decTracePicOutput     = false;
    400 Bool g_stopAtPos             = false;
    401 Bool g_outputPos             = false;
    402 Bool g_traceCameraParameters = true;
     400Bool g_stopAtPos             = true;
     401Bool g_outputPos             = true;   
     402Bool g_traceCameraParameters = false;
     403Bool g_encNumberOfWrittenBits     = true;
    403404#endif
    404405#endif
     
    607608    if ( stopAtCU )        // Stop at CU with specific size
    608609    {   
    609       stopFlag = ( cuPelX  == 0 ) && ( cuPelY  == 0 ) && ( cuWidth == 16 ) && ( cuHeight == 16 );
     610      stopFlag = ( cuPelX  == 0 ) && ( cuPelY  == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8 );
    610611    }
    611612    else
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.h

    r1172 r1173  
    230230
    231231#ifndef ENC_DEC_TRACE
    232 #define ENC_DEC_TRACE   0
     232#define ENC_DEC_TRACE   0  
    233233#endif
    234234
     
    266266 extern Bool   g_outputPos;             // Output position
    267267 extern Bool   g_traceCameraParameters; // Trace camera parameters
     268 extern Bool   g_encNumberOfWrittenBits;// Trace number of written bits
    268269
    269270#define DTRACE_CU(x,y)             writeToTraceFile( x,y, g_traceCU );
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h

    r1172 r1173  
    12001200#endif
    12011201#endif
     1202
    12021203#if HHI_INTER_COMP_PRED_K0052
    12031204#if HHI_CAM_PARA_K0052
     
    12161217    assert( 0 );   
    12171218    return -1;
    1218   }; 
     1219  };
    12191220
    12201221#if HHI_CAM_PARA_K0052
     
    14041405#else
    14051406  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
     1407
    14061408  Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
    14071409  Void setCamParPresent      ( Int viewIndex, Bool val )  { m_bCamParPresent[viewIndex] = val; }
     
    30373039
    30383040    for( Int i = 0; i <= numCurCmpLIds - 1; i++ )
    3039     {
     3041    {     
    30403042      m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] ));
    30413043#if HHI_CAM_PARA_K0052
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r1172 r1173  
    335335#define HHI_RES_PRED_K0052                     1
    336336#define HHI_CAM_PARA_K0052                     1
     337#define HHI_MOVE_SYN_K0052                     1
    337338#define H_3D_ANNEX_SELECTION_FIX               1
    338339#endif
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r1172 r1173  
    559559  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    560560
     561#if !HHI_MOVE_SYN_K0052
    561562#if H_3D_DIM_SDC
    562563  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    563564#endif
     565#endif
    564566  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    565567  {
     
    568570    if(pcCU->getIPCMFlag(uiAbsPartIdx))
    569571    {
     572#if HHI_MOVE_SYN_K0052
     573#if H_3D_DIM_SDC
     574      m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
     575#endif
     576#endif
    570577      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    571578#if H_3D_IV_MERGE
     
    581588  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    582589  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
     590
    583591  // Coefficient decoding
    584592  Bool bCodeDQP = getdQPFlag();
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1170 r1173  
    161161{
    162162  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
    163  
     163#if !HHI_MOVE_SYN_K0052 
    164164#if H_3D_DBBP
    165165if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     
    168168  }
    169169#endif
     170#endif
    170171}
    171172
     
    175176  {
    176177    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
     178#if HHI_MOVE_SYN_K0052
     179    decodeSDCFlag   ( pcCU, uiAbsPartIdx, uiDepth );   
     180#endif
    177181#if H_3D_DIM_SDC
    178182#if H_3D_DISABLE_CHROMA
     183#if !HHI_MOVE_SYN_K0052
    179184    if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
     185#else
     186    if(!pcCU->getSlice()->getIsDepth() )
     187#endif
    180188#else
    181189    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     
    257265  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    258266#endif
     267#if HHI_MOVE_SYN_K0052
    259268  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    260269  {
     
    265274    //DTRACE_PU("x1", uiTPelY)
    266275#endif
     276
     277    ////// Parse PUs syntax
    267278    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
    268279    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
    269280    {
    270       decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
     281      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );     
     282    }
     283    else
     284    {
     285      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
     286      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     287      {       
     288        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     289        {
     290          decodeRefFrmIdxPU( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     291          decodeMvdPU      ( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     292          decodeMVPIdxPU   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     293        }
     294      }
     295    }
     296  }
     297
     298  ////// Parse CUs extension syntax
     299  decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     300  decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
     301
     302#if H_3D_ARP
     303  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     304#endif
     305#if H_3D_IC
     306  decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     307#endif
     308
     309  ////// Decode motion vectors
     310  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
     311  {
     312    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
     313    {
    271314      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    272 #if H_3D_ARP
    273       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    274 #endif
    275 #if H_3D_IC
    276       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    277 #endif
    278315#if H_3D_DBBP
    279316      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     
    408445    else
    409446    {
     447      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     448      {       
     449        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     450        {
     451          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     452        }
     453      }
     454    }
     455
     456    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     457    {
     458      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
     459      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
     460      pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth);
     461    }
     462  }
     463#else
     464  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
     465  {
     466#if H_MV_ENC_DEC_TRAC
     467    DTRACE_PU_S("=========== prediction_unit ===========\n")
     468    // ToDo:
     469    //DTRACE_PU("x0", uiLPelX)
     470    //DTRACE_PU("x1", uiTPelY)
     471#endif
     472    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
     473    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
     474    {
     475      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
     476      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     477#if H_3D_ARP
     478      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     479#endif
     480#if H_3D_IC
     481      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     482#endif
     483#if H_3D_DBBP
     484      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     485#else
     486      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
     487#endif
     488      {
     489        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     490        if ( !isMerged )
     491        {
     492#if H_3D_VSP
     493          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     494          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     495#if H_3D_SPIVMP
     496          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     497#endif
     498          pcSubCU->initAvailableFlags();
     499          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     500          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
     501#if H_3D_SPIVMP
     502            , pcMvFieldSP, puhInterDirSP
     503#endif
     504            , numValidMergeCand );
     505          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     506#if H_3D_SPIVMP
     507            , bSPIVMPFlag
     508#endif
     509            , numValidMergeCand );
     510          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     511
     512#else
     513#if H_3D
     514          pcSubCU->initAvailableFlags();
     515          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     516          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     517
     518#else
     519          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     520#endif
     521#endif
     522          isMerged = true;
     523        }
     524        pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
     525      }
     526      else
     527      {
     528        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     529#if H_3D_VSP
     530        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     531        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     532#if H_3D_SPIVMP
     533        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     534#endif
     535        pcSubCU->initAvailableFlags();
     536        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     537        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
     538#if H_3D_SPIVMP
     539          , pcMvFieldSP, puhInterDirSP
     540#endif
     541          ,numValidMergeCand, uiMergeIndex );
     542        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     543#if H_3D_SPIVMP
     544          , bSPIVMPFlag
     545#endif
     546          ,numValidMergeCand );
     547        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     548#else
     549#if H_3D
     550        pcSubCU->initAvailableFlags();
     551        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     552        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     553#else
     554        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     555#endif
     556#endif
     557      }
     558      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     559
     560      TComMv cTmpMv( 0, 0 );
     561      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     562      {       
     563        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     564        {
     565          pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
     566          pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
     567          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
     568          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
     569#if H_3D_VSP
     570#if H_3D_DBBP
     571          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
     572#else
     573          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
     574#endif
     575          {
     576            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
     577            {
     578              UInt dummy;
     579              Int vspSize;
     580              Int width, height;
     581              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
     582              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
     583              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
     584            }
     585          }
     586#endif
     587        }
     588      }
     589#if H_3D_SPIVMP
     590      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
     591      if (bSPIVMPFlag[uiMergeIndex] != 0)
     592      {
     593        Int iWidth, iHeight;
     594        UInt uiIdx;
     595        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
     596
     597        UInt uiSPAddr;
     598
     599        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     600
     601        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     602
     603        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
     604        {
     605          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
     606          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
     607          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
     608          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
     609        }
     610      }
     611#endif
     612    }
     613    else
     614    {
    410615      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
    411616      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     
    432637    }
    433638  }
     639#endif
    434640#if H_3D_SPIVMP
    435641  delete[] pcMvFieldSP;
     
    500706}
    501707
     708#if HHI_MOVE_SYN_K0052
    502709Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
    503710{
    504711  Int iMVPIdx = -1;
    505 
    506   TComMv cZeroMv( 0, 0 );
    507   TComMv cMv     = cZeroMv;
    508   Int    iRefIdx = -1;
    509 
    510   TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
    511   AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
    512 
    513   iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
    514   cMv = cZeroMv;
    515712
    516713  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
     
    530727#endif
    531728  }
     729  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
     730}
     731
     732Void TDecEntropy::decodeMvsAMVP( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     733{
     734  TComMv cZeroMv( 0, 0 );
     735  TComMv cMv     = cZeroMv;
     736  Int    iRefIdx = -1;
     737
     738  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
     739  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
     740
     741  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
     742  cMv = cZeroMv;
     743
     744  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
     745  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
     746  if ( iRefIdx >= 0 )
     747  {
     748    m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv);
     749    cMv += pcSubCUMvField->getMvd( uiPartAddr );
     750  }
     751
     752  PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr );
     753  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
     754}
     755
     756#else
     757Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     758{
     759  Int iMVPIdx = -1;
     760
     761  TComMv cZeroMv( 0, 0 );
     762  TComMv cMv     = cZeroMv;
     763  Int    iRefIdx = -1;
     764
     765  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
     766  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
     767
     768  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
     769  cMv = cZeroMv;
     770
     771  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
     772  {
     773    m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx );
     774#if H_MV_ENC_DEC_TRAC
     775#if ENC_DEC_TRACE
     776    if ( eRefList == REF_PIC_LIST_0 )
     777    {
     778      DTRACE_PU("mvp_l0_flag", iMVPIdx)
     779    }
     780    else
     781    {
     782      DTRACE_PU("mvp_l1_flag", iMVPIdx)
     783    }
     784#endif
     785#endif
     786  }
    532787  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
    533788  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
     
    542797  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
    543798}
    544 
     799#endif
    545800Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    546801{
     
    8761131{
    8771132  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
     1133#if HHI_MOVE_SYN_K0052
     1134  if ( pcCU->isSkipped( uiAbsPartIdx ) )
     1135  {
     1136    return;
     1137  }
     1138#endif
     1139
    8781140
    8791141  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) ||
     
    8951157Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    8961158{
    897   m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     1159#if HHI_MOVE_SYN_K0052
     1160  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     1161  {
     1162#endif
     1163    m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     1164#if HHI_MOVE_SYN_K0052
     1165  }
     1166#endif
    8981167}
    8991168#endif
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h

    r1163 r1173  
    152152  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    153153  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    154  
     154#if HHI_MOVE_SYN_K0052
     155  Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
     156#endif 
    155157  Void    setEntropyDecoder           ( TDecEntropyIf* p );
    156158  Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r1172 r1173  
    21912191
    21922192  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
    2193 
     2193  DTRACE_CU("dc_only_flag", uiSymbol)
    21942194  if( uiSymbol )
    21952195  {
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r1172 r1173  
    16221622  m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    16231623 
     1624#if !HHI_MOVE_SYN_K0052
    16241625#if H_3D_DIM_SDC
    16251626  m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
    16261627#endif
     1628#endif
    16271629  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    16281630  {
    16291631    m_pcEntropyCoder->encodeIPCMInfo( pcCU, uiAbsPartIdx );
    1630 
    16311632    if(pcCU->getIPCMFlag(uiAbsPartIdx))
    16321633    {
     1634#if HHI_MOVE_SYN_K0052
     1635#if H_3D_DIM_SDC
     1636      m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
     1637#endif 
     1638#endif
    16331639      // Encode slice finish
    16341640      finishCU(pcCU,uiAbsPartIdx,uiDepth);
     
    16391645  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    16401646  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1641 
     1647#if HHI_MOVE_SYN_K0052
     1648  m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx );
     1649#if H_3D_DIM_SDC
     1650  m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
     1651#endif 
     1652#endif
    16421653#if H_3D_ARP
    16431654  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
     
    28322843  m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
    28332844  m_pcEntropyCoder->encodePartSize( rpcTempCU, 0, uiDepth, true );
     2845#if !HHI_MOVE_SYN_K0052
    28342846#if H_3D_DIM_SDC
    28352847  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
    28362848#endif
     2849#endif
    28372850  m_pcEntropyCoder->encodePredInfo( rpcTempCU, 0,          true );
    28382851  m_pcEntropyCoder->encodeIPCMInfo(rpcTempCU, 0, true );
     2852#if HHI_MOVE_SYN_K0052
     2853#if H_3D_DIM_SDC
     2854  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
     2855#endif
     2856#endif
    28392857
    28402858  // Encode Coefficients
     
    29082926  m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
    29092927  m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true );
     2928#if !HHI_MOVE_SYN_K0052
    29102929#if H_3D_DIM_SDC
    29112930  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
    29122931#endif
     2932#endif
    29132933  m_pcEntropyCoder->encodeIPCMInfo ( rpcTempCU, 0, true );
    2914 
     2934#if HHI_MOVE_SYN_K0052
     2935#if H_3D_DIM_SDC
     2936  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
     2937#endif
     2938#endif
    29152939  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    29162940
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1170 r1173  
    271271  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
    272272 
     273#if !HHI_MOVE_SYN_K0052
    273274#if H_3D_DBBP
    274275  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     
    276277    encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
    277278  }
     279#endif
    278280#endif
    279281}
     
    861863Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    862864{
    863   if( bRD )
    864   {
    865     uiAbsPartIdx = 0;
    866   }
    867   m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx );
     865#if HHI_MOVE_SYN_K0052
     866  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() &&
     867    ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN ||
     868      pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) &&
     869      pcCU->getWidth(uiAbsPartIdx) > 8 &&
     870      pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     871  {
     872#endif
     873    if( bRD )
     874    {
     875      uiAbsPartIdx = 0;
     876    }
     877    m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx );
     878#if HHI_MOVE_SYN_K0052
     879  }
     880#endif
    868881}
    869882#endif
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h

    r1163 r1173  
    151151  Void    resetBits                 ()                        { m_pcEntropyCoderIf->resetBits();      }
    152152  Void    resetCoeffCost            ()                        { m_pcEntropyCoderIf->resetCoeffCost(); }
    153   UInt    getNumberOfWrittenBits    ()                        { return m_pcEntropyCoderIf->getNumberOfWrittenBits(); }
     153  UInt    getNumberOfWrittenBits    ()
     154  {
     155#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
     156    Bool oldJustDoIt = g_bJustDoIt;
     157    g_bJustDoIt = true;
     158    writeToTraceFile( "NumberOfWrittenBits", m_pcEntropyCoderIf->getNumberOfWrittenBits(), g_encNumberOfWrittenBits );
     159    g_bJustDoIt = oldJustDoIt;
     160#endif
     161    return m_pcEntropyCoderIf->getNumberOfWrittenBits();
     162  }
    154163  UInt    getCoeffCost              ()                        { return  m_pcEntropyCoderIf->getCoeffCost(); }
    155164  Void    resetEntropy              ()                        { m_pcEntropyCoderIf->resetEntropy();  }
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r1172 r1173  
    23672367  UInt uiSymbol = pcCU->getSDCFlag( uiAbsPartIdx ) ? 1 : 0;
    23682368  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
    2369 
     2369  DTRACE_CU("dc_only_flag", uiSymbol)
    23702370  m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
    23712371}
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r1169 r1173  
    924924#endif
    925925#endif
    926         m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     926          m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    927927      }
    928928#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     
    948948#endif
    949949#endif
    950       m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    951 
     950        m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
     951
     952#if !HHI_MOVE_SYN_K0052
    952953#if H_3D_DIM_SDC
    953       m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    954 #endif
    955       if (pcCU->isIntra(0) && pcCU->getPartitionSize(0) == SIZE_2Nx2N )
    956       {
    957         m_pcEntropyCoder->encodeIPCMInfo( pcCU, 0, true );
    958 
    959         if ( pcCU->getIPCMFlag (0))
    960         {
    961           return;
    962         }
    963       }
     954        m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     955#endif
     956#endif
     957        if (pcCU->isIntra(0) && pcCU->getPartitionSize(0) == SIZE_2Nx2N )
     958        {
     959          m_pcEntropyCoder->encodeIPCMInfo( pcCU, 0, true );
     960          if ( pcCU->getIPCMFlag (0))
     961          {
     962#if HHI_MOVE_SYN_K0052
     963#if H_3D_DIM_SDC
     964            m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     965#endif
     966#endif
     967            return;
     968          }
     969        }
    964970#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    965971      }
    966972#else
    967973#if H_3D_SINGLE_DEPTH
    968     }
     974      }
    969975#endif
    970976#endif
     
    975981#else
    976982#if H_3D_SINGLE_DEPTH
    977       if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    978       {
    979 #endif
    980 #endif
    981     // luma prediction mode
    982     if( pcCU->getPartitionSize(0) == SIZE_2Nx2N )
    983     {
    984       if( uiAbsPartIdx == 0 )
    985       {
    986         m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );
     983    if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     984    {
     985#endif
     986#endif
     987      // luma prediction mode
     988      if( pcCU->getPartitionSize(0) == SIZE_2Nx2N )
     989      {
     990        if( uiAbsPartIdx == 0 )
     991        {
     992          m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );
    987993#if H_3D_DIM_SDC
    988         if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE )
    989         {
    990           m_pcEntropyCoder->encodeDeltaDC( pcCU, 0 );
    991         }
    992 #endif
    993       }
    994     }
    995     else
    996     {
    997       UInt uiQNumParts = pcCU->getTotalNumPart() >> 2;
    998       if( uiTrDepth == 0 )
    999       {
    1000         assert( uiAbsPartIdx == 0 );
    1001         for( UInt uiPart = 0; uiPart < 4; uiPart++ )
    1002         {
    1003           m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts );
     994#if HHI_MOVE_SYN_K0052
    1004995#if H_3D_DIM_SDC
    1005           if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE )
     996          m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     997#endif
     998#endif
     999          if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE )
    10061000          {
    1007             m_pcEntropyCoder->encodeDeltaDC( pcCU, uiPart * uiQNumParts );
     1001            m_pcEntropyCoder->encodeDeltaDC( pcCU, 0 );
    10081002          }
    10091003#endif
    10101004        }
    10111005      }
    1012       else if( ( uiAbsPartIdx % uiQNumParts ) == 0 )
    1013       {
    1014         m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx );
     1006      else
     1007      {
     1008        UInt uiQNumParts = pcCU->getTotalNumPart() >> 2;
     1009        if( uiTrDepth == 0 )
     1010        {
     1011          assert( uiAbsPartIdx == 0 );
     1012          for( UInt uiPart = 0; uiPart < 4; uiPart++ )
     1013          {
     1014            m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts );
     1015
     1016#if HHI_MOVE_SYN_K0052
     1017          }
     1018          m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     1019          for( UInt uiPart = 0; uiPart < 4; uiPart++ )
     1020          {
     1021#endif
    10151022#if H_3D_DIM_SDC
    1016         if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE )
    1017         {
    1018           m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx );
    1019       }
    1020 #endif
    1021     }
    1022   }
     1023            if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE )
     1024            {
     1025              m_pcEntropyCoder->encodeDeltaDC( pcCU, uiPart * uiQNumParts );
     1026            }
     1027#endif
     1028          }
     1029        }
     1030        else if( ( uiAbsPartIdx % uiQNumParts ) == 0 )
     1031        {
     1032          m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx );
     1033#if H_3D_DIM_SDC
     1034#if HHI_MOVE_SYN_K0052
     1035          if( uiAbsPartIdx == 0 ) 
     1036          {
     1037            m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     1038          }
     1039#endif
     1040          if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE )
     1041          {
     1042            m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx );
     1043          }
     1044#endif
     1045        }
     1046      }
    10231047#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    1024  }
     1048    }
    10251049#else
    10261050#if H_3D_SINGLE_DEPTH
     
    22942318
    22952319  m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true );
     2320#if !HHI_MOVE_SYN_K0052
    22962321  m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     2322#endif
    22972323
    22982324  // encode pred direction + DC residual data
    22992325  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     2326#if HHI_MOVE_SYN_K0052
     2327  m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     2328#endif
     2329
    23002330  Bool bDummy = false;
    23012331  m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy );
     
    74907520    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    74917521    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
     7522#if !HHI_MOVE_SYN_K0052
    74927523#if H_3D_DIM_SDC
    74937524    m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    74947525#endif
     7526#endif
    74957527    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     7528#if HHI_MOVE_SYN_K0052
     7529#if H_3D_DIM_SDC
     7530    m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
     7531#endif
     7532#endif
    74967533#if H_3D_ARP
    7497     m_pcEntropyCoder->encodeARPW( pcCU , 0 );
     7534    m_pcEntropyCoder->encodeARPW( pcCU , 0  );
    74987535#endif
    74997536#if H_3D_IC
    75007537    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     7538#endif
     7539#if HHI_MOVE_SYN_K0052
     7540    m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true );
    75017541#endif
    75027542    Bool bDummy = false;
Note: See TracChangeset for help on using the changeset viewer.