Ticket #284: HM-5.0-dev-misc-rev1755-unused-dqp-context-removal.patch

File HM-5.0-dev-misc-rev1755-unused-dqp-context-removal.patch, 3.2 KB (added by kchono, 13 years ago)
  • source/Lib/TLibCommon/ContextTables.h

     
    8484#define NUM_TRANS_SUBDIV_FLAG_CTX     10      ///< number of context models for transform subdivision flags
    8585#define NUM_QT_CBF_CTX                5       ///< number of context models for QT CBF
    8686#define NUM_QT_ROOT_CBF_CTX           1       ///< number of context models for QT ROOT CBF
    87 #define NUM_DELTA_QP_CTX              4       ///< number of context models for dQP
     87#define NUM_DELTA_QP_CTX              3       ///< number of context models for dQP
    8888
    8989#if MULTI_LEVEL_SIGNIFICANCE
    9090#define NUM_SIG_CG_FLAG_CTX           2       ///< number of context models for MULTI_LEVEL_SIGNIFICANCE
     
    447447INIT_DQP[3][NUM_DELTA_QP_CTX] =
    448448{
    449449  {
    450     CNU, CNU, CNU, CNU,
     450    CNU, CNU, CNU,
    451451   
    452452  },
    453453  {
    454     CNU, CNU, CNU, CNU,
     454    CNU, CNU, CNU,
    455455   
    456456  },
    457457  {
    458     CNU, CNU, CNU, CNU,
     458    CNU, CNU, CNU,
    459459   
    460460  },
    461461};
     
    15361536INIT_DQP[3][NUM_DELTA_QP_CTX][2] =
    15371537{
    15381538  {
    1539     {    0,   64 }, {    0,   64 }, {    0,   64 }, {    0,   64 }
     1539    {    0,   64 }, {    0,   64 }, {    0,   64 },
    15401540  },
    15411541  {
    1542     {    0,   64 }, {    0,   64 }, {    0,   64 }, {    0,   64 }
     1542    {    0,   64 }, {    0,   64 }, {    0,   64 },
    15431543  },
    15441544  {
    1545     {    0,   64 }, {    0,   64 }, {    0,   64 }, {    0,   64 }
     1545    {    0,   64 }, {    0,   64 }, {    0,   64 },
    15461546  }
    15471547};
    15481548
  • source/Lib/TLibDecoder/TDecSbac.cpp

     
    12611261
    12621262    UInt uiMaxAbsDQpMinus1 = 24 + (uiQpBdOffsetY/2) + (uiSign);
    12631263    UInt uiAbsDQpMinus1;
    1264     xReadUnaryMaxSymbol (uiAbsDQpMinus1,  &m_cCUDeltaQpSCModel.get( 0, 0, 2 ), 1, uiMaxAbsDQpMinus1);
     1264    xReadUnaryMaxSymbol (uiAbsDQpMinus1,  &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1, uiMaxAbsDQpMinus1);
    12651265
    12661266    iDQp = uiAbsDQpMinus1 + 1;
    12671267
     
    12701270      iDQp = -iDQp;
    12711271    }
    12721272#else
    1273     xReadUnarySymbol( uiDQp, &m_cCUDeltaQpSCModel.get( 0, 0, 2 ), 1 );
     1273    xReadUnarySymbol( uiDQp, &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1 );
    12741274    iDQp = ( uiDQp + 2 ) / 2;
    12751275   
    12761276    if ( uiDQp & 1 )
  • source/Lib/TLibEncoder/TEncSbac.cpp

     
    11181118
    11191119    UInt uiMaxAbsDQpMinus1 = 24 + (uiQpBdOffsetY/2) + (uiSign);
    11201120    UInt uiAbsDQpMinus1 = (UInt)((iDQp > 0)? iDQp  : (-iDQp)) - 1;
    1121     xWriteUnaryMaxSymbol( uiAbsDQpMinus1, &m_cCUDeltaQpSCModel.get( 0, 0, 2 ), 1, uiMaxAbsDQpMinus1);
     1121    xWriteUnaryMaxSymbol( uiAbsDQpMinus1, &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1, uiMaxAbsDQpMinus1);
    11221122#else
    11231123    UInt uiDQp = (UInt)( iDQp > 0 ? ( 2 * iDQp - 2 ) : ( -2 * iDQp - 1 ) );
    1124     xWriteUnarySymbol( uiDQp, &m_cCUDeltaQpSCModel.get( 0, 0, 2 ), 1 );
     1124    xWriteUnarySymbol( uiDQp, &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1 );
    11251125#endif
    11261126  }
    11271127