Skip to content
Snippets Groups Projects
EncAppCfg.cpp 391 KiB
Newer Older
  • Learn to ignore specific revisions
  • yonghe's avatar
    yonghe committed
      {
        xConfirmPara(m_doSEITransformType < 0 || m_doSEITransformType > 7, "SEIDisplayOrientationTransformType must be in rage 0 to 7");
      }
    
    
      if( m_erpSEIEnabled && !m_erpSEICancelFlag )
      {
        xConfirmPara( m_erpSEIGuardBandType < 0 || m_erpSEIGuardBandType > 8, "SEIEquirectangularprojectionGuardBandType must be in the range of 0 to 7");
    
        xConfirmPara(
          (m_chromaFormatIdc == ChromaFormat::_420 || m_chromaFormatIdc == ChromaFormat::_422)
            && (m_erpSEILeftGuardBandWidth % 2 == 1),
          "SEIEquirectangularprojectionLeftGuardBandWidth must be an even number for 4:2:0 or 4:2:2 chroma format");
        xConfirmPara(
          (m_chromaFormatIdc == ChromaFormat::_420 || m_chromaFormatIdc == ChromaFormat::_422)
            && (m_erpSEIRightGuardBandWidth % 2 == 1),
          "SEIEquirectangularprojectionRightGuardBandWidth must be an even number for 4:2:0 or 4:2:2 chroma format");
    
      }
    
      if( m_sphereRotationSEIEnabled && !m_sphereRotationSEICancelFlag )
      {
        xConfirmPara( m_sphereRotationSEIYaw  < -(180<<16) || m_sphereRotationSEIYaw > (180<<16)-1, "SEISphereRotationYaw must be in the range of -11 796 480 to 11 796 479");
        xConfirmPara( m_sphereRotationSEIPitch < -(90<<16) || m_sphereRotationSEIYaw > (90<<16),    "SEISphereRotationPitch must be in the range of -5 898 240 to 5 898 240");
        xConfirmPara( m_sphereRotationSEIRoll < -(180<<16) || m_sphereRotationSEIYaw > (180<<16)-1, "SEISphereRotationRoll must be in the range of -11 796 480 to 11 796 479");
      }
    
      if ( m_omniViewportSEIEnabled && !m_omniViewportSEICancelFlag )
      {
        xConfirmPara( m_omniViewportSEIId < 0 || m_omniViewportSEIId > 1023, "SEIomniViewportId must be in the range of 0 to 1023");
        xConfirmPara( m_omniViewportSEICntMinus1 < 0 || m_omniViewportSEICntMinus1 > 15, "SEIomniViewportCntMinus1 must be in the range of 0 to 15");
        for ( uint32_t i=0; i<=m_omniViewportSEICntMinus1; i++ )
        {
          xConfirmPara( m_omniViewportSEIAzimuthCentre[i] < -(180<<16)  || m_omniViewportSEIAzimuthCentre[i] > (180<<16)-1, "SEIOmniViewportAzimuthCentre must be in the range of -11 796 480 to 11 796 479");
          xConfirmPara( m_omniViewportSEIElevationCentre[i] < -(90<<16) || m_omniViewportSEIElevationCentre[i] > (90<<16),  "SEIOmniViewportSEIElevationCentre must be in the range of -5 898 240 to 5 898 240");
          xConfirmPara( m_omniViewportSEITiltCentre[i] < -(180<<16)     || m_omniViewportSEITiltCentre[i] > (180<<16)-1,    "SEIOmniViewportTiltCentre must be in the range of -11 796 480 to 11 796 479");
          xConfirmPara( m_omniViewportSEIHorRange[i] < 1 || m_omniViewportSEIHorRange[i] > (360<<16), "SEIOmniViewportHorRange must be in the range of 1 to 360*2^16");
          xConfirmPara( m_omniViewportSEIVerRange[i] < 1 || m_omniViewportSEIVerRange[i] > (180<<16), "SEIOmniViewportVerRange must be in the range of 1 to 180*2^16");
        }
      }
    
    
      if (m_gcmpSEIEnabled && !m_gcmpSEICancelFlag)
      {
        xConfirmPara( m_gcmpSEIMappingFunctionType < 0 || m_gcmpSEIMappingFunctionType > 2, "SEIGcmpMappingFunctionType must be in the range of 0 to 2");
        int numFace = m_gcmpSEIPackingType == 4 || m_gcmpSEIPackingType == 5 ? 5 : 6;
        for ( int i = 0; i < numFace; i++ )
        {
          xConfirmPara( m_gcmpSEIFaceIndex[i] < 0 || m_gcmpSEIFaceIndex[i] > 5,       "SEIGcmpFaceIndex must be in the range of 0 to 5");
          xConfirmPara( m_gcmpSEIFaceRotation[i] < 0 || m_gcmpSEIFaceRotation[i] > 3, "SEIGcmpFaceRotation must be in the range of 0 to 3");
          if (m_gcmpSEIMappingFunctionType == 2)
          {
            xConfirmPara( m_gcmpSEIFunctionCoeffU[i] <= 0.0 || m_gcmpSEIFunctionCoeffU[i] > 1.0, "SEIGcmpFunctionCoeffU must be in the range (0, 1]");
            xConfirmPara( m_gcmpSEIFunctionCoeffV[i] <= 0.0 || m_gcmpSEIFunctionCoeffV[i] > 1.0, "SEIGcmpFunctionCoeffV must be in the range (0, 1]");
          }
    
          if (i != 2 && (m_gcmpSEIPackingType == 4 || m_gcmpSEIPackingType == 5))
          {
            if (m_gcmpSEIFaceIndex[2] == 0 || m_gcmpSEIFaceIndex[2] == 1)
            {
              xConfirmPara( m_gcmpSEIFaceIndex[i] == 0 || m_gcmpSEIFaceIndex[i] == 1, "SEIGcmpFaceIndex[i] must be in the range of 2 to 5 for i equal to 0, 1, 3, or 4 when SEIGcmpFaceIndex[2] is equal to 0 or 1");
              if (m_gcmpSEIPackingType == 4)
              {
                xConfirmPara( m_gcmpSEIFaceRotation[i] != 0 && m_gcmpSEIFaceRotation[i] != 2, "SEIGcmpFaceRotation[i] must be 0 or 2 for i equal to 0, 1, 3, or 4 when SEIGcmpFaceIndex[2] is equal to 0 or 1");
              }
              else
              {
                xConfirmPara( m_gcmpSEIFaceRotation[i] != 1 && m_gcmpSEIFaceRotation[i] != 3, "SEIGcmpFaceRotation[i] must be 1 or 3 for i equal to 0, 1, 3, or 4 when SEIGcmpFaceIndex[2] is equal to 0 or 1");
              }
            }
            else if (m_gcmpSEIFaceIndex[2] == 2 || m_gcmpSEIFaceIndex[2] == 3)
            {
              xConfirmPara( m_gcmpSEIFaceIndex[i] == 2 || m_gcmpSEIFaceIndex[i] == 3, "SEIGcmpFaceIndex[i] must be 0, 1, 4 or 5 for i equal to 0, 1, 3, or 4 when SEIGcmpFaceIndex[2] is equal to 2 or 3");
              if (m_gcmpSEIPackingType == 4)
              {
                if (m_gcmpSEIFaceIndex[i] == 1)
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 0 && m_gcmpSEIFaceRotation[i] != 2, "SEIGcmpFaceRotation[i] must be 0 or 2 when SEIGcmpFaceIndex[2] is equal to 2 or 3 and SEIGcmpFaceIndex[i] is equal to 1");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 1 && m_gcmpSEIFaceRotation[i] != 3, "SEIGcmpFaceRotation[i] must be 1 or 3 when SEIGcmpFaceIndex[2] is equal to 2 or 3 and SEIGcmpFaceIndex[i] is equal to 0, 4 or 5");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
              }
              else
              {
                if (m_gcmpSEIFaceIndex[i] == 1)
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 1 && m_gcmpSEIFaceRotation[i] != 3, "SEIGcmpFaceRotation[i] must be 1 or 3 when SEIGcmpFaceIndex[2] is equal to 2 or 3 and SEIGcmpFaceIndex[i] is equal to 1");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 0 && m_gcmpSEIFaceRotation[i] != 2, "SEIGcmpFaceRotation[i] must be 0 or 2 when SEIGcmpFaceIndex[2] is equal to 2 or 3 and SEIGcmpFaceIndex[i] is equal to 0, 4 or 5");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
              }
            }
            else if (m_gcmpSEIFaceIndex[2] == 4 || m_gcmpSEIFaceIndex[2] == 5)
            {
              xConfirmPara( m_gcmpSEIFaceIndex[i] == 4 || m_gcmpSEIFaceIndex[i] == 5, "SEIGcmpFaceIndex[i] must be in the range of 0 to 3 for i equal to 0, 1, 3, or 4 when SEIGcmpFaceIndex[2] is equal to 4 or 5");
              if (m_gcmpSEIPackingType == 4)
              {
                if (m_gcmpSEIFaceIndex[i] == 0)
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 0 && m_gcmpSEIFaceRotation[i] != 2, "SEIGcmpFaceRotation[i] must be 0 or 2 when SEIGcmpFaceIndex[2] is equal to 4 or 5 and SEIGcmpFaceIndex[i] is equal to 0");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 1 && m_gcmpSEIFaceRotation[i] != 3, "SEIGcmpFaceRotation[i] must be 1 or 3 when SEIGcmpFaceIndex[2] is equal to 4 or 5 and SEIGcmpFaceIndex[i] is equal to 1, 2 or 3");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
              }
              else
              {
                if (m_gcmpSEIFaceIndex[i] == 0)
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 1 && m_gcmpSEIFaceRotation[i] != 3, "SEIGcmpFaceRotation[i] must be 1 or 3 when SEIGcmpFaceIndex[2] is equal to 4 or 5 and SEIGcmpFaceIndex[i] is equal to 0");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                {
    
                  xConfirmPara( m_gcmpSEIFaceRotation[i] != 0 && m_gcmpSEIFaceRotation[i] != 2, "SEIGcmpFaceRotation[i] must be 0 or 2 when SEIGcmpFaceIndex[2] is equal to 4 or 5 and SEIGcmpFaceIndex[i] is equal to 1, 2 or 3");
    
    Ya-Hsuan Lee's avatar
    Ya-Hsuan Lee committed
                }
    
        }
        if (m_gcmpSEIGuardBandFlag)
        {
          xConfirmPara( m_gcmpSEIGuardBandSamplesMinus1 < 0 || m_gcmpSEIGuardBandSamplesMinus1 > 15, "SEIGcmpGuardBandSamplesMinus1 must be in the range of 0 to 15");
        }
      }
    
    
      if (m_siiSEIEnabled && m_ShutterFilterEnable)
      {
        xConfirmPara(m_maxTempLayer == 1 || m_maxDecPicBuffering[0] == 1,"Shutter Interval SEI message processing is disabled for single TempLayer and single frame in DPB\n");
      }
    
    
      if (m_nnPostFilterSEICharacteristicsEnabled)
      {
        for (int i = 0; i < m_nnPostFilterSEICharacteristicsNumFilters; i++)
        {
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsId[i] > MAX_NNPFC_ID, "SEINNPFCId must be in the range of 0 to 2^32-2");
          xConfirmPara(m_nnPostFilterSEICharacteristicsModeIdc[i] > 255, "SEINNPFCModeIdc must be in the range of 0 to 255");
          xConfirmPara(m_nnPostFilterSEICharacteristicsPurpose[i] > 1023, "SEINNPFCPurpose must be in the range of 0 to 1023");
          xConfirmPara(m_nnPostFilterSEICharacteristicsNumberInputDecodedPicturesMinus1[i] > 63, "SEINNPFCNumberInputDecodedPicturesMinus1 must be in the range of 0 to 63");
          xConfirmPara(m_nnPostFilterSEICharacteristicsInpTensorBitDepthLumaMinus8[i] > 24, "SEINNPFCInpTensorBitDepthLumaMinus8 must be in the range of 0 to 24");
          xConfirmPara(m_nnPostFilterSEICharacteristicsInpTensorBitDepthChromaMinus8[i] > 24, "SEINNPFCInpTensorBitDepthChromaMinus8 must be in the range of 0 to 24");
          xConfirmPara(m_nnPostFilterSEICharacteristicsOutTensorBitDepthLumaMinus8[i] > 24, "SEINNPFCOutTensorBitDepthLumaMinus8 must be in the range of 0 to 24");
          xConfirmPara(m_nnPostFilterSEICharacteristicsOutTensorBitDepthChromaMinus8[i] > 24, "SEINNPFCOutTensorBitDepthChromaMinus8 must be in the range of 0 to 24");
          xConfirmPara(m_nnPostFilterSEICharacteristicsInpFormatIdc[i] > 255, "SEINNPFCInpFormatIdc must be in the range of 0 to 255");
          xConfirmPara(m_nnPostFilterSEICharacteristicsInpOrderIdc[i] > 255, "SEINNPFCInpOrderIdc must be in the range of  0 to 255");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsColPrimaries[i] > 255, "m_nnPostFilterSEICharacteristicsColPrimaries must in the range 0 to 255");
          xConfirmPara(m_nnPostFilterSEICharacteristicsTransCharacteristics[i] > 255, "m_nnPostFilterSEICharacteristicsTransCharacteristics must in the range 0 to 255");
          xConfirmPara(m_nnPostFilterSEICharacteristicsMatrixCoeffs[i] > 255, "m_nnPostFilterSEICharacteristicsMatrixCoeffs must in the range 0 to 255");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsOutFormatIdc[i] > 255, "SEINNPFCOutFormatIdc must be in the range of 0 to 255");
          xConfirmPara(m_nnPostFilterSEICharacteristicsOutOrderIdc[i] > 255, "SEINNPFCOutOrderIdc must be in the range of 0 to 255");
    
          if (m_nnPostFilterSEICharacteristicsChromaLocInfoPresentFlag[i])
          {
            xConfirmPara(m_nnPostFilterSEICharacteristicsChromaSampleLocTypeFrame[i] > (uint32_t) Chroma420LocType::UNSPECIFIED,
                         "The value of nnpfc_chroma_sample_loc_type_frame shall be in the range of 0 to 6, inclusive");
          }
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsPatchWidthMinus1[i] > 32766, "SEINNPFCPatchWidthMinus1 must be in the range of 0 to 32766");
          xConfirmPara(m_nnPostFilterSEICharacteristicsPatchHeightMinus1[i] > 32766, "SEINNPFCPatchHeightMinus1 must be in the range of 0 to 32766");
          xConfirmPara(m_nnPostFilterSEICharacteristicsOverlap[i] > 16383, "SEINNPFCOverlap must be in the range of 0 to 16383");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsPaddingType[i] > (1 << 4) - 1, "SEINNPostFilterPaddingType must be in the range of 0 to 2^4-1");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsLog2ParameterBitLengthMinus3[i] > 3, "SEINNPFCLog2ParameterBitLengthMinus3 must be in the range of 0 to 3");
          xConfirmPara(m_nnPostFilterSEICharacteristicsNumParametersIdc[i] > 52, "SEINNPFCNumParametersIdc must be in the range of 0 to 52");
          xConfirmPara(m_nnPostFilterSEICharacteristicsTotalKilobyteSize[i] > (uint32_t) (((uint64_t) 1 << 32) - 2), "SEINNPFCTotalKilobyteSize must be in the range of 0 to 2^32-2");
    
    Chaoyi Lin's avatar
    Chaoyi Lin committed
          xConfirmPara(m_nnPostFilterSEICharacteristicsNumKmacOperationsIdc[i] > (uint32_t) (((uint64_t) 1 << 32) - 2), "SEICharacteristicsNumKmacOperationsIdc must be in the range of 0 to 2^32-2");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsPicWidthNumerator[i] <= 0,
                       "Output picture width numerator cannot be equal to or less than 0");
          xConfirmPara(m_nnPostFilterSEICharacteristicsPicWidthDenominator[i] <= 0,
                       "Output picture width denominator cannot be equal to or less than 0");
          xConfirmPara(m_nnPostFilterSEICharacteristicsPicHeightNumerator[i] <= 0,
                       "Output picture height numerator cannot be equal to or less than 0");
          xConfirmPara(m_nnPostFilterSEICharacteristicsPicHeightDenominator[i] <= 0,
                       "Output picture height denominator cannot be equal to or less than 0");
    
          xConfirmPara(m_nnPostFilterSEICharacteristicsLumaPadding[i] > ((1 << m_inputBitDepth[ChannelType::LUMA]) - 1), "SEINNPFCLumaPadding must be in the range of 0 to 2^bitDepthLuma - 1");
          xConfirmPara(m_nnPostFilterSEICharacteristicsCbPadding[i] > ((1 << m_inputBitDepth[ChannelType::CHROMA]) - 1), "SEINNPFCLumaPadding must be in the range of 0 to 2^bitDepthChroma - 1");
          xConfirmPara(m_nnPostFilterSEICharacteristicsCrPadding[i] > ((1 << m_inputBitDepth[ChannelType::CHROMA]) - 1), "SEINNPFCLumaPadding must be in the range of 0 to 2^bitDepthChroma - 1");
    
        }
      }
    
      if (m_nnPostFilterSEIActivationEnabled)
      {
    
        xConfirmPara(m_nnPostFilterSEIActivationTargetId > MAX_NNPFA_ID, "SEINNPostFilterActivationTargetId must be in the range of 0 to 2^32-2");
    
      if (m_phaseIndicationSEIEnabledFullResolution)
      {
        xConfirmPara(m_piHorPhaseNumFullResolution < 0, "m_piHorPhaseNumFullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseDenMinus1FullResolution < 0, "m_piHorPhaseDenMinus1FullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseNumFullResolution < 0, "m_piVerPhaseNumFullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseDenMinus1FullResolution < 0, "m_piVerPhaseDenMinus1FullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseDenMinus1FullResolution > 511, "m_piHorPhaseDenMinus1FullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseNumFullResolution > m_piHorPhaseDenMinus1FullResolution + 1, "m_piHorPhaseNumFullResolution must be in the range of 0 to m_piHorPhaseDenMinus1FullResolution + 1, inclusive");
        xConfirmPara(m_piVerPhaseDenMinus1FullResolution > 511, "m_piVerPhaseDenMinus1FullResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseNumFullResolution > m_piVerPhaseDenMinus1FullResolution + 1, "m_piVerPhaseNumFullResolution must be in the range of 0 to m_piVerPhaseDenMinus1FullResolution + 1, inclusive");
      }
      if (m_phaseIndicationSEIEnabledReducedResolution)
      {
        xConfirmPara(m_piHorPhaseNumReducedResolution < 0, "m_piHorPhaseNumReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseDenMinus1ReducedResolution < 0, "m_piHorPhaseDenMinus1ReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseNumReducedResolution < 0, "m_piVerPhaseNumReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseDenMinus1ReducedResolution < 0, "m_piVerPhaseDenMinus1ReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseDenMinus1ReducedResolution > 511, "m_piHorPhaseDenMinus1ReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piHorPhaseNumReducedResolution > m_piHorPhaseDenMinus1ReducedResolution + 1, "m_piHorPhaseNumReducedResolution must be in the range of 0 to m_piHorPhaseDenMinus1ReducedResolution + 1, inclusive");
        xConfirmPara(m_piVerPhaseDenMinus1ReducedResolution > 511, "m_piVerPhaseDenMinus1ReducedResolution must be in the range of 0 to 511, inclusive");
        xConfirmPara(m_piVerPhaseNumReducedResolution > m_piVerPhaseDenMinus1ReducedResolution + 1, "m_piVerPhaseNumReducedResolution must be in the range of 0 to m_piVerPhaseDenMinus1ReducedResolution + 1, inclusive");
      }
    
    
      xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2");
    
    Frank Bossen's avatar
    Frank Bossen committed
      xConfirmPara(m_log2ParallelMergeLevel > m_ctuSize, "Log2ParallelMergeLevel should be less than or equal to CTU size");
    
      xConfirmPara(m_preferredTransferCharacteristics > 255, "transfer_characteristics_idc should not be greater than 255.");
    
      xConfirmPara( unsigned(m_ImvMode) > 1, "ImvMode exceeds range (0 to 1)" );
    
      if (m_AffineAmvr)
      {
        xConfirmPara(!m_ImvMode, "AffineAmvr cannot be used when IMV is disabled.");
      }
    
      xConfirmPara( m_decodeBitstreams[0] == m_bitstreamFileName, "Debug bitstream and the output bitstream cannot be equal.\n" );
      xConfirmPara( m_decodeBitstreams[1] == m_bitstreamFileName, "Decode2 bitstream and the output bitstream cannot be equal.\n" );
      xConfirmPara(unsigned(m_LMChroma) > 1, "LMMode exceeds range (0 to 1)");
    
      if (m_gopBasedTemporalFilterEnabled)
      {
        xConfirmPara(m_temporalSubsampleRatio != 1, "GOP Based Temporal Filter only support Temporal sub-sample ratio 1");
    
        xConfirmPara(
          m_gopBasedTemporalFilterPastRefs <= 0 && m_gopBasedTemporalFilterFutureRefs <= 0,
          "Either TemporalFilterPastRefs or TemporalFilterFutureRefs must be larger than 0 when TemporalFilter is enabled");
    
        if ((m_gopBasedTemporalFilterPastRefs != 0 && m_gopBasedTemporalFilterPastRefs != TF_DEFAULT_REFS)
            || (m_gopBasedTemporalFilterFutureRefs != 0 && m_gopBasedTemporalFilterFutureRefs != TF_DEFAULT_REFS))
        {
          msg(WARNING, "Number of frames used for temporal prefilter is different from default.\n");
        }
    
      if (m_bimEnabled)
      {
        xConfirmPara(m_temporalSubsampleRatio != 1, "Block Importance Mapping only support Temporal sub-sample ratio 1");
        xConfirmPara(
          m_gopBasedTemporalFilterPastRefs <= 0 && m_gopBasedTemporalFilterFutureRefs <= 0,
          "Either TemporalFilterPastRefs or TemporalFilterFutureRefs must be larger than 0 when Block Importance Mapping is enabled" );
    
    #if EXTENSION_360_VIDEO
      check_failed |= m_ext360.verifyParameters();
    #endif
    
    
      xConfirmPara(m_useColorTrans && (m_log2MaxTbSize == 6), "Log2MaxTbSize must be less than 6 when ACT is enabled, otherwise ACT needs to be disabled");
    
    Frank Bossen's avatar
    Frank Bossen committed
      xConfirmPara(m_ctuSize <= 32 && (m_log2MaxTbSize == 6), "Log2MaxTbSize must be less than 6 when CTU size is 32");
    
    #undef xConfirmPara
      return check_failed;
    }
    
    const char *profileToString(const Profile::Name profile)
    {
      static const uint32_t numberOfProfiles = sizeof(strToProfile)/sizeof(*strToProfile);
    
      for (uint32_t profileIndex = 0; profileIndex < numberOfProfiles; profileIndex++)
      {
        if (strToProfile[profileIndex].value == profile)
        {
          return strToProfile[profileIndex].str;
        }
      }
    
      //if we get here, we didn't find this profile in the list - so there is an error
      EXIT( "ERROR: Unknown profile \"" << profile << "\" in profileToString" );
      return "";
    }
    
    void EncAppCfg::xPrintParameter()
    {
      //msg( DETAILS, "\n" );
      msg( DETAILS, "Input          File                    : %s\n", m_inputFileName.c_str() );
      msg( DETAILS, "Bitstream      File                    : %s\n", m_bitstreamFileName.c_str() );
      msg( DETAILS, "Reconstruction File                    : %s\n", m_reconFileName.c_str() );
    
      if (m_ShutterFilterEnable && !m_shutterIntervalPreFileName.empty())
      {
        msg(DETAILS,"SII Pre-processed File                 : %s\n", m_shutterIntervalPreFileName.c_str());
      }
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(DETAILS, "Real     Format                        : %dx%d %gHz\n", m_sourceWidth - m_confWinLeft - m_confWinRight,
    
          m_sourceHeight - m_confWinTop - m_confWinBottom, m_frameRate.getFloatVal() / m_temporalSubsampleRatio);
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(DETAILS, "Internal Format                        : %dx%d %gHz\n", m_sourceWidth, m_sourceHeight,
    
          m_frameRate.getFloatVal() / m_temporalSubsampleRatio);
    
      msg( DETAILS, "Sequence PSNR output                   : %s\n", ( m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only" ) );
    
      msg( DETAILS, "Hexadecimal PSNR output                : %s\n", ( m_printHexPsnr ? "Enabled" : "Disabled" ) );
    
      msg( DETAILS, "Sequence MSE output                    : %s\n", ( m_printSequenceMSE ? "Enabled" : "Disabled" ) );
      msg( DETAILS, "Frame MSE output                       : %s\n", ( m_printFrameMSE ? "Enabled" : "Disabled" ) );
    
    Xiang Li's avatar
    Xiang Li committed
      msg( DETAILS, "MS-SSIM output                         : %s\n", ( m_printMSSSIM ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "Cabac-zero-word-padding                : %s\n", ( m_cabacZeroWordPaddingEnabled ? "Enabled" : "Disabled" ) );
      if (m_isField)
      {
        msg( DETAILS, "Frame/Field                            : Field based coding\n" );
    
    Frank Bossen's avatar
    Frank Bossen committed
        msg(DETAILS, "Field index                            : %u - %d (%d fields)\n", m_frameSkip,
            m_frameSkip + m_framesToBeEncoded - 1, m_framesToBeEncoded);
    
        msg( DETAILS, "Field Order                            : %s field first\n", m_isTopFieldFirst ? "Top" : "Bottom" );
    
      }
      else
      {
        msg( DETAILS, "Frame/Field                            : Frame based coding\n" );
    
    Frank Bossen's avatar
    Frank Bossen committed
        msg(DETAILS, "Frame index                            : %u - %d (%d frames)\n", m_frameSkip,
            m_frameSkip + m_framesToBeEncoded - 1, m_framesToBeEncoded);
    
      }
      {
        msg( DETAILS, "Profile                                : %s\n", profileToString(m_profile) );
      }
    
      msg( DETAILS,"AllRapPicturesFlag                     : %d\n", m_allRapPicturesFlag );
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(DETAILS, "CTU size / min CU size                 : %d / %d \n", m_maxCuWidth, 1 << m_log2MinCuSize);
    
      msg(DETAILS, "subpicture info present flag           : %s\n", m_subPicInfoPresentFlag ? "Enabled" : "Disabled");
    
        msg(DETAILS, "number of subpictures                  : %d\n", m_numSubPics);
        msg(DETAILS, "subpicture size same flag              : %d\n", m_subPicSameSizeFlag);
    
    Mitsuru Katsumata's avatar
    Mitsuru Katsumata committed
        if (m_subPicSameSizeFlag)
    
          msg(DETAILS, "[0]th subpicture size                  : [%d %d]\n", m_subPicWidth[0], m_subPicHeight[0]);
    
    Mitsuru Katsumata's avatar
    Mitsuru Katsumata committed
        for (int i = 0; i < m_numSubPics; i++)
        {
          if (!m_subPicSameSizeFlag)
          {
    
            msg(DETAILS, "[%d]th subpicture location              : [%d %d]\n", i, m_subPicCtuTopLeftX[i],
                m_subPicCtuTopLeftY[i]);
            msg(DETAILS, "[%d]th subpicture size                  : [%d %d]\n", i, m_subPicWidth[i], m_subPicHeight[i]);
    
    Mitsuru Katsumata's avatar
    Mitsuru Katsumata committed
          }
    
          msg(DETAILS, "[%d]th subpicture treated as picture    : %d\n", i,
              m_subPicTreatedAsPicFlag[i] ? "Enabled" : "Disabled");
          msg(DETAILS, "loop filter across [%d]th subpicture    : %d\n", i,
              m_loopFilterAcrossSubpicEnabledFlag[i] ? "Enabled" : "Disabled");
    
    Mitsuru Katsumata's avatar
    Mitsuru Katsumata committed
        }
    
      msg(DETAILS, "subpicture ID present flag             : %s\n",
          m_subPicIdMappingExplicitlySignalledFlag ? "Enabled" : "Disabled");
    
      if (m_subPicIdMappingExplicitlySignalledFlag)
    
        msg(DETAILS, "subpicture ID signalling present flag  : %d\n", m_subPicIdMappingInSpsFlag);
    
        for (int i = 0; i < m_numSubPics; i++)
    
          msg(DETAILS, "[%d]th subpictures ID length           : %d\n", i, m_subPicIdLen);
          msg(DETAILS, "[%d]th subpictures ID                  : %d\n", i, m_subPicId[i]);
    
      msg( DETAILS, "Max TB size                            : %d \n", 1 << m_log2MaxTbSize );
    
      msg( DETAILS, "Motion search range                    : %d\n", m_iSearchRange );
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(DETAILS, "Intra period                           : %d\n", m_intraPeriod);
      msg(DETAILS, "Decoding refresh type                  : %d\n", m_intraRefreshType);
    
      msg( DETAILS, "DRAP period                            : %d\n", m_drapPeriod );
    
      msg( DETAILS, "EDRAP period                           : %d\n", m_edrapPeriod );
    
      if (m_qpIncrementAtSourceFrame.has_value())
    
        msg(DETAILS, "QP                                     : %d (incrementing internal QP at source frame %d)\n", m_iQP,
            m_qpIncrementAtSourceFrame.value());
    
      msg( DETAILS, "Max dQP signaling subdiv               : %d\n", m_cuQpDeltaSubdiv);
    
    
      msg( DETAILS, "Cb QP Offset (dual tree)               : %d (%d)\n", m_cbQpOffset, m_cbQpOffsetDualTree);
      msg( DETAILS, "Cr QP Offset (dual tree)               : %d (%d)\n", m_crQpOffset, m_crQpOffsetDualTree);
      msg( DETAILS, "QP adaptation                          : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(DETAILS, "GOP size                               : %d\n", m_gopSize);
    
      msg(DETAILS, "Input bit depth                        : (Y:%d, C:%d)\n", m_inputBitDepth[ChannelType::LUMA],
          m_inputBitDepth[ChannelType::CHROMA]);
      msg(DETAILS, "MSB-extended bit depth                 : (Y:%d, C:%d)\n", m_msbExtendedBitDepth[ChannelType::LUMA],
          m_msbExtendedBitDepth[ChannelType::CHROMA]);
      msg(DETAILS, "Internal bit depth                     : (Y:%d, C:%d)\n", m_internalBitDepth[ChannelType::LUMA],
          m_internalBitDepth[ChannelType::CHROMA]);
    
      if (m_cuChromaQpOffsetList.size() > 0)
      {
        msg( DETAILS, "Chroma QP offset list                  : (" );
        for (int i=0; i < m_cuChromaQpOffsetList.size(); i++)
        {
    
    Frank Bossen's avatar
    Frank Bossen committed
          msg(DETAILS, "%d %d %d%s", m_cuChromaQpOffsetList[i].u.comp.cbOffset, m_cuChromaQpOffsetList[i].u.comp.crOffset,
              m_cuChromaQpOffsetList[i].u.comp.jointCbCrOffset, (i + 1 < m_cuChromaQpOffsetList.size() ? ", " : ")\n"));
    
        }
        msg( DETAILS, "cu_chroma_qp_offset_subdiv             : %d\n", m_cuChromaQpOffsetSubdiv);
    
        msg( DETAILS, "cu_chroma_qp_offset_enabled_flag       : %s\n", (m_cuChromaQpOffsetEnabled ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "extended_precision_processing_flag     : %s\n", (m_extendedPrecisionProcessingFlag         ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "TSRC_Rice_present_flag                 : %s\n", (m_tsrcRicePresentFlag                     ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "reverse_last_sig_coeff_enabled_flag    : %s\n", (m_reverseLastSigCoeffEnabledFlag          ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "transform_skip_rotation_enabled_flag   : %s\n", (m_transformSkipRotationEnabledFlag        ? "Enabled" : "Disabled") );
      msg( DETAILS, "transform_skip_context_enabled_flag    : %s\n", (m_transformSkipContextEnabledFlag         ? "Enabled" : "Disabled") );
      msg( DETAILS, "high_precision_offsets_enabled_flag    : %s\n", (m_highPrecisionOffsetsEnabledFlag         ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "rrc_rice_extension_flag                : %s\n", (m_rrcRiceExtensionEnableFlag                 ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "persistent_rice_adaptation_enabled_flag: %s\n", (m_persistentRiceAdaptationEnabledFlag     ? "Enabled" : "Disabled") );
      msg( DETAILS, "cabac_bypass_alignment_enabled_flag    : %s\n", (m_cabacBypassAlignmentEnabledFlag         ? "Enabled" : "Disabled") );
    
      switch (m_costMode)
      {
        case COST_STANDARD_LOSSY:               msg( DETAILS, "Cost function:                         : Lossy coding (default)\n"); break;
        case COST_SEQUENCE_LEVEL_LOSSLESS:      msg( DETAILS, "Cost function:                         : Sequence_level_lossless coding\n"); break;
        case COST_LOSSLESS_CODING:              msg( DETAILS, "Cost function:                         : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break;
        case COST_MIXED_LOSSLESS_LOSSY_CODING:  msg( DETAILS, "Cost function:                         : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break;
        default:                                msg( DETAILS, "Cost function:                         : Unknown\n"); break;
      }
    
    
      msg(DETAILS, "RateControl                            : %d\n", m_rcEnableRateControl);
    
      msg( DETAILS, "WeightedPredMethod                     : %d\n", int(m_weightedPredictionMethod));
    
      if (m_rcEnableRateControl)
    
        msg(DETAILS, "TargetBitrate                          : %d\n", m_rcTargetBitrate);
        msg(DETAILS, "KeepHierarchicalBit                    : %d\n", m_rcKeepHierarchicalBit);
        msg(DETAILS, "LCULevelRC                             : %d\n", m_rcCtuLevelRateControl);
        msg(DETAILS, "UseLCUSeparateModel                    : %d\n", m_rcUseCtuSeparateModel);
        msg(DETAILS, "InitialQP                              : %d\n", m_rcInitialQp);
        msg(DETAILS, "ForceIntraQP                           : %d\n", m_rcForceIntraQp);
    
        msg(DETAILS, "CpbSaturation                          : %d\n", m_rcCpbSaturationEnabled);
        if (m_rcCpbSaturationEnabled)
    
          msg(DETAILS, "CpbSize                                : %d\n", m_rcCpbSize);
          msg(DETAILS, "InitalCpbFullness                      : %.2f\n", m_rcInitialCpbFullness);
    
    #if GDR_ENABLED
      msg(DETAILS, "GDREnabled                             : %d\n", m_gdrEnabled);
    
      if (m_gdrEnabled)
      {
        msg(DETAILS, "GDR Start                              : %d\n", m_gdrPocStart);
        msg(DETAILS, "GDR Interval                           : %d\n", m_gdrInterval);
        msg(DETAILS, "GDR Period                             : %d\n", m_gdrPeriod);
      }
    #endif
    
    
      msg( DETAILS, "Max Num Merge Candidates               : %d\n", m_maxNumMergeCand );
    
      msg( DETAILS, "Max Num Affine Merge Candidates        : %d\n", m_maxNumAffineMergeCand );
    
      msg( DETAILS, "Max Num Geo Merge Candidates           : %d\n", m_maxNumGeoCand );
    
    Yan Zhang's avatar
    Yan Zhang committed
      msg( DETAILS, "Max Num IBC Merge Candidates           : %d\n", m_maxNumIBCMergeCand );
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(VERBOSE, "IBD:%d ",
    
          ((m_internalBitDepth[ChannelType::LUMA] > m_msbExtendedBitDepth[ChannelType::LUMA])
           || (m_internalBitDepth[ChannelType::CHROMA] > m_msbExtendedBitDepth[ChannelType::CHROMA])));
    
      msg( VERBOSE, "HAD:%d ", m_bUseHADME                          );
      msg( VERBOSE, "RDQ:%d ", m_useRDOQ                            );
      msg( VERBOSE, "RDQTS:%d ", m_useRDOQTS                        );
      msg( VERBOSE, "RDpenalty:%d ", m_rdPenalty                    );
    #if SHARP_LUMA_DELTA_QP
      msg( VERBOSE, "LQP:%d ", m_lumaLevelToDeltaQPMapping.mode     );
    #endif
      msg( VERBOSE, "SQP:%d ", m_uiDeltaQpRD                        );
      msg( VERBOSE, "ASR:%d ", m_bUseASR                            );
      msg( VERBOSE, "MinSearchWindow:%d ", m_minSearchWindow        );
      msg( VERBOSE, "RestrictMESampling:%d ", m_bRestrictMESampling );
      msg( VERBOSE, "FEN:%d ", int(m_fastInterSearchMode)           );
      msg( VERBOSE, "ECU:%d ", m_bUseEarlyCU                        );
      msg( VERBOSE, "FDM:%d ", m_useFastDecisionForMerge            );
      msg( VERBOSE, "ESD:%d ", m_useEarlySkipDetection              );
      msg( VERBOSE, "TransformSkip:%d ",     m_useTransformSkip     );
      msg( VERBOSE, "TransformSkipFast:%d ", m_useTransformSkipFast );
      msg( VERBOSE, "TransformSkipLog2MaxSize:%d ", m_log2MaxTransformSkipBlockSize);
    
      msg(VERBOSE, "ChromaTS:%d ", m_useChromaTS);
    
      msg( VERBOSE, "BDPCM:%d ", m_useBDPCM                         );
    
      msg( VERBOSE, "Tiles: %dx%d ", m_numTileCols, m_numTileRows );
      msg( VERBOSE, "Slices: %d ", m_numSlicesInPic);
    
      msg( VERBOSE, "MCTS:%d ", m_MCTSEncConstraint );
    
    Frank Bossen's avatar
    Frank Bossen committed
      msg(VERBOSE, "SAO:%d ", (m_useSao) ? (1) : (0));
    
      msg( VERBOSE, "CCALF:%d ", m_ccalf ? 1 : 0 );
    
      msg(VERBOSE, "MaxNumALFAPS %d ", m_maxNumAlfAps);
      msg(VERBOSE, "AlfapsIDShift %d ", m_alfapsIDShift);
    
      msg(VERBOSE, "ConstantJointCbCrSignFlag", m_constantJointCbCrSignFlag);
    
      msg( VERBOSE, "WPP:%d ", (int)m_useWeightedPred);
      msg( VERBOSE, "WPB:%d ", (int)m_useWeightedBiPred);
    
      msg( VERBOSE, "PME:%d ", m_log2ParallelMergeLevel);
    
    Frank Bossen's avatar
    Frank Bossen committed
      const int wavefrontSubstreams =
        m_entropyCodingSyncEnabledFlag ? (m_sourceHeight + m_maxCuHeight - 1) / m_maxCuHeight : 1;
      msg(VERBOSE, " WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_entropyCodingSyncEnabledFlag ? 1 : 0,
          wavefrontSubstreams);
    
      msg( VERBOSE, " ScalingList:%d ", m_useScalingListId );
    
      msg( VERBOSE, "TMVPMode:%d ", m_TMVPModeId );
    
      msg( VERBOSE, " DQ:%d ", m_depQuantEnabledFlag);
      msg( VERBOSE, " SignBitHidingFlag:%d ", m_signDataHidingEnabledFlag);
      msg( VERBOSE, "RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 );
    
      {
    
        msg( VERBOSE, "\nTOOL CFG: " );
    
        msg( VERBOSE, "LFNST:%d ", m_LFNST );
    
    Seungsoo Jeong's avatar
    Seungsoo Jeong committed
        msg( VERBOSE, "MMVD:%d ", m_MMVD);
    
        msg( VERBOSE, "Affine:%d ", m_Affine );
        if ( m_Affine )
        {
          msg( VERBOSE, "AffineType:%d ", m_AffineType );
    
          msg( VERBOSE, "AdaptBypassAffineMe:%d ", m_adaptBypassAffineMe);
    
        msg(VERBOSE, "SbTMVP:%d ", m_sbTmvpEnableFlag);
    
    Karsten Suehring's avatar
    Karsten Suehring committed
        msg( VERBOSE, "DualITree:%d ", m_dualTree );
    
        msg( VERBOSE, "BIO:%d ", m_BIO );
    
        msg( VERBOSE, "HorCollocatedChroma:%d ", m_horCollocatedChromaFlag );
        msg( VERBOSE, "VerCollocatedChroma:%d ", m_verCollocatedChromaFlag );
    
    
        {
          std::string s;
          const int   m = m_mtsMode + 4 * m_mtsImplicitIntra;
          if (m != 0)
          {
            s = "(";
            s += (m & 1) != 0 ? "explicit intra" : "implicit intra";
            if (m & 2)
            {
              s += ", explicit inter";
            }
            s += ")";
          }
          msg(VERBOSE, "MTS:%d%s ", m != 0, s.c_str());
        }
    
        msg( VERBOSE, "SBT:%d ", m_SBT );
    
        msg( VERBOSE, "ISP:%d ", m_ISP );
    
        msg( VERBOSE, "SMVD:%d ", m_SMVD );
    
    Tung Nguyen's avatar
    Tung Nguyen committed
        msg( VERBOSE, "CompositeLTReference:%d ", m_compositeRefEnabled);
    
        msg( VERBOSE, "Bcw:%d ", m_bcw );
        msg( VERBOSE, "BcwFast:%d ", m_BcwFast );
    
        msg(VERBOSE, "CIIP:%d ", m_ciip);
    
        msg( VERBOSE, "Geo:%d ", m_Geo );
    
    Seungsoo Jeong's avatar
    Seungsoo Jeong committed
        m_allowDisFracMMVD = m_MMVD ? m_allowDisFracMMVD : false;
        if ( m_MMVD )
          msg(VERBOSE, "AllowDisFracMMVD:%d ", m_allowDisFracMMVD);
    
        msg( VERBOSE, "AffineAmvr:%d ", m_AffineAmvr );
    
        m_AffineAmvrEncOpt = m_AffineAmvr ? m_AffineAmvrEncOpt : false;
        msg( VERBOSE, "AffineAmvrEncOpt:%d ", m_AffineAmvrEncOpt );
    
        msg(VERBOSE, "AffineAmvp:%d ", m_AffineAmvp);
    
        msg(VERBOSE, "DMVR:%d ", m_DMVR);
    
        msg(VERBOSE, "MmvdDisNum:%d ", m_MmvdDisNum);
    
    Frank Bossen's avatar
    Frank Bossen committed
        msg(VERBOSE, "JointCbCr:%d ", m_jointCbCrMode);
    
      m_useColorTrans = m_chromaFormatIdc == ChromaFormat::_444 ? m_useColorTrans : false;
      msg(VERBOSE, "ACT:%d ", m_useColorTrans ? 1 : 0);
      msg(VERBOSE, "PLT:%d ", m_PLTMode);
      msg(VERBOSE, "IBC:%d ", m_IBCMode);
    
      msg( VERBOSE, "HashME:%d ", m_HashME );
    
      msg( VERBOSE, "WrapAround:%d ", m_wrapAround);
      if( m_wrapAround )
    
    Philippe Hanhart's avatar
    Philippe Hanhart committed
      {
    
        msg( VERBOSE, "WrapAroundOffset:%d ", m_wrapAroundOffset );
    
    Philippe Hanhart's avatar
    Philippe Hanhart committed
      }
    
      // ADD_NEW_TOOL (add some output indicating the usage of tools)
    
      msg( VERBOSE, "VirtualBoundariesEnabledFlag:%d ", m_virtualBoundariesEnabledFlag );
      msg( VERBOSE, "VirtualBoundariesPresentInSPSFlag:%d ", m_virtualBoundariesPresentFlag );
      if( m_virtualBoundariesPresentFlag )
      {
    
        msg(VERBOSE, "vertical virtual boundaries:[");
        for (unsigned i = 0; i < m_numVerVirtualBoundaries; i++)
        {
          msg(VERBOSE, " %d", m_virtualBoundariesPosX[i]);
        }
        msg(VERBOSE, " ] horizontal virtual boundaries:[");
        for (unsigned i = 0; i < m_numHorVirtualBoundaries; i++)
        {
          msg(VERBOSE, " %d", m_virtualBoundariesPosY[i]);
        }
        msg(VERBOSE, " ] ");
      }
    
        msg(VERBOSE, "Reshape:%d ", m_lmcsEnabled);
        if (m_lmcsEnabled)
    
          msg(VERBOSE, "(Signal:%s ", m_reshapeSignalType == 0 ? "SDR" : (m_reshapeSignalType == 2 ? "HDR-HLG" : "HDR-PQ"));
          msg(VERBOSE, "Opt:%d", m_adpOption);
          if (m_adpOption > 0) { msg(VERBOSE, " CW:%d", m_initialCW); }
    
          msg(VERBOSE, " CSoffset:%d", m_CSoffset);
    
    Taoran Lu's avatar
    Taoran Lu committed
          msg(VERBOSE, ") ");
        }
    
        msg(VERBOSE, "MRL:%d ", m_MRL);
    
        msg(VERBOSE, "MIP:%d ", m_MIP);
    
    Nan Hu's avatar
    Nan Hu committed
        msg(VERBOSE, "EncDbOpt:%d ", m_encDbOpt);
    
      msg( VERBOSE, "LCTUFast:%d ", m_useFastLCTU );
    
      msg( VERBOSE, "FastMrg:%d ", m_useFastMrg );
    
      msg( VERBOSE, "MaxMergeRdCandNumTotal:%d MergeRdCandQuotaRegular:%d MergeRdCandQuotaRegularSmallBlk:%d ", 
        m_maxMergeRdCandNumTotal, m_mergeRdCandQuotaRegular, m_mergeRdCandQuotaRegularSmallBlk);
      msg( VERBOSE, "MergeRdCandQuotaSubBlk:%d MergeRdCandQuotaCiip:%d MergeRdCandQuotaGpm:%d ",
        m_mergeRdCandQuotaSubBlk, m_mergeRdCandQuotaCiip, m_mergeRdCandQuotaGpm);
    
      msg( VERBOSE, "PBIntraFast:%d ", m_usePbIntraFast );
    
      if( m_ImvMode ) msg( VERBOSE, "IMV4PelFast:%d ", m_Imv4PelFast );
    
      if (m_mtsMode)
      {
        msg(VERBOSE, "MTSMaxCand: %1d(intra) %1d(inter) ", m_MTSIntraMaxCand, m_MTSInterMaxCand);
      }
    
      if( m_ISP ) msg( VERBOSE, "ISPFast:%d ", m_useFastISP );
    
      if( m_LFNST ) msg( VERBOSE, "FastLFNST:%d ", m_useFastLFNST );
    
    Karsten Suehring's avatar
    Karsten Suehring committed
      msg( VERBOSE, "AMaxBT:%d ", m_useAMaxBT );
      msg( VERBOSE, "E0023FastEnc:%d ", m_e0023FastEnc );
      msg( VERBOSE, "ContentBasedFastQtbt:%d ", m_contentBasedFastQtbt );
    
      msg( VERBOSE, "UseNonLinearAlfLuma:%d ", m_useNonLinearAlfLuma );
      msg( VERBOSE, "UseNonLinearAlfChroma:%d ", m_useNonLinearAlfChroma );
      msg( VERBOSE, "MaxNumAlfAlternativesChroma:%d ", m_maxNumAlfAlternativesChroma );
    
      if( m_MIP ) msg(VERBOSE, "FastMIP:%d ", m_useFastMIP);
    
      msg( VERBOSE, "TTFastSkip:%d ", m_ttFastSkip);
      msg( VERBOSE, "TTFastSkipThr:%.3f ", m_ttFastSkipThr);
    
      msg( VERBOSE, "FastLocalDualTree:%d ", m_fastLocalDualTreeMode );
    
        if (m_gopBasedRPREnabledFlag || m_rprFunctionalityTestingEnabledFlag)
    
          msg(VERBOSE, "RPR:(%1.2lfx, %1.2lfx)|%d ", m_scalingRatioHor, m_scalingRatioVer, m_rprFunctionalityTestingEnabledFlag ? m_rprSwitchingSegmentSize : m_gopSize);
          msg(VERBOSE, "RPR2:(%1.2lfx, %1.2lfx)|%d ", m_scalingRatioHor2, m_scalingRatioVer2, m_rprFunctionalityTestingEnabledFlag ? m_rprSwitchingSegmentSize : m_gopSize);
          msg(VERBOSE, "RPR3:(%1.2lfx, %1.2lfx)|%d ", m_scalingRatioHor3, m_scalingRatioVer3, m_rprFunctionalityTestingEnabledFlag ? m_rprSwitchingSegmentSize : m_gopSize);
    
        else
        {
          msg(VERBOSE, "RPR:(%1.2lfx, %1.2lfx)|%d ", m_scalingRatioHor, m_scalingRatioVer, m_switchPocPeriod);
        }
    
      if (m_rplOfDepLayerInSh)
      {
        msg(VERBOSE, "RPLofDepLayerInSH:%d ", m_rplOfDepLayerInSh);
      }
    
      msg(VERBOSE, "TemporalFilter:%d/%d ", m_gopBasedTemporalFilterPastRefs, m_gopBasedTemporalFilterFutureRefs);
    
      msg(VERBOSE, "SEI CTI:%d ", m_ctiSEIEnabled);
    
      msg(VERBOSE, "BIM:%d ", m_bimEnabled);
    
      msg(VERBOSE, "SEI FGC:%d ", m_fgcSEIEnabled);
    
    
      msg(VERBOSE, "SEI processing Order:%d ", m_poSEIEnabled);
    
    
    #if EXTENSION_360_VIDEO
      m_ext360.outputConfigurationSummary();
    #endif
    
    
      if( m_constrainedRaslEncoding )
      {
        msg(VERBOSE, "\n\nWarning: with SEIConstrainedRASL enabled, LMChroma estimation is skipped in RASL frames" );
    
        if( m_wrapAround )
        {
          msg(VERBOSE,   "\n         and wrap-around motion compensation is disabled in RASL frames" );
        }
    
    Frank Bossen's avatar
    Frank Bossen committed
      for (unsigned int i = 0; i < m_gopSize; i++)
    
    #if GREEN_METADATA_SEI_ENABLED
    
    bool EncAppCfg::getGMFAUsage() {
      return m_GMFA;
    }
    
    std::string EncAppCfg::getGMFAFile (){
      return m_GMFAFile;
    }
    
    #endif
    
    
    Frank Bossen's avatar
    Frank Bossen committed
      for (unsigned int i = 0; i < m_gopSize; i++)
    
      {
        for ( unsigned int j = 0; j < m_GOPList[i].m_numRefPics0; j++)
        {
          if ( m_GOPList[i].m_deltaRefPics0[j] < 0 )
          {
            return true;
          }
        }
        for ( unsigned int j = 0; j < m_GOPList[i].m_numRefPics1; j++)
        {
          if ( m_GOPList[i].m_deltaRefPics1[j] < 0 )
          {
            return true;
          }
        }
      }
      return false;
    }
    
    
    
    bool confirmPara(bool bflag, const char* message)
    {
      if (!bflag)
      {
        return false;
      }
    
      msg( ERROR, "Error: %s\n",message);
      return true;
    }