Changeset 1316 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
21 Jul 2015, 20:08:08 (10 years ago)
Author:
seregin
Message:

port rev 4391

Location:
branches/SHM-dev/source/Lib/TLibEncoder
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1307 r1316  
    228228  Bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS]={false};
    229229
    230   pps_extension_flags[PPS_EXT__REXT] = (
    231              ( pcPPS->getUseTransformSkip() && (pcPPS->getTransformSkipLog2MaxSize() != 2))
    232           || pcPPS->getUseCrossComponentPrediction()
    233           || ( pcPPS->getChromaQpAdjTableSize() > 0 )
    234           || ( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA) !=0 ) || ( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) !=0 )
    235      )
    236     ;
     230  pps_extension_flags[PPS_EXT__REXT] = pcPPS->getPpsRangeExtension().settingsDifferFromDefaults(pcPPS->getUseTransformSkip());
    237231
    238232  // Other PPS extension flags checked here.
     
    277271        {
    278272          case PPS_EXT__REXT:
    279 
    280             if (pcPPS->getUseTransformSkip())
    281273            {
    282               WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2,                 "log2_max_transform_skip_block_size_minus2");
     274              const TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension();
     275              if (pcPPS->getUseTransformSkip())
     276              {
     277                WRITE_UVLC( ppsRangeExtension.getLog2MaxTransformSkipBlockSize()-2,            "log2_max_transform_skip_block_size_minus2");
     278              }
     279
     280              WRITE_FLAG((ppsRangeExtension.getCrossComponentPredictionEnabledFlag() ? 1 : 0), "cross_component_prediction_enabled_flag" );
     281
     282              WRITE_FLAG(UInt(ppsRangeExtension.getChromaQpOffsetListEnabledFlag()),           "chroma_qp_offset_list_enabled_flag" );
     283              if (ppsRangeExtension.getChromaQpOffsetListEnabledFlag())
     284              {
     285                WRITE_UVLC(ppsRangeExtension.getDiffCuChromaQpOffsetDepth(),                   "diff_cu_chroma_qp_offset_depth");
     286                WRITE_UVLC(ppsRangeExtension.getChromaQpOffsetListLen() - 1,                   "chroma_qp_offset_list_len_minus1");
     287                /* skip zero index */
     288                for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < ppsRangeExtension.getChromaQpOffsetListLen(); cuChromaQpOffsetIdx++)
     289                {
     290                  WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset,     "cb_qp_offset_list[i]");
     291                  WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset,     "cr_qp_offset_list[i]");
     292                }
     293              }
     294
     295              WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA),           "log2_sao_offset_scale_luma"   );
     296              WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA),         "log2_sao_offset_scale_chroma" );
    283297            }
    284 
    285             WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0),         "cross_component_prediction_enabled_flag" );
    286 
    287             WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0),                "chroma_qp_offset_list_enabled_flag" );
    288             if (pcPPS->getChromaQpAdjTableSize() > 0)
    289             {
    290               WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(),                       "diff_cu_chroma_qp_offset_depth");
    291               WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1,                    "chroma_qp_offset_list_len_minus1");
    292               /* skip zero index */
    293               for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < pcPPS->getChromaQpAdjTableSize(); cuChromaQpOffsetIdx++)
    294               {
    295                 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(cuChromaQpOffsetIdx+1).u.comp.CbOffset,     "cb_qp_offset_list[i]");
    296                 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(cuChromaQpOffsetIdx+1).u.comp.CrOffset,     "cr_qp_offset_list[i]");
    297               }
    298             }
    299 
    300             WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA),           "log2_sao_offset_scale_luma"   );
    301             WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA),         "log2_sao_offset_scale_chroma" );
    302298            break;
     299
    303300#if SVC_EXTENSION
    304301          case PPS_EXT__MLAYER:
     
    713710  Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS]={false};
    714711
    715   sps_extension_flags[SPS_EXT__REXT] = (
    716           pcSPS->getUseResidualRotation()
    717        || pcSPS->getUseSingleSignificanceMapContext()
    718        || pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT)
    719        || pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT)
    720        || pcSPS->getUseExtendedPrecision()
    721        || pcSPS->getDisableIntraReferenceSmoothing()
    722        || pcSPS->getUseHighPrecisionPredictionWeighting()
    723        || pcSPS->getUseGolombRiceParameterAdaptation()
    724        || pcSPS->getAlignCABACBeforeBypass()
    725     );
     712  sps_extension_flags[SPS_EXT__REXT] = pcSPS->getSpsRangeExtension().settingsDifferFromDefaults();
    726713
    727714  // Other SPS extension flags checked here.
     
    762749        {
    763750          case SPS_EXT__REXT:
    764 
    765             WRITE_FLAG( (pcSPS->getUseResidualRotation() ? 1 : 0),                  "transform_skip_rotation_enabled_flag");
    766             WRITE_FLAG( (pcSPS->getUseSingleSignificanceMapContext() ? 1 : 0),      "transform_skip_context_enabled_flag");
    767             WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" );
    768             WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" );
    769             WRITE_FLAG( (pcSPS->getUseExtendedPrecision() ? 1 : 0),                 "extended_precision_processing_flag" );
    770             WRITE_FLAG( (pcSPS->getDisableIntraReferenceSmoothing() ? 1 : 0),       "intra_smoothing_disabled_flag" );
    771             WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0),  "high_precision_offsets_enabled_flag" );
    772             WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0),     "persistent_rice_adaptation_enabled_flag" );
    773             WRITE_FLAG( (pcSPS->getAlignCABACBeforeBypass() ? 1 : 0),               "cabac_bypass_alignment_enabled_flag" );
     751          {
     752            const TComSPSRExt &spsRangeExtension=pcSPS->getSpsRangeExtension();
     753
     754            WRITE_FLAG( (spsRangeExtension.getTransformSkipRotationEnabledFlag() ? 1 : 0),      "transform_skip_rotation_enabled_flag");
     755            WRITE_FLAG( (spsRangeExtension.getTransformSkipContextEnabledFlag() ? 1 : 0),       "transform_skip_context_enabled_flag");
     756            WRITE_FLAG( (spsRangeExtension.getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" );
     757            WRITE_FLAG( (spsRangeExtension.getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" );
     758            WRITE_FLAG( (spsRangeExtension.getExtendedPrecisionProcessingFlag() ? 1 : 0),       "extended_precision_processing_flag" );
     759            WRITE_FLAG( (spsRangeExtension.getIntraSmoothingDisabledFlag() ? 1 : 0),            "intra_smoothing_disabled_flag" );
     760            WRITE_FLAG( (spsRangeExtension.getHighPrecisionOffsetsEnabledFlag() ? 1 : 0),       "high_precision_offsets_enabled_flag" );
     761            WRITE_FLAG( (spsRangeExtension.getPersistentRiceAdaptationEnabledFlag() ? 1 : 0),   "persistent_rice_adaptation_enabled_flag" );
     762            WRITE_FLAG( (spsRangeExtension.getCabacBypassAlignmentEnabledFlag() ? 1 : 0),       "cabac_bypass_alignment_enabled_flag" );
    774763            break;
     764          }
    775765#if SVC_EXTENSION
    776766          case SPS_EXT__MLAYER:
     
    12991289    }
    13001290
    1301     if (pcSlice->getPPS()->getChromaQpAdjTableSize() > 0)
     1291    if (pcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag())
    13021292    {
    13031293      WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "cu_chroma_qp_offset_enabled_flag");
     
    17151705
    17161706#if SVC_EXTENSION
    1717               Int range=pcSlice->getSPS()->getUseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
     1707              Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
    17181708#else
    1719               Int range=pcSlice->getSPS()->getUseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
     1709              Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
    17201710#endif
    17211711              Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1311 r1316  
    177177  Int       m_iMaxDeltaQP;                      //  Max. absolute delta QP (1:default)
    178178  Int       m_iMaxCuDQPDepth;                   //  Max. depth for a minimum CuDQP (0:default)
    179   Int       m_maxCUChromaQpAdjustmentDepth;
     179  Int       m_diffCuChromaQpOffsetDepth;        ///< If negative, then do not apply chroma qp offsets.
    180180
    181181  Int       m_chromaCbQpOffset;                 //  Chroma Cb QP Offset (0:default)
     
    186186  Bool      m_bUseAdaptQpSelect;
    187187#endif
    188   Bool      m_useExtendedPrecision;
    189   Bool      m_useHighPrecisionPredictionWeighting;
     188  Bool      m_extendedPrecisionProcessingFlag;
     189  Bool      m_highPrecisionOffsetsEnabledFlag;
    190190  Bool      m_bUseAdaptiveQP;
    191191  Int       m_iQPAdaptationRange;
     
    206206  Bool      m_bUseCbfFastMode;
    207207  Bool      m_useEarlySkipDetection;
    208   Bool      m_useCrossComponentPrediction;
     208  Bool      m_crossComponentPredictionEnabledFlag;
    209209  Bool      m_reconBasedCrossCPredictionEstimate;
    210   UInt      m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];
     210  UInt      m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE];
    211211  Bool      m_useTransformSkip;
    212212  Bool      m_useTransformSkipFast;
    213   UInt      m_transformSkipLog2MaxSize;
    214   Bool      m_useResidualRotation;
    215   Bool      m_useSingleSignificanceMapContext;
    216   Bool      m_useGolombRiceParameterAdaptation;
    217   Bool      m_alignCABACBeforeBypass;
    218   Bool      m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];
     213  UInt      m_log2MaxTransformSkipBlockSize;
     214  Bool      m_transformSkipRotationEnabledFlag;
     215  Bool      m_transformSkipContextEnabledFlag;
     216  Bool      m_persistentRiceAdaptationEnabledFlag;
     217  Bool      m_cabacBypassAlignmentEnabledFlag;
     218  Bool      m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];
    219219  Int*      m_aidQP;
    220220  UInt      m_uiDeltaQpRD;
     
    235235  Bool      m_bPCMInputBitDepthFlag;
    236236  Bool      m_bPCMFilterDisableFlag;
    237   Bool      m_disableIntraReferenceSmoothing;
     237  Bool      m_intraSmoothingDisabledFlag;
    238238  Bool      m_loopFilterAcrossTilesEnabledFlag;
    239239  Bool      m_tileUniformSpacingFlag;
     
    551551  Void      setMaxCuDQPDepth                ( Int   i )      { m_iMaxCuDQPDepth = i; }
    552552
    553   Int       getMaxCUChromaQpAdjustmentDepth ()         const { return m_maxCUChromaQpAdjustmentDepth;  }
    554   Void      setMaxCUChromaQpAdjustmentDepth (Int value)      { m_maxCUChromaQpAdjustmentDepth = value; }
     553  Int       getDiffCuChromaQpOffsetDepth    ()         const { return m_diffCuChromaQpOffsetDepth;  }
     554  Void      setDiffCuChromaQpOffsetDepth    (Int value)      { m_diffCuChromaQpOffsetDepth = value; }
    555555
    556556  Void      setChromaCbQpOffset             ( Int   i )      { m_chromaCbQpOffset = i; }
     
    565565#endif
    566566
    567   Bool      getUseExtendedPrecision         ()         const { return m_useExtendedPrecision;  }
    568   Void      setUseExtendedPrecision         (Bool value)     { m_useExtendedPrecision = value; }
    569 
    570   Bool      getUseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; }
    571   Void      setUseHighPrecisionPredictionWeighting(Bool value) { m_useHighPrecisionPredictionWeighting = value; }
     567  Bool      getExtendedPrecisionProcessingFlag         ()         const { return m_extendedPrecisionProcessingFlag;  }
     568  Void      setExtendedPrecisionProcessingFlag         (Bool value)     { m_extendedPrecisionProcessingFlag = value; }
     569
     570  Bool      getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; }
     571  Void      setHighPrecisionOffsetsEnabledFlag(Bool value) { m_highPrecisionOffsetsEnabledFlag = value; }
    572572
    573573  Void      setUseAdaptiveQP                ( Bool  b )      { m_bUseAdaptiveQP = b; }
     
    662662  UInt      getPCMLog2MinSize               ()      { return  m_uiPCMLog2MinSize;  }
    663663
    664   Bool      getUseCrossComponentPrediction        ()                const { return m_useCrossComponentPrediction;   }
    665   Void      setUseCrossComponentPrediction        (const Bool value)      { m_useCrossComponentPrediction = value;  }
     664  Bool      getCrossComponentPredictionEnabledFlag     ()                const { return m_crossComponentPredictionEnabledFlag;   }
     665  Void      setCrossComponentPredictionEnabledFlag     (const Bool value)      { m_crossComponentPredictionEnabledFlag = value;  }
    666666  Bool      getUseReconBasedCrossCPredictionEstimate ()                const { return m_reconBasedCrossCPredictionEstimate;  }
    667667  Void      setUseReconBasedCrossCPredictionEstimate (const Bool value)      { m_reconBasedCrossCPredictionEstimate = value; }
    668   Void      setSaoOffsetBitShift(ChannelType type, UInt uiBitShift)          { m_saoOffsetBitShift[type] = uiBitShift; }
     668  Void      setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift)         { m_log2SaoOffsetScale[type] = uiBitShift; }
    669669
    670670  Bool getUseTransformSkip                             ()      { return m_useTransformSkip;        }
    671671  Void setUseTransformSkip                             ( Bool b ) { m_useTransformSkip  = b;       }
    672   Bool getUseResidualRotation                          ()            const { return m_useResidualRotation;  }
    673   Void setUseResidualRotation                          (const Bool value)  { m_useResidualRotation = value; }
    674   Bool getUseSingleSignificanceMapContext              ()            const { return m_useSingleSignificanceMapContext;  }
    675   Void setUseSingleSignificanceMapContext              (const Bool value)  { m_useSingleSignificanceMapContext = value; }
    676   Bool getUseGolombRiceParameterAdaptation             ()                 const { return m_useGolombRiceParameterAdaptation;  }
    677   Void setUseGolombRiceParameterAdaptation             (const Bool value)       { m_useGolombRiceParameterAdaptation = value; }
    678   Bool getAlignCABACBeforeBypass                       ()       const      { return m_alignCABACBeforeBypass;  }
    679   Void setAlignCABACBeforeBypass                       (const Bool value)  { m_alignCABACBeforeBypass = value; }
    680   Bool getUseResidualDPCM                              (const RDPCMSignallingMode signallingMode)        const      { return m_useResidualDPCM[signallingMode];  }
    681   Void setUseResidualDPCM                              (const RDPCMSignallingMode signallingMode, const Bool value) { m_useResidualDPCM[signallingMode] = value; }
     672  Bool getTransformSkipRotationEnabledFlag             ()            const { return m_transformSkipRotationEnabledFlag;  }
     673  Void setTransformSkipRotationEnabledFlag             (const Bool value)  { m_transformSkipRotationEnabledFlag = value; }
     674  Bool getTransformSkipContextEnabledFlag              ()            const { return m_transformSkipContextEnabledFlag;  }
     675  Void setTransformSkipContextEnabledFlag              (const Bool value)  { m_transformSkipContextEnabledFlag = value; }
     676  Bool getPersistentRiceAdaptationEnabledFlag          ()                 const { return m_persistentRiceAdaptationEnabledFlag;  }
     677  Void setPersistentRiceAdaptationEnabledFlag          (const Bool value)       { m_persistentRiceAdaptationEnabledFlag = value; }
     678  Bool getCabacBypassAlignmentEnabledFlag              ()       const      { return m_cabacBypassAlignmentEnabledFlag;  }
     679  Void setCabacBypassAlignmentEnabledFlag              (const Bool value)  { m_cabacBypassAlignmentEnabledFlag = value; }
     680  Bool getRdpcmEnabledFlag                             (const RDPCMSignallingMode signallingMode)        const      { return m_rdpcmEnabledFlag[signallingMode];  }
     681  Void setRdpcmEnabledFlag                             (const RDPCMSignallingMode signallingMode, const Bool value) { m_rdpcmEnabledFlag[signallingMode] = value; }
    682682  Bool getUseTransformSkipFast                         ()      { return m_useTransformSkipFast;    }
    683683  Void setUseTransformSkipFast                         ( Bool b ) { m_useTransformSkipFast  = b;   }
    684   UInt getTransformSkipLog2MaxSize                     () const      { return m_transformSkipLog2MaxSize;     }
    685   Void setTransformSkipLog2MaxSize                     ( UInt u )    { m_transformSkipLog2MaxSize  = u;       }
    686   Void setDisableIntraReferenceSmoothing               (Bool bValue) { m_disableIntraReferenceSmoothing=bValue; }
    687   Bool getDisableIntraReferenceSmoothing               ()      const { return m_disableIntraReferenceSmoothing; }
     684  UInt getLog2MaxTransformSkipBlockSize                () const      { return m_log2MaxTransformSkipBlockSize;     }
     685  Void setLog2MaxTransformSkipBlockSize                ( UInt u )    { m_log2MaxTransformSkipBlockSize  = u;       }
     686  Bool getIntraSmoothingDisabledFlag               ()      const { return m_intraSmoothingDisabledFlag; }
     687  Void setIntraSmoothingDisabledFlag               (Bool bValue) { m_intraSmoothingDisabledFlag=bValue; }
    688688
    689689  Int*      getdQPs                         ()      { return m_aidQP;       }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r1314 r1316  
    9797  }
    9898
    99   m_bEncodeDQP          = false;
    100   m_CodeChromaQpAdjFlag = false;
    101   m_ChromaQpAdjIdc      = 0;
     99  m_bEncodeDQP                     = false;
     100  m_stillToCodeChromaQpOffsetFlag = false;
     101  m_cuChromaQpOffsetIdxPlus1       = 0;
    102102
    103103  // initialize partition order.
     
    486486      }
    487487
    488       m_ChromaQpAdjIdc = 0;
     488      m_cuChromaQpOffsetIdxPlus1 = 0;
    489489      if (pcSlice->getUseChromaQpAdj())
    490490      {
     
    495495         */
    496496        Int lgMinCuSize = sps.getLog2MinCodingBlockSize() +
    497                           std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.getMaxCuChromaQpAdjDepth()));
    498         m_ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getChromaQpAdjTableSize() + 1);
     497                          std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth()));
     498        m_cuChromaQpOffsetIdxPlus1 = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getPpsRangeExtension().getChromaQpOffsetListLen() + 1);
    499499      }
    500500
     
    10951095    }
    10961096
    1097     if( uiDepth == pps.getMaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())
     1097    if( uiDepth == pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj())
    10981098    {
    10991099      setCodeChromaQpAdjFlag(true);
     
    11221122  }
    11231123
    1124   if( uiDepth <= pps.getMaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())
     1124  if( uiDepth <= pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj())
    11251125  {
    11261126    setCodeChromaQpAdjFlag(true);
     
    13571357          rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to CTU level
    13581358          rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth );
    1359           rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_ChromaQpAdjIdc, 0, uhDepth );
     1359          rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth );
    13601360          rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level
    13611361          rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level
     
    14531453  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
    14541454  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    1455   rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ChromaQpAdjIdc, 0, uhDepth );
     1455  rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth );
    14561456 
    14571457#if SVC_EXTENSION
     
    15081508  rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth );
    15091509  rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
    1510   rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ChromaQpAdjIdc, 0, uiDepth );
     1510  rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uiDepth );
    15111511
    15121512  Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE];
     
    15731573  rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
    15741574  rpcTempCU->setTrIdxSubParts ( 0, 0, uiDepth );
    1575   rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ChromaQpAdjIdc, 0, uiDepth );
     1575  rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uiDepth );
    15761576
    15771577  m_pcPredSearch->IPCMSearch( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth]);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.h

    r1307 r1316  
    8181  //  Data : encoder control
    8282  Bool                    m_bEncodeDQP;
    83   Bool                    m_CodeChromaQpAdjFlag;
    84   Int                     m_ChromaQpAdjIdc;
     83  Bool                    m_stillToCodeChromaQpOffsetFlag; //indicates whether chroma QP offset flag needs to coded at this particular CU granularity.
     84  Int                     m_cuChromaQpOffsetIdxPlus1; // if 0, then cu_chroma_qp_offset_flag will be 0, otherwise cu_chroma_qp_offset_flag will be 1.
    8585
    8686  //  Access channel
     
    162162  Void setdQPFlag           ( Bool b )                { m_bEncodeDQP = b;           }
    163163
    164   Bool getCodeChromaQpAdjFlag() { return m_CodeChromaQpAdjFlag; }
    165   Void setCodeChromaQpAdjFlag( Bool b ) { m_CodeChromaQpAdjFlag = b; }
     164  Bool getCodeChromaQpAdjFlag() { return m_stillToCodeChromaQpOffsetFlag; }
     165  Void setCodeChromaQpAdjFlag( Bool b ) { m_stillToCodeChromaQpOffsetFlag = b; }
    166166
    167167#if ADAPTIVE_QP_SELECTION
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp

    r1315 r1316  
    839839  TComDataCU *pcCU = rTu.getCU();
    840840
    841   if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction() )
     841  if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() )
    842842  {
    843843    return;
     
    915915{
    916916  Int internalIdc = cu->getChromaQpAdj( absPartIdx );
    917   Int tableSize = cu->getSlice()->getPPS()->getChromaQpAdjTableSize();
     917  Int chromaQpOffsetListLen = cu->getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListLen();
    918918  /* internal_idc == 0 => flag = 0
    919919   * internal_idc > 1 => code idc value (if table size warrents) */
    920920  m_pcBinIf->encodeBin( internalIdc > 0, m_ChromaQpAdjFlagSCModel.get( 0, 0, 0 ) );
    921921
    922   if (internalIdc > 0 && tableSize > 1)
    923   {
    924     xWriteUnaryMaxSymbol( internalIdc - 1, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, tableSize - 1 );
     922  if (internalIdc > 0 && chromaQpOffsetListLen > 1)
     923  {
     924    xWriteUnaryMaxSymbol( internalIdc - 1, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, chromaQpOffsetListLen - 1 );
    925925  }
    926926}
     
    10131013  }
    10141014
    1015   if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getTransformSkipLog2MaxSize()))
     1015  if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()))
    10161016  {
    10171017    return;
     
    12521252
    12531253  const ChannelType  channelType       = toChannelType(compID);
    1254   const Bool         extendedPrecision = sps.getUseExtendedPrecision();
    1255 
    1256   const Bool         alignCABACBeforeBypass = sps.getAlignCABACBeforeBypass();
     1254  const Bool         extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag();
     1255
     1256  const Bool         alignCABACBeforeBypass = sps.getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag();
    12571257  const Int          maxLog2TrDynamicRange  = sps.getMaxLog2TrDynamicRange(channelType);
    12581258
     
    13091309  //--------------------------------------------------------------------------------------------------
    13101310
    1311   const Bool  bUseGolombRiceParameterAdaptation = sps.getUseGolombRiceParameterAdaptation();
     1311  const Bool  bUseGolombRiceParameterAdaptation = sps.getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag();
    13121312        UInt &currentGolombRiceStatistic        = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)];
    13131313
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1315 r1316  
    968968    TCoeff* pcCoeff         = bRealCoeff ? pcCU->getCoeff(component) : m_ppcQTTempCoeff[component][uiQTLayer];
    969969
    970     if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction() )
     970    if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() )
    971971    {
    972972      m_pcEntropyCoder->encodeCrossComponentPrediction( rTu, component );
     
    11731173#endif
    11741174  {
    1175     const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getDisableIntraReferenceSmoothing());
     1175    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    11761176
    11771177    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) );
     
    12341234  }
    12351235
    1236   if (pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction())
     1236  if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    12371237  {
    12381238    if (bUseCrossCPrediction)
     
    13071307    Pel* pRecIPred  = piRecIPred;
    13081308
    1309     if (pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction())
     1309    if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    13101310    {
    13111311      if (bUseCrossCPrediction)
     
    14651465  Bool       checkTransformSkip  = pcCU->getSlice()->getPPS()->getUseTransformSkip();
    14661466  Int        bestModeId[MAX_NUM_COMPONENT] = { 0, 0, 0};
    1467   checkTransformSkip           &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getTransformSkipLog2MaxSize());
     1467  checkTransformSkip           &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize());
    14681468  checkTransformSkip           &= (!pcCU->getCUTransquantBypass(0));
    14691469
     
    15331533          }
    15341534
    1535           if (pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction())
     1535          if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    15361536          {
    15371537            const Int xOffset = rTu.getRect( COMPONENT_Y ).x0;
     
    16001600      dSingleCost       = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDistLuma );
    16011601
    1602       if (pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction())
     1602      if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    16031603      {
    16041604        const Int xOffset = rTu.getRect( COMPONENT_Y ).x0;
     
    16731673      dRDCost  += dSplitCost;
    16741674
    1675       if (pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction())
     1675      if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    16761676      {
    16771677        const Int xOffset = rTu.getRect( COMPONENT_Y ).x0;
     
    19471947
    19481948    Bool checkTransformSkip = pcCU->getSlice()->getPPS()->getUseTransformSkip();
    1949     checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->getTransformSkipLog2MaxSize());
     1949    checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize());
    19501950
    19511951    if ( m_pcEncCfg->getUseTransformSkipFast() )
    19521952    {
    1953       checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getTransformSkipLog2MaxSize());
     1953      checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize());
    19541954
    19551955      if (checkTransformSkip)
     
    19951995
    19961996        const Bool checkCrossComponentPrediction =    (pcCU->getIntraDir(CHANNEL_TYPE_CHROMA, subTUAbsPartIdx) == DM_CHROMA_IDX)
    1997                                                    &&  pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction()
     1997                                                   &&  pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()
    19981998                                                   && (pcCU->getCbf(subTUAbsPartIdx,  COMPONENT_Y, uiTrDepth) != 0);
    19991999
     
    23232323#endif
    23242324
    2325         const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.getDisableIntraReferenceSmoothing());
     2325        const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag());
    23262326
    23272327        predIntraAng( COMPONENT_Y, uiMode, piOrg, uiStride, piPred, uiStride, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter, TComPrediction::UseDPCMForFirstPassIntraEstimation(tuRecurseWithPU, uiMode) );
     
    24352435        xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU );
    24362436
    2437         if (pps.getUseCrossComponentPrediction())
     2437        if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    24382438        {
    24392439          const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0;
     
    25112511        xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU );
    25122512
    2513         if (pps.getUseCrossComponentPrediction())
     2513        if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag())
    25142514        {
    25152515          const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0;
     
    47624762
    47634763        checkTransformSkip[compID] = pcCU->getSlice()->getPPS()->getUseTransformSkip() &&
    4764                                      TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->getTransformSkipLog2MaxSize()) &&
     4764                                     TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()) &&
    47654765                                     (!pcCU->isLosslessCoded(0));
    47664766
     
    47834783#endif
    47844784          const Bool isCrossCPredictionAvailable      =    isChroma(compID)
    4785                                                          && pcCU->getSlice()->getPPS()->getUseCrossComponentPrediction()
     4785                                                         && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()
    47864786                                                         && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrMode) != 0);
    47874787
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1307 r1316  
    502502  rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 );
    503503  rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 );
    504   rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getChromaQpAdjTableSize() > 0 );
     504  rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag() );
    505505  rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive);
    506506  rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1309 r1316  
    121121  if (m_bUseSAO)
    122122  {
    123     m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );
     123    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA], m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] );
    124124#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    125125    m_cEncSAO.createEncData(getSaoCtuBoundary());
     
    949949  }
    950950
    951   m_cSPS.setUseExtendedPrecision(m_useExtendedPrecision);
    952   m_cSPS.setUseHighPrecisionPredictionWeighting(m_useHighPrecisionPredictionWeighting);
    953 
    954951  m_cSPS.setUseSAO( m_bUseSAO );
    955   m_cSPS.setUseResidualRotation(m_useResidualRotation);
    956   m_cSPS.setUseSingleSignificanceMapContext(m_useSingleSignificanceMapContext);
    957   m_cSPS.setUseGolombRiceParameterAdaptation(m_useGolombRiceParameterAdaptation);
    958   m_cSPS.setAlignCABACBeforeBypass(m_alignCABACBeforeBypass);
    959 
    960   for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
    961   {
    962     m_cSPS.setUseResidualDPCM(RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);
    963   }
    964952
    965953  m_cSPS.setMaxTLayers( m_maxTempLayer );
     
    976964
    977965  m_cSPS.setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag );
    978   m_cSPS.setDisableIntraReferenceSmoothing( m_disableIntraReferenceSmoothing );
    979966  m_cSPS.setScalingListFlag ( (m_useScalingListId == SCALING_LIST_OFF) ? 0 : 1 );
    980967  m_cSPS.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing );
     
    10321019    m_cSPS.getVuiParameters()->setHrdParametersPresentFlag( true );
    10331020  }
     1021
     1022  // Set up SPS range extension settings
     1023  m_cSPS.getSpsRangeExtension().setTransformSkipRotationEnabledFlag(m_transformSkipRotationEnabledFlag);
     1024  m_cSPS.getSpsRangeExtension().setTransformSkipContextEnabledFlag(m_transformSkipContextEnabledFlag);
     1025  for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
     1026  {
     1027    m_cSPS.getSpsRangeExtension().setRdpcmEnabledFlag(RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]);
     1028  }
     1029  m_cSPS.getSpsRangeExtension().setExtendedPrecisionProcessingFlag(m_extendedPrecisionProcessingFlag);
     1030  m_cSPS.getSpsRangeExtension().setIntraSmoothingDisabledFlag( m_intraSmoothingDisabledFlag );
     1031  m_cSPS.getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag(m_highPrecisionOffsetsEnabledFlag);
     1032  m_cSPS.getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag(m_persistentRiceAdaptationEnabledFlag);
     1033  m_cSPS.getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag(m_cabacBypassAlignmentEnabledFlag);
    10341034}
    10351035
     
    10661066  }
    10671067
    1068   if ( m_maxCUChromaQpAdjustmentDepth >= 0 )
    1069   {
    1070     m_cPPS.setMaxCuChromaQpAdjDepth(m_maxCUChromaQpAdjustmentDepth);
    1071     m_cPPS.setChromaQpAdjTableAt(1, 6, 6);
     1068  if ( m_diffCuChromaQpOffsetDepth >= 0 )
     1069  {
     1070    m_cPPS.getPpsRangeExtension().setDiffCuChromaQpOffsetDepth(m_diffCuChromaQpOffsetDepth);
     1071    m_cPPS.getPpsRangeExtension().clearChromaQpOffsetList();
     1072    m_cPPS.getPpsRangeExtension().setChromaQpOffsetListEntry(1, 6, 6);
    10721073    /* todo, insert table entries from command line (NB, 0 should not be touched) */
    10731074  }
    10741075  else
    10751076  {
    1076     m_cPPS.setMaxCuChromaQpAdjDepth(0);
    1077     m_cPPS.clearChromaQpAdjTable();
    1078   }
     1077    m_cPPS.getPpsRangeExtension().setDiffCuChromaQpOffsetDepth(0);
     1078    m_cPPS.getPpsRangeExtension().clearChromaQpOffsetList();
     1079  }
     1080  m_cPPS.getPpsRangeExtension().setCrossComponentPredictionEnabledFlag(m_crossComponentPredictionEnabledFlag);
     1081  m_cPPS.getPpsRangeExtension().setLog2SaoOffsetScale(CHANNEL_TYPE_LUMA,   m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA  ]);
     1082  m_cPPS.getPpsRangeExtension().setLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]);
    10791083
    10801084  m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset );
     
    10851089  m_cPPS.setUseWP( m_useWeightedPred );
    10861090  m_cPPS.setWPBiPred( m_useWeightedBiPred );
    1087   m_cPPS.setUseCrossComponentPrediction(m_useCrossComponentPrediction);
    1088   m_cPPS.setSaoOffsetBitShift(CHANNEL_TYPE_LUMA,   m_saoOffsetBitShift[CHANNEL_TYPE_LUMA  ]);
    1089   m_cPPS.setSaoOffsetBitShift(CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]);
    10901091  m_cPPS.setOutputFlagPresentFlag( false );
    10911092  m_cPPS.setSignHideFlag(getSignHideFlag());
     
    11451146  m_cPPS.setTransquantBypassEnableFlag(getTransquantBypassEnableFlag());
    11461147  m_cPPS.setUseTransformSkip( m_useTransformSkip );
    1147   m_cPPS.setTransformSkipLog2MaxSize( m_transformSkipLog2MaxSize  );
     1148  m_cPPS.getPpsRangeExtension().setLog2MaxTransformSkipBlockSize( m_log2MaxTransformSkipBlockSize  );
    11481149
    11491150  if (m_sliceSegmentMode != NO_SLICES)
  • branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r1287 r1316  
    112112    }
    113113
    114     const Int fixedBitShift = (slice->getSPS()->getUseHighPrecisionPredictionWeighting())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0;
     114    const Int fixedBitShift = (slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0;
    115115    weightACDCParam[compID].iDC = (((iOrgDC<<fixedBitShift)+(iSample>>1)) / iSample);
    116116    weightACDCParam[compID].iAC = iOrgAC;
     
    204204{
    205205  const Int  numComp                    = slice->getPic()->getPicYuvOrg()->getNumberValidComponents();
    206   const Bool bUseHighPrecisionWeighting = slice->getSPS()->getUseHighPrecisionPredictionWeighting();
     206  const Bool bUseHighPrecisionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag();
    207207  const Int numPredDir                  = slice->isInterP() ? 1 : 2;
    208208
     
    215215    for ( Int refIdxTemp = 0; refIdxTemp < slice->getNumRefIdx(eRefPicList); refIdxTemp++ )
    216216    {
    217       WPACDCParam *currWeightACDCParam = slice->getWpAcDcParam();
    218       WPACDCParam *refWeightACDCParam  = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam();
     217      WPACDCParam *currWeightACDCParam, *refWeightACDCParam;
     218      slice->getWpAcDcParam(currWeightACDCParam);
     219      slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(refWeightACDCParam);
    219220
    220221#if SVC_EXTENSION
     
    225226      if( validILRPic )
    226227      {
    227         refWeightACDCParam = slice->getWpAcDcParam();
     228        slice->getWpAcDcParam(refWeightACDCParam);
    228229      }
    229230#endif
     
    332333  const Int               iDefaultWeight                      = ((Int)1<<log2Denom);
    333334  const Int               iNumPredDir                         = slice->isInterP() ? 1 : 2;
    334   const Bool              useHighPrecisionPredictionWeighting = slice->getSPS()->getUseHighPrecisionPredictionWeighting();
     335  const Bool              useHighPrecisionPredictionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag();
    335336
    336337  assert (iNumPredDir <= Int(NUM_REF_PIC_LIST_01));
Note: See TracChangeset for help on using the changeset viewer.