Changeset 1173 in 3DVCSoftware for branches/HTM-13.1-dev0/source/Lib/TLibCommon


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

K0052: Moved Dppb_flag and sdc_flag

Location:
branches/HTM-13.1-dev0/source/Lib/TLibCommon
Files:
5 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
Note: See TracChangeset for help on using the changeset viewer.