Changeset 655 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncSbac.cpp


Ignore:
Timestamp:
23 Oct 2013, 23:01:30 (12 years ago)
Author:
tech
Message:

Merged 8.1-Cleanup@654

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r622 r655  
    9595#if H_3D_DIM_DMM
    9696, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    97 #if !SEC_DMM2_E0146_HHIFIX
    98 , m_cDmm2DataSCModel          ( 1,             1,               NUM_DMM2_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    99 #endif
    10097, m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    10198#endif
     
    108105#endif
    109106#endif
    110 #if LGE_INTER_SDC_E0156
     107#if H_3D_INTER_SDC
    111108, m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    112109, m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     
    177174#if H_3D_DIM_DMM
    178175  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    179 #if !SEC_DMM2_E0146_HHIFIX
    180   m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
    181 #endif
    182176  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    183177#endif
     
    190184#endif
    191185#endif
    192 #if LGE_INTER_SDC_E0156
     186#if H_3D_INTER_SDC
    193187  m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    194188  m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    232226      curCost += m_cCUICFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
    233227#endif
    234 #if LGE_INTER_SDC_E0156
     228#if H_3D_INTER_SDC
    235229      curCost += m_cInterSDCFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    236230      curCost += m_cInterSDCResidualSCModel.calcCost  ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    268262#if H_3D_DIM_DMM
    269263      curCost += m_cDmm1DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );
    270 #if !SEC_DMM2_E0146_HHIFIX
    271       curCost += m_cDmm2DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM2_DATA );
    272 #endif
    273264      curCost += m_cDmm3DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM3_DATA );
    274265#endif
     
    340331#if H_3D_DIM_DMM
    341332  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    342 #if !SEC_DMM2_E0146_HHIFIX
    343   m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
    344 #endif
    345333  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    346334#endif
     
    353341#endif
    354342#endif
    355 #if LGE_INTER_SDC_E0156
     343#if H_3D_INTER_SDC
    356344  m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    357345  m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    548536  }
    549537}
    550 
    551 #if !SEC_DMM2_E0146_HHIFIX
    552 Void TEncSbac::xCodeDmm2Offset( Int iOffset )
    553 {
    554   if( DMM2_DELTAEND_MAX > 0 )
    555   {
    556     m_pcBinIf->encodeBin( (iOffset != 0) , m_cDmm2DataSCModel.get(0, 0, 0) );
    557     if( iOffset != 0 )
    558     {
    559       UInt uiAbsValMinus1 = abs(iOffset)-1;
    560       m_pcBinIf->encodeBin( (uiAbsValMinus1 & 0x01),      m_cDmm2DataSCModel.get(0, 0, 0) );
    561       m_pcBinIf->encodeBin( (uiAbsValMinus1 & 0x02) >> 1, m_cDmm2DataSCModel.get(0, 0, 0) );
    562 
    563       UInt uiSign = (iOffset > 0) ? 0 : 1;
    564       m_pcBinIf->encodeBinEP( uiSign );
    565     }
    566   }
    567 }
    568 #endif
    569538
    570539Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit )
     
    12401209      xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
    12411210    } break;
    1242 #if !SEC_DMM2_E0146_HHIFIX
    1243   case( DMM2_IDX ):
    1244     {
    1245       xCodeDmm2Offset( pcCU->getDmm2DeltaEnd( absPartIdx ) );
    1246     } break;
    1247 #endif
    12481211  case( DMM3_IDX ):
    12491212    {
     
    12941257Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
    12951258{
    1296 #if ZJU_DEPTH_INTRA_MODE_E0204
    12971259    UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 0, 2, 7, 3, 6, 2},{0, 1, 0, 0, 0, 0, 0}};
    12981260    UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{1, 1, 2, 3, 2, 3, 2},{1, 1, 0, 0, 0, 0, 0}};
    1299 #else
    1300 #if LGE_SDC_REMOVE_DC_E0158
    1301 #if SEC_DMM2_E0146_HHIFIX
    1302   UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}};
    1303   UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}};
    1304 #else
    1305   UInt codeWordTable[3][8] =    { { 0, 0, 0, 2, 0, 6, 0, 7 }, { 0, 2, 3, 4, 5, 6, 15, 14 }, { 0, 1, 0, 0, 0, 0, 0, 0 } };
    1306   UInt codeWordLenTable[3][8] = { { 0, 1, 0, 2, 0, 3, 0, 3 }, { 2, 3, 3, 3, 3, 3,  4,  4 }, { 1, 1, 0, 0, 0, 0, 0, 0 } };
    1307 #endif
    1308 #else
    1309 #if SEC_DMM2_E0146_HHIFIX
    1310   UInt codeWordTable[3][8] =    {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}};
    1311   UInt codeWordLenTable[3][8] = {{0, 1, 0, 2, 0,3, 0, 3},{2, 3, 3, 3, 3, 3,  4,  4},{1, 2, 0, 0, 0, 0, 2, 0}};
    1312 #else
    1313   UInt codeWordTable[3][9] =    {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}};
    1314   UInt codeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3,  4,  5,  5},{1, 2, 0, 0, 0, 0, 2, 0, 0}};
    1315 #endif
    1316 #endif
    1317 #endif
    13181261  UInt dir = pcCU->getLumaIntraDir( absPartIdx );
    13191262  UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
     
    13311274    case DMM4_IDX: codeIdx = 4; break;
    13321275    case DMM3_IDX: codeIdx = 5; break;
    1333 #if LGE_SDC_REMOVE_DC_E0158
    1334 #if SEC_DMM2_E0146_HHIFIX
    13351276    case  RBC_IDX: codeIdx = 6; break;
    1336 #else
    1337     case DMM2_IDX: codeIdx = 6; break;
    1338     case  RBC_IDX: codeIdx = 7; break;
    1339 #endif
    1340 #else
    1341 #if SEC_DMM2_E0146_HHIFIX
    1342     case  RBC_IDX: codeIdx = 7; break;
    1343 #else
    1344     case DMM2_IDX: codeIdx = 7; break;
    1345     case  RBC_IDX: codeIdx = 8; break;
    1346 #endif
    1347 #endif
    13481277    default:                    break;
    13491278    }
     
    13561285    {
    13571286      case PLANAR_IDX:  codeIdx = 0; break;
    1358 #if !LGE_SDC_REMOVE_DC_E0158
    1359       case DC_IDX:      codeIdx = 6; break;
    1360 #endif
    13611287      default:          codeIdx = 2; break;
    13621288    }
    13631289  }
    13641290#endif
    1365 #if ZJU_DEPTH_INTRA_MODE_E0204
    13661291  if( puIdx==1 )
    13671292  {
     
    13751300      }
    13761301  }
    1377 #endif
    13781302  //mode coding
    13791303  for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
     
    23042228}
    23052229
    2306 #if LGE_INTER_SDC_E0156
     2230#if H_3D_INTER_SDC
    23072231Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    23082232{
Note: See TracChangeset for help on using the changeset viewer.