Changeset 11 in 3DVCSoftware for branches/0.2-poznan-univ/source


Ignore:
Timestamp:
5 Feb 2012, 22:00:22 (13 years ago)
Author:
poznan-univ
Message:

Poznan disocclusion coding - CU Skip

Location:
branches/0.2-poznan-univ/source
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp

    r5 r11  
    13391339}
    13401340
    1341 
    13421341Void
    13431342TAppComCamPara::check( Bool bCheckViewRange, Bool bCheckFrameRange )
     
    14571456}
    14581457
     1458#if POZNAN_SYNTH
     1459Bool
     1460TAppComCamPara::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft)
     1461{
     1462  riNearestViewIdx = 0;
     1463
     1464  Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] );
     1465  Int  iFactor       = ( bDecencdingVN ? -1 : 1 );
     1466
     1467  if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor  <= 0 )
     1468  {
     1469    rbRenderFromLeft = true;
     1470  }
     1471  else
     1472  {
     1473    rbRenderFromLeft = false;
     1474  }
     1475
     1476  riRelDistToLeft = 128; //Not used for now;
     1477
     1478  return true;
     1479}
     1480#endif
     1481
     1482
     1483
    14591484Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx )
    14601485{
  • branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.h

    r5 r11  
    182182  Int                 synthRelNum2Idx           ( Int iRelNum );
    183183  Bool getLeftRightBaseView( Int iSynthViewIdx, Int &riLeftViewIdx, Int &riRightViewIdx, Int &riRelDistToLeft, Bool& rbIsBaseView );
     184#if POZNAN_SYNTH
     185  Bool getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft);
     186#endif
     187
    184188  Int                 getRelDistLeft            ( Int iSynthViewIdx, Int   iLeftViewIdx, Int iRightViewIdx );
    185189  UInt                getCurFrameId             ()  { return m_iCurrentFrameId;   }
  • branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp

    r5 r11  
    163163    if( eNalUnitType == NAL_UNIT_SPS )
    164164    {
     165#if POZNAN_SYNTH
     166      if(cComSPS.getViewId()==0 && !cComSPS.isDepth()) // it should be called at first view at the begining of the stream
     167        initRenderer(cComSPS);
     168#endif
    165169      if( cComSPS.isDepth() && (m_bUsingDepth==false) )  // expected not using depth, but bitstream are using depth
    166170      {                                                     // know from sps
     
    539543  return pcRefPic;
    540544}
     545
     546#if POZNAN_SYNTH
     547Void TAppDecTop::initRenderer(TComSPS &cComSPS)
     548{
     549  m_cAvailabilityRenderer.init(cComSPS.getWidth(), cComSPS.getHeight(),true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 );  //GT: simplest configuration
     550}
     551//*
     552Void TAppDecTop::storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth)
     553{
     554  Int  iLeftViewIdx  = -1;
     555  Int  iRightViewIdx = -1;
     556  Int  iNearestViewIdx = -1;
     557  Bool bIsBaseView;
     558  Bool bRenderFromLeft;
     559
     560  Int iRelDistToLeft = 128;
     561  if(iCoddedViewIdx==0) //First on View Coded List
     562  {
     563    TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false );
     564    return;
     565  }
     566  iNearestViewIdx = 0;
     567  bRenderFromLeft = iCoddedViewOrderIdx>0?true:false;
     568  //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);
     569
     570  m_cAvailabilityRenderer.setShiftLUTs(
     571    m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],
     572    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     573    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     574    m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right
     575    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     576    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     577    iRelDistToLeft
     578  );
     579
     580  TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, bDepth );
     581
     582  TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth();
     583  TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail();
     584  if(!pcPicYuvSynthView)
     585  {
     586    pcPic->addSynthesisBuffer();
     587    pcPicYuvSynthView = pcPic->getPicYuvSynth();
     588  }
     589  if(!pcPicYuvAvailView)
     590  {
     591    pcPic->addAvailabilityBuffer();
     592    pcPicYuvAvailView = pcPic->getPicYuvAvail();
     593  }
     594
     595  //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft );
     596  m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft );
     597
     598  pcPicYuvAvailView->setBorderExtension( false );//Needed??
     599  pcPicYuvAvailView->extendPicBorder();//Needed??
     600
     601#if POZNAN_OUTPUT_AVAILABLE_MAP
     602  {
     603  Char acFilenameBase[1024];
     604  ::sprintf( acFilenameBase,  "Available_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx);
     605  pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0);
     606  }
     607#endif
     608#if POZNAN_OUTPUT_SYNTH
     609  {
     610  Char acFilenameBase[1024];
     611  ::sprintf( acFilenameBase,  "Synth_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx );
     612  pcPicYuvSynthView->dump(acFilenameBase, iCurPoc!=0);
     613  }
     614#endif
     615 
     616}
     617#endif
  • branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h

    r5 r11  
    5252#include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
    5353#include "../../Lib/TLibDecoder/TDecTop.h"
     54#if POZNAN_SYNTH
     55#include "../../Lib/TLibRenderer/TRenTop.h"
     56#endif
    5457#include "TAppDecCfg.h"
    5558
     
    8790#endif
    8891
     92#if POZNAN_SYNTH
     93  TRenTop                         m_cAvailabilityRenderer;
     94#endif
     95
     96
    8997public:
    9098  TAppDecTop();
     
    96104  Void  increaseNumberOfViews   (Int iNewNumberOfViews);
    97105  Void  startUsingDepth() ;
     106
     107#if POZNAN_SYNTH
     108  Void  initRenderer(TComSPS &cComSPS);
     109  Void  storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth);
     110#endif
    98111
    99112// GT FIX
  • branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp

    r5 r11  
    435435#endif
    436436
     437#if POZNAN_SYNTH
     438  //m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 );  //GT: simplest configuration
     439  m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 );  //GT: simplest configuration
     440#endif
     441
    437442#if HHI_INTERVIEW_SKIP
    438443  m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 );
     
    692697    for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )     // Start encoding
    693698    {
     699#if POZNAN_SYNTH
     700      xStoreSynthPicsInBuffer(iViewIdx,false);
     701#endif
    694702      bool bThisViewContinueReadingPics = bContinueReadingPics[iViewIdx];
    695703      m_acTEncTopList[iViewIdx]->encode( bEos[iViewIdx], m_cListPicYuvRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingPics );
     
    708716      if( m_bUsingDepthMaps )
    709717      {
     718#if POZNAN_SYNTH
     719        xStoreSynthPicsInBuffer(iViewIdx,true);
     720#endif
    710721        bool bThisViewContinueReadingDepthPics = bContinueReadingDepthPics[iViewIdx];
    711722        m_acTEncDepthTopList[iViewIdx]->encode( bDepthEos[iViewIdx], m_cListPicYuvDepthRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingDepthPics );
     
    11771188#endif
    11781189
     1190#if POZNAN_SYNTH
     1191Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx,Bool bDepth)
     1192{
     1193  Int iCurPoc;
     1194  if(bDepth)
     1195  {
     1196    iCurPoc = m_acTEncDepthTopList[ iCoddedViewIdx ]->getNextFrameId();
     1197    if (!(m_acTEncDepthTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return;
     1198  }
     1199  else
     1200  {
     1201    iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId();
     1202    if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return;
     1203  }
     1204 
     1205  Int iNumberOfReferenceViews = 0;
     1206  UInt iSynthViewIdx;
     1207  // Get Left and right view
     1208  Int  iLeftViewIdx  = -1;
     1209  Int  iRightViewIdx = -1;
     1210  Int  iNearestViewIdx = -1;
     1211  Bool bIsBaseView;
     1212  Bool bRenderFromLeft;
     1213
     1214  Int iRelDistToLeft;
     1215  if(iCoddedViewIdx==0) //First on View Coded List
     1216  {
     1217    //TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, false );
     1218    return;
     1219  }
     1220  m_cCameraData.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);
     1221
     1222  m_cAvailabilityRenderer.setShiftLUTs(
     1223    m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],
     1224    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     1225    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     1226    m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right
     1227    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     1228    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
     1229    iRelDistToLeft
     1230  );
     1231   
     1232
     1233  TComPicYuv* pcPicYuvERView = new TComPicYuv;
     1234  pcPicYuvERView->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
     1235
     1236  TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, bDepth );
     1237  pcPic->addSynthesisBuffer();
     1238  pcPic->addAvailabilityBuffer();
     1239  TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth();
     1240  TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail();
     1241 
     1242  //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft );
     1243  m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft );
     1244     
     1245  pcPicYuvAvailView->setBorderExtension( false );//Needed??
     1246  pcPicYuvAvailView->extendPicBorder();//Needed??
     1247
     1248  pcPicYuvSynthView->setBorderExtension( false );//Needed??
     1249  pcPicYuvSynthView->extendPicBorder();//Needed??
     1250
     1251  //TComPic* pcPicDepth = xGetPicFromView( iCoddedViewIdx, iCurPoc, true );
     1252  //pcPicDepth->addAvailabilityBuffer();
     1253  //pcPicDepth->addSynthesisBuffer();
     1254  //pcPicYuvAvailView->copyToPic(pcPicDepth->getPicYuvAvail());
     1255     
     1256#if POZNAN_OUTPUT_AVAILABLE_MAP
     1257  {
     1258  Char acFilenameBase[1024];
     1259  ::sprintf( acFilenameBase,  "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx );
     1260  pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0);
     1261  }
     1262#endif
     1263#if POZNAN_OUTPUT_SYNTH
     1264  {
     1265  Char acFilenameBase[1024];
     1266  ::sprintf( acFilenameBase,  "Synth_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx );
     1267  pcPicYuvERView->dump(acFilenameBase, iCurPoc!=0);
     1268  }
     1269#endif
     1270
     1271      //Usun pcPicYuvERView i inne bufforki
     1272}
     1273#endif
     1274
    11791275#if HHI_INTERVIEW_SKIP
    11801276Void TAppEncTop::getUsedPelsMap( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedSplsMap )
  • branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.h

    r5 r11  
    9292#endif
    9393
     94#if POZNAN_SYNTH
     95  TRenTop                     m_cAvailabilityRenderer;
     96#endif
     97
    9498protected:
    9599  // initialization
     
    154158  Void  xStoreVSORefPicsInBuffer();                                                   ///< read in External Ref pic from file and store in buffer
    155159#endif
    156  
     160
     161
     162#if POZNAN_SYNTH
     163private:
     164  Void  xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth);
     165#endif
     166
    157167};// END CLASS DEFINITION TAppEncTop
    158168
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/CommonDef.h

    r8 r11  
    5858
    5959#define HM_VERSION        "3.0rc2"                 ///< Current software version
    60 #define NV_VERSION        "0.2"                   ///< Current software version
     60#define NV_VERSION        "0.3"                   ///< Current software version
    6161
    6262// ====================================================================================================================
     
    137137#define LOG2_DISP_PREC_LUT                              2                               ///< log2 of disparity precision used in integer disparity LUTs
    138138
    139 
    140139#if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED )
    141140#define DEPTH_MAP_GENERATION        1
     
    171170#define OUTPUT_RESIDUAL_PICTURES          0         // output residual pictures (for debugging)
    172171
    173 #define HHI_MPI_MERGE_POS                     0         // position of mvi in merge list (0..5)
    174 
     172#define HHI_MPI_MERGE_POS                 0           // position of mvi in merge list (0..5)
     173
     174// ====================================================================================================================
     175// POZNAN DEFINE SECTION
     176// ====================================================================================================================
     177#define POZNAN_OUTPUT_AVAILABLE_MAP       0           // output available map (for debugging)
     178#define POZNAN_OUTPUT_SYNTH               0           // output synthesised view (for debugging)
    175179
    176180// ====================================================================================================================
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.cpp

    r5 r11  
    27112711    pcCULeft = NULL;
    27122712  }
    2713   if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) )
     2713  if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx )
     2714#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     2715    && !pcCULeft->isCUSkiped( uiLeftPartIdx )
     2716#endif
     2717  )
    27142718  {
    27152719    abCandIsInter[uiLeftAddr] = true;
     
    27372741    pcCUAbove = NULL;
    27382742  }
    2739   if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) )
     2743  if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx )
     2744#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     2745    && !pcCUAbove->isCUSkiped( uiAbovePartIdx )
     2746#endif
     2747  )
    27402748  {
    27412749    abCandIsInter[uiAboveAddr] = true;
     
    32713279  if( uiIter == 0 )
    32723280  {
    3273     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
     3281    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx )
     3282#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     3283       && !pcCorner->isCUSkiped( uiCornerPUIdx )
     3284#endif
     3285    )
    32743286    {
    32753287      rbValidCand = true;
     
    33063318  else
    33073319  {
    3308     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
     3320    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx )
     3321#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     3322       && !pcCorner->isCUSkiped( uiCornerPUIdx )
     3323#endif
     3324    )
    33093325    {
    33103326      rbValidCand = true;
     
    44254441  if (pColCU->isIntra(uiPartIdxCenter))
    44264442    return false;
     4443
     4444#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     4445  if (pColCU->isSkipped(uiPartIdxCenter))
     4446    return false;
     4447#endif
    44274448 
    44284449  if( m_pcSlice->getRefPic(eRefPicList, iRefIdx)->getViewIdx() != m_pcSlice->getViewIdx() )
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.h

    r5 r11  
    529529  Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
    530530  Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
     531#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     532  Bool          isCUSkiped( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_SYNTH; }
     533#endif
    531534 
    532535  // -------------------------------------------------------------------------------------------------------------------
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r5 r11  
    971971    xInterPredictCUDepthMap( pcSubCU, pcSubDM );
    972972    break;
     973#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     974  case MODE_SYNTH:
     975    //What to do? Need Fix!
     976    xIntraPredictCUDepthMap( pcSubCU, pcSubDM );
     977    break;
     978#endif
    973979  default:
    974980    AOT( true );
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp

    r5 r11  
    444444 
    445445  //-- Set BS for Intra MB : BS = 4 or 3
    446   if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) )
     446  if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ)
     447#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     448     || pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ)
     449#endif
     450  )
    447451  {
    448452    uiBs = bAtCUBoundary ? 4 : 3;   // Intra MB && MB boundary
    449453  }
    450  
     454
    451455  //-- Set BS for not Intra MB : BS = 2 or 1 or 0
    452   if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) )
     456  if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ)
     457#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     458     && !pcCUP->isCUSkiped(uiPartP) && !pcCUQ->isCUSkiped(uiPartQ)
     459#endif
     460  )
    453461  {
    454462    if ( pcCUQ->getCbf( uiPartQ, TEXT_LUMA, pcCUQ->getTransformIdx(uiPartQ)) != 0 || pcCUP->getCbf( uiPartP, TEXT_LUMA, pcCUP->getTransformIdx(uiPartP) ) != 0)
     
    527535    }   // enf of "if( one of BCBP == 0 )"
    528536  }   // enf of "if( not Intra )"
    529  
     537
     538#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU //if one of the block is CUSkipped dont use loop filter
     539  if ( pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ))
     540  {
     541    uiBs = 0;
     542  }
     543#endif
     544
    530545  m_aapucBS[iDir][0][uiAbsPartIdx] = uiBs;
    531546  if ( bAtCUBoundary || bAtCUHalf )
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.cpp

    r5 r11  
    5050  m_apcPicYuv[0]      = NULL;
    5151  m_apcPicYuv[1]      = NULL;
     52#if POZNAN_AVAIL_MAP
     53  m_apcPicYuvAvail     = NULL;
     54#endif
     55#if POZNAN_SYNTH_VIEW
     56  m_apcPicYuvSynth     = NULL;
     57#endif
    5258#if DEPTH_MAP_GENERATION
    5359  m_pcPredDepthMap    = NULL;
     
    116122    m_apcPicYuv[1]  = NULL;
    117123  }
     124#if POZNAN_AVAIL_MAP
     125  if (m_apcPicYuvAvail)
     126  {
     127    m_apcPicYuvAvail->destroy();
     128    delete m_apcPicYuvAvail;
     129    m_apcPicYuvAvail  = NULL;
     130  }
     131#endif
     132
     133#if POZNAN_SYNTH_VIEW
     134  if (m_apcPicYuvSynth)
     135  {
     136    m_apcPicYuvSynth->destroy();
     137    delete m_apcPicYuvSynth;
     138    m_apcPicYuvSynth  = NULL;
     139  }
     140#endif
    118141 
    119142#if DEPTH_MAP_GENERATION
     
    193216}
    194217
     218#if POZNAN_AVAIL_MAP
     219Void
     220TComPic::addAvailabilityBuffer()
     221{
     222  AOT( m_apcPicYuvAvail );
     223  AOF( m_apcPicYuv[1] );
     224  Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
     225  Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
     226  UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
     227  UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
     228  UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
     229  m_apcPicYuvAvail      = new TComPicYuv;
     230  m_apcPicYuvAvail      ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
     231}
     232#endif
     233
     234#if POZNAN_SYNTH_VIEW
     235Void
     236TComPic::addSynthesisBuffer()
     237{
     238  AOT( m_apcPicYuvSynth );
     239  AOF( m_apcPicYuv[1] );
     240  Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
     241  Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
     242  UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
     243  UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
     244  UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
     245  m_apcPicYuvSynth      = new TComPicYuv;
     246  m_apcPicYuvSynth      ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
     247}
     248#endif
     249
    195250#if PARALLEL_MERGED_DEBLK
    196251Void
     
    284339}
    285340
     341#if POZNAN_AVAIL_MAP
     342Void
     343TComPic::removeAvailabilityBuffer()
     344{
     345  if( m_apcPicYuvAvail )
     346  {
     347    m_apcPicYuvAvail->destroy();
     348    delete m_apcPicYuvAvail;
     349    m_apcPicYuvAvail  = NULL;
     350  }
     351}
     352#endif
     353
     354#if POZNAN_SYNTH_VIEW
     355Void
     356TComPic::removeSynthesisBuffer()
     357{
     358  if( m_apcPicYuvSynth )
     359  {
     360    m_apcPicYuvSynth->destroy();
     361    delete m_apcPicYuvSynth;
     362    m_apcPicYuvSynth  = NULL;
     363  }
     364}
     365#endif
     366
    286367#if PARALLEL_MERGED_DEBLK
    287368Void
     
    349430#endif
    350431
     432#if POZNAN_AVAIL_MAP
     433Void TComPic::checkSynthesisAvailability( TComDataCU*& rpcCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied )
     434{
     435  rpbCUSynthesied[0] = true;
     436  rpbCUSynthesied[1] = true;
     437  rpbCUSynthesied[2] = true;
     438  rpbCUSynthesied[3] = true;
     439
     440  if (!getPicYuvAvail())
     441  {
     442    rpbCUSynthesied[0] = false;
     443    rpbCUSynthesied[1] = false;
     444    rpbCUSynthesied[2] = false;
     445    rpbCUSynthesied[3] = false;
     446    return;   
     447  }
     448 
     449  Int x, y;
     450  Bool bAvailable = true;
     451  Pel* pAvail  = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx );
     452  Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx);
     453  Int CUWidth  = g_uiMaxCUWidth  >> uiPartDepth; //rpcCU->getWidth(uiAbsZorderIdx);
     454 
     455  Int  iStride  = getPicYuvAvail()->getStride();
     456  for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- )
     457  {
     458    for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- )
     459    {
     460      rpbCUSynthesied[0] &= (pAvail[x] != 0);
     461    }
     462    for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- )
     463    {
     464      rpbCUSynthesied[1] &= (pAvail[x] != 0);
     465    }
     466    pAvail += iStride;
     467  }
     468  //for ( y = CUHeight - 1; y >= ((CUHeight) >> 1); y-- )
     469  for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) //Owieczka
     470  {
     471    for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- )
     472    {
     473      rpbCUSynthesied[2] &= (pAvail[x] != 0);
     474    }
     475    for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- )
     476    {
     477      rpbCUSynthesied[3] &= (pAvail[x] != 0);
     478    }
     479    pAvail += iStride;
     480  }
     481
     482  //rpbCUSynthesied[0] = !rpbCUSynthesied[0];
     483  //rpbCUSynthesied[1] = !rpbCUSynthesied[1];
     484  //rpbCUSynthesied[2] = !rpbCUSynthesied[2];
     485  //rpbCUSynthesied[3] = !rpbCUSynthesied[3];
     486}
     487#endif
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.h

    r5 r11  
    6161
    6262  TComPicYuv*           m_apcPicYuv[2];           //  Texture,  0:org / 1:rec
     63
     64#if POZNAN_AVAIL_MAP
     65  TComPicYuv*           m_apcPicYuvAvail;         //  Availability Map - Does the given pixel can be synthesised in receiver
     66#endif
     67
     68#if POZNAN_SYNTH_VIEW
     69  TComPicYuv*           m_apcPicYuvSynth;         //  Sythesied image
     70#endif
     71
    6372#if DEPTH_MAP_GENERATION
    6473  TComPicYuv*           m_pcPredDepthMap;         //  estimated depth map
     
    126135  TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[0]; }
    127136  TComPicYuv*   getPicYuvRec()        { return  m_apcPicYuv[1]; }
     137
     138#if POZNAN_AVAIL_MAP
     139  TComPicYuv*   getPicYuvAvail()      { return  m_apcPicYuvAvail; } //Owieczka - returns available map from other pic image
     140#endif
     141
     142#if POZNAN_SYNTH_VIEW
     143  TComPicYuv*   getPicYuvSynth()      { return  m_apcPicYuvSynth; } //Owieczka - returns synth form other pic in image
     144#endif
    128145
    129146#if DEPTH_MAP_GENERATION
     
    196213
    197214  Void          addOriginalBuffer       ();
     215#if POZNAN_AVAIL_MAP
     216  Void          addAvailabilityBuffer   ();
     217#endif
     218#if POZNAN_SYNTH_VIEW
     219  Void          addSynthesisBuffer      ();
     220#endif
    198221#if PARALLEL_MERGED_DEBLK
    199222  Void          addDeblockBuffer        ();
     
    214237
    215238  Void          removeOriginalBuffer    ();
     239#if POZNAN_SYNTH_VIEW
     240  Void          removeSynthesisBuffer   ();
     241#endif
     242#if POZNAN_AVAIL_MAP
     243  Void          removeAvailabilityBuffer();
     244#endif
    216245#if PARALLEL_MERGED_DEBLK
    217246  Void          removeDeblockBuffer     ();
     
    228257#if HHI_INTERVIEW_SKIP
    229258  Void          removeUsedPelsMapBuffer ();
     259#endif
     260
     261#if POZNAN_AVAIL_MAP
     262  Void          checkSynthesisAvailability(  TComDataCU*& rpcBestCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied);
    230263#endif
    231264
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r5 r11  
    306306    xSetRecResidualInterCU( pcSubCU, pcSubRes );
    307307    break;
     308#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     309  case MODE_SYNTH:
     310    xSetRecResidualIntraCU( pcSubCU, pcSubRes ); //MayBe it should be seperate function
     311    break;
     312#endif
    308313  default:
    309314    AOT( true );
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp

    r5 r11  
    676676  // AMVP parameter
    677677  ::memset( m_aeAMVPMode, 0, sizeof( m_aeAMVPMode ) );
     678#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    678679  m_bUseDMM = false;
     680#endif
    679681}
    680682
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.h

    r5 r11  
    452452
    453453  Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
    454   TComSPS*  getSPS          () { return m_pcSPS; }
     454                                                                                               TComSPS*  getSPS          () { return m_pcSPS; }
    455455
    456456  Void      setPPS          ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; }
  • branches/0.2-poznan-univ/source/Lib/TLibCommon/TypeDef.h

    r5 r11  
    6161//<<<<< HHI 3DV tools <<<<<
    6262
     63//<<<<< Poznan 3DV tools <<<<<<
     64#define POZNAN_CU_SKIP              1 //Poznan Cu Skip
     65#define POZNAN_CU_SYNTH             1 //Poznan Cu Synth
     66
     67#define POZNAN_AVAIL_MAP            1 //Creates Availibity buffers in all needed classes
     68
     69#define POZNAN_SYNTH_VIEW           1 //Creates view synthesis buffers in all needed classes
     70#define POZNAN_SYNTH_DEPTH          1
     71
     72#define POZNAN_SYNTH                1 //Creates aligned synthesis classes in encoder and decoder
     73
     74#define POZNAN_ENCODE_ONLY_DISOCCLUDED_CU          1 //Poznan CU Skip
     75#define POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS     1 //Fills not sended CUs with synthesized data
     76
     77#define POZNAN_CU_SKIP_PSNR         1 //Poznan Cu Skip Display psnr of the codded CU only
     78//<<<<< Poznan 3DV tools <<<<<<
    6379
    6480////////////////////////////
     
    575591  MODE_INTER,           ///< inter-prediction mode
    576592  MODE_INTRA,           ///< intra-prediction mode
     593#if POZNAN_CU_SKIP
     594  MODE_SYNTH,           ///< synth-mode
     595#endif
    577596  MODE_NONE = 15
    578597};
  • branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r5 r11  
    285285        for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ )
    286286        {
    287           xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode;
    288           xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode;
     287          xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; //printf("SPS Scale: %d\n",iCode);
     288          xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; //printf("SPS Offset: %d\n",iCode);
    289289          xReadSvlc( iCode );   m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ];
    290290          xReadSvlc( iCode );   m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ];
     
    517517      for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ )
    518518      {
    519         xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode;
    520         xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode;
     519        xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; printf("Scale: %d\n",iCode);
     520        xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; printf("Offset: %d\n",iCode);
    521521        xReadSvlc( iCode );   m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ];
    522522        xReadSvlc( iCode );   m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ];
  • branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp

    r5 r11  
    4949  m_ppcYuvReco    = NULL;
    5050  m_ppcYuvResPred = NULL;
     51#if POZNAN_AVAIL_MAP
     52  m_ppcYuvAvail   = NULL;
     53#endif
     54#if POZNAN_SYNTH_VIEW
     55  m_ppcYuvSynth   = NULL;
     56#endif
    5157  m_ppcCU         = NULL;
    5258}
     
    7581  m_ppcYuvReco    = new TComYuv*    [m_uiMaxDepth-1];
    7682  m_ppcYuvResPred = new TComYuv*    [m_uiMaxDepth-1];
     83#if POZNAN_AVAIL_MAP
     84  m_ppcYuvAvail   = new TComYuv*    [m_uiMaxDepth-1];
     85#endif
     86#if POZNAN_SYNTH_VIEW
     87  m_ppcYuvSynth   = new TComYuv*    [m_uiMaxDepth-1];
     88#endif
    7789  m_ppcCU         = new TComDataCU* [m_uiMaxDepth-1];
    7890 
     
    8799    m_ppcYuvReco   [ui] = new TComYuv;    m_ppcYuvReco   [ui]->create( uiWidth, uiHeight );
    88100    m_ppcYuvResPred[ui] = new TComYuv;    m_ppcYuvResPred[ui]->create( uiWidth, uiHeight );
     101#if POZNAN_AVAIL_MAP
     102    m_ppcYuvAvail  [ui] = new TComYuv;    m_ppcYuvAvail  [ui]->create( uiWidth, uiHeight );
     103#endif
     104#if POZNAN_SYNTH_VIEW
     105    m_ppcYuvSynth  [ui] = new TComYuv;    m_ppcYuvSynth  [ui]->create( uiWidth, uiHeight );
     106#endif
     107
    89108    m_ppcCU        [ui] = new TComDataCU; m_ppcCU        [ui]->create( uiNumPartitions, uiWidth, uiHeight, true );
    90109  }
     
    106125    m_ppcYuvReco   [ui]->destroy(); delete m_ppcYuvReco   [ui]; m_ppcYuvReco   [ui] = NULL;
    107126    m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL;
     127#if POZNAN_AVAIL_MAP
     128    m_ppcYuvAvail  [ui]->destroy(); delete m_ppcYuvAvail  [ui]; m_ppcYuvAvail  [ui] = NULL;
     129#endif
     130#if POZNAN_SYNTH_VIEW
     131    m_ppcYuvSynth  [ui]->destroy(); delete m_ppcYuvSynth  [ui]; m_ppcYuvSynth  [ui] = NULL;
     132#endif
    108133    m_ppcCU        [ui]->destroy(); delete m_ppcCU        [ui]; m_ppcCU        [ui] = NULL;
    109134  }
     
    112137  delete [] m_ppcYuvReco;    m_ppcYuvReco    = NULL;
    113138  delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL;
     139#if POZNAN_AVAIL_MAP
     140  delete [] m_ppcYuvAvail;   m_ppcYuvAvail   = NULL;
     141#endif
     142#if POZNAN_SYNTH_VIEW
     143  delete [] m_ppcYuvSynth;   m_ppcYuvSynth   = NULL;
     144#endif
     145
    114146  delete [] m_ppcCU;         m_ppcCU         = NULL;
    115147}
     
    184216{
    185217  TComPic* pcPic = pcCU->getPic();
     218
     219#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     220  Bool bWholeCUCanBeSynthesized = false;
     221  Bool bOneSubCUCanNotBeSynthesied = false;
     222  Bool bSubCUCanBeSynthesized[4];
     223  Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
     224  pcPic->checkSynthesisAvailability(pcCU, pcCU->getAddr(), uiAbsPartIdx, uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
     225  Int  iSubCUCanNotBeSynthesized = 0;
     226  Int  iSubCUCanBeSynthesizedCnt = 0;
     227  for(Int i = 0; i < 4; i++)
     228  {
     229    if (!bSubCUCanBeSynthesized[i])
     230    {
     231      iSubCUCanNotBeSynthesized = i;
     232    }
     233    else
     234    {
     235      iSubCUCanBeSynthesizedCnt ++;
     236    }
     237  }
     238  if(iSubCUCanBeSynthesizedCnt == 4)
     239  {
     240    bWholeCUCanBeSynthesized = true;
     241  }
     242  else if(iSubCUCanBeSynthesizedCnt == 3)
     243  {
     244    bOneSubCUCanNotBeSynthesied = true;
     245  }
     246
     247  if(bWholeCUCanBeSynthesized)
     248  {
     249    pcCU->setPredModeSubParts( MODE_SYNTH, uiAbsPartIdx, uiDepth );
     250    pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx );
     251    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     252    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     253    //pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
     254    return;   
     255  }
     256#endif
     257
    186258  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
    187259  UInt uiQNumParts      = uiCurNumParts>>2;
     
    195267  if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
    196268  {
     269#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     270    if(bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // KUBA SYNTH check if CU has 3 synthesied subCU - no split flag is send in that case and CU split is assumed
     271    {
     272      pcCU->setDepthSubParts( uiDepth + 1, uiAbsPartIdx );
     273    }
     274    else
     275#endif
    197276#if HHI_MPI
    198277    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
     
    367446{
    368447  TComPic* pcPic = pcCU->getPic();
     448#if POZNAN_SYNTH_VIEW
     449  if(pcPic->getPicYuvSynth())  m_ppcYuvSynth[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx );
     450#endif
     451#if POZNAN_AVAIL_MAP
     452  if(pcPic->getPicYuvAvail())  m_ppcYuvAvail[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx );
     453#endif
    369454 
    370455  Bool bBoundary = false;
     
    411496      xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    412497      break;
     498#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     499    case MODE_SYNTH:
     500    //  break;
     501#if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS
     502      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx);
     503#else
     504      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx); //Poprawiæ
     505#endif
     506      //m_ppcYuvReco[uiDepth]->clear();
     507      break;
     508#endif
    413509    default:
    414510      assert(0);
  • branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.h

    r5 r11  
    6161  TComYuv**           m_ppcYuvReco;       ///< array of prediction & reconstruction buffer
    6262  TComYuv**           m_ppcYuvResPred;    ///< residual prediction buffer
     63#if POZNAN_AVAIL_MAP
     64  TComYuv**           m_ppcYuvAvail;      ///< array of available map buffer
     65#endif
     66#if POZNAN_SYNTH_VIEW
     67  TComYuv**           m_ppcYuvSynth;      ///< array of synth buffer
     68#endif
    6369  TComDataCU**        m_ppcCU;            ///< CU data array
    6470 
  • branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp

    r5 r11  
    5353    m_aaiCodedScale       [ uiId ] = new Int [ MAX_NUMBER_VIEWS ];
    5454  }
     55#if POZNAN_SYNTH
     56  xCreateLUTs   ( (UInt)MAX_NUMBER_VIEWS, (UInt)MAX_NUMBER_VIEWS,  m_adBaseViewShiftLUT,  m_aiBaseViewShiftLUT);
     57
     58  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
     59  m_uiBitDepthForLUT = 8; //fixed
     60#endif
    5561}
    5662
     
    6672  delete [] m_aiViewOrderIndex;
    6773  delete [] m_aiViewReceived;
     74
     75#if POZNAN_SYNTH
     76  xDeleteArray( m_adBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
     77  xDeleteArray( m_aiBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
     78#endif
    6879}
    6980
     
    7990  m_uiMaxViewId             = 0;
    8091}
     92
     93#if POZNAN_SYNTH
     94/*
     95Void
     96CamParsCollector::initLUT(TComSPS &cComSPS)
     97{
     98    //===== create arrays =====
     99  //xCreateLUTs   ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_adBaseViewShiftLUT,  m_aiBaseViewShiftLUT,  m_adBaseViewShiftParameter,  m_aiBaseViewShiftParameter  );
     100 
     101 
     102  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiCodedScale           );
     103  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiCodedOffset          );
     104  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet    );
     105  //xInit2dArray  ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet, 0 );
     106
     107  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmScaleNomDelta     );
     108  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmOffset            );
     109
     110  //===== init disparity to virtual depth conversion parameters =====
     111  //xSetPdmConversionParams();
     112
     113  //===== init arrays for first frame =====
     114  //xSetShiftParametersAndLUT( m_uiFirstFrameId );
     115}//*/
     116
     117Void
     118CamParsCollector::xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT)
     119{
     120  //AOF( m_uiBitDepthForLUT == 8 );
     121  //AOF(radLUT == NULL && raiLUT == NULL );
     122
     123  uiNumberSourceViews = Max( 1, uiNumberSourceViews );
     124  uiNumberTargetViews = Max( 1, uiNumberTargetViews );
     125
     126  radLUT         = new Double***[ uiNumberSourceViews ];
     127  raiLUT         = new Int   ***[ uiNumberSourceViews ];
     128
     129  for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ )
     130  {
     131    radLUT        [ uiSourceView ] = new Double**[ uiNumberTargetViews ];
     132    raiLUT        [ uiSourceView ] = new Int   **[ uiNumberTargetViews ];
     133
     134    for( UInt uiTargetView = 0; uiTargetView < uiNumberTargetViews; uiTargetView++ )
     135    {
     136      radLUT        [ uiSourceView ][ uiTargetView ]      = new Double*[ 2 ];
     137      radLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257 ];
     138      radLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257 ];
     139
     140      raiLUT        [ uiSourceView ][ uiTargetView ]      = new Int*   [ 2 ];
     141      raiLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Int    [ 257 ];
     142      raiLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Int    [ 257 ];
     143    }
     144  }
     145}
     146
     147Void
     148CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
     149{
     150  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     151  Int     iLog2DivChroma = iLog2DivLuma + 1;
     152
     153  iOffset <<= m_uiBitDepthForLUT;
     154
     155  Double dScale  = (Double) iScale  / (( Double ) ( 1 << iLog2DivLuma ));
     156  Double dOffset = (Double) iOffset / (( Double ) ( 1 << iLog2DivLuma ));
     157
     158  // offsets including rounding offsets
     159  Int64 iOffsetLuma   = iOffset + ( ( 1 << iLog2DivLuma   ) >> 1 );
     160  Int64 iOffsetChroma = iOffset + ( ( 1 << iLog2DivChroma ) >> 1 );
     161
     162  for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ )
     163  {
     164    // real-valued look-up tables
     165    Double  dShiftLuma      = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision );
     166    Double  dShiftChroma    = dShiftLuma / 2;
     167    radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma;
     168    radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = dShiftChroma;
     169
     170    // integer-valued look-up tables
     171    Int64   iTempScale      = (Int64)uiDepthValue * iScale;
     172    Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
     173    Int64   iShiftLuma      = ( iTempScale + iOffsetLuma   ) >> iLog2DivLuma;
     174    Int64   iShiftChroma    = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma;
     175    raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = (Int)iShiftLuma;
     176    raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = (Int)iShiftChroma;
     177
     178    // maximum deviation
     179    //dMaxDispDev     = Max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
     180    //dMaxRndDispDvL  = Max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
     181    //dMaxRndDispDvC  = Max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) );
     182  }
     183
     184  radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
     185  radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
     186  raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
     187  raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
     188}
     189
     190Bool
     191CamParsCollector::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft)
     192{
     193  /*
     194  riNearestViewIdx = 0;
     195
     196  Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] );
     197  Int  iFactor       = ( bDecencdingVN ? -1 : 1 );
     198
     199  if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor  <= 0 )
     200  {
     201    rbRenderFromLeft = true;
     202  }
     203  else
     204  {
     205    rbRenderFromLeft = false;
     206  }
     207
     208  riRelDistToLeft = 128; //Not used for now;
     209//*/
     210  return true;
     211}
     212
     213#endif
    81214
    82215Void
     
    161294        m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
    162295        m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
     296#if POZNAN_SYNTH
     297        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     298        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     299#endif
    163300      }
    164301      else
     
    168305        m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseId ];
    169306        m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseId ];
     307#if POZNAN_SYNTH
     308        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     309        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     310#endif
    170311      }
    171312    }
     
    182323        m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
    183324        m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
     325#if POZNAN_SYNTH
     326        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     327        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
     328#endif
    184329      }
    185330    }
     
    458603#if HHI_INTERVIEW_SKIP
    459604    pcPic->removeUsedPelsMapBuffer();
     605#endif
     606#if POZNAN_AVAIL_MAP
     607    pcPic->removeAvailabilityBuffer();
     608#endif
     609#if POZNAN_SYNTH_VIEW
     610    pcPic->removeSynthesisBuffer();
    460611#endif
    461612  }
     
    724875#endif
    725876
     877#if POZNAN_SYNTH
     878      if( m_pcCamParsCollector)
     879      {
     880        m_pcCamParsCollector->setSlice( pcSlice );
     881      }
     882      //if(!getIsDepth())
     883      getDecTop()->storeSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC(),getIsDepth());
     884#endif
     885
    726886      //  Decode a picture
    727887      m_cGopDecoder.decompressGop ( bEos, pcBitstream, pcPic, false );
  • branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.h

    r5 r11  
    7171  Void  uninit      ();
    7272  Void  setSlice    ( TComSlice* pcSlice );
     73#if POZNAN_SYNTH
     74  Double****          getBaseViewShiftLUTD      ()  { return m_adBaseViewShiftLUT;   }
     75  Int****             getBaseViewShiftLUTI      ()  { return m_aiBaseViewShiftLUT;   }
     76
     77  Int**               getBaseViewOffsetI        ()  { return m_aaiCodedOffset;   }
     78  Int**               getBaseViewScaleI         ()  { return m_aaiCodedScale;   }
     79
     80  Bool                getNearestBaseView        ( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft);
     81#endif
    7382
    7483private:
     
    8998  Int     m_iLastPOC;
    9099  UInt    m_uiMaxViewId;
    91 };
     100
     101#if POZNAN_SYNTH
     102
     103  UInt    m_uiBitDepthForLUT;
     104  UInt    m_iLog2Precision;
     105  UInt    m_uiInputBitDepth;
     106
     107  // look-up tables
     108  Double****          m_adBaseViewShiftLUT;                                                                             ///< Disparity LUT
     109  Int****             m_aiBaseViewShiftLUT;                                                                       ///< Disparity LUT
     110
     111  Void xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT);
     112  Void xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT);
     113
     114  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 );
     115  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2 );
     116  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize );
     117#endif
     118};
     119
     120#if POZNAN_SYNTH
     121  template <class T>
     122Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 )
     123{
     124  if( rpt )
     125  {
     126    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
     127    {
     128      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
     129      {
     130        for( UInt uiM = 0; uiM < uiSize3; uiM++ )
     131        {
     132          delete[] rpt[ uiK ][ uiL ][ uiM ];
     133        }
     134        delete[] rpt[ uiK ][ uiL ];
     135      }
     136      delete[] rpt[ uiK ];
     137    }
     138    delete[] rpt;
     139  }
     140  rpt = NULL;
     141};
     142
     143
     144template <class T>
     145Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2 )
     146{
     147  if( rpt )
     148  {
     149    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
     150    {
     151      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
     152      {
     153        delete[] rpt[ uiK ][ uiL ];
     154      }
     155      delete[] rpt[ uiK ];
     156    }
     157    delete[] rpt;
     158  }
     159  rpt = NULL;
     160};
     161
     162
     163template <class T>
     164Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize )
     165{
     166  if( rpt )
     167  {
     168    for( UInt uiK = 0; uiK < uiSize; uiK++ )
     169    {
     170      delete[] rpt[ uiK ];
     171    }
     172    delete[] rpt;
     173  }
     174  rpt = NULL;
     175};
     176#endif
    92177
    93178
  • branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp

    r5 r11  
    353353        for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ )
    354354        {
    355           xWriteSvlc( pcSPS->getCodedScale    ()[ uiId ] );
    356           xWriteSvlc( pcSPS->getCodedOffset   ()[ uiId ] );
     355          //printf("From ViewID %d To ViewID: %d\n",pcSPS->getViewId(),uiId);
     356          xWriteSvlc( pcSPS->getCodedScale    ()[ uiId ] ); //printf("SPS Scale: %d\n",pcSPS->getCodedScale    ()[ uiId ]);
     357          xWriteSvlc( pcSPS->getCodedOffset   ()[ uiId ] ); //printf("SPS Offset: %d\n", pcSPS->getCodedOffset   ()[ uiId ]);
    357358          xWriteSvlc( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ] );
    358359          xWriteSvlc( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ] );
     
    531532      for( UInt uiId = 0; uiId < pcSlice->getSPS()->getViewId(); uiId++ )
    532533      {
    533         xWriteSvlc( pcSlice->getCodedScale    ()[ uiId ] );
    534         xWriteSvlc( pcSlice->getCodedOffset   ()[ uiId ] );
     534        printf("From ViewID %d To ViewID: %d\n",pcSlice->getSPS()->getViewId(),uiId);
     535        xWriteSvlc( pcSlice->getCodedScale    ()[ uiId ] ); printf("Slice Scale: %d\n",pcSlice->getCodedScale    ()[ uiId ]);
     536        xWriteSvlc( pcSlice->getCodedOffset   ()[ uiId ] ); printf("Slice Offset: %d\n", pcSlice->getCodedOffset   ()[ uiId ]);
    535537        xWriteSvlc( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ] );
    536538        xWriteSvlc( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ] );
  • branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.cpp

    r5 r11  
    6767  m_ppcOrigYuv     = new TComYuv*[m_uhTotalDepth-1];
    6868  m_ppcResPredTmp  = new TComYuv*[m_uhTotalDepth-1];
     69#if POZNAN_AVAIL_MAP
     70  m_ppcAvailYuv    = new TComYuv*[m_uhTotalDepth-1];
     71#endif
     72#if POZNAN_SYNTH_VIEW
     73  m_ppcSynthYuv    = new TComYuv*[m_uhTotalDepth-1];
     74#endif
     75 
    6976
    7077#if HHI_MPI
     
    93100    m_ppcOrigYuv    [i] = new TComYuv; m_ppcOrigYuv    [i]->create(uiWidth, uiHeight);
    94101
     102#if POZNAN_AVAIL_MAP
     103    m_ppcAvailYuv   [i] = new TComYuv; m_ppcAvailYuv    [i]->create(uiWidth, uiHeight);
     104#endif
     105#if POZNAN_SYNTH_VIEW
     106    m_ppcSynthYuv   [i] = new TComYuv; m_ppcSynthYuv    [i]->create(uiWidth, uiHeight);
     107#endif
     108
     109
    95110    m_ppcResPredTmp [i] = new TComYuv; m_ppcResPredTmp [i]->create(uiWidth, uiHeight);
    96111  }
     
    150165    if(m_ppcOrigYuv[i])
    151166    {
    152       m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i] = NULL;
    153     }
     167      m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i]     = NULL;
     168    }
     169#if POZNAN_AVAIL_MAP
     170    if(m_ppcAvailYuv[i])
     171    {
     172      m_ppcAvailYuv[i]->destroy();    delete m_ppcAvailYuv[i];    m_ppcAvailYuv[i]    = NULL;
     173    }
     174#endif
     175#if POZNAN_SYNTH_VIEW
     176    if(m_ppcSynthYuv[i])
     177    {
     178      m_ppcSynthYuv[i]->destroy();    delete m_ppcSynthYuv[i];    m_ppcSynthYuv[i]    = NULL;
     179    }
     180#endif
    154181    if(m_ppcResPredTmp[i])
    155182    {
     
    203230    m_ppcOrigYuv = NULL;
    204231  }
     232#if POZNAN_AVAIL_MAP
     233  if(m_ppcAvailYuv)
     234  {
     235    delete [] m_ppcAvailYuv;
     236    m_ppcAvailYuv = NULL;
     237  }
     238#endif
     239#if POZNAN_SYNTH_VIEW
     240  if(m_ppcSynthYuv)
     241  {
     242    delete [] m_ppcSynthYuv;
     243    m_ppcSynthYuv = NULL;
     244  }
     245#endif
    205246  if(m_ppcResPredTmp)
    206247  {
     
    426467  // get Original YUV data from picture
    427468  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
    428 
     469#if POZNAN_AVAIL_MAP
     470  if (pcPic->getPicYuvAvail())  m_ppcAvailYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
     471#endif 
     472#if POZNAN_SYNTH_VIEW
     473  if (pcPic->getPicYuvSynth())  m_ppcSynthYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
     474#endif
     475
     476#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     477  Bool bWholeCUCanBeSynthesized = false;
     478  Bool bOneSubCUCanNotBeSynthesied = false;
     479  Bool bSubCUCanBeSynthesized[4];
     480  Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
     481  pcPic->checkSynthesisAvailability(rpcBestCU, rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
     482  Int  iSubCUCanNotBeSynthesized = 0;
     483  Int  iSubCUCanBeSynthesizedCnt = 0;
     484  for(Int i = 0; i < 4; i++)
     485  {
     486    if (!bSubCUCanBeSynthesized[i])
     487    {
     488      iSubCUCanNotBeSynthesized = i;
     489    }
     490    else
     491    {
     492      iSubCUCanBeSynthesizedCnt ++;
     493    }
     494  }
     495  if(iSubCUCanBeSynthesizedCnt == 4)
     496  {
     497    bWholeCUCanBeSynthesized = true;
     498  }
     499  else if(iSubCUCanBeSynthesizedCnt == 3)
     500  {
     501    bOneSubCUCanNotBeSynthesied = true;
     502  }
     503#endif
    429504  // variables for fast encoder decision
    430505  TComDataCU* pcTempCU;
     
    493568  if( ( uiRPelX < rpcBestCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < rpcBestCU->getSlice()->getSPS()->getHeight() ) )
    494569  {
     570    // do CU Skip
     571#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     572    if(bWholeCUCanBeSynthesized)
     573    {
     574      rpcBestCU->getTotalCost() = 0;       // Cost of synthesised CU is zero
     575      rpcBestCU->getTotalBits() = 0;       // Cost of synthesised CU is zero
     576      rpcBestCU->getTotalDistortion() = 0; // Distortion of synthesised CU is zero
     577      rpcBestCU->setPredModeSubParts( MODE_SYNTH,      0, uiDepth );
     578      rpcBestCU->setPartSizeSubParts( SIZE_2Nx2N,      0, uiDepth );
     579#if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS
     580      m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure
     581#else
     582      m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure
     583#endif
     584      UInt uiInitTrDepth  = rpcBestCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1;
     585      rpcBestCU->copyToPic(uiDepth, 0, uiInitTrDepth);
     586      xCopyYuv2Pic( rpcBestCU->getPic(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth );   // Next copy it to reconstruction YUV buffer in coded picture
     587      assert( rpcBestCU->getPartitionSize ( 0 ) != SIZE_NONE  ); //Not needed any more ??
     588      assert( rpcBestCU->getPredictionMode( 0 ) != MODE_NONE  );
     589      assert( rpcBestCU->getTotalCost     (   ) != MAX_DOUBLE );
     590
     591      #if HHI_VSO//??
     592      if( m_pcRdCost->getUseRenModel() )
     593      {
     594        UInt  uiWidth     = rpcBestCU->getWidth ( 0 );
     595        UInt  uiHeight    = rpcBestCU->getHeight( 0 );
     596        Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
     597        UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride();
     598        m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     599      }
     600      #endif
     601      return;
     602    }
     603    else if (bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // If only one from subCU can not be synthesised than force NxN split but donot signal it in the stream
     604    {
     605      //printf("CUSkip - OneCanNotBe %d %d %d\n",rpcBestCU->getCUPelX(),rpcBestCU->getCUPelY(),rpcBestCU->getWidth());
     606      // further split !!!!go to line 866!!!
     607#if HHI_VSO
     608    // reset Model
     609    if( m_pcRdCost->getUseRenModel() )
     610    {
     611      UInt  uiWidth     = m_ppcBestCU[uiDepth]->getWidth ( 0 );
     612      UInt  uiHeight    = m_ppcBestCU[uiDepth]->getHeight( 0 );
     613      Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getLumaAddr( 0 );
     614      UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride();
     615      m_pcRdCost->setRenModelData( m_ppcBestCU[uiDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     616    }
     617#endif
     618
     619      UChar       uhNextDepth         = uiDepth + 1;
     620      TComDataCU* pcSubBestPartCU     = m_ppcBestCU[uhNextDepth];
     621      TComDataCU* pcSubTempPartCU     = m_ppcTempCU[uhNextDepth];
     622     
     623      for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) //UInt uiPartUnitIdx = iSubCUNotSynthesied;
     624      {
     625        pcSubBestPartCU->initSubCU( rpcBestCU, uiPartUnitIdx, uhNextDepth );           // clear sub partition datas or init.
     626        pcSubTempPartCU->initSubCU( rpcBestCU, uiPartUnitIdx, uhNextDepth );           // clear sub partition datas or init.
     627//        pcSubBestPartCU->setLastCodedQP( rpcBestCU->getLastCodedQP() );
     628//        pcSubTempPartCU->setLastCodedQP( rpcBestCU->getLastCodedQP() );
     629       
     630        if( ( pcSubBestPartCU->getCUPelX() < pcSubBestPartCU->getSlice()->getSPS()->getWidth() ) && ( pcSubBestPartCU->getCUPelY() < pcSubBestPartCU->getSlice()->getSPS()->getHeight() ) )
     631        {
     632          if( m_bUseSBACRD )
     633          {
     634            if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer
     635            {
     636              m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
     637            }
     638            else
     639            {
     640              m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]);
     641            }
     642          }
     643         
     644          xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth ); //Compress SubCU's
     645         
     646#if HHI_VSO
     647          if( m_pcRdCost->getUseRenModel() )
     648          {
     649            UInt  uiWidth     = pcSubBestPartCU->getWidth ( 0 );
     650            UInt  uiHeight    = pcSubBestPartCU->getHeight( 0 );
     651            Pel*  piSrc       = m_ppcRecoYuvBest[pcSubBestPartCU->getDepth(0)]->getLumaAddr( 0 );
     652            UInt  uiSrcStride = m_ppcRecoYuvBest[pcSubBestPartCU->getDepth(0)]->getStride();
     653            m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     654          }
     655#endif
     656          rpcTempCU->copyPartFrom( pcSubBestPartCU, uiPartUnitIdx, uhNextDepth );         // Keep best part data to current temporary data.
     657          xCopyYuv2Tmp( pcSubBestPartCU->getTotalNumPart()*uiPartUnitIdx, uhNextDepth );
     658        }
     659      }
     660
     661      if( !bBoundary )
     662      {
     663        m_pcEntropyCoder->resetBits();
     664        m_pcEntropyCoder->encodeSplitFlag( rpcTempCU, 0, uiDepth, true );
     665
     666        rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
     667      }
     668
     669#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
     670      if( bFullyRenderedSec )
     671      {
     672        m_pcRdCost->setLambdaScale( m_pcEncCfg->getInterViewSkipLambdaScale() );
     673      }
     674      else
     675      {
     676        m_pcRdCost->setLambdaScale( 1 );
     677      }
     678#endif
     679#if HHI_VSO
     680      if ( m_pcRdCost->getUseLambdaScaleVSO())
     681      {
     682        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     683      }
     684      else
     685#endif
     686      {
     687        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     688      }   
     689
     690      if( m_bUseSBACRD )
     691      {
     692        m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     693      }
     694      //Copy Tmp to Best
     695      xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth );  //Roznica z naszym koder                                          // RD compare current larger prediction
     696
     697#if HHI_VSO
     698      if( m_pcRdCost->getUseRenModel() )
     699      {
     700        UInt  uiWidth     = rpcBestCU->getWidth ( 0 );
     701        UInt  uiHeight    = rpcBestCU->getHeight( 0 );
     702        Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
     703        UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride();
     704        m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     705      }
     706#endif
     707      //Copy result to pic
     708      rpcBestCU->copyToPic(uiDepth);                                                     // Copy Best data to Picture for next partition prediction.
     709     
     710      if( bBoundary )
     711        return;
     712
     713      xCopyYuv2Pic( rpcBestCU->getPic(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth );   // Copy Yuv data to picture Yuv
     714     
     715      // Assert if Best prediction mode is NONE
     716      // Selected mode's RD-cost must be not MAX_DOUBLE.
     717      assert( rpcBestCU->getPartitionSize ( 0 ) != SIZE_NONE  ); //Not needed any more?
     718      assert( rpcBestCU->getPredictionMode( 0 ) != MODE_NONE  );
     719      assert( rpcBestCU->getTotalCost     (   ) != MAX_DOUBLE );
     720      return;
     721    }
     722#endif
     723
    495724    // do inter modes
    496725    if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )
     
    8361065  TComPic* pcPic = pcCU->getPic();
    8371066
     1067#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     1068  if( pcCU->isCUSkiped( uiAbsPartIdx ) && uiDepth == pcCU->getDepth( uiAbsPartIdx )) //If CU Skiped no information is coded into stream
     1069    return;
     1070#endif
     1071
    8381072  Bool bBoundary = false;
    8391073  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     
    8421076  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    8431077
     1078#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     1079  Bool bDontSendSplitFlag = false;
     1080  if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < (g_uiMaxCUDepth-g_uiAddCUDepth) ) ) || bBoundary ) //check if CU has 3 synthesied subCU - no split flag is send in that case
     1081  {
     1082    UInt uiQNumParts = ( pcPic->getNumPartInCU() >> (uiDepth<<1) )>>2;
     1083    Int iCUSkipCounter = 0;
     1084    UInt uiAbsPartIdxTmp = uiAbsPartIdx;
     1085    for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++, uiAbsPartIdxTmp+=uiQNumParts )
     1086    {
     1087      if(pcCU->isCUSkiped(uiAbsPartIdxTmp) && (pcCU->getDepth( uiAbsPartIdxTmp ) == uiDepth + 1) )
     1088      {
     1089        iCUSkipCounter++;
     1090      }
     1091    }
     1092    if(iCUSkipCounter == 3)
     1093    {
     1094      bDontSendSplitFlag = true;
     1095    }
     1096  }
     1097#endif
     1098
    8441099  if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
    8451100  {
     1101#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     1102    if(!bDontSendSplitFlag)
     1103#endif
    8461104#if HHI_MPI
    8471105    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
     
    14121670    for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ )
    14131671    {
    1414       if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) )
     1672      if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui )
     1673#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
     1674        || pcTextureCU->isCUSkiped( rpcTempCU->getZorderIdxInCU() + ui )
     1675#endif
     1676      )
    14151677      {
    14161678        return;
  • branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.h

    r5 r11  
    7878  TComYuv**               m_ppcOrigYuv;     ///< Original Yuv for each depth
    7979  TComYuv**               m_ppcResPredTmp;  ///< Temporary residual prediction for each depth
    80  
     80#if POZNAN_AVAIL_MAP
     81  TComYuv**               m_ppcAvailYuv;    ///< Avaiability map for each depth 
     82#endif
     83#if POZNAN_SYNTH_VIEW
     84  TComYuv**               m_ppcSynthYuv;    ///< Synthetized Yuv for each depth
     85#endif
     86
    8187  //  Data : encoder control
    8288  Int                     m_iQp;            ///< Last QP
  • branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp

    r5 r11  
    799799  Pel*  pOrg    = pcPic ->getPicYuvOrg()->getLumaAddr();
    800800  Pel*  pRec    = pcPicD->getLumaAddr();
     801#if POZNAN_CU_SKIP_PSNR
     802  Pel*  pAvail  = NULL;
     803  if(pcPic ->getPicYuvAvail())
     804    pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
     805  UInt64 iPixelsCnt = 0;
     806#endif
    801807  Int   iStride = pcPicD->getStride();
    802808
     
    813819  Double fRefValueC = fRefValueY / 4.0;
    814820
    815   for( y = 0; y < iHeight; y++ )
    816   {
    817     for( x = 0; x < iWidth; x++ )
    818     {
    819       Int iDiff = (Int)( pOrg[x] - pRec[x] );
    820       uiSSDY   += iDiff * iDiff;
    821     }
    822     pOrg += iStride;
    823     pRec += iStride;
     821#if POZNAN_CU_SKIP_PSNR
     822  if(pAvail)
     823  {
     824    for( y = 0; y < iHeight; y++ )
     825    {
     826      for( x = 0; x < iWidth; x++ )
     827      {
     828        if(pAvail[x]==0) //If pixel was codded
     829        {
     830          Int iDiff = (Int)( pOrg[x] - pRec[x] );
     831          uiSSDY   += iDiff * iDiff;
     832          iPixelsCnt++;
     833        }
     834      }
     835      pOrg += iStride;
     836      pRec += iStride;
     837      pAvail+=iStride;
     838    }
     839   
     840    fRefValueY = (double) maxval * maxval * iPixelsCnt;
     841  }
     842  else
     843#endif
     844  {
     845    for( y = 0; y < iHeight; y++ )
     846    {
     847      for( x = 0; x < iWidth; x++ )
     848      {
     849        Int iDiff = (Int)( pOrg[x] - pRec[x] );
     850        uiSSDY   += iDiff * iDiff;
     851      }
     852      pOrg += iStride;
     853      pRec += iStride;
     854    }
    824855  }
    825856
     
    837868#endif
    838869  {
    839   iHeight >>= 1;
    840   iWidth  >>= 1;
    841   iStride >>= 1;
    842   pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
    843   pRec  = pcPicD->getCbAddr();
    844 
    845   for( y = 0; y < iHeight; y++ )
    846   {
    847     for( x = 0; x < iWidth; x++ )
    848     {
    849       Int iDiff = (Int)( pOrg[x] - pRec[x] );
    850       uiSSDU   += iDiff * iDiff;
    851     }
    852     pOrg += iStride;
    853     pRec += iStride;
    854   }
    855 
    856   pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
    857   pRec  = pcPicD->getCrAddr();
    858 
    859   for( y = 0; y < iHeight; y++ )
    860   {
    861     for( x = 0; x < iWidth; x++ )
    862     {
    863       Int iDiff = (Int)( pOrg[x] - pRec[x] );
    864       uiSSDV   += iDiff * iDiff;
    865     }
    866     pOrg += iStride;
    867     pRec += iStride;
    868   }
    869   dYPSNR            = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 );
    870   dUPSNR            = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 );
    871   dVPSNR            = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 );
     870#if POZNAN_CU_SKIP_PSNR
     871    if(pAvail)
     872    {
     873      iHeight >>= 1;
     874      iWidth  >>= 1;
     875      iStride >>= 1;
     876   
     877      pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
     878      pRec  = pcPicD->getCbAddr();
     879      pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
     880      iPixelsCnt = 0;
     881
     882      for( y = 0; y < iHeight; y++ )
     883      {
     884        for( x = 0; x < iWidth; x++ )
     885        {
     886          if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0||
     887             pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded
     888          {
     889            Int iDiff = (Int)( pOrg[x] - pRec[x] );
     890            uiSSDU   += iDiff * iDiff;
     891            iPixelsCnt++;
     892          }
     893        }
     894        pOrg += iStride;
     895        pRec += iStride;
     896        pAvail+= (iStride<<2);
     897      }
     898     
     899      fRefValueC = (double) maxval * maxval * iPixelsCnt;
     900
     901      pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
     902      pRec  = pcPicD->getCrAddr();
     903      pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
     904      for( y = 0; y < iHeight; y++ )
     905      {
     906        for( x = 0; x < iWidth; x++ )
     907        {
     908          if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0||
     909             pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded
     910          {
     911            Int iDiff = (Int)( pOrg[x] - pRec[x] );
     912            uiSSDV   += iDiff * iDiff;
     913          }
     914        }
     915        pOrg += iStride;
     916        pRec += iStride;
     917        pAvail+= iStride<<2;
     918      }
     919    }
     920    else
     921#endif
     922    {
     923      iHeight >>= 1;
     924      iWidth  >>= 1;
     925      iStride >>= 1;
     926
     927      pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
     928      pRec  = pcPicD->getCbAddr();
     929
     930      for( y = 0; y < iHeight; y++ )
     931      {
     932        for( x = 0; x < iWidth; x++ )
     933        {
     934          Int iDiff = (Int)( pOrg[x] - pRec[x] );
     935          uiSSDU   += iDiff * iDiff;
     936        }
     937        pOrg += iStride;
     938        pRec += iStride;
     939      }
     940
     941      pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
     942      pRec  = pcPicD->getCrAddr();
     943
     944      for( y = 0; y < iHeight; y++ )
     945      {
     946        for( x = 0; x < iWidth; x++ )
     947        {
     948          Int iDiff = (Int)( pOrg[x] - pRec[x] );
     949          uiSSDV   += iDiff * iDiff;
     950        }
     951        pOrg += iStride;
     952        pRec += iStride;
     953      }
     954    }
     955
     956    dYPSNR            = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 );
     957    dUPSNR            = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 );
     958    dVPSNR            = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 );
    872959  }
    873960  // fix: total bits should consider slice size bits (32bit)
  • branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp

    r5 r11  
    416416  {
    417417    pcPic->removeOriginalBuffer   ();
     418#if POZNAN_AVAIL_MAP
     419    pcPic->removeAvailabilityBuffer();
     420#endif
     421#if POZNAN_SYNTH_VIEW
     422    pcPic->removeSynthesisBuffer();
     423#endif
    418424#if HHI_INTER_VIEW_MOTION_PRED
    419425    pcPic->removeOrgDepthMapBuffer();
  • branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenModel.cpp

    r5 r11  
    523523    Int iTargetStride = m_aiCurDepthStrides[ m_iCurrentView ];
    524524    TRenFilter::copy( piNewData, iStride, iWidth, iHeight,  m_apiCurDepthPel[ m_iCurrentView ] + iStartPosY * iTargetStride + iStartPosX, iTargetStride );
     525
     526    {
     527      printf("%d %d\n",iStartPosX,iStartPosY);
     528      TComPicYuv mapPic;
     529      mapPic.create( 1920, 1088, 64, 64, 3 );
     530      TRenFilter::copy( m_apiCurDepthPel[ m_iCurrentView ], iTargetStride, 1920,1088, mapPic.getLumaAddr(), mapPic.getStride());
     531      mapPic.dump("VSO_1920x1088.yuv",true);
     532    }
    525533  }
    526534  else
  • branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.cpp

    r5 r11  
    266266  PelImage cInputDepth ( pcPicYuvDepth    , true);
    267267  PelImage cOutputImage( pcPicYuvSynthOut );
    268 
     268   
    269269  m_pcOutputImage->init();
    270270  m_pcFilled     ->assign(REN_IS_HOLE);
    271 
    272271  xPreProcessDepth ( &cInputDepth,  &cInputDepth);
    273272  xConvertInputData( &cInputImage, &cInputDepth, m_pcInputImage, m_pcInputDepth, !bRenderFromLeft );
     
    279278  xCutMargin        ( &cOutputImage );
    280279};
     280
     281#if POZNAN_SYNTH
     282Void TRenTop::extrapolateAvailabilityView( TComPicYuv* pcPicYuvVideo, TComPicYuv* pcPicYuvDepth, TComPicYuv* pcPicYuvSynthOut, TComPicYuv* pcPicYuvAvailOut, Bool bRenderFromLeft )
     283{
     284  AOF( m_bExtrapolate );
     285  AOF( bRenderFromLeft ? m_ppiShiftLUTLeft || m_ppdShiftLUTLeft : m_ppiShiftLUTRight || m_ppdShiftLUTRight );
     286  AOF( m_auiInputResolution[0] == pcPicYuvVideo->getWidth ());
     287  AOF( m_auiInputResolution[1] == pcPicYuvVideo->getHeight());
     288
     289  PelImage cInputImage ( pcPicYuvVideo    );
     290  PelImage cInputDepth ( pcPicYuvDepth    , true);
     291  PelImage cOutputImage( pcPicYuvSynthOut );
     292  PelImage cFillImage( pcPicYuvAvailOut );
     293   
     294  m_pcOutputImage->init();
     295  m_pcFilled     ->assign(REN_IS_HOLE);
     296 
     297  xPreProcessDepth ( &cInputDepth,  &cInputDepth);
     298  xConvertInputData( &cInputImage, &cInputDepth, m_pcInputImage, m_pcInputDepth, !bRenderFromLeft );
     299  xShiftPixels(m_pcInputImage, m_pcInputDepth, m_pcOutputImage, &cFillImage, bRenderFromLeft);
     300  xRemBoundaryNoise ( m_pcOutputImage, &cFillImage, m_pcOutputImage, bRenderFromLeft); // Erode
     301  xFillHoles        ( m_pcOutputImage, &cFillImage, m_pcOutputImage, bRenderFromLeft);
     302  xConvertOutputData( m_pcOutputImage, &cOutputImage, !bRenderFromLeft );
     303  if (!bRenderFromLeft)  TRenFilter::mirrorHor( &cFillImage );
     304  //xConvertOutputData( m_pcFilled, &cFillImage, !bRenderFromLeft );
     305  xPostProcessImage (&cOutputImage, &cOutputImage);
     306  xCutMargin        ( &cOutputImage );
     307};
     308#endif
    281309
    282310Void TRenTop::getUsedSamplesMap( TComPicYuv* pcPicYuvDepth, TComPicYuv* pcUsedSampleMap, Bool bRenderFromLeft )
  • branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.h

    r5 r11  
    109109                           Int         iBlendMode,
    110110                           Int         iSimEnhBaseView );
     111
     112#if POZNAN_SYNTH
     113  Void extrapolateAvailabilityView   
     114                         ( TComPicYuv* pcPicYuvVideo,
     115                           TComPicYuv* pcPicYuvDepth,
     116                           TComPicYuv* pcPicYuvSynthOut,
     117                           TComPicYuv* pcPicYuvAvailOut,
     118                           Bool bRenderFromLeft );
     119#endif
    111120  // Tools
    112121  Void getUsedSamplesMap ( TComPicYuv* pcPicYuvDepth,
Note: See TracChangeset for help on using the changeset viewer.