Ticket #1: FIX_TRACE.patch

File FIX_TRACE.patch, 5.6 KB (added by ksuehring, 4 years ago)
  • Lib/TLibCommon/TComRom.h

     
    207207extern       Char   g_aucConvertToBit  [ MAX_CU_SIZE+1 ];   // from width to log2(width)-2
    208208
    209209#ifndef ENC_DEC_TRACE
    210 # define ENC_DEC_TRACE 0
     210# define ENC_DEC_TRACE 1
    211211#endif
    212212
    213213#if ENC_DEC_TRACE
  • Lib/TLibCommon/TypeDef.h

     
    4141//! \ingroup TLibCommon
    4242//! \{
    4343
     44#define FIX_TRACE 1
    4445///////////////////////////////////////////////////////////
    4546// Contribution COM16–C806 (QUALCOMM) defines section start
    4647///////////////////////////////////////////////////////////
  • Lib/TLibDecoder/SEIread.cpp

     
    122122  } while (m_pcBitstream->getNumBitsLeft() > 8);
    123123
    124124  UInt rbspTrailingBits;
     125#if ENC_DEC_TRACE && FIX_TRACE
     126  // omit trace text to match encoder side
     127  xReadCode(8, rbspTrailingBits);
     128#else
    125129  READ_CODE(8, rbspTrailingBits, "rbsp_trailing_bits");
     130#endif
    126131  assert(rbspTrailingBits == 0x80);
    127132}
    128133
  • Lib/TLibDecoder/TDecBinCoderCABAC.cpp

     
    101101Void TDecBinCABAC::decodeBin( UInt& ruiBin, ContextModel &rcCtxModel )
    102102{
    103103  UShort uiLPS = TComCABACTables::sm_aucLPSTable[rcCtxModel.getState()>>6][(m_uiRange>>2)-64];
    104 #if DEBUG
     104#if DEBUG && !FIX_TRACE
    105105  {
    106106    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    107107    DTRACE_CABAC_T( "\tstate=" )
  • Lib/TLibDecoder/TDecCAVLC.cpp

     
    13171317#if QC_SUB_PU_TMVP &&!MERGE_CAND_NUM_PATCH
    13181318      READ_UVLC( uiCode, rpcSlice->getSPS()->getAtmvpEnableFlag() ? "six_minus_max_num_merge_cand": "five_minus_max_num_merge_cand");
    13191319      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - ( rpcSlice->getSPS()->getAtmvpEnableFlag() ? 0 : 1) - uiCode);
    1320      
    13211320#else
     1321#if MERGE_CAND_NUM_PATCH && FIX_TRACE
     1322      READ_UVLC( uiCode, "MAX_minus_slice_max_num_merge_cand");
     1323#else
    13221324      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
     1325#endif
    13231326      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
    13241327#endif
    13251328
  • Lib/TLibDecoder/TDecTop.cpp

     
    381381  m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS
    382382  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
    383383
     384#if ENC_DEC_TRACE && FIX_TRACE
     385  const UInt64 originalSymbolCount = g_nSymbolCounter;
     386#endif
     387
    384388  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
    385389
    386390#if QC_AC_ADAPT_WDOW
     
    481485    if (m_prevPOC >= m_pocRandomAccess)
    482486    {
    483487      m_prevPOC = m_apcSlicePilot->getPOC();
     488#if ENC_DEC_TRACE && FIX_TRACE
     489      //rewind the trace counter since we didn't actually decode the slice
     490      g_nSymbolCounter = originalSymbolCount;
     491#endif
    484492      return true;
    485493    }
    486494    m_prevPOC = m_apcSlicePilot->getPOC();
  • Lib/TLibEncoder/TEncBinCoderCABAC.cpp

     
    238238  }
    239239#endif
    240240  UShort uiLPS = TComCABACTables::sm_aucLPSTable[rcCtxModel.getState()>>6][(m_uiRange>>2)-64];
    241 #if DEBUG
     241#if DEBUG && !FIX_TRACE
    242242  {
    243243    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    244244    DTRACE_CABAC_T( "\tstate=" )
     
    285285#else
    286286Void TEncBinCABAC::encodeBin( UInt binValue, ContextModel &rcCtxModel )
    287287{
     288#if !FIX_TRACE
    288289  {
    289290    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    290291    DTRACE_CABAC_T( "\tstate=" )
     
    293294    DTRACE_CABAC_V( binValue )
    294295    DTRACE_CABAC_T( "\n" )
    295296  }
     297#endif
    296298  m_uiBinsCoded += m_binCountIncrement;
    297299  rcCtxModel.setBinsCoded( 1 );
    298300 
     
    332334 */
    333335Void TEncBinCABAC::encodeBinEP( UInt binValue )
    334336{
    335 #if !DEBUG
     337#if !DEBUG && !FIX_TRACE
    336338  {
    337339    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    338340    DTRACE_CABAC_T( "\tEPsymbol=" )
     
    360362Void TEncBinCABAC::encodeBinsEP( UInt binValues, Int numBins )
    361363{
    362364  m_uiBinsCoded += numBins & -m_binCountIncrement;
    363  #if !DEBUG
     365 #if !DEBUG && !FIX_TRACE
    364366  for ( Int i = 0; i < numBins; i++ )
    365367  {
    366368    DTRACE_CABAC_VL( g_nSymbolCounter++ )
  • Lib/TLibEncoder/TEncCavlc.cpp

     
    460460    }
    461461  }
    462462#if QC_IC
     463#if FIX_TRACE
     464  WRITE_FLAG( pcSPS->getICFlag()? 1: 0, "illumination_comp_enabled_flag");
     465#else
    463466  WRITE_FLAG( pcSPS->getICFlag()? 1: 0, "illumination_comp_flag");
    464467#endif
     468#endif
    465469#if QC_SUB_PU_TMVP
    466470  WRITE_FLAG( pcSPS->getAtmvpEnableFlag() ? 1: 0, "atmvp_flag");
    467471  WRITE_CODE( pcSPS->getSubPUTLog2Size(), 3, "log2_sub_pu_tmvp_size" );