Changeset 1316 in SHVCSoftware
- Timestamp:
- 21 Jul 2015, 20:08:08 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1311 r1316 876 876 cfg_aiPadX[layer] = &m_acLayerCfg[layer].m_aiPad[0]; 877 877 cfg_aiPadY[layer] = &m_acLayerCfg[layer].m_aiPad[1]; 878 cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_ useExtendedPrecision;878 cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag; 879 879 880 880 cfg_maxCuDQPDepth[layer] = &m_acLayerCfg[layer].m_iMaxCuDQPDepth; … … 1165 1165 ("MSBExtendedBitDepthC", m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per MSBExtendedBitDepth but for chroma component. (default:MSBExtendedBitDepth)") 1166 1166 ("InternalBitDepthC", m_internalBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per InternalBitDepth but for chroma component. (default:InternalBitDepth)") 1167 ("ExtendedPrecision", m_ useExtendedPrecision,false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")1168 ("HighPrecisionPredictionWeighting", m_ useHighPrecisionPredictionWeighting,false, "Use high precision option for weighted prediction (not valid in V1 profiles)")1167 ("ExtendedPrecision", m_extendedPrecisionProcessingFlag, false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)") 1168 ("HighPrecisionPredictionWeighting", m_highPrecisionOffsetsEnabledFlag, false, "Use high precision option for weighted prediction (not valid in V1 profiles)") 1169 1169 ("InputColourSpaceConvert", inputColourSpaceConvert, string(""), "Colour space conversion to apply to input video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(true)) 1170 1170 ("SNRInternalColourSpace", m_snrInternalColourSpace, false, "If true, then no colour space conversion is applied prior to SNR, otherwise inverse of input is applied.") … … 1312 1312 ("MaxCuDQPDepth,-dqd", m_iMaxCuDQPDepth, 0, "max depth for a minimum CuDQP") 1313 1313 #endif 1314 ("MaxCUChromaQpAdjustmentDepth", m_ maxCUChromaQpAdjustmentDepth,-1, "Maximum depth for CU chroma Qp adjustment - set less than 0 to disable")1314 ("MaxCUChromaQpAdjustmentDepth", m_diffCuChromaQpOffsetDepth, -1, "Maximum depth for CU chroma Qp adjustment - set less than 0 to disable") 1315 1315 1316 1316 ("CbQpOffset,-cbqpofs", m_cbQpOffset, 0, "Chroma Cb QP Offset") … … 1343 1343 // Coding tools 1344 1344 ("AMP", m_enableAMP, true, "Enable asymmetric motion partitions") 1345 ("CrossComponentPrediction", m_ useCrossComponentPrediction,false, "Enable the use of cross-component prediction (not valid in V1 profiles)")1345 ("CrossComponentPrediction", m_crossComponentPredictionEnabledFlag, false, "Enable the use of cross-component prediction (not valid in V1 profiles)") 1346 1346 ("ReconBasedCrossCPredictionEstimate", m_reconBasedCrossCPredictionEstimate, false, "When determining the alpha value for cross-component prediction, use the decoded residual rather than the pre-transform encoder-side residual") 1347 1347 ("SaoLumaOffsetBitShift", saoOffsetBitShift[CHANNEL_TYPE_LUMA], 0, "Specify the luma SAO bit-shift. If negative, automatically calculate a suitable value based upon bit depth and initial QP") … … 1349 1349 ("TransformSkip", m_useTransformSkip, false, "Intra transform skipping") 1350 1350 ("TransformSkipFast", m_useTransformSkipFast, false, "Fast intra transform skipping") 1351 ("TransformSkipLog2MaxSize", m_ transformSkipLog2MaxSize,2U, "Specify transform-skip maximum size. Minimum 2. (not valid in V1 profiles)")1352 ("ImplicitResidualDPCM", m_ useResidualDPCM[RDPCM_SIGNAL_IMPLICIT],false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)")1353 ("ExplicitResidualDPCM", m_ useResidualDPCM[RDPCM_SIGNAL_EXPLICIT],false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)")1354 ("ResidualRotation", m_ useResidualRotation,false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)")1355 ("SingleSignificanceMapContext", m_ useSingleSignificanceMapContext, false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)")1356 ("GolombRiceParameterAdaptation", m_ useGolombRiceParameterAdaptation,false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice")1357 ("AlignCABACBeforeBypass", m_ alignCABACBeforeBypass,false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise" )1351 ("TransformSkipLog2MaxSize", m_log2MaxTransformSkipBlockSize, 2U, "Specify transform-skip maximum size. Minimum 2. (not valid in V1 profiles)") 1352 ("ImplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT], false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)") 1353 ("ExplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT], false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)") 1354 ("ResidualRotation", m_transformSkipRotationEnabledFlag, false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)") 1355 ("SingleSignificanceMapContext", m_transformSkipContextEnabledFlag, false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)") 1356 ("GolombRiceParameterAdaptation", m_persistentRiceAdaptationEnabledFlag, false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice") 1357 ("AlignCABACBeforeBypass", m_cabacBypassAlignmentEnabledFlag, false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise" ) 1358 1358 ("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset") 1359 1359 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") … … 1858 1858 m_acLayerCfg[layer].m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1859 1859 1860 m_acLayerCfg[layer].m_ useHighPrecisionPredictionWeighting = false;1861 m_acLayerCfg[layer].m_ useExtendedPrecision= false;1860 m_acLayerCfg[layer].m_highPrecisionOffsetsEnabledFlag = false; 1861 m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag = false; 1862 1862 1863 1863 if( m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd ) … … 1881 1881 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 1882 1882 { 1883 m_acLayerCfg[layer].m_ saoOffsetBitShift[channelType] = 0;1883 m_acLayerCfg[layer].m_log2SaoOffsetScale[channelType] = 0; 1884 1884 } 1885 1885 … … 1925 1925 { 1926 1926 // produce a valid combination, if possible. 1927 const Bool bUsingGeneralRExtTools = m_ useResidualRotation||1928 m_ useSingleSignificanceMapContext||1929 m_ useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||1930 m_ useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||1931 !m_enableIntraReferenceSmoothing ||1932 m_ useGolombRiceParameterAdaptation||1933 m_ transformSkipLog2MaxSize!=2;1934 const Bool bUsingChromaQPAdjustment= m_ maxCUChromaQpAdjustmentDepth >= 0;1935 const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_ useExtendedPrecision;1927 const Bool bUsingGeneralRExtTools = m_transformSkipRotationEnabledFlag || 1928 m_transformSkipContextEnabledFlag || 1929 m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] || 1930 m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] || 1931 !m_enableIntraReferenceSmoothing || 1932 m_persistentRiceAdaptationEnabledFlag || 1933 m_log2MaxTransformSkipBlockSize!=2; 1934 const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0; 1935 const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag; 1936 1936 m_acLayerCfg[layer].m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 1937 1937 automaticallySelectRExtProfile(bUsingGeneralRExtTools, … … 2030 2030 { 2031 2031 // produce a valid combination, if possible. 2032 const Bool bUsingGeneralRExtTools = m_ useResidualRotation||2033 m_ useSingleSignificanceMapContext||2034 m_ useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||2035 m_ useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||2036 !m_enableIntraReferenceSmoothing ||2037 m_ useGolombRiceParameterAdaptation||2038 m_ transformSkipLog2MaxSize!=2;2039 const Bool bUsingChromaQPAdjustment= m_ maxCUChromaQpAdjustmentDepth >= 0;2040 const Bool bUsingExtendedPrecision = m_ useExtendedPrecision;2032 const Bool bUsingGeneralRExtTools = m_transformSkipRotationEnabledFlag || 2033 m_transformSkipContextEnabledFlag || 2034 m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] || 2035 m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] || 2036 !m_enableIntraReferenceSmoothing || 2037 m_persistentRiceAdaptationEnabledFlag || 2038 m_log2MaxTransformSkipBlockSize!=2; 2039 const Bool bUsingChromaQPAdjustment= m_diffCuChromaQpOffsetDepth >= 0; 2040 const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag; 2041 2041 m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 2042 2042 automaticallySelectRExtProfile(bUsingGeneralRExtTools, … … 2617 2617 if (m_internalBitDepth[ch]>10) 2618 2618 { 2619 m_ saoOffsetBitShift[ch]=UInt(Clip3<Int>(0, m_internalBitDepth[ch]-10, Int(m_internalBitDepth[ch]-10 + 0.165*m_iQP - 3.22 + 0.5) ) );2619 m_log2SaoOffsetScale[ch]=UInt(Clip3<Int>(0, m_internalBitDepth[ch]-10, Int(m_internalBitDepth[ch]-10 + 0.165*m_iQP - 3.22 + 0.5) ) ); 2620 2620 } 2621 2621 else 2622 2622 { 2623 m_ saoOffsetBitShift[ch]=0;2623 m_log2SaoOffsetScale[ch]=0; 2624 2624 } 2625 2625 } 2626 2626 else 2627 2627 { 2628 m_ saoOffsetBitShift[ch]=UInt(saoOffsetBitShift[ch]);2628 m_log2SaoOffsetScale[ch]=UInt(saoOffsetBitShift[ch]); 2629 2629 } 2630 2630 } … … 2908 2908 Void TAppEncCfg::xCheckParameter(UInt layerIdx) 2909 2909 { 2910 Bool m_ useExtendedPrecision = m_acLayerCfg[layerIdx].m_useExtendedPrecision;2911 Bool m_ useHighPrecisionPredictionWeighting = m_acLayerCfg[layerIdx].m_useHighPrecisionPredictionWeighting;2910 Bool m_extendedPrecisionProcessingFlag = m_acLayerCfg[layerIdx].m_extendedPrecisionProcessingFlag; 2911 Bool m_highPrecisionOffsetsEnabledFlag = m_acLayerCfg[layerIdx].m_highPrecisionOffsetsEnabledFlag; 2912 2912 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerIdx].m_chromaFormatIDC; 2913 2913 ChromaFormat m_chromaFormatConstraint = m_acLayerCfg[layerIdx].m_chromaFormatConstraint; … … 2918 2918 Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerIdx].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerIdx].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]}; 2919 2919 2920 m_ saoOffsetBitShift[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_saoOffsetBitShift[CHANNEL_TYPE_LUMA];2921 m_ saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA];2920 m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]; 2921 m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]; 2922 2922 2923 2923 Int layerPTLIdx = m_acLayerCfg[layerIdx].m_layerPTLIdx; … … 2993 2993 { 2994 2994 xConfirmPara(m_lowerBitRateConstraintFlag==false && m_intraConstraintFlag==false, "The lowerBitRateConstraint flag cannot be false when intraConstraintFlag is false"); 2995 xConfirmPara(m_ alignCABACBeforeBypass&& m_profile!=Profile::HIGHTHROUGHPUTREXT, "AlignCABACBeforeBypass must not be enabled unless the high throughput profile is being used.");2995 xConfirmPara(m_cabacBypassAlignmentEnabledFlag && m_profile!=Profile::HIGHTHROUGHPUTREXT, "AlignCABACBeforeBypass must not be enabled unless the high throughput profile is being used."); 2996 2996 if (m_profile == Profile::MAINREXT) 2997 2997 { … … 3001 3001 const Bool bValidProfile = (bitDepthIdx > 3 || chromaFormatIdx>3) ? false : (validRExtProfileNames[intraIdx][bitDepthIdx][chromaFormatIdx] != NONE); 3002 3002 xConfirmPara(!bValidProfile, "Invalid intra constraint flag, bit depth constraint flag and chroma format constraint flag combination for a RExt profile"); 3003 const Bool bUsingGeneralRExtTools = m_ useResidualRotation||3004 m_ useSingleSignificanceMapContext||3005 m_ useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||3006 m_ useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||3007 !m_enableIntraReferenceSmoothing ||3008 m_ useGolombRiceParameterAdaptation||3009 m_ transformSkipLog2MaxSize!=2;3010 const Bool bUsingChromaQPTool = m_ maxCUChromaQpAdjustmentDepth >= 0;3011 const Bool bUsingExtendedPrecision = m_ useExtendedPrecision;3003 const Bool bUsingGeneralRExtTools = m_transformSkipRotationEnabledFlag || 3004 m_transformSkipContextEnabledFlag || 3005 m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] || 3006 m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] || 3007 !m_enableIntraReferenceSmoothing || 3008 m_persistentRiceAdaptationEnabledFlag || 3009 m_log2MaxTransformSkipBlockSize!=2; 3010 const Bool bUsingChromaQPTool = m_diffCuChromaQpOffsetDepth >= 0; 3011 const Bool bUsingExtendedPrecision = m_extendedPrecisionProcessingFlag; 3012 3012 3013 3013 xConfirmPara((m_chromaFormatConstraint==CHROMA_420 || m_chromaFormatConstraint==CHROMA_400) && bUsingChromaQPTool, "CU Chroma QP adjustment cannot be used for 4:0:0 or 4:2:0 RExt profiles"); … … 3042 3042 xConfirmPara(m_lowerBitRateConstraintFlag==false, "LowerBitrateConstraintFlag must be true for non main-RExt profiles."); 3043 3043 3044 xConfirmPara(m_ useCrossComponentPrediction==true, "CrossComponentPrediction must not be used for non main-RExt profiles.");3045 xConfirmPara(m_ transformSkipLog2MaxSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles.");3046 xConfirmPara(m_ useResidualRotation==true, "UseResidualRotation must not be enabled for non main-RExt profiles.");3047 xConfirmPara(m_ useSingleSignificanceMapContext==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles.");3048 xConfirmPara(m_ useResidualDPCM[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles.");3049 xConfirmPara(m_ useResidualDPCM[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles.");3050 xConfirmPara(m_ useGolombRiceParameterAdaptation==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles.");3051 xConfirmPara(m_ useExtendedPrecision==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles.");3052 xConfirmPara(m_ useHighPrecisionPredictionWeighting==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles.");3044 xConfirmPara(m_crossComponentPredictionEnabledFlag==true, "CrossComponentPrediction must not be used for non main-RExt profiles."); 3045 xConfirmPara(m_log2MaxTransformSkipBlockSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles."); 3046 xConfirmPara(m_transformSkipRotationEnabledFlag==true, "UseResidualRotation must not be enabled for non main-RExt profiles."); 3047 xConfirmPara(m_transformSkipContextEnabledFlag==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles."); 3048 xConfirmPara(m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles."); 3049 xConfirmPara(m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles."); 3050 xConfirmPara(m_persistentRiceAdaptationEnabledFlag==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles."); 3051 xConfirmPara(m_extendedPrecisionProcessingFlag==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles."); 3052 xConfirmPara(m_highPrecisionOffsetsEnabledFlag==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles."); 3053 3053 xConfirmPara(m_enableIntraReferenceSmoothing==false, "EnableIntraReferenceSmoothing must be enabled for non main-RExt profiles."); 3054 xConfirmPara(m_ alignCABACBeforeBypass, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles.");3054 xConfirmPara(m_cabacBypassAlignmentEnabledFlag, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles."); 3055 3055 } 3056 3056 … … 3060 3060 3061 3061 #if !RExt__HIGH_BIT_DEPTH_SUPPORT 3062 if (m_ useExtendedPrecision)3062 if (m_extendedPrecisionProcessingFlag) 3063 3063 { 3064 3064 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) … … 3079 3079 xConfirmPara( (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] < m_inputBitDepth[CHANNEL_TYPE_CHROMA]), "MSB-extended bit depth for chroma channel (--MSBExtendedBitDepthC) must be greater than or equal to input bit depth for chroma channel (--InputBitDepthC)" ); 3080 3080 3081 xConfirmPara( m_ saoOffsetBitShift[CHANNEL_TYPE_LUMA] > (m_internalBitDepth[CHANNEL_TYPE_LUMA ]<10?0:(m_internalBitDepth[CHANNEL_TYPE_LUMA ]-10)), "SaoLumaOffsetBitShift must be in the range of 0 to InternalBitDepth-10, inclusive");3082 xConfirmPara( m_ saoOffsetBitShift[CHANNEL_TYPE_CHROMA] > (m_internalBitDepth[CHANNEL_TYPE_CHROMA]<10?0:(m_internalBitDepth[CHANNEL_TYPE_CHROMA]-10)), "SaoChromaOffsetBitShift must be in the range of 0 to InternalBitDepthC-10, inclusive");3081 xConfirmPara( m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] > (m_internalBitDepth[CHANNEL_TYPE_LUMA ]<10?0:(m_internalBitDepth[CHANNEL_TYPE_LUMA ]-10)), "SaoLumaOffsetBitShift must be in the range of 0 to InternalBitDepth-10, inclusive"); 3082 xConfirmPara( m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] > (m_internalBitDepth[CHANNEL_TYPE_CHROMA]<10?0:(m_internalBitDepth[CHANNEL_TYPE_CHROMA]-10)), "SaoChromaOffsetBitShift must be in the range of 0 to InternalBitDepthC-10, inclusive"); 3083 3083 3084 3084 xConfirmPara( m_chromaFormatIDC >= NUM_CHROMA_FORMAT, "ChromaFormatIDC must be either 400, 420, 422 or 444" ); … … 3132 3132 } 3133 3133 3134 if(m_ useCrossComponentPrediction&& (m_chromaFormatIDC != CHROMA_444))3134 if(m_crossComponentPredictionEnabledFlag && (m_chromaFormatIDC != CHROMA_444)) 3135 3135 { 3136 3136 fprintf(stderr, "****************************************************************************\n"); … … 3138 3138 fprintf(stderr, "****************************************************************************\n"); 3139 3139 3140 m_ useCrossComponentPrediction= false;3140 m_crossComponentPredictionEnabledFlag = false; 3141 3141 } 3142 3142 … … 3151 3151 } 3152 3152 3153 xConfirmPara (m_ transformSkipLog2MaxSize < 2, "Transform Skip Log2 Max Size must be at least 2 (4x4)");3154 3155 if (m_ transformSkipLog2MaxSize!=2 && m_useTransformSkipFast)3153 xConfirmPara (m_log2MaxTransformSkipBlockSize < 2, "Transform Skip Log2 Max Size must be at least 2 (4x4)"); 3154 3155 if (m_log2MaxTransformSkipBlockSize!=2 && m_useTransformSkipFast) 3156 3156 { 3157 3157 fprintf(stderr, "***************************************************************************\n"); … … 4314 4314 printf("Bitstream File : %s\n", m_pBitstreamFile ); 4315 4315 #else //SVC_EXTENSION 4316 printf("Input File : %s\n", m_pchInputFile ); 4317 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 4318 printf("Reconstruction File : %s\n", m_pchReconFile ); 4319 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 4320 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 4316 printf("\n"); 4317 printf("Input File : %s\n", m_pchInputFile ); 4318 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 4319 printf("Reconstruction File : %s\n", m_pchReconFile ); 4320 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 4321 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 4321 4322 #endif //SVC_EXTENSION 4322 4323 4323 printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );4324 printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );4325 printf("Frame MSE output : %s\n", (m_printFrameMSE ? "Enabled" : "Disabled") );4326 printf("Cabac-zero-word-padding : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") );4324 printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") ); 4325 printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") ); 4326 printf("Frame MSE output : %s\n", (m_printFrameMSE ? "Enabled" : "Disabled") ); 4327 printf("Cabac-zero-word-padding : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") ); 4327 4328 if (m_isField) 4328 4329 { 4329 printf("Frame/Field : Field based coding\n");4330 printf("Field index : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );4331 printf("Field Order : %s field first\n", m_isTopFieldFirst?"Top":"Bottom");4330 printf("Frame/Field : Field based coding\n"); 4331 printf("Field index : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4332 printf("Field Order : %s field first\n", m_isTopFieldFirst?"Top":"Bottom"); 4332 4333 4333 4334 } 4334 4335 else 4335 4336 { 4336 printf("Frame/Field : Frame based coding\n");4337 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );4337 printf("Frame/Field : Frame based coding\n"); 4338 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4338 4339 } 4339 4340 #if !SVC_EXTENSION … … 4353 4354 rextSubProfile="main_444_16 [NON STANDARD]"; 4354 4355 } 4355 printf("Profile : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() );4356 printf("Profile : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() ); 4356 4357 } 4357 4358 else 4358 4359 { 4359 printf("Profile : %s\n", profileToString(m_profile) );4360 } 4361 printf("CU size / depth / total-depth : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth );4362 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );4363 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter);4364 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra);4365 #endif 4366 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize);4367 printf("Motion search range : %d\n", m_iSearchRange );4360 printf("Profile : %s\n", profileToString(m_profile) ); 4361 } 4362 printf("CU size / depth / total-depth : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth ); 4363 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 4364 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 4365 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 4366 #endif 4367 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 4368 printf("Motion search range : %d\n", m_iSearchRange ); 4368 4369 #if !SVC_EXTENSION 4369 printf("Intra period : %d\n", m_iIntraPeriod );4370 #endif 4371 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType );4370 printf("Intra period : %d\n", m_iIntraPeriod ); 4371 #endif 4372 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); 4372 4373 #if !SVC_EXTENSION 4373 printf("QP : %5.2f\n", m_fQP ); 4374 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth); 4375 #endif 4376 4377 printf("Cb QP Offset : %d\n", m_cbQpOffset ); 4378 printf("Cr QP Offset : %d\n", m_crQpOffset); 4379 printf("Max CU chroma QP adjustment depth : %d\n", m_maxCUChromaQpAdjustmentDepth); 4380 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 4381 printf("GOP size : %d\n", m_iGOPSize ); 4374 printf("QP : %5.2f\n", m_fQP ); 4375 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth); 4376 #endif 4377 4378 printf("Cb QP Offset : %d\n", m_cbQpOffset ); 4379 printf("Cr QP Offset : %d\n", m_crQpOffset); 4380 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 4381 printf("GOP size : %d\n", m_iGOPSize ); 4382 4382 #if !SVC_EXTENSION 4383 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 4384 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); 4385 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4386 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], 4387 m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4388 printf("Extended precision processing : %s\n", (m_useExtendedPrecision ? "Enabled" : "Disabled") ); 4389 #endif 4390 printf("Intra reference smoothing : %s\n", (m_enableIntraReferenceSmoothing ? "Enabled" : "Disabled") ); 4391 printf("Implicit residual DPCM : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") ); 4392 printf("Explicit residual DPCM : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") ); 4393 printf("Residual rotation : %s\n", (m_useResidualRotation ? "Enabled" : "Disabled") ); 4394 printf("Single significance map context : %s\n", (m_useSingleSignificanceMapContext ? "Enabled" : "Disabled") ); 4395 printf("Cross-component prediction : %s\n", (m_useCrossComponentPrediction ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") ); 4383 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 4384 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); 4385 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4386 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], 4387 m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4388 #endif 4389 printf("Intra reference smoothing : %s\n", (m_enableIntraReferenceSmoothing ? "Enabled" : "Disabled") ); 4390 printf("diff_cu_chroma_qp_offset_depth : %d\n", m_diffCuChromaQpOffsetDepth); 4396 4391 #if !SVC_EXTENSION 4397 printf("High-precision prediction weight : %s\n", (m_useHighPrecisionPredictionWeighting ? "Enabled" : "Disabled") ); 4398 #endif 4399 printf("Golomb-Rice parameter adaptation : %s\n", (m_useGolombRiceParameterAdaptation ? "Enabled" : "Disabled") ); 4400 printf("CABAC bypass bit alignment : %s\n", (m_alignCABACBeforeBypass ? "Enabled" : "Disabled") ); 4392 printf("extended_precision_processing_flag : %s\n", (m_extendedPrecisionProcessingFlag ? "Enabled" : "Disabled") ); 4393 #endif 4394 printf("implicit_rdpcm_enabled_flag : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") ); 4395 printf("explicit_rdpcm_enabled_flag : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") ); 4396 printf("transform_skip_rotation_enabled_flag : %s\n", (m_transformSkipRotationEnabledFlag ? "Enabled" : "Disabled") ); 4397 printf("transform_skip_context_enabled_flag : %s\n", (m_transformSkipContextEnabledFlag ? "Enabled" : "Disabled") ); 4398 printf("cross_component_prediction_enabled_flag: %s\n", (m_crossComponentPredictionEnabledFlag ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") ); 4399 #if !SVC_EXTENSION 4400 printf("high_precision_offsets_enabled_flag : %s\n", (m_highPrecisionOffsetsEnabledFlag ? "Enabled" : "Disabled") ); 4401 #endif 4402 printf("persistent_rice_adaptation_enabled_flag: %s\n", (m_persistentRiceAdaptationEnabledFlag ? "Enabled" : "Disabled") ); 4403 printf("cabac_bypass_alignment_enabled_flag : %s\n", (m_cabacBypassAlignmentEnabledFlag ? "Enabled" : "Disabled") ); 4401 4404 if (m_bUseSAO) 4402 4405 { 4403 printf(" Sao Luma Offset bit shifts : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]);4404 printf(" Sao Chroma Offset bit shifts : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]);4406 printf("log2_sao_offset_scale_luma : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA]); 4407 printf("log2_sao_offset_scale_chroma : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]); 4405 4408 } 4406 4409 4407 4410 switch (m_costMode) 4408 4411 { 4409 case COST_STANDARD_LOSSY: printf("Cost function: : Lossy coding (default)\n"); break;4410 case COST_SEQUENCE_LEVEL_LOSSLESS: printf("Cost function: : Sequence_level_lossless coding\n"); break;4411 case COST_LOSSLESS_CODING: printf("Cost function: : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break;4412 case COST_MIXED_LOSSLESS_LOSSY_CODING: printf("Cost function: : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break;4413 default: printf("Cost function: : Unknown\n"); break;4412 case COST_STANDARD_LOSSY: printf("Cost function: : Lossy coding (default)\n"); break; 4413 case COST_SEQUENCE_LEVEL_LOSSLESS: printf("Cost function: : Sequence_level_lossless coding\n"); break; 4414 case COST_LOSSLESS_CODING: printf("Cost function: : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break; 4415 case COST_MIXED_LOSSLESS_LOSSY_CODING: printf("Cost function: : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break; 4416 default: printf("Cost function: : Unknown\n"); break; 4414 4417 } 4415 4418 4416 4419 #if !RC_SHVC_HARMONIZATION 4417 printf("RateControl : %d\n", m_RCEnableRateControl );4420 printf("RateControl : %d\n", m_RCEnableRateControl ); 4418 4421 4419 4422 if(m_RCEnableRateControl) 4420 4423 { 4421 printf("TargetBitrate : %d\n", m_RCTargetBitrate );4422 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit );4423 printf("LCULevelRC : %d\n", m_RCLCULevelRC );4424 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel );4425 printf("InitialQP : %d\n", m_RCInitialQP );4426 printf("ForceIntraQP : %d\n", m_RCForceIntraQP );4427 } 4428 #endif 4429 4430 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand);4424 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 4425 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit ); 4426 printf("LCULevelRC : %d\n", m_RCLCULevelRC ); 4427 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel ); 4428 printf("InitialQP : %d\n", m_RCInitialQP ); 4429 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 4430 } 4431 #endif 4432 4433 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 4431 4434 printf("\n"); 4432 4435 … … 4452 4455 printf("TransformSkip:%d ", m_useTransformSkip ); 4453 4456 printf("TransformSkipFast:%d ", m_useTransformSkipFast ); 4454 printf("TransformSkipLog2MaxSize:%d ", m_ transformSkipLog2MaxSize);4457 printf("TransformSkipLog2MaxSize:%d ", m_log2MaxTransformSkipBlockSize); 4455 4458 printf("Slice: M=%d ", m_sliceMode); 4456 4459 if (m_sliceMode!=NO_SLICES) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1311 r1316 168 168 169 169 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 170 171 170 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 172 171 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 173 Bool m_ useCrossComponentPrediction;///< flag enabling the use of cross-component prediction172 Bool m_crossComponentPredictionEnabledFlag; ///< flag enabling the use of cross-component prediction 174 173 Bool m_reconBasedCrossCPredictionEstimate; ///< causes the alpha calculation in encoder search to be based on the decoded residual rather than the pre-transform encoder-side residual 175 UInt m_ saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];///< number of bits for the upward bit shift operation on the decoded SAO offsets174 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; ///< number of bits for the upward bit shift operation on the decoded SAO offsets 176 175 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 177 176 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping 178 UInt m_ transformSkipLog2MaxSize;///< transform-skip maximum size (minimum of 2)179 Bool m_ useResidualRotation;///< control flag for transform-skip/transquant-bypass residual rotation180 Bool m_ useSingleSignificanceMapContext; ///< control flag for transform-skip/transquant-bypass single significance map context181 Bool m_ useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM177 UInt m_log2MaxTransformSkipBlockSize; ///< transform-skip maximum size (minimum of 2) 178 Bool m_transformSkipRotationEnabledFlag; ///< control flag for transform-skip/transquant-bypass residual rotation 179 Bool m_transformSkipContextEnabledFlag; ///< control flag for transform-skip/transquant-bypass single significance map context 180 Bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM 182 181 Bool m_enableAMP; 183 Bool m_ useGolombRiceParameterAdaptation;///< control flag for Golomb-Rice parameter adaptation over each slice184 Bool m_ alignCABACBeforeBypass;182 Bool m_persistentRiceAdaptationEnabledFlag; ///< control flag for Golomb-Rice parameter adaptation over each slice 183 Bool m_cabacBypassAlignmentEnabledFlag; 185 184 186 185 // coding quality … … 196 195 Int m_iMaxCuDQPDepth; ///< Max. depth for a minimum CuDQPSize (0:default) 197 196 #endif 198 Int m_ maxCUChromaQpAdjustmentDepth;197 Int m_diffCuChromaQpOffsetDepth; ///< If negative, then do not apply chroma qp offsets. 199 198 200 199 Int m_cbQpOffset; ///< Chroma Cb QP Offset (0:default) … … 234 233 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 235 234 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 236 Bool m_ useExtendedPrecision;237 Bool m_ useHighPrecisionPredictionWeighting;235 Bool m_extendedPrecisionProcessingFlag; 236 Bool m_highPrecisionOffsetsEnabledFlag; 238 237 239 238 //coding tools (chroma format) … … 298 297 #if !SVC_EXTENSION 299 298 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 299 Int m_iWaveFrontFlush; //< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs. 300 300 #endif 301 301 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1290 r1316 88 88 Int m_maxTidIlRefPicsPlus1; 89 89 Int m_waveFrontSynchro; ///< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 90 Int m_waveFrontFlush; ///< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs. 90 91 91 92 Int m_iQP; ///< QP value of key-picture (integer) … … 115 116 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 116 117 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 117 UInt m_ saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];118 Bool m_ useExtendedPrecision;119 Bool m_ useHighPrecisionPredictionWeighting;118 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; 119 Bool m_extendedPrecisionProcessingFlag; 120 Bool m_highPrecisionOffsetsEnabledFlag; 120 121 121 122 Int m_repFormatIdx; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1311 r1316 414 414 m_acTEncTop[layer].setMaxDeltaQP ( m_iMaxDeltaQP ); 415 415 m_acTEncTop[layer].setMaxCuDQPDepth ( m_acLayerCfg[layer].m_iMaxCuDQPDepth ); 416 m_acTEncTop[layer].set MaxCUChromaQpAdjustmentDepth ( m_maxCUChromaQpAdjustmentDepth );416 m_acTEncTop[layer].setDiffCuChromaQpOffsetDepth ( m_diffCuChromaQpOffsetDepth ); 417 417 m_acTEncTop[layer].setChromaCbQpOffset ( m_cbQpOffset ); 418 418 m_acTEncTop[layer].setChromaCrQpOffset ( m_crQpOffset ); … … 426 426 m_acTEncTop[layer].setUseAdaptiveQP ( m_bUseAdaptiveQP ); 427 427 m_acTEncTop[layer].setQPAdaptationRange ( m_iQPAdaptationRange ); 428 m_acTEncTop[layer].set UseExtendedPrecision ( m_acLayerCfg[layer].m_useExtendedPrecision);429 m_acTEncTop[layer].set UseHighPrecisionPredictionWeighting ( m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting );428 m_acTEncTop[layer].setExtendedPrecisionProcessingFlag ( m_acLayerCfg[layer].m_extendedPrecisionProcessingFlag ); 429 m_acTEncTop[layer].setHighPrecisionOffsetsEnabledFlag ( m_acLayerCfg[layer].m_highPrecisionOffsetsEnabledFlag ); 430 430 431 431 //====== Tool list ======== … … 455 455 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); 456 456 m_acTEncTop[layer].setUseEarlySkipDetection ( m_useEarlySkipDetection ); 457 m_acTEncTop[layer].set UseCrossComponentPrediction ( m_useCrossComponentPrediction);457 m_acTEncTop[layer].setCrossComponentPredictionEnabledFlag ( m_crossComponentPredictionEnabledFlag ); 458 458 m_acTEncTop[layer].setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate ); 459 m_acTEncTop[layer].set SaoOffsetBitShift ( CHANNEL_TYPE_LUMA , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] );460 m_acTEncTop[layer].set SaoOffsetBitShift ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );459 m_acTEncTop[layer].setLog2SaoOffsetScale ( CHANNEL_TYPE_LUMA , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] ); 460 m_acTEncTop[layer].setLog2SaoOffsetScale ( CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] ); 461 461 m_acTEncTop[layer].setUseTransformSkip ( m_useTransformSkip ); 462 462 m_acTEncTop[layer].setUseTransformSkipFast ( m_useTransformSkipFast ); 463 m_acTEncTop[layer].set UseResidualRotation ( m_useResidualRotation);464 m_acTEncTop[layer].set UseSingleSignificanceMapContext ( m_useSingleSignificanceMapContext);465 m_acTEncTop[layer].set UseGolombRiceParameterAdaptation ( m_useGolombRiceParameterAdaptation);466 m_acTEncTop[layer].set AlignCABACBeforeBypass ( m_alignCABACBeforeBypass);467 m_acTEncTop[layer].set TransformSkipLog2MaxSize ( m_transformSkipLog2MaxSize );463 m_acTEncTop[layer].setTransformSkipRotationEnabledFlag ( m_transformSkipRotationEnabledFlag ); 464 m_acTEncTop[layer].setTransformSkipContextEnabledFlag ( m_transformSkipContextEnabledFlag ); 465 m_acTEncTop[layer].setPersistentRiceAdaptationEnabledFlag ( m_persistentRiceAdaptationEnabledFlag ); 466 m_acTEncTop[layer].setCabacBypassAlignmentEnabledFlag ( m_cabacBypassAlignmentEnabledFlag ); 467 m_acTEncTop[layer].setLog2MaxTransformSkipBlockSize ( m_log2MaxTransformSkipBlockSize ); 468 468 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 469 469 { 470 m_acTEncTop[layer].set UseResidualDPCM ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);470 m_acTEncTop[layer].setRdpcmEnabledFlag ( RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]); 471 471 } 472 472 m_acTEncTop[layer].setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); … … 521 521 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 522 522 523 m_acTEncTop[layer].set DisableIntraReferenceSmoothing(!m_enableIntraReferenceSmoothing );523 m_acTEncTop[layer].setIntraSmoothingDisabledFlag (!m_enableIntraReferenceSmoothing ); 524 524 m_acTEncTop[layer].setDecodedPictureHashSEIEnabled ( m_decodedPictureHashSEIEnabled ); 525 525 m_acTEncTop[layer].setRecoveryPointSEIEnabled ( m_recoveryPointSEIEnabled ); … … 851 851 m_cTEncTop.setMaxDeltaQP ( m_iMaxDeltaQP ); 852 852 m_cTEncTop.setMaxCuDQPDepth ( m_iMaxCuDQPDepth ); 853 m_cTEncTop.set MaxCUChromaQpAdjustmentDepth ( m_maxCUChromaQpAdjustmentDepth );853 m_cTEncTop.setDiffCuChromaQpOffsetDepth ( m_diffCuChromaQpOffsetDepth ); 854 854 m_cTEncTop.setChromaCbQpOffset ( m_cbQpOffset ); 855 855 m_cTEncTop.setChromaCrQpOffset ( m_crQpOffset ); … … 863 863 m_cTEncTop.setUseAdaptiveQP ( m_bUseAdaptiveQP ); 864 864 m_cTEncTop.setQPAdaptationRange ( m_iQPAdaptationRange ); 865 m_cTEncTop.set UseExtendedPrecision ( m_useExtendedPrecision);866 m_cTEncTop.set UseHighPrecisionPredictionWeighting ( m_useHighPrecisionPredictionWeighting );865 m_cTEncTop.setExtendedPrecisionProcessingFlag ( m_extendedPrecisionProcessingFlag ); 866 m_cTEncTop.setHighPrecisionOffsetsEnabledFlag ( m_highPrecisionOffsetsEnabledFlag ); 867 867 //====== Tool list ======== 868 868 m_cTEncTop.setDeltaQpRD ( m_uiDeltaQpRD ); … … 892 892 m_cTEncTop.setUseFastIntraScalable ( m_useFastIntraScalable ); 893 893 #endif 894 m_cTEncTop.set UseCrossComponentPrediction ( m_useCrossComponentPrediction);894 m_cTEncTop.setCrossComponentPredictionEnabledFlag ( m_crossComponentPredictionEnabledFlag ); 895 895 m_cTEncTop.setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate ); 896 m_cTEncTop.set SaoOffsetBitShift ( CHANNEL_TYPE_LUMA , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] );897 m_cTEncTop.set SaoOffsetBitShift ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );896 m_cTEncTop.setLog2SaoOffsetScale ( CHANNEL_TYPE_LUMA , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] ); 897 m_cTEncTop.setLog2SaoOffsetScale ( CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] ); 898 898 m_cTEncTop.setUseTransformSkip ( m_useTransformSkip ); 899 899 m_cTEncTop.setUseTransformSkipFast ( m_useTransformSkipFast ); 900 m_cTEncTop.set UseResidualRotation ( m_useResidualRotation);901 m_cTEncTop.set UseSingleSignificanceMapContext ( m_useSingleSignificanceMapContext);902 m_cTEncTop.set UseGolombRiceParameterAdaptation ( m_useGolombRiceParameterAdaptation);903 m_cTEncTop.set AlignCABACBeforeBypass ( m_alignCABACBeforeBypass);904 m_cTEncTop.set TransformSkipLog2MaxSize ( m_transformSkipLog2MaxSize );900 m_cTEncTop.setTransformSkipRotationEnabledFlag ( m_transformSkipRotationEnabledFlag ); 901 m_cTEncTop.setTransformSkipContextEnabledFlag ( m_transformSkipContextEnabledFlag ); 902 m_cTEncTop.setPersistentRiceAdaptationEnabledFlag ( m_persistentRiceAdaptationEnabledFlag ); 903 m_cTEncTop.setCabacBypassAlignmentEnabledFlag ( m_cabacBypassAlignmentEnabledFlag ); 904 m_cTEncTop.setLog2MaxTransformSkipBlockSize ( m_log2MaxTransformSkipBlockSize ); 905 905 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 906 906 { 907 m_cTEncTop.set UseResidualDPCM ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);907 m_cTEncTop.setRdpcmEnabledFlag ( RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]); 908 908 } 909 909 m_cTEncTop.setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); … … 948 948 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 949 949 950 m_cTEncTop.set DisableIntraReferenceSmoothing(!m_enableIntraReferenceSmoothing );950 m_cTEncTop.setIntraSmoothingDisabledFlag (!m_enableIntraReferenceSmoothing ); 951 951 m_cTEncTop.setDecodedPictureHashSEIEnabled ( m_decodedPictureHashSEIEnabled ); 952 952 m_cTEncTop.setRecoveryPointSEIEnabled ( m_recoveryPointSEIEnabled ); -
branches/SHM-dev/source/Lib/TLibCommon/TComChromaFormat.cpp
r1259 r1316 132 132 //set the significance map context selection parameters 133 133 134 if (pcCU->getSlice()->getSPS()->get UseSingleSignificanceMapContext()134 if (pcCU->getSlice()->getSPS()->getSpsRangeExtension().getTransformSkipContextEnabledFlag() 135 135 && (pcCU->getCUTransquantBypass(uiAbsPartIdx) || (pcCU->getTransformSkip(uiAbsPartIdx, component) != 0))) 136 136 { -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1315 r1316 284 284 Void setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 285 285 286 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->get UseResidualDPCM(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); }286 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); } 287 287 288 288 Void setCrossComponentPredictionAlphaPartRange ( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1295 r1316 1816 1816 } 1817 1817 1818 //! get AC and DC values for weighted pred 1819 Void TComSlice::getWpAcDcParam(WPACDCParam *&wp) 1820 { 1821 wp = m_weightACDCParam; 1822 } 1823 1818 1824 //! init AC and DC values for weighted pred 1819 1825 Void TComSlice::initWpAcDcParam() … … 1856 1862 Void TComSlice::initWpScaling(const TComSPS *sps) 1857 1863 { 1858 const Bool bUseHighPrecisionPredictionWeighting = sps->get UseHighPrecisionPredictionWeighting();1864 const Bool bUseHighPrecisionPredictionWeighting = sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 1859 1865 for ( Int e=0 ; e<NUM_REF_PIC_LIST_01 ; e++ ) 1860 1866 { … … 2040 2046 // ------------------------------------------------------------------------------------------------ 2041 2047 2048 TComSPSRExt::TComSPSRExt() 2049 : m_transformSkipRotationEnabledFlag (false) 2050 , m_transformSkipContextEnabledFlag (false) 2051 // m_rdpcmEnabledFlag initialized below 2052 , m_extendedPrecisionProcessingFlag (false) 2053 , m_intraSmoothingDisabledFlag (false) 2054 , m_highPrecisionOffsetsEnabledFlag (false) 2055 , m_persistentRiceAdaptationEnabledFlag(false) 2056 , m_cabacBypassAlignmentEnabledFlag (false) 2057 { 2058 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 2059 { 2060 m_rdpcmEnabledFlag[signallingModeIndex] = false; 2061 } 2062 } 2063 2042 2064 TComSPS::TComSPS() 2043 2065 : m_SPSId ( 0) … … 2062 2084 , m_pcmLog2MaxSize ( 5) 2063 2085 , m_uiPCMLog2MinSize ( 7) 2064 , m_useExtendedPrecision (false)2065 , m_useHighPrecisionPredictionWeighting(false)2066 , m_useResidualRotation (false)2067 , m_useSingleSignificanceMapContext(false)2068 , m_useGolombRiceParameterAdaptation(false)2069 , m_alignCABACBeforeBypass (false)2070 2086 , m_bPCMFilterDisableFlag (false) 2071 , m_disableIntraReferenceSmoothing(false)2072 2087 , m_uiBitsForPOC ( 8) 2073 2088 , m_numLongTermRefPicSPS ( 0) … … 2106 2121 } 2107 2122 2108 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)2109 {2110 m_useResidualDPCM[signallingModeIndex] = false;2111 }2112 2113 2123 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2114 2124 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); … … 2244 2254 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 2245 2255 2256 TComPPSRExt::TComPPSRExt() 2257 : m_log2MaxTransformSkipBlockSize (2) 2258 , m_crossComponentPredictionEnabledFlag(false) 2259 , m_diffCuChromaQpOffsetDepth (0) 2260 , m_chromaQpOffsetListLen (0) 2261 // m_ChromaQpAdjTableIncludingNullEntry initialized below 2262 // m_log2SaoOffsetScale initialized below 2263 { 2264 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CbOffset = 0; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0. This is initialised here and never subsequently changed. 2265 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CrOffset = 0; 2266 for(Int ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++) 2267 { 2268 m_log2SaoOffsetScale[ch] = 0; 2269 } 2270 } 2271 2246 2272 TComPPS::TComPPS() 2247 2273 : m_PPSId (0) … … 2252 2278 , m_bSliceChromaQpFlag (false) 2253 2279 , m_uiMaxCuDQPDepth (0) 2254 , m_MaxCuChromaQpAdjDepth (0)2255 , m_ChromaQpAdjTableSize (0)2256 2280 , m_chromaCbQpOffset (0) 2257 2281 , m_chromaCrQpOffset (0) 2258 2282 , m_numRefIdxL0DefaultActive (1) 2259 2283 , m_numRefIdxL1DefaultActive (1) 2260 , m_useCrossComponentPrediction (false)2261 2284 , m_TransquantBypassEnableFlag (false) 2262 2285 , m_useTransformSkip (false) 2263 , m_transformSkipLog2MaxSize (2)2264 2286 , m_dependentSliceSegmentsEnabledFlag(false) 2265 2287 , m_tilesEnabledFlag (false) … … 2290 2312 #endif //SVC_EXTENSION 2291 2313 { 2292 for(Int ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)2293 {2294 m_saoOffsetBitShift[ch] = 0;2295 }2296 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CbOffset = 0; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0. This is initialised here and never subsequently changed.2297 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CrOffset = 0;2298 2299 2314 #if SVC_EXTENSION 2300 2315 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1295 r1316 1304 1304 }; 1305 1305 1306 /// SPS RExt class 1307 class TComSPSRExt // Names aligned to text specification 1308 { 1309 private: 1310 Bool m_transformSkipRotationEnabledFlag; 1311 Bool m_transformSkipContextEnabledFlag; 1312 Bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES]; 1313 Bool m_extendedPrecisionProcessingFlag; 1314 Bool m_intraSmoothingDisabledFlag; 1315 Bool m_highPrecisionOffsetsEnabledFlag; 1316 Bool m_persistentRiceAdaptationEnabledFlag; 1317 Bool m_cabacBypassAlignmentEnabledFlag; 1318 1319 public: 1320 TComSPSRExt(); 1321 1322 Bool settingsDifferFromDefaults() const 1323 { 1324 return getTransformSkipRotationEnabledFlag() 1325 || getTransformSkipContextEnabledFlag() 1326 || getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT) 1327 || getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT) 1328 || getExtendedPrecisionProcessingFlag() 1329 || getIntraSmoothingDisabledFlag() 1330 || getHighPrecisionOffsetsEnabledFlag() 1331 || getPersistentRiceAdaptationEnabledFlag() 1332 || getCabacBypassAlignmentEnabledFlag(); 1333 } 1334 1335 1336 Bool getTransformSkipRotationEnabledFlag() const { return m_transformSkipRotationEnabledFlag; } 1337 Void setTransformSkipRotationEnabledFlag(const Bool value) { m_transformSkipRotationEnabledFlag = value; } 1338 1339 Bool getTransformSkipContextEnabledFlag() const { return m_transformSkipContextEnabledFlag; } 1340 Void setTransformSkipContextEnabledFlag(const Bool value) { m_transformSkipContextEnabledFlag = value; } 1341 1342 Bool getRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode) const { return m_rdpcmEnabledFlag[signallingMode]; } 1343 Void setRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode, const Bool value) { m_rdpcmEnabledFlag[signallingMode] = value; } 1344 1345 Bool getExtendedPrecisionProcessingFlag() const { return m_extendedPrecisionProcessingFlag; } 1346 Void setExtendedPrecisionProcessingFlag(Bool value) { m_extendedPrecisionProcessingFlag = value; } 1347 1348 Bool getIntraSmoothingDisabledFlag() const { return m_intraSmoothingDisabledFlag; } 1349 Void setIntraSmoothingDisabledFlag(Bool bValue) { m_intraSmoothingDisabledFlag=bValue; } 1350 1351 Bool getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; } 1352 Void setHighPrecisionOffsetsEnabledFlag(Bool value) { m_highPrecisionOffsetsEnabledFlag = value; } 1353 1354 Bool getPersistentRiceAdaptationEnabledFlag() const { return m_persistentRiceAdaptationEnabledFlag; } 1355 Void setPersistentRiceAdaptationEnabledFlag(const Bool value) { m_persistentRiceAdaptationEnabledFlag = value; } 1356 1357 Bool getCabacBypassAlignmentEnabledFlag() const { return m_cabacBypassAlignmentEnabledFlag; } 1358 Void setCabacBypassAlignmentEnabledFlag(const Bool value) { m_cabacBypassAlignmentEnabledFlag = value; } 1359 }; 1306 1360 1307 1361 /// SPS class … … 1345 1399 BitDepths m_bitDepths; 1346 1400 Int m_qpBDOffset[MAX_NUM_CHANNEL_TYPE]; 1347 Bool m_useExtendedPrecision;1348 Bool m_useHighPrecisionPredictionWeighting;1349 Bool m_useResidualRotation;1350 Bool m_useSingleSignificanceMapContext;1351 Bool m_useGolombRiceParameterAdaptation;1352 Bool m_alignCABACBeforeBypass;1353 Bool m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];1354 1401 Int m_pcmBitDepths[MAX_NUM_CHANNEL_TYPE]; 1355 1402 Bool m_bPCMFilterDisableFlag; 1356 Bool m_disableIntraReferenceSmoothing;1357 1403 1358 1404 UInt m_uiBitsForPOC; … … 1377 1423 Bool m_vuiParametersPresentFlag; 1378 1424 TComVUI m_vuiParameters; 1425 1426 TComSPSRExt m_spsRangeExtension; 1379 1427 1380 1428 static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; … … 1486 1534 #endif 1487 1535 const BitDepths& getBitDepths() const { return m_bitDepths; } 1488 Int getMaxLog2TrDynamicRange(ChannelType channelType) const { return get UseExtendedPrecision() ? std::max<Int>(15, Int(m_bitDepths.recon[channelType] + 6)) : 15; }1536 Int getMaxLog2TrDynamicRange(ChannelType channelType) const { return getSpsRangeExtension().getExtendedPrecisionProcessingFlag() ? std::max<Int>(15, Int(m_bitDepths.recon[channelType] + 6)) : 15; } 1489 1537 1490 1538 Int getDifferentialLumaChromaBitDepth() const { return Int(m_bitDepths.recon[CHANNEL_TYPE_LUMA]) - Int(m_bitDepths.recon[CHANNEL_TYPE_CHROMA]); } 1491 1539 Int getQpBDOffset(ChannelType type) const { return m_qpBDOffset[type]; } 1492 1540 Void setQpBDOffset(ChannelType type, Int i) { m_qpBDOffset[type] = i; } 1493 Bool getUseExtendedPrecision() const { return m_useExtendedPrecision; }1494 Void setUseExtendedPrecision(Bool value) { m_useExtendedPrecision = value; }1495 Bool getUseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; }1496 Void setUseHighPrecisionPredictionWeighting(Bool value) { m_useHighPrecisionPredictionWeighting = value; }1497 1541 1498 1542 Void setUseSAO(Bool bVal) { m_bUseSAO = bVal; } 1499 1543 Bool getUseSAO() const { return m_bUseSAO; } 1500 1501 Bool getUseResidualRotation() const { return m_useResidualRotation; }1502 Void setUseResidualRotation(const Bool value) { m_useResidualRotation = value; }1503 1504 Bool getUseSingleSignificanceMapContext() const { return m_useSingleSignificanceMapContext; }1505 Void setUseSingleSignificanceMapContext(const Bool value) { m_useSingleSignificanceMapContext = value; }1506 1507 Bool getUseGolombRiceParameterAdaptation() const { return m_useGolombRiceParameterAdaptation; }1508 Void setUseGolombRiceParameterAdaptation(const Bool value) { m_useGolombRiceParameterAdaptation = value; }1509 1510 Bool getAlignCABACBeforeBypass() const { return m_alignCABACBeforeBypass; }1511 Void setAlignCABACBeforeBypass(const Bool value) { m_alignCABACBeforeBypass = value; }1512 1513 Bool getUseResidualDPCM(const RDPCMSignallingMode signallingMode) const { return m_useResidualDPCM[signallingMode]; }1514 Void setUseResidualDPCM(const RDPCMSignallingMode signallingMode, const Bool value) { m_useResidualDPCM[signallingMode] = value; }1515 1544 1516 1545 UInt getMaxTLayers() const { return m_uiMaxTLayers; } … … 1523 1552 Void setPCMFilterDisableFlag( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } 1524 1553 Bool getPCMFilterDisableFlag() const { return m_bPCMFilterDisableFlag; } 1525 Void setDisableIntraReferenceSmoothing(Bool bValue) { m_disableIntraReferenceSmoothing=bValue; }1526 Bool getDisableIntraReferenceSmoothing() const { return m_disableIntraReferenceSmoothing; }1527 1554 1528 1555 Bool getScalingListFlag() const { return m_scalingListEnabledFlag; } … … 1548 1575 const TComPTL* getPTL() const { return &m_pcPTL; } 1549 1576 TComPTL* getPTL() { return &m_pcPTL; } 1577 1578 const TComSPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; } 1579 TComSPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; } 1580 1581 // Sequence parameter set range extension syntax 1582 // WAS: getUseResidualRotation and setUseResidualRotation 1583 // Now getSpsRangeExtension().getTransformSkipRotationEnabledFlag and getSpsRangeExtension().setTransformSkipRotationEnabledFlag 1584 1585 // WAS: getUseSingleSignificanceMapContext and setUseSingleSignificanceMapContext 1586 // Now: getSpsRangeExtension().getTransformSkipContextEnabledFlag and getSpsRangeExtension().setTransformSkipContextEnabledFlag 1587 1588 // WAS: getUseResidualDPCM and setUseResidualDPCM 1589 // Now: getSpsRangeExtension().getRdpcmEnabledFlag and getSpsRangeExtension().setRdpcmEnabledFlag and 1590 1591 // WAS: getUseExtendedPrecision and setUseExtendedPrecision 1592 // Now: getSpsRangeExtension().getExtendedPrecisionProcessingFlag and getSpsRangeExtension().setExtendedPrecisionProcessingFlag 1593 1594 // WAS: getDisableIntraReferenceSmoothing and setDisableIntraReferenceSmoothing 1595 // Now: getSpsRangeExtension().getIntraSmoothingDisabledFlag and getSpsRangeExtension().setIntraSmoothingDisabledFlag 1596 1597 // WAS: getUseHighPrecisionPredictionWeighting and setUseHighPrecisionPredictionWeighting 1598 // Now: getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag and getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag 1599 1600 // WAS: getUseGolombRiceParameterAdaptation and setUseGolombRiceParameterAdaptation 1601 // Now: getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag and getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag 1602 1603 // WAS: getAlignCABACBeforeBypass and setAlignCABACBeforeBypass 1604 // Now: getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag and getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag 1550 1605 1551 1606 #if SVC_EXTENSION … … 1602 1657 }; 1603 1658 1659 1660 1661 /// PPS RExt class 1662 class TComPPSRExt // Names aligned to text specification 1663 { 1664 private: 1665 Int m_log2MaxTransformSkipBlockSize; 1666 Bool m_crossComponentPredictionEnabledFlag; 1667 1668 // Chroma QP Adjustments 1669 Int m_diffCuChromaQpOffsetDepth; 1670 Int m_chromaQpOffsetListLen; // size (excludes the null entry used in the following array). 1671 ChromaQpAdj m_ChromaQpAdjTableIncludingNullEntry[1+MAX_QP_OFFSET_LIST_SIZE]; //!< Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1672 1673 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; 1674 1675 public: 1676 TComPPSRExt(); 1677 1678 Bool settingsDifferFromDefaults(const bool bTransformSkipEnabledFlag) const 1679 { 1680 return (bTransformSkipEnabledFlag && (getLog2MaxTransformSkipBlockSize() !=2)) 1681 || (getCrossComponentPredictionEnabledFlag() ) 1682 || (getChromaQpOffsetListEnabledFlag() ) 1683 || (getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA) !=0 ) 1684 || (getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) !=0 ); 1685 } 1686 1687 UInt getLog2MaxTransformSkipBlockSize() const { return m_log2MaxTransformSkipBlockSize; } 1688 Void setLog2MaxTransformSkipBlockSize( UInt u ) { m_log2MaxTransformSkipBlockSize = u; } 1689 1690 Bool getCrossComponentPredictionEnabledFlag() const { return m_crossComponentPredictionEnabledFlag; } 1691 Void setCrossComponentPredictionEnabledFlag(Bool value) { m_crossComponentPredictionEnabledFlag = value; } 1692 1693 Void clearChromaQpOffsetList() { m_chromaQpOffsetListLen = 0; } 1694 1695 UInt getDiffCuChromaQpOffsetDepth () const { return m_diffCuChromaQpOffsetDepth; } 1696 Void setDiffCuChromaQpOffsetDepth ( UInt u ) { m_diffCuChromaQpOffsetDepth = u; } 1697 1698 Bool getChromaQpOffsetListEnabledFlag() const { return getChromaQpOffsetListLen()>0; } 1699 Int getChromaQpOffsetListLen() const { return m_chromaQpOffsetListLen; } 1700 1701 const ChromaQpAdj& getChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1 ) const 1702 { 1703 assert(cuChromaQpOffsetIdxPlus1 < m_chromaQpOffsetListLen+1); 1704 return m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1]; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1705 } 1706 1707 Void setChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset ) 1708 { 1709 assert (cuChromaQpOffsetIdxPlus1 != 0 && cuChromaQpOffsetIdxPlus1 <= MAX_QP_OFFSET_LIST_SIZE); 1710 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CbOffset = cbOffset; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1711 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CrOffset = crOffset; 1712 m_chromaQpOffsetListLen = max(m_chromaQpOffsetListLen, cuChromaQpOffsetIdxPlus1); 1713 } 1714 1715 // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale 1716 UInt getLog2SaoOffsetScale(ChannelType type) const { return m_log2SaoOffsetScale[type]; } 1717 Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift) { m_log2SaoOffsetScale[type] = uiBitShift; } 1718 1719 }; 1720 1721 1604 1722 /// PPS class 1605 1723 class TComPPS … … 1616 1734 UInt m_uiMaxCuDQPDepth; 1617 1735 1618 // Chroma QP Adjustments1619 Int m_MaxCuChromaQpAdjDepth;1620 Int m_ChromaQpAdjTableSize; // size (excludes the null entry used in the following array).1621 ChromaQpAdj m_ChromaQpAdjTableIncludingNullEntry[1+MAX_QP_OFFSET_LIST_SIZE]; //!< Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1622 1623 1736 Int m_chromaCbQpOffset; 1624 1737 Int m_chromaCrQpOffset; … … 1630 1743 Bool m_useWeightedBiPred; //!< Use of Weighting Bi-Prediction (B_SLICE) 1631 1744 Bool m_OutputFlagPresentFlag; //!< Indicates the presence of output_flag in slice header 1632 Bool m_useCrossComponentPrediction;1633 UInt m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];1634 1745 Bool m_TransquantBypassEnableFlag; //!< Indicates presence of cu_transquant_bypass_flag in CUs. 1635 1746 Bool m_useTransformSkip; 1636 Int m_transformSkipLog2MaxSize;1637 1747 Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices 1638 1748 Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles … … 1662 1772 UInt m_log2ParallelMergeLevelMinus2; 1663 1773 Int m_numExtraSliceHeaderBits; 1774 1775 TComPPSRExt m_ppsRangeExtension; 1664 1776 1665 1777 #if SVC_EXTENSION … … 1724 1836 } 1725 1837 1726 Void setMaxCuChromaQpAdjDepth ( UInt u ) { m_MaxCuChromaQpAdjDepth = u; }1727 UInt getMaxCuChromaQpAdjDepth () const { return m_MaxCuChromaQpAdjDepth; }1728 Void clearChromaQpAdjTable() { m_ChromaQpAdjTableSize = 0; }1729 Int getChromaQpAdjTableSize() const { return m_ChromaQpAdjTableSize; }1730 1731 const ChromaQpAdj& getChromaQpAdjTableAt( Int cuChromaQpOffsetIdxPlus1 ) const1732 {1733 assert(cuChromaQpOffsetIdxPlus1 < m_ChromaQpAdjTableSize+1);1734 return m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1]; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1735 }1736 1737 Void setChromaQpAdjTableAt( Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset )1738 {1739 assert (cuChromaQpOffsetIdxPlus1 != 0 && cuChromaQpOffsetIdxPlus1 <= MAX_QP_OFFSET_LIST_SIZE);1740 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CbOffset = cbOffset; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1741 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CrOffset = crOffset;1742 m_ChromaQpAdjTableSize = max(m_ChromaQpAdjTableSize, cuChromaQpOffsetIdxPlus1);1743 }1744 1745 1838 Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } 1746 1839 UInt getNumRefIdxL0DefaultActive() const { return m_numRefIdxL0DefaultActive; } … … 1753 1846 Void setWPBiPred( Bool b ) { m_useWeightedBiPred = b; } 1754 1847 1755 Bool getUseCrossComponentPrediction() const { return m_useCrossComponentPrediction; }1756 Void setUseCrossComponentPrediction(Bool value) { m_useCrossComponentPrediction = value; }1757 1758 UInt getSaoOffsetBitShift(ChannelType type) const { return m_saoOffsetBitShift[type]; }1759 Void setSaoOffsetBitShift(ChannelType type, UInt uiBitShift) { m_saoOffsetBitShift[type] = uiBitShift; }1760 1761 1848 Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } 1762 1849 Bool getOutputFlagPresentFlag() const { return m_OutputFlagPresentFlag; } … … 1766 1853 Bool getUseTransformSkip() const { return m_useTransformSkip; } 1767 1854 Void setUseTransformSkip( Bool b ) { m_useTransformSkip = b; } 1768 UInt getTransformSkipLog2MaxSize() const { return m_transformSkipLog2MaxSize; }1769 Void setTransformSkipLog2MaxSize( UInt u ) { m_transformSkipLog2MaxSize = u; }1770 1855 1771 1856 Void setLoopFilterAcrossTilesEnabledFlag(Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } … … 1818 1903 Bool getSliceHeaderExtensionPresentFlag() const { return m_sliceHeaderExtensionPresentFlag; } 1819 1904 Void setSliceHeaderExtensionPresentFlag(Bool val) { m_sliceHeaderExtensionPresentFlag = val; } 1905 1906 const TComPPSRExt& getPpsRangeExtension() const { return m_ppsRangeExtension; } 1907 TComPPSRExt& getPpsRangeExtension() { return m_ppsRangeExtension; } 1908 1909 // WAS: getTransformSkipLog2MaxSize and setTransformSkipLog2MaxSize 1910 // Now: getPpsRangeExtension().getLog2MaxTransformSkipBlockSize and getPpsRangeExtension().setLog2MaxTransformSkipBlockSize 1911 1912 // WAS: getUseCrossComponentPrediction and setUseCrossComponentPrediction 1913 // Now: getPpsRangeExtension().getCrossComponentPredictionEnabledFlag and getPpsRangeExtension().setCrossComponentPredictionEnabledFlag 1914 1915 // WAS: clearChromaQpAdjTable 1916 // Now: getPpsRangeExtension().clearChromaQpOffsetList 1917 1918 // WAS: getMaxCuChromaQpAdjDepth and setMaxCuChromaQpAdjDepth 1919 // Now: getPpsRangeExtension().getDiffCuChromaQpOffsetDepth and getPpsRangeExtension().setDiffCuChromaQpOffsetDepth 1920 1921 // WAS: getChromaQpAdjTableSize 1922 // Now: getPpsRangeExtension().getChromaQpOffsetListLen 1923 1924 // WAS: getChromaQpAdjTableAt and setChromaQpAdjTableAt 1925 // Now: getPpsRangeExtension().getChromaQpOffsetListEntry and getPpsRangeExtension().setChromaQpOffsetListEntry 1926 1927 // WAS: getSaoOffsetBitShift and setSaoOffsetBitShift 1928 // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale 1929 1820 1930 #if SVC_EXTENSION 1821 1931 Int getExtensionFlag() const { return m_extensionFlag; } … … 2257 2367 } 2258 2368 2259 WPACDCParam* getWpAcDcParam() { return &m_weightACDCParam[0]; } 2260 2369 Void getWpAcDcParam( WPACDCParam *&wp ); 2261 2370 Void initWpAcDcParam(); 2262 2371 -
branches/SHM-dev/source/Lib/TLibCommon/TComTU.cpp
r1259 r1316 237 237 { 238 238 // rotation only for 4x4 intra, and is only used for non-transformed blocks (the latter is not checked here) 239 return getCU()->getSlice()->getSPS()->get UseResidualRotation()239 return getCU()->getSlice()->getSPS()->getSpsRangeExtension().getTransformSkipRotationEnabledFlag() 240 240 && mRect[compID].width == 4 241 241 && getCU()->isIntra(GetAbsPartIdxTU()); -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1307 r1316 109 109 chromaQpOffset += cu.getSlice()->getSliceChromaQpDelta(compID); 110 110 111 chromaQpOffset += cu.getSlice()->getPPS()->get ChromaQpAdjTableAt(cu.getChromaQpAdj(0)).u.offset[Int(compID)-1];111 chromaQpOffset += cu.getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEntry(cu.getChromaQpAdj(0)).u.offset[Int(compID)-1]; 112 112 } 113 113 … … 1206 1206 // Represents scaling through forward transform 1207 1207 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1208 if (useTransformSkip && pcCU->getSlice()->getSPS()->get UseExtendedPrecision())1208 if (useTransformSkip && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 1209 1209 { 1210 1210 iTransformShift = std::max<Int>(0, iTransformShift); … … 1294 1294 // Represents scaling through forward transform 1295 1295 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1296 if (useTransformSkip && pcCU->getSlice()->getSPS()->get UseExtendedPrecision())1296 if (useTransformSkip && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 1297 1297 { 1298 1298 iTransformShift = std::max<Int>(0, iTransformShift); … … 1356 1356 1357 1357 // Represents scaling through forward transform 1358 const Bool bClipTransformShiftTo0 = (pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->get UseExtendedPrecision();1358 const Bool bClipTransformShiftTo0 = (pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1359 1359 const Int originalTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1360 1360 const Int iTransformShift = bClipTransformShiftTo0 ? std::max<Int>(0, originalTransformShift) : originalTransformShift; … … 1708 1708 UInt absPartIdxTU = rTu.GetAbsPartIdxTU(); 1709 1709 UInt uiTrMode=rTu.GetTransformDepthRel(); 1710 if( (pcCU->getCbf(absPartIdxTU, compID, uiTrMode) == 0) && (isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()) )1710 if( (pcCU->getCbf(absPartIdxTU, compID, uiTrMode) == 0) && (isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) ) 1711 1711 { 1712 1712 return; … … 2052 2052 2053 2053 Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange); 2054 if (rTu.getCU()->getSlice()->getSPS()->get UseExtendedPrecision())2054 if (rTu.getCU()->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 2055 2055 { 2056 2056 iTransformShift = std::max<Int>(0, iTransformShift); … … 2109 2109 2110 2110 Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange); 2111 if (rTu.getCU()->getSlice()->getSPS()->get UseExtendedPrecision())2111 if (rTu.getCU()->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 2112 2112 { 2113 2113 iTransformShift = std::max<Int>(0, iTransformShift); … … 2173 2173 const UInt uiLog2TrSize = rTu.GetEquivalentLog2TrSize(compID); 2174 2174 2175 const Bool extendedPrecision = pcCU->getSlice()->getSPS()->get UseExtendedPrecision();2175 const Bool extendedPrecision = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 2176 2176 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)); 2177 2177 #if SVC_EXTENSION … … 2189 2189 // Represents scaling through forward transform 2190 2190 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 2191 if ((pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->getUseExtendedPrecision())2191 if ((pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && extendedPrecision) 2192 2192 { 2193 2193 iTransformShift = std::max<Int>(0, iTransformShift); 2194 2194 } 2195 2195 2196 const Bool bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->get UseGolombRiceParameterAdaptation();2196 const Bool bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 2197 2197 const UInt initialGolombRiceParameter = m_pcEstBitsSbac->golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)] / RExt__GOLOMB_RICE_INCREMENT_DIVISOR; 2198 2198 UInt uiGoRiceParam = initialGolombRiceParameter; -
branches/SHM-dev/source/Lib/TLibCommon/TComWeightPrediction.cpp
r1287 r1316 226 226 227 227 const UInt numValidComponent = pcCU->getPic()->getNumberValidComponents(); 228 const Bool bUseHighPrecisionPredictionWeighting = pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting();228 const Bool bUseHighPrecisionPredictionWeighting = pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 229 229 230 230 if ( bBiDir ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1307 r1316 363 363 { 364 364 case PPS_EXT__REXT: 365 assert(!bSkipTrailingExtensionBits);366 367 if (pcPPS->getUseTransformSkip())368 365 { 369 READ_UVLC( uiCode, "log2_max_transform_skip_block_size_minus2"); 370 pcPPS->setTransformSkipLog2MaxSize(uiCode+2); 366 TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension(); 367 assert(!bSkipTrailingExtensionBits); 368 369 if (pcPPS->getUseTransformSkip()) 370 { 371 READ_UVLC( uiCode, "log2_max_transform_skip_block_size_minus2"); 372 ppsRangeExtension.setLog2MaxTransformSkipBlockSize(uiCode+2); 373 } 374 375 READ_FLAG( uiCode, "cross_component_prediction_enabled_flag"); 376 ppsRangeExtension.setCrossComponentPredictionEnabledFlag(uiCode != 0); 377 378 READ_FLAG( uiCode, "chroma_qp_offset_list_enabled_flag"); 379 if (uiCode == 0) 380 { 381 ppsRangeExtension.clearChromaQpOffsetList(); 382 ppsRangeExtension.setDiffCuChromaQpOffsetDepth(0); 383 } 384 else 385 { 386 READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); ppsRangeExtension.setDiffCuChromaQpOffsetDepth(uiCode); 387 UInt tableSizeMinus1 = 0; 388 READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1"); 389 assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE); 390 391 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++) 392 { 393 Int cbOffset; 394 Int crOffset; 395 READ_SVLC(cbOffset, "cb_qp_offset_list[i]"); 396 assert(cbOffset >= -12 && cbOffset <= 12); 397 READ_SVLC(crOffset, "cr_qp_offset_list[i]"); 398 assert(crOffset >= -12 && crOffset <= 12); 399 // table uses +1 for index (see comment inside the function) 400 ppsRangeExtension.setChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1, cbOffset, crOffset); 401 } 402 assert(ppsRangeExtension.getChromaQpOffsetListLen() == tableSizeMinus1 + 1); 403 } 404 405 READ_UVLC( uiCode, "log2_sao_offset_scale_luma"); 406 ppsRangeExtension.setLog2SaoOffsetScale(CHANNEL_TYPE_LUMA, uiCode); 407 READ_UVLC( uiCode, "log2_sao_offset_scale_chroma"); 408 ppsRangeExtension.setLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA, uiCode); 371 409 } 372 373 READ_FLAG( uiCode, "cross_component_prediction_enabled_flag");374 pcPPS->setUseCrossComponentPrediction(uiCode != 0);375 376 READ_FLAG( uiCode, "chroma_qp_offset_list_enabled_flag");377 if (uiCode == 0)378 {379 pcPPS->clearChromaQpAdjTable();380 pcPPS->setMaxCuChromaQpAdjDepth(0);381 }382 else383 {384 READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); pcPPS->setMaxCuChromaQpAdjDepth(uiCode);385 UInt tableSizeMinus1 = 0;386 READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1");387 assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE);388 389 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++)390 {391 Int cbOffset;392 Int crOffset;393 READ_SVLC(cbOffset, "cb_qp_offset_list[i]");394 assert(cbOffset >= -12 && cbOffset <= 12);395 READ_SVLC(crOffset, "cr_qp_offset_list[i]");396 assert(crOffset >= -12 && crOffset <= 12);397 // table uses +1 for index (see comment inside the function)398 pcPPS->setChromaQpAdjTableAt(cuChromaQpOffsetIdx+1, cbOffset, crOffset);399 }400 assert(pcPPS->getChromaQpAdjTableSize() == tableSizeMinus1 + 1);401 }402 403 READ_UVLC( uiCode, "log2_sao_offset_scale_luma");404 pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_LUMA, uiCode);405 READ_UVLC( uiCode, "log2_sao_offset_scale_chroma");406 pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_CHROMA, uiCode);407 410 break; 408 411 … … 986 989 case SPS_EXT__REXT: 987 990 assert(!bSkipTrailingExtensionBits); 988 989 READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag"); pcSPS->setUseResidualRotation (uiCode != 0); 990 READ_FLAG( uiCode, "transform_skip_context_enabled_flag"); pcSPS->setUseSingleSignificanceMapContext (uiCode != 0); 991 READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag"); pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0)); 992 READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag"); pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0)); 993 READ_FLAG( uiCode, "extended_precision_processing_flag"); pcSPS->setUseExtendedPrecision (uiCode != 0); 994 READ_FLAG( uiCode, "intra_smoothing_disabled_flag"); pcSPS->setDisableIntraReferenceSmoothing (uiCode != 0); 995 READ_FLAG( uiCode, "high_precision_offsets_enabled_flag"); pcSPS->setUseHighPrecisionPredictionWeighting (uiCode != 0); 996 READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag"); pcSPS->setUseGolombRiceParameterAdaptation (uiCode != 0); 997 READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag"); pcSPS->setAlignCABACBeforeBypass (uiCode != 0); 991 { 992 TComSPSRExt &spsRangeExtension = pcSPS->getSpsRangeExtension(); 993 READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag"); spsRangeExtension.setTransformSkipRotationEnabledFlag(uiCode != 0); 994 READ_FLAG( uiCode, "transform_skip_context_enabled_flag"); spsRangeExtension.setTransformSkipContextEnabledFlag (uiCode != 0); 995 READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag"); spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0)); 996 READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag"); spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0)); 997 READ_FLAG( uiCode, "extended_precision_processing_flag"); spsRangeExtension.setExtendedPrecisionProcessingFlag (uiCode != 0); 998 READ_FLAG( uiCode, "intra_smoothing_disabled_flag"); spsRangeExtension.setIntraSmoothingDisabledFlag (uiCode != 0); 999 READ_FLAG( uiCode, "high_precision_offsets_enabled_flag"); spsRangeExtension.setHighPrecisionOffsetsEnabledFlag (uiCode != 0); 1000 READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag"); spsRangeExtension.setPersistentRiceAdaptationEnabledFlag (uiCode != 0); 1001 READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag"); spsRangeExtension.setCabacBypassAlignmentEnabledFlag (uiCode != 0); 1002 } 998 1003 break; 999 1004 #if SVC_EXTENSION … … 1850 1855 } 1851 1856 1852 if (pps->get ChromaQpAdjTableSize() > 0)1857 if (pps->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag()) 1853 1858 { 1854 1859 READ_FLAG(uiCode, "cu_chroma_qp_offset_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0); … … 2483 2488 READ_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" ); 2484 2489 #if SVC_EXTENSION 2485 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;2490 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128; 2486 2491 #else 2487 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;2492 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128; 2488 2493 #endif 2489 2494 assert( wp[0].iOffset >= -range ); … … 2500 2505 { 2501 2506 #if SVC_EXTENSION 2502 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;2507 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 2503 2508 #else 2504 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;2509 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 2505 2510 #endif 2506 2511 for ( Int j=1 ; j<numValidComp ; j++ ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1315 r1316 244 244 } 245 245 246 if( uiDepth == pps.get MaxCuChromaQpAdjDepth() && pcCU->getSlice()->getUseChromaQpAdj() )246 if( uiDepth == pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcCU->getSlice()->getUseChromaQpAdj() ) 247 247 { 248 248 setIsChromaQpAdjCoded(true); … … 286 286 } 287 287 288 if( uiDepth <= pps.get MaxCuChromaQpAdjDepth() && pcCU->getSlice()->getUseChromaQpAdj() )288 if( uiDepth <= pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcCU->getSlice()->getUseChromaQpAdj() ) 289 289 { 290 290 setIsChromaQpAdjCoded(true); … … 576 576 Bool bLeftAvail = false; 577 577 578 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->get DisableIntraReferenceSmoothing());578 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 579 579 580 580 #ifdef DEBUG_STRING -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1315 r1316 851 851 TComDataCU *pcCU = rTu.getCU(); 852 852 853 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )853 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 854 854 { 855 855 return; … … 983 983 #endif 984 984 985 Int tableSize = cu->getSlice()->getPPS()->getChromaQpAdjTableSize();986 987 / * cu_chroma_qp_adjustment_flag */985 Int chromaQpOffsetListLen = cu->getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListLen(); 986 987 // cu_chroma_qp_offset_flag 988 988 m_pcTDecBinIf->decodeBin( symbol, m_ChromaQpAdjFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 989 989 990 if (symbol && tableSize> 1)991 { 992 / * cu_chroma_qp_adjustment_idc */993 xReadUnaryMaxSymbol( symbol, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, tableSize- 1 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) );990 if (symbol && chromaQpOffsetListLen > 1) 991 { 992 // cu_chroma_qp_offset_idx 993 xReadUnaryMaxSymbol( symbol, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, chromaQpOffsetListLen - 1 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 994 994 symbol++; 995 995 } … … 1113 1113 } 1114 1114 1115 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()))1115 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize())) 1116 1116 { 1117 1117 return; … … 1286 1286 1287 1287 const ChannelType channelType = toChannelType(compID); 1288 const Bool extendedPrecision = sps.get UseExtendedPrecision();1289 1290 const Bool alignCABACBeforeBypass = sps.get AlignCABACBeforeBypass();1288 const Bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1289 1290 const Bool alignCABACBeforeBypass = sps.getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag(); 1291 1291 const Int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(channelType); 1292 1292 … … 1351 1351 //-------------------------------------------------------------------------------------------------- 1352 1352 1353 const Bool bUseGolombRiceParameterAdaptation = sps.get UseGolombRiceParameterAdaptation();1353 const Bool bUseGolombRiceParameterAdaptation = sps.getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 1354 1354 UInt ¤tGolombRiceStatistic = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)]; 1355 1355 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1307 r1316 433 433 434 434 #if RExt__HIGH_BIT_DEPTH_SUPPORT==0 435 if (sps->get UseExtendedPrecision() || sps->getBitDepth(CHANNEL_TYPE_LUMA)>12 || sps->getBitDepth(CHANNEL_TYPE_CHROMA)>12 )435 if (sps->getSpsRangeExtension().getExtendedPrecisionProcessingFlag() || sps->getBitDepth(CHANNEL_TYPE_LUMA)>12 || sps->getBitDepth(CHANNEL_TYPE_CHROMA)>12 ) 436 436 { 437 437 printf("High bit depth support must be enabled at compile-time in order to decode this bitstream\n"); … … 604 604 // Initialise the various objects for the new set of settings 605 605 #if SVC_EXTENSION 606 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->get SaoOffsetBitShift(CHANNEL_TYPE_LUMA), pps->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) );606 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 607 607 #else 608 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->get SaoOffsetBitShift(CHANNEL_TYPE_LUMA), pps->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) );608 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 609 609 #endif 610 610 m_cLoopFilter.create( sps->getMaxTotalCUDepth() ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1307 r1316 228 228 Bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS]={false}; 229 229 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()); 237 231 238 232 // Other PPS extension flags checked here. … … 277 271 { 278 272 case PPS_EXT__REXT: 279 280 if (pcPPS->getUseTransformSkip())281 273 { 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" ); 283 297 } 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" );302 298 break; 299 303 300 #if SVC_EXTENSION 304 301 case PPS_EXT__MLAYER: … … 713 710 Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS]={false}; 714 711 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(); 726 713 727 714 // Other SPS extension flags checked here. … … 762 749 { 763 750 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" ); 774 763 break; 764 } 775 765 #if SVC_EXTENSION 776 766 case SPS_EXT__MLAYER: … … 1299 1289 } 1300 1290 1301 if (pcSlice->getPPS()->get ChromaQpAdjTableSize() > 0)1291 if (pcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag()) 1302 1292 { 1303 1293 WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "cu_chroma_qp_offset_enabled_flag"); … … 1715 1705 1716 1706 #if SVC_EXTENSION 1717 Int range=pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;1707 Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 1718 1708 #else 1719 Int range=pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting() ? (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; 1720 1710 #endif 1721 1711 Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1311 r1316 177 177 Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) 178 178 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. 180 180 181 181 Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) … … 186 186 Bool m_bUseAdaptQpSelect; 187 187 #endif 188 Bool m_ useExtendedPrecision;189 Bool m_ useHighPrecisionPredictionWeighting;188 Bool m_extendedPrecisionProcessingFlag; 189 Bool m_highPrecisionOffsetsEnabledFlag; 190 190 Bool m_bUseAdaptiveQP; 191 191 Int m_iQPAdaptationRange; … … 206 206 Bool m_bUseCbfFastMode; 207 207 Bool m_useEarlySkipDetection; 208 Bool m_ useCrossComponentPrediction;208 Bool m_crossComponentPredictionEnabledFlag; 209 209 Bool m_reconBasedCrossCPredictionEstimate; 210 UInt m_ saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];210 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; 211 211 Bool m_useTransformSkip; 212 212 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]; 219 219 Int* m_aidQP; 220 220 UInt m_uiDeltaQpRD; … … 235 235 Bool m_bPCMInputBitDepthFlag; 236 236 Bool m_bPCMFilterDisableFlag; 237 Bool m_ disableIntraReferenceSmoothing;237 Bool m_intraSmoothingDisabledFlag; 238 238 Bool m_loopFilterAcrossTilesEnabledFlag; 239 239 Bool m_tileUniformSpacingFlag; … … 551 551 Void setMaxCuDQPDepth ( Int i ) { m_iMaxCuDQPDepth = i; } 552 552 553 Int get MaxCUChromaQpAdjustmentDepth () const { return m_maxCUChromaQpAdjustmentDepth; }554 Void set MaxCUChromaQpAdjustmentDepth (Int value) { m_maxCUChromaQpAdjustmentDepth = value; }553 Int getDiffCuChromaQpOffsetDepth () const { return m_diffCuChromaQpOffsetDepth; } 554 Void setDiffCuChromaQpOffsetDepth (Int value) { m_diffCuChromaQpOffsetDepth = value; } 555 555 556 556 Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } … … 565 565 #endif 566 566 567 Bool get UseExtendedPrecision () const { return m_useExtendedPrecision; }568 Void set UseExtendedPrecision (Bool value) { m_useExtendedPrecision= value; }569 570 Bool get UseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; }571 Void set UseHighPrecisionPredictionWeighting(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; } 572 572 573 573 Void setUseAdaptiveQP ( Bool b ) { m_bUseAdaptiveQP = b; } … … 662 662 UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } 663 663 664 Bool get UseCrossComponentPrediction () const { return m_useCrossComponentPrediction; }665 Void set UseCrossComponentPrediction (const Bool value) { m_useCrossComponentPrediction= value; }664 Bool getCrossComponentPredictionEnabledFlag () const { return m_crossComponentPredictionEnabledFlag; } 665 Void setCrossComponentPredictionEnabledFlag (const Bool value) { m_crossComponentPredictionEnabledFlag = value; } 666 666 Bool getUseReconBasedCrossCPredictionEstimate () const { return m_reconBasedCrossCPredictionEstimate; } 667 667 Void setUseReconBasedCrossCPredictionEstimate (const Bool value) { m_reconBasedCrossCPredictionEstimate = value; } 668 Void set SaoOffsetBitShift(ChannelType type, UInt uiBitShift) { m_saoOffsetBitShift[type] = uiBitShift; }668 Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift) { m_log2SaoOffsetScale[type] = uiBitShift; } 669 669 670 670 Bool getUseTransformSkip () { return m_useTransformSkip; } 671 671 Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } 672 Bool get UseResidualRotation () const { return m_useResidualRotation; }673 Void set UseResidualRotation (const Bool value) { m_useResidualRotation= value; }674 Bool get UseSingleSignificanceMapContext () const { return m_useSingleSignificanceMapContext; }675 Void set UseSingleSignificanceMapContext (const Bool value) { m_useSingleSignificanceMapContext= value; }676 Bool get UseGolombRiceParameterAdaptation () const { return m_useGolombRiceParameterAdaptation; }677 Void set UseGolombRiceParameterAdaptation (const Bool value) { m_useGolombRiceParameterAdaptation= value; }678 Bool get AlignCABACBeforeBypass () const { return m_alignCABACBeforeBypass; }679 Void set AlignCABACBeforeBypass (const Bool value) { m_alignCABACBeforeBypass= value; }680 Bool get UseResidualDPCM (const RDPCMSignallingMode signallingMode) const { return m_useResidualDPCM[signallingMode]; }681 Void set UseResidualDPCM (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; } 682 682 Bool getUseTransformSkipFast () { return m_useTransformSkipFast; } 683 683 Void setUseTransformSkipFast ( Bool b ) { m_useTransformSkipFast = b; } 684 UInt get TransformSkipLog2MaxSize () const { return m_transformSkipLog2MaxSize; }685 Void set TransformSkipLog2MaxSize ( 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; } 688 688 689 689 Int* getdQPs () { return m_aidQP; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1314 r1316 97 97 } 98 98 99 m_bEncodeDQP = false;100 m_ CodeChromaQpAdjFlag= false;101 m_ ChromaQpAdjIdc= 0;99 m_bEncodeDQP = false; 100 m_stillToCodeChromaQpOffsetFlag = false; 101 m_cuChromaQpOffsetIdxPlus1 = 0; 102 102 103 103 // initialize partition order. … … 486 486 } 487 487 488 m_ ChromaQpAdjIdc= 0;488 m_cuChromaQpOffsetIdxPlus1 = 0; 489 489 if (pcSlice->getUseChromaQpAdj()) 490 490 { … … 495 495 */ 496 496 Int lgMinCuSize = sps.getLog2MinCodingBlockSize() + 497 std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.get MaxCuChromaQpAdjDepth()));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); 499 499 } 500 500 … … 1095 1095 } 1096 1096 1097 if( uiDepth == pps.get MaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())1097 if( uiDepth == pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj()) 1098 1098 { 1099 1099 setCodeChromaQpAdjFlag(true); … … 1122 1122 } 1123 1123 1124 if( uiDepth <= pps.get MaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())1124 if( uiDepth <= pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj()) 1125 1125 { 1126 1126 setCodeChromaQpAdjFlag(true); … … 1357 1357 rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to CTU level 1358 1358 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1359 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_ ChromaQpAdjIdc, 0, uhDepth );1359 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 1360 1360 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1361 1361 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level … … 1453 1453 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); 1454 1454 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 ); 1456 1456 1457 1457 #if SVC_EXTENSION … … 1508 1508 rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth ); 1509 1509 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 ); 1511 1511 1512 1512 Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE]; … … 1573 1573 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 1574 1574 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 ); 1576 1576 1577 1577 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 81 81 // Data : encoder control 82 82 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. 85 85 86 86 // Access channel … … 162 162 Void setdQPFlag ( Bool b ) { m_bEncodeDQP = b; } 163 163 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; } 166 166 167 167 #if ADAPTIVE_QP_SELECTION -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1315 r1316 839 839 TComDataCU *pcCU = rTu.getCU(); 840 840 841 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )841 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 842 842 { 843 843 return; … … 915 915 { 916 916 Int internalIdc = cu->getChromaQpAdj( absPartIdx ); 917 Int tableSize = cu->getSlice()->getPPS()->getChromaQpAdjTableSize();917 Int chromaQpOffsetListLen = cu->getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListLen(); 918 918 /* internal_idc == 0 => flag = 0 919 919 * internal_idc > 1 => code idc value (if table size warrents) */ 920 920 m_pcBinIf->encodeBin( internalIdc > 0, m_ChromaQpAdjFlagSCModel.get( 0, 0, 0 ) ); 921 921 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 ); 925 925 } 926 926 } … … 1013 1013 } 1014 1014 1015 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()))1015 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize())) 1016 1016 { 1017 1017 return; … … 1252 1252 1253 1253 const ChannelType channelType = toChannelType(compID); 1254 const Bool extendedPrecision = sps.get UseExtendedPrecision();1255 1256 const Bool alignCABACBeforeBypass = sps.get AlignCABACBeforeBypass();1254 const Bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1255 1256 const Bool alignCABACBeforeBypass = sps.getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag(); 1257 1257 const Int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(channelType); 1258 1258 … … 1309 1309 //-------------------------------------------------------------------------------------------------- 1310 1310 1311 const Bool bUseGolombRiceParameterAdaptation = sps.get UseGolombRiceParameterAdaptation();1311 const Bool bUseGolombRiceParameterAdaptation = sps.getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 1312 1312 UInt ¤tGolombRiceStatistic = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)]; 1313 1313 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1315 r1316 968 968 TCoeff* pcCoeff = bRealCoeff ? pcCU->getCoeff(component) : m_ppcQTTempCoeff[component][uiQTLayer]; 969 969 970 if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )970 if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 971 971 { 972 972 m_pcEntropyCoder->encodeCrossComponentPrediction( rTu, component ); … … 1173 1173 #endif 1174 1174 { 1175 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.get DisableIntraReferenceSmoothing());1175 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1176 1176 1177 1177 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) ); … … 1234 1234 } 1235 1235 1236 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1236 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1237 1237 { 1238 1238 if (bUseCrossCPrediction) … … 1307 1307 Pel* pRecIPred = piRecIPred; 1308 1308 1309 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1309 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1310 1310 { 1311 1311 if (bUseCrossCPrediction) … … 1465 1465 Bool checkTransformSkip = pcCU->getSlice()->getPPS()->getUseTransformSkip(); 1466 1466 Int bestModeId[MAX_NUM_COMPONENT] = { 0, 0, 0}; 1467 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1467 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1468 1468 checkTransformSkip &= (!pcCU->getCUTransquantBypass(0)); 1469 1469 … … 1533 1533 } 1534 1534 1535 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1535 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1536 1536 { 1537 1537 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1600 1600 dSingleCost = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDistLuma ); 1601 1601 1602 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1602 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1603 1603 { 1604 1604 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1673 1673 dRDCost += dSplitCost; 1674 1674 1675 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1675 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1676 1676 { 1677 1677 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1947 1947 1948 1948 Bool checkTransformSkip = pcCU->getSlice()->getPPS()->getUseTransformSkip(); 1949 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1949 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1950 1950 1951 1951 if ( m_pcEncCfg->getUseTransformSkipFast() ) 1952 1952 { 1953 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1953 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1954 1954 1955 1955 if (checkTransformSkip) … … 1995 1995 1996 1996 const Bool checkCrossComponentPrediction = (pcCU->getIntraDir(CHANNEL_TYPE_CHROMA, subTUAbsPartIdx) == DM_CHROMA_IDX) 1997 && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()1997 && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() 1998 1998 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrDepth) != 0); 1999 1999 … … 2323 2323 #endif 2324 2324 2325 const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.get DisableIntraReferenceSmoothing());2325 const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 2326 2326 2327 2327 predIntraAng( COMPONENT_Y, uiMode, piOrg, uiStride, piPred, uiStride, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter, TComPrediction::UseDPCMForFirstPassIntraEstimation(tuRecurseWithPU, uiMode) ); … … 2435 2435 xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU ); 2436 2436 2437 if (pps.get UseCrossComponentPrediction())2437 if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 2438 2438 { 2439 2439 const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0; … … 2511 2511 xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU ); 2512 2512 2513 if (pps.get UseCrossComponentPrediction())2513 if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 2514 2514 { 2515 2515 const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0; … … 4762 4762 4763 4763 checkTransformSkip[compID] = pcCU->getSlice()->getPPS()->getUseTransformSkip() && 4764 TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()) &&4764 TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()) && 4765 4765 (!pcCU->isLosslessCoded(0)); 4766 4766 … … 4783 4783 #endif 4784 4784 const Bool isCrossCPredictionAvailable = isChroma(compID) 4785 && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()4785 && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() 4786 4786 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrMode) != 0); 4787 4787 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1307 r1316 502 502 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 ); 503 503 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 ); 504 rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->get ChromaQpAdjTableSize() > 0);504 rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag() ); 505 505 rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); 506 506 rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1309 r1316 121 121 if (m_bUseSAO) 122 122 { 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] ); 124 124 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 125 125 m_cEncSAO.createEncData(getSaoCtuBoundary()); … … 949 949 } 950 950 951 m_cSPS.setUseExtendedPrecision(m_useExtendedPrecision);952 m_cSPS.setUseHighPrecisionPredictionWeighting(m_useHighPrecisionPredictionWeighting);953 954 951 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 }964 952 965 953 m_cSPS.setMaxTLayers( m_maxTempLayer ); … … 976 964 977 965 m_cSPS.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag ); 978 m_cSPS.setDisableIntraReferenceSmoothing( m_disableIntraReferenceSmoothing );979 966 m_cSPS.setScalingListFlag ( (m_useScalingListId == SCALING_LIST_OFF) ? 0 : 1 ); 980 967 m_cSPS.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); … … 1032 1019 m_cSPS.getVuiParameters()->setHrdParametersPresentFlag( true ); 1033 1020 } 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); 1034 1034 } 1035 1035 … … 1066 1066 } 1067 1067 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); 1072 1073 /* todo, insert table entries from command line (NB, 0 should not be touched) */ 1073 1074 } 1074 1075 else 1075 1076 { 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]); 1079 1083 1080 1084 m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset ); … … 1085 1089 m_cPPS.setUseWP( m_useWeightedPred ); 1086 1090 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]);1090 1091 m_cPPS.setOutputFlagPresentFlag( false ); 1091 1092 m_cPPS.setSignHideFlag(getSignHideFlag()); … … 1145 1146 m_cPPS.setTransquantBypassEnableFlag(getTransquantBypassEnableFlag()); 1146 1147 m_cPPS.setUseTransformSkip( m_useTransformSkip ); 1147 m_cPPS. setTransformSkipLog2MaxSize( m_transformSkipLog2MaxSize );1148 m_cPPS.getPpsRangeExtension().setLog2MaxTransformSkipBlockSize( m_log2MaxTransformSkipBlockSize ); 1148 1149 1149 1150 if (m_sliceSegmentMode != NO_SLICES) -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1287 r1316 112 112 } 113 113 114 const Int fixedBitShift = (slice->getSPS()->get UseHighPrecisionPredictionWeighting())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0;114 const Int fixedBitShift = (slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0; 115 115 weightACDCParam[compID].iDC = (((iOrgDC<<fixedBitShift)+(iSample>>1)) / iSample); 116 116 weightACDCParam[compID].iAC = iOrgAC; … … 204 204 { 205 205 const Int numComp = slice->getPic()->getPicYuvOrg()->getNumberValidComponents(); 206 const Bool bUseHighPrecisionWeighting = slice->getSPS()->get UseHighPrecisionPredictionWeighting();206 const Bool bUseHighPrecisionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 207 207 const Int numPredDir = slice->isInterP() ? 1 : 2; 208 208 … … 215 215 for ( Int refIdxTemp = 0; refIdxTemp < slice->getNumRefIdx(eRefPicList); refIdxTemp++ ) 216 216 { 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); 219 220 220 221 #if SVC_EXTENSION … … 225 226 if( validILRPic ) 226 227 { 227 refWeightACDCParam = slice->getWpAcDcParam();228 slice->getWpAcDcParam(refWeightACDCParam); 228 229 } 229 230 #endif … … 332 333 const Int iDefaultWeight = ((Int)1<<log2Denom); 333 334 const Int iNumPredDir = slice->isInterP() ? 1 : 2; 334 const Bool useHighPrecisionPredictionWeighting = slice->getSPS()->get UseHighPrecisionPredictionWeighting();335 const Bool useHighPrecisionPredictionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 335 336 336 337 assert (iNumPredDir <= Int(NUM_REF_PIC_LIST_01));
Note: See TracChangeset for help on using the changeset viewer.