Skip to content
Snippets Groups Projects
EncAppCfg.cpp 202 KiB
Newer Older
  • Learn to ignore specific revisions
  •       rextSubProfile=enumToString(strToExtendedProfile, sizeof(strToExtendedProfile)/sizeof(*strToExtendedProfile), validProfileName);
        }
        if (rextSubProfile == "main_444_16")
        {
          rextSubProfile="main_444_16 [NON STANDARD]";
        }
        msg( DETAILS, "Profile                                : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() );
      }
      else
      {
        msg( DETAILS, "Profile                                : %s\n", profileToString(m_profile) );
      }
      msg( DETAILS, "CU size / depth / total-depth          : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxCodingDepth );
    
    #if MAX_TB_SIZE_SIGNALLING
      msg( DETAILS, "Max TB size                            : %d \n", 1 << m_log2MaxTbSize );
    #endif
    
      msg( DETAILS, "Min PCM size                           : %d\n", 1 << m_uiPCMLog2MinSize);
      msg( DETAILS, "Motion search range                    : %d\n", m_iSearchRange );
      msg( DETAILS, "Intra period                           : %d\n", m_iIntraPeriod );
      msg( DETAILS, "Decoding refresh type                  : %d\n", m_iDecodingRefreshType );
    #if QP_SWITCHING_FOR_PARALLEL
      if (m_qpIncrementAtSourceFrame.bPresent)
      {
        msg( DETAILS, "QP                                     : %d (incrementing internal QP at source frame %d)\n", m_iQP, m_qpIncrementAtSourceFrame.value);
      }
      else
      {
        msg( DETAILS, "QP                                     : %d\n", m_iQP);
      }
    #else
      msg( DETAILS, "QP                                     : %5.2f\n", m_fQP );
    #endif
    
      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) );
      msg( DETAILS, "GOP size                               : %d\n", m_iGOPSize );
      msg( DETAILS, "Input bit depth                        : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
      msg( DETAILS, "MSB-extended bit depth                 : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] );
      msg( DETAILS, "Internal bit depth                     : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
      msg( DETAILS, "PCM sample bit depth                   : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA],
                                                                        m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
      msg( DETAILS, "Intra reference smoothing              : %s\n", (m_enableIntraReferenceSmoothing           ? "Enabled" : "Disabled") );
    
      msg( DETAILS, "cu_chroma_qp_offset_subdiv             : %d\n", m_cuChromaQpOffsetSubdiv);
    
      msg( DETAILS, "extended_precision_processing_flag     : %s\n", (m_extendedPrecisionProcessingFlag         ? "Enabled" : "Disabled") );
      msg( DETAILS, "implicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") );
      msg( DETAILS, "explicit_rdpcm_enabled_flag            : %s\n", (m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT] ? "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, "cross_component_prediction_enabled_flag: %s\n", (m_crossComponentPredictionEnabledFlag     ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") );
      msg( DETAILS, "high_precision_offsets_enabled_flag    : %s\n", (m_highPrecisionOffsetsEnabledFlag         ? "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") );
      if (m_bUseSAO)
      {
        msg( DETAILS, "log2_sao_offset_scale_luma             : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] );
        msg( DETAILS, "log2_sao_offset_scale_chroma           : %d\n", m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] );
      }
    
      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, "WPMethod                               : %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_RCLCULevelRC );
        msg( DETAILS, "UseLCUSeparateModel                    : %d\n", m_RCUseLCUSeparateModel );
        msg( DETAILS, "InitialQP                              : %d\n", m_RCInitialQP );
        msg( DETAILS, "ForceIntraQP                           : %d\n", m_RCForceIntraQP );
    #if U0132_TARGET_BITS_SATURATION
        msg( DETAILS, "CpbSaturation                          : %d\n", m_RCCpbSaturationEnabled );
        if (m_RCCpbSaturationEnabled)
        {
          msg( DETAILS, "CpbSize                                : %d\n", m_RCCpbSize);
          msg( DETAILS, "InitalCpbFullness                      : %.2f\n", m_RCInitialCpbFullness);
        }
    #endif
      }
    
      msg( DETAILS, "Max Num Merge Candidates               : %d\n", m_maxNumMergeCand );
    
      msg( DETAILS, "Max Num Affine Merge Candidates        : %d\n", m_maxNumAffineMergeCand );
    
    #if JVET_N0400_SIGNAL_TRIANGLE_CAND_NUM
      msg( DETAILS, "Max Num Triangle Merge Candidates      : %d\n", m_maxNumTriangleCand );
    #endif
    
      msg( DETAILS, "\n");
    
      msg( VERBOSE, "TOOL CFG: ");
      msg( VERBOSE, "IBD:%d ", ((m_internalBitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (m_internalBitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_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, "CFM:%d ", m_bUseCbfFastMode                    );
      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, "Slice: M=%d ", int(m_sliceMode));
      if (m_sliceMode!=NO_SLICES)
      {
        msg( VERBOSE, "A=%d ", m_sliceArgument);
      }
    #if HEVC_DEPENDENT_SLICES
      msg( VERBOSE, "SliceSegment: M=%d ",m_sliceSegmentMode);
      if (m_sliceSegmentMode!=NO_SLICES)
      {
        msg( VERBOSE, "A=%d ", m_sliceSegmentArgument);
      }
    
    Valeri George's avatar
    Valeri George committed
    #endif
      msg( VERBOSE, "Tiles:%dx%d ", m_numTileColumnsMinus1 + 1, m_numTileRowsMinus1 + 1 );
    
      msg( VERBOSE, "MCTS:%d ", m_MCTSEncConstraint );
    
      msg( VERBOSE, "CIP:%d ", m_bUseConstrainedIntraPred);
      msg( VERBOSE, "SAO:%d ", (m_bUseSAO)?(1):(0));
      msg( VERBOSE, "ALF:%d ", m_alf ? 1 : 0 );
      msg( VERBOSE, "PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
    
      if (m_TransquantBypassEnabledFlag && m_CUTransquantBypassFlagForce)
      {
        msg( VERBOSE, "TransQuantBypassEnabled: =1");
      }
      else
      {
        msg( VERBOSE, "TransQuantBypassEnabled:%d ", (m_TransquantBypassEnabledFlag)? 1:0 );
      }
    
      msg( VERBOSE, "WPP:%d ", (int)m_useWeightedPred);
      msg( VERBOSE, "WPB:%d ", (int)m_useWeightedBiPred);
      msg( VERBOSE, "PME:%d ", m_log2ParallelMergeLevel);
      const int iWaveFrontSubstreams = m_entropyCodingSyncEnabledFlag ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
      msg( VERBOSE, " WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_entropyCodingSyncEnabledFlag?1:0, iWaveFrontSubstreams);
    #if HEVC_USE_SCALING_LISTS
      msg( VERBOSE, " ScalingList:%d ", m_useScalingListId );
    #endif
      msg( VERBOSE, "TMVPMode:%d ", m_TMVPModeId     );
    
      msg( VERBOSE, " DQ:%d ", m_depQuantEnabledFlag);
    #if HEVC_USE_SIGN_HIDING
      msg( VERBOSE, " SignBitHidingFlag:%d ", m_signDataHidingEnabledFlag);
    #endif
      msg( VERBOSE, "RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 );
    
      if( m_profile == Profile::NEXT )
      {
        msg( VERBOSE, "\nNEXT TOOL CFG: " );
    
    #if JVET_N0193_LFNST
        msg( VERBOSE, "LFNST:%d ", m_LFNST );
    #endif
    
    Seungsoo Jeong's avatar
    Seungsoo Jeong committed
    #if JVET_N0127_MMVD_SPS_FLAG 
        msg( VERBOSE, "MMVD:%d ", m_MMVD);
    #endif
    
        msg( VERBOSE, "Affine:%d ", m_Affine );
        if ( m_Affine )
        {
          msg( VERBOSE, "AffineType:%d ", m_AffineType );
        }
        msg(VERBOSE, "SubPuMvp:%d+%d ", m_SubPuMvpMode & 1, (m_SubPuMvpMode & 2) == 2);
    
    Karsten Suehring's avatar
    Karsten Suehring committed
        msg( VERBOSE, "DualITree:%d ", m_dualTree );
    
        msg( VERBOSE, "BIO:%d ", m_BIO );
    
    Philippe Hanhart's avatar
    Philippe Hanhart committed
        if( m_LMChroma && m_chromaFormatIDC == CHROMA_420 )
        {
          msg( VERBOSE, "CclmCollocatedChroma:%d ", m_cclmCollocatedChromaFlag );
        }
    
    Tung Nguyen's avatar
    Tung Nguyen committed
        msg( VERBOSE, "MTS: %1d(intra) %1d(inter) ", m_MTS & 1, ( m_MTS >> 1 ) & 1 );
    
        msg( VERBOSE, "SBT:%d ", m_SBT );
    
    #if INCLUDE_ISP_CFG_FLAG
        msg( VERBOSE, "ISP:%d ", m_ISP );
    #endif
    
    #if JVET_N0235_SMVD_SPS
        msg( VERBOSE, "SMVD:%d ", m_SMVD );
    #endif
    
    Tung Nguyen's avatar
    Tung Nguyen committed
        msg( VERBOSE, "CompositeLTReference:%d ", m_compositeRefEnabled);
    
        msg( VERBOSE, "GBi:%d ", m_GBi );
        msg( VERBOSE, "GBiFast:%d ", m_GBiFast );
    
    #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
        msg( VERBOSE, "LADF:%d ", m_LadfEnabed );
    
    #endif
        msg(VERBOSE, "MHIntra:%d ", m_MHIntra);
    
        msg( VERBOSE, "Triangle:%d ", m_Triangle );
    
    Seungsoo Jeong's avatar
    Seungsoo Jeong committed
    #if JVET_N0127_MMVD_SPS_FLAG 
        m_allowDisFracMMVD = m_MMVD ? m_allowDisFracMMVD : false;
        if ( m_MMVD )
          msg(VERBOSE, "AllowDisFracMMVD:%d ", m_allowDisFracMMVD);
    #else
    
        msg( VERBOSE, "AllowDisFracMMVD:%d ", m_allowDisFracMMVD );
    
    Seungsoo Jeong's avatar
    Seungsoo Jeong committed
    #endif
    
        msg( VERBOSE, "AffineAmvr:%d ", m_AffineAmvr );
    
        m_AffineAmvrEncOpt = m_AffineAmvr ? m_AffineAmvrEncOpt : false;
        msg( VERBOSE, "AffineAmvrEncOpt:%d ", m_AffineAmvrEncOpt );
    
        msg(VERBOSE, "DMVR:%d ", m_DMVR);
    
    #if JVET_N0449_MMVD_SIMP
        msg(VERBOSE, "MmvdDisNum:%d ", m_MmvdDisNum);
    
    #endif
    #if JVET_N0413_RDPCM
        msg(VERBOSE, "RDPCM:%d ", m_RdpcmMode );
    
    Yu Han's avatar
    Yu Han committed
        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)
    
    Taoran Lu's avatar
    Taoran Lu committed
        msg(VERBOSE, "Reshape:%d ", m_lumaReshapeEnable);
        if (m_lumaReshapeEnable)
    
    Taoran Lu's avatar
    Taoran Lu committed
          msg(VERBOSE, "(Sigal:%s ", m_reshapeSignalType==0? "SDR" : "HDR-PQ");
    
    Taoran Lu's avatar
    Taoran Lu committed
          msg(VERBOSE, ") ");
        }
    
    #if JVET_N0217_MATRIX_INTRAPRED
        msg(VERBOSE, "MIP:%d ", m_MIP);
    #endif
    
    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, "PBIntraFast:%d ", m_usePbIntraFast );
    
      if( m_ImvMode ) msg( VERBOSE, "IMV4PelFast:%d ", m_Imv4PelFast );
    
    Tung Nguyen's avatar
    Tung Nguyen committed
      if( m_MTS ) msg( VERBOSE, "MTSMaxCand: %1d(intra) %1d(inter) ", m_MTSIntraMaxCand, m_MTSInterMaxCand );
    
    #if INCLUDE_ISP_CFG_FLAG
      if( m_ISP ) msg( VERBOSE, "ISPFast:%d ", m_useFastISP );
    #else
    
      msg( VERBOSE, "ISPFast:%d ", m_useFastISP );
    
    #endif
    #if JVET_N0193_LFNST
      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 );
    
    #if JVET_N0242_NON_LINEAR_ALF
      msg( VERBOSE, "UseNonLinearALFLuma:%d ", m_useNonLinearAlfLuma );
      msg( VERBOSE, "UseNonLinearALFChroma:%d ", m_useNonLinearAlfChroma );
    #endif
    
    #if JVET_N0217_MATRIX_INTRAPRED
      if( m_MIP ) msg(VERBOSE, "FastMIP:%d ", m_useFastMIP);
    #endif
    
    
      msg( VERBOSE, "NumSplitThreads:%d ", m_numSplitThreads );
      if( m_numSplitThreads > 1 )
      {
        msg( VERBOSE, "ForceSingleSplitThread:%d ", m_forceSplitSequential );
      }
      msg( VERBOSE, "NumWppThreads:%d+%d ", m_numWppThreads, m_numWppExtraLines );
      msg( VERBOSE, "EnsureWppBitEqual:%d ", m_ensureWppBitEqual );
    
    #if EXTENSION_360_VIDEO
      m_ext360.outputConfigurationSummary();
    #endif
    
      msg( VERBOSE, "\n\n");
    
      msg( NOTICE, "\n");
    
      fflush( stdout );
    }
    
    bool confirmPara(bool bflag, const char* message)
    {
      if (!bflag)
      {
        return false;
      }
    
      msg( ERROR, "Error: %s\n",message);
      return true;
    }
    
    //! \}