Ignore:
Timestamp:
13 Jul 2013, 15:51:26 (11 years ago)
Author:
tech
Message:

Update to HM 11.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComTrQuant.cpp

    r446 r537  
    10751075    Int iTransformShift = MAX_TR_DYNAMIC_RANGE - uiBitDepth - uiLog2TrSize;  // Represents scaling through forward transform
    10761076
    1077     Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift;                // Right shift of non-RDOQ quantizer;  level = (coeff*uiQ + offset)>>q_bits
    1078 
    1079     iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9);
    1080 
    10811077#if ADAPTIVE_QP_SELECTION
    1082     iQBits = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift;
     1078    Int iQBits = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift;
    10831079    iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9);
    10841080    Int iQBitsC = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift - ARL_C_PRECISION; 
    10851081    Int iAddC   = 1 << (iQBitsC-1);
     1082#else
     1083    Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift;                // Right shift of non-RDOQ quantizer;  level = (coeff*uiQ + offset)>>q_bits
     1084    iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9);
    10861085#endif
    10871086
     
    13471346#else
    13481347  Int j;
    1349   {
    1350     Short block[ 64 * 64 ];
    1351     Short coeff[ 64 * 64 ];
    1352     {
     1348  Short block[ 32 * 32 ];
     1349  Short coeff[ 32 * 32 ];
    13531350      for (j = 0; j < iHeight; j++)
    13541351      {   
    13551352        memcpy( block + j * iWidth, piBlkResi + j * uiStride, iWidth * sizeof( Short ) );
    13561353      }
    1357     }
    13581354    xTrMxN(bitDepth, block, coeff, iWidth, iHeight, uiMode );
    13591355    for ( j = 0; j < iHeight * iWidth; j++ )
     
    13611357      psCoeff[ j ] = coeff[ j ];
    13621358    }
    1363     return ;
    1364   }
    13651359#endif 
    13661360}
     
    13821376  Int j;
    13831377  {
    1384     Short block[ 64 * 64 ];
    1385     Short coeff[ 64 * 64 ];
     1378    Short block[ 32 * 32 ];
     1379    Short coeff[ 32 * 32 ];
    13861380    for ( j = 0; j < iHeight * iWidth; j++ )
    13871381    {   
     
    15051499                                                      UInt                            uiAbsPartIdx )
    15061500{
    1507   Int    iQBits      = m_cQP.m_iBits;
    1508   Double dTemp       = 0;
    15091501  UInt uiLog2TrSize = g_aucConvertToBit[ uiWidth ] + 2;
    1510   Int uiQ = g_quantScales[m_cQP.rem()];
    15111502 
    15121503  UInt uiBitDepth = eTType == TEXT_LUMA ? g_bitDepthY : g_bitDepthC;
     
    15191510  assert(scalingListType < 6);
    15201511 
    1521   iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift;                   // Right shift of non-RDOQ quantizer;  level = (coeff*uiQ + offset)>>q_bits
    1522   Double dErrScale   = 0;
     1512  Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift;                   // Right shift of non-RDOQ quantizer;  level = (coeff*uiQ + offset)>>q_bits
    15231513  Double *pdErrScaleOrg = getErrScaleCoeff(scalingListType,uiLog2TrSize-2,m_cQP.m_iRem);
    15241514  Int *piQCoefOrg = getQuantCoeff(scalingListType,m_cQP.m_iRem,uiLog2TrSize-2);
     
    15721562  Double  d64BaseCost         = 0;
    15731563  Int     iLastScanPos        = -1;
    1574   dTemp                       = dErrScale;
    15751564 
    15761565  UInt    c1Idx     = 0;
     
    16011590      UInt    uiBlkPos          = scan[iScanPos];
    16021591      // set coeff
    1603       uiQ  = piQCoef[uiBlkPos];
    1604       dTemp = pdErrScale[uiBlkPos];
     1592      Int uiQ  = piQCoef[uiBlkPos];
     1593      Double dTemp = pdErrScale[uiBlkPos];
    16051594      Int lLevelDouble          = plSrcCoeff[ uiBlkPos ];
    16061595      lLevelDouble              = (Int)min<Int64>((Int64)abs((Int)lLevelDouble) * uiQ , MAX_INT - (1 << (iQBits - 1)));
Note: See TracChangeset for help on using the changeset viewer.