Ticket #981: Q0089_fix.patch

File Q0089_fix.patch, 2.2 KB (added by T.Hashimoto, 19 months ago)
  • source/Lib/CommonLib/DepQuant.cpp

    diff --git a/source/Lib/CommonLib/DepQuant.cpp b/source/Lib/CommonLib/DepQuant.cpp
    index 96bf315e..a746767b 100644
    a b DepQuant::~DepQuant() 
    15731573
    15741574void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx& ctx )
    15751575{
     1576#if JVET_Q0089_SLICE_LOSSLESS_CODING_CHROMA_BDPCM
     1577  if ( tu.cs->picHeader->getDepQuantEnabledFlag() && !(tu.mtsIdx[compID] == MTS_SKIP && !tu.cs->slice->getTSResidualCodingDisabledFlag()))
     1578#else
    15761579  if ( tu.cs->picHeader->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP) )
     1580#endif
    15771581  {
    15781582    //===== scaling matrix ====
    15791583    const int         qpDQ            = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
    void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeff 
    16031607
    16041608void DepQuant::dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const ComponentID &compID, const QpParam &cQP )
    16051609{
     1610#if JVET_Q0089_SLICE_LOSSLESS_CODING_CHROMA_BDPCM
     1611  if( tu.cs->picHeader->getDepQuantEnabledFlag() && !(tu.mtsIdx[compID] == MTS_SKIP && !tu.cs->slice->getTSResidualCodingDisabledFlag()))
     1612#else
    16061613  if( tu.cs->picHeader->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP))
     1614#endif
    16071615  {
    16081616    const int         qpDQ            = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
    16091617    const int         qpPer           = qpDQ / 6;
  • source/Lib/CommonLib/QuantRDOQ.cpp

    diff --git a/source/Lib/CommonLib/QuantRDOQ.cpp b/source/Lib/CommonLib/QuantRDOQ.cpp
    index a258d766..e88e6893 100644
    a b void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff 
    541541        }
    542542        else
    543543        {
     544#if JVET_Q0089_SLICE_LOSSLESS_CODING_CHROMA_BDPCM
     545          if (tu.cs->slice->getTSResidualCodingDisabledFlag())
     546          {
     547            xRateDistOptQuant( tu, compID, pSrc, uiAbsSum, cQP, ctx );
     548          }
     549          else
     550          {
     551            xRateDistOptQuantTS( tu, compID, pSrc, uiAbsSum, cQP, ctx );
     552          }
     553#else
    544554          xRateDistOptQuantTS( tu, compID, pSrc, uiAbsSum, cQP, ctx );
     555#endif
    545556        }
    546557      }
    547558      else