Changeset 1049 in 3DVCSoftware


Ignore:
Timestamp:
20 Aug 2014, 08:01:43 (10 years ago)
Author:
mediatek-htm
Message:

Fix of the Ticket #63. The MACRO is "MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX".

By Yi-Wen Chen (yiwen.chen@…)

Location:
branches/HTM-12.0-dev1/source/Lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComRom.cpp

    r1039 r1049  
    369369
    370370Char  g_aucConvertToBit  [ MAX_CU_SIZE+1 ];
    371 
     371#if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    372372#if H_3D_IC
    373373UInt g_aICEnableCANDIDATE[10] = { 0, };
    374374UInt g_aICEnableNUM[ 10 ] = { 0, };
    375375Int g_lastlayer=0;
     376#endif
    376377#endif
    377378#if ENC_DEC_TRACE
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComRom.h

    r1039 r1049  
    192192
    193193extern       Char   g_aucConvertToBit  [ MAX_CU_SIZE+1 ];   // from width to log2(width)-2
    194 
     194#if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    195195#if H_3D_IC
    196196extern UInt g_aICEnableCANDIDATE[10];
    197197extern UInt g_aICEnableNUM[ 10 ]; //10 layers
    198198extern Int  g_lastlayer;
     199#endif
    199200#endif
    200201
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.cpp

    r1048 r1049  
    36023602      m_bApplyIC = true;
    36033603      Int refLayer = curLayer-1;
    3604       if( (refLayer>=0) && (g_aICEnableCANDIDATE[refLayer]>0) )
     3604#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     3605      Int ICEnableCandidate = getICEnableCandidate(refLayer);
     3606      Int ICEnableNum = getICEnableNum(refLayer);
     3607      if( (refLayer>=0) && (ICEnableCandidate>0) )
    36053608      {   
    3606         Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]);
     3609        Double ratio=Double(ICEnableNum/Double(ICEnableCandidate));
    36073610
    36083611        if( ratio > IC_LOW_LATENCY_ENCODING_THRESHOLD)
    3609 {
     3612        {
    36103613          m_bApplyIC=true;
    36113614        }
     
    36153618        }
    36163619      }
     3620      setICEnableCandidate(curLayer, 0);
     3621      setICEnableNum(curLayer, 0);
     3622#else
     3623      if( (refLayer>=0) && (g_aICEnableCANDIDATE[refLayer]>0) )
     3624      {   
     3625        Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]);
     3626
     3627        if( ratio > IC_LOW_LATENCY_ENCODING_THRESHOLD)
     3628{
     3629          m_bApplyIC=true;
     3630        }
     3631        else
     3632        {
     3633          m_bApplyIC=false;
     3634        }
     3635      }
    36173636      g_aICEnableNUM[curLayer]=0;
    36183637      g_aICEnableCANDIDATE[curLayer]=0;
    36193638      g_lastlayer=getDepth();
     3639#endif
    36203640    }
    36213641  }
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.h

    r1039 r1049  
    22562256  Bool      m_bApplySingleDepthMode;
    22572257#endif
     2258#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     2259  Int *m_aICEnableCandidate;
     2260  Int *m_aICEnableNum;
     2261#endif
    22582262public:
    22592263  TComSlice();
     
    25672571#endif
    25682572#endif
     2573#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     2574  Void    setICEnableCandidate( Int* ICEnableCandidate)   { m_aICEnableCandidate = ICEnableCandidate; };
     2575  Void    setICEnableNum( Int* ICEnableNum)   { m_aICEnableNum = ICEnableNum; };
     2576  Void    setICEnableCandidate( UInt layer, Int value)   { m_aICEnableCandidate[ layer ] = value; };
     2577  Void    setICEnableNum( UInt layer, Int value)   { m_aICEnableNum[ layer ] = value; };
     2578
     2579  Int    getICEnableCandidate( Int layer){ return  m_aICEnableCandidate[ layer ]; };
     2580  Int    getICEnableNum( Int layer){ return m_aICEnableNum[ layer ]; };
     2581#endif
    25692582#if H_MV
    25702583// Additional slice header syntax elements
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TypeDef.h

    r1048 r1049  
    123123                                              // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121
    124124                                              // MTK_LOW_LATENCY_IC_ENCODING_H0086  Low-latency IC encoding in JCT3V-H0086
     125
     126#define MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX  1  // Remove the global variables used in JCT3V-H0086
     127
    125128
    126129#define SEC_IC_NEIGHBOR_CLIP_I0080        1   // Clipping of neighboring sample position, JCT3V-I0080
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1039 r1049  
    185185  else
    186186  {
     187#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     188    Int ICEnableCandidate = pcCU->getSlice()->getICEnableCandidate(pcCU->getSlice()->getDepth());
     189    Int ICEnableNum = pcCU->getSlice()->getICEnableNum(pcCU->getSlice()->getDepth());
     190    ICEnableCandidate++;
     191    if(pcCU->getICFlag(uiAbsPartIdx))
     192    {
     193      ICEnableNum++;
     194    }
     195    pcCU->getSlice()->setICEnableCandidate(pcCU->getSlice()->getDepth(), ICEnableCandidate);
     196    pcCU->getSlice()->setICEnableNum(pcCU->getSlice()->getDepth(), ICEnableNum);
     197#else
    187198    g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++;
    188199    if(pcCU->getICFlag(uiAbsPartIdx))
     
    190201      g_aICEnableNUM[pcCU->getSlice()->getDepth()]++;
    191202    }
     203#endif
    192204  }
    193205  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncGOP.cpp

    r1039 r1049  
    160160#endif
    161161#endif
    162 
     162#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     163  m_aICEnableCandidate           = pcTEncTop->getICEnableCandidate();
     164  m_aICEnableNum           = pcTEncTop->getICEnableNum();
     165#endif
    163166#if KWU_FIX_URQ
    164167  m_pcRateCtrl           = pcTEncTop->getRateCtrl();
     
    968971#endif   
    969972#endif
     973#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     974    pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
     975    pcSlice->setICEnableNum( m_aICEnableNum );         
     976#endif
    970977    //  Slice info. refinement
    971978#if H_MV
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncGOP.h

    r964 r1049  
    116116#endif
    117117#endif
     118#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     119  Int *m_aICEnableCandidate;
     120  Int *m_aICEnableNum;
     121#endif
    118122  //--Adaptive Loop filter
    119123  TEncSampleAdaptiveOffset*  m_pcSAO;
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncTop.cpp

    r1039 r1049  
    8484  m_ivPicLists = NULL;
    8585#endif
     86#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     87  m_aICEnableCandidate = NULL;
     88  m_aICEnableNum = NULL;
     89#endif
    8690}
    8791
     
    305309
    306310  xInitPPSforTiles();
    307 
     311#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     312  m_aICEnableCandidate = new Int[ 10 ];
     313  m_aICEnableNum = new Int[ 10 ];
     314
     315  for(int i=0;i<10;i++)
     316  {
     317    m_aICEnableCandidate[i]=0;
     318    m_aICEnableNum[i]=0;
     319  }
     320#endif
    308321  // initialize processing unit classes
    309322  m_cGOPEncoder.  init( this );
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncTop.h

    r872 r1049  
    7979#if H_MV
    8080  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers
     81#endif
     82#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     83  Int *m_aICEnableCandidate;
     84  Int *m_aICEnableNum;
    8185#endif
    8286  // encoder search
     
    162166  TComPicLists* getIvPicLists() { return m_ivPicLists; }
    163167#endif
     168#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     169  Int *getICEnableCandidate() { return m_aICEnableCandidate; }
     170  Int *getICEnableNum() { return m_aICEnableNum; }
     171#endif
    164172  Void      deletePicBuffer ();
    165173
     
    221229  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    222230#endif
     231#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     232  Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
     233  Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
     234#endif
    223235  // -------------------------------------------------------------------------------------------------------------------
    224236  // encoder function
Note: See TracChangeset for help on using the changeset viewer.