Changeset 1335 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 22 Jul 2015, 02:37:09 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDownConvert/DownConvert.h
r1259 r1335 40 40 41 41 #include <cassert> 42 #include "../../Lib/TLibCommon/ TypeDef.h"42 #include "../../Lib/TLibCommon/CommonDef.h" 43 43 44 44 #ifndef gMax -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r1333 r1335 33 33 34 34 /** \file CommonDef.h 35 \brief Defines constants, macros and tool parameters35 \brief Defines version information, constants and small in-line functions 36 36 */ 37 37 … … 116 116 // ==================================================================================================================== 117 117 118 #define MAX_GOP 64 ///< max. value of hierarchical GOP size 119 120 #define MAX_NUM_REF_PICS 16 ///< max. number of pictures used for reference 121 #define MAX_NUM_REF 16 ///< max. number of entries in picture reference list 122 123 #define MAX_UINT 0xFFFFFFFFU ///< max. value of unsigned 32-bit integer 124 #define MAX_INT 2147483647 ///< max. value of signed 32-bit integer 125 #define MAX_INT64 0x7FFFFFFFFFFFFFFFLL ///< max. value of signed 64-bit integer 126 #if RExt__HIGH_BIT_DEPTH_SUPPORT 127 #define MAX_INTERMEDIATE_INT MAX_INT64 128 #else 129 #define MAX_INTERMEDIATE_INT MAX_INT 130 #endif 131 132 #define MAX_DOUBLE 1.7e+308 ///< max. value of Double-type value 133 134 #define MIN_QP 0 135 #define MAX_QP 51 136 137 #define NOT_VALID -1 118 static const UInt MAX_UINT = 0xFFFFFFFFU; ///< max. value of unsigned 32-bit integer 119 static const Int MAX_INT = 2147483647; ///< max. value of signed 32-bit integer 120 static const Double MAX_DOUBLE = 1.7e+308; ///< max. value of Double-type value 121 122 // ==================================================================================================================== 123 // Coding tool configuration 124 // ==================================================================================================================== 125 // Most of these should not be changed - they resolve the meaning of otherwise magic numbers. 126 127 static const Int MAX_GOP = 64; ///< max. value of hierarchical GOP size 128 static const Int MAX_NUM_REF_PICS = 16; ///< max. number of pictures used for reference 129 static const Int MAX_NUM_REF = 16; ///< max. number of entries in picture reference list 130 static const Int MAX_QP = 51; 131 static const Int NOT_VALID = -1; 132 133 static const Int AMVP_MAX_NUM_CANDS = 2; ///< AMVP: advanced motion vector prediction - max number of final candidates 134 static const Int AMVP_MAX_NUM_CANDS_MEM = 3; ///< AMVP: advanced motion vector prediction - max number of candidates 135 static const Int AMVP_DECIMATION_FACTOR = 4; 136 static const Int MRG_MAX_NUM_CANDS = 5; ///< MERGE 137 138 139 static const Int MAX_TLAYER = 7; ///< Explicit temporal layer QP offset - max number of temporal layer 140 141 static const Int ADAPT_SR_SCALE = 1; ///< division factor for adaptive search range 142 143 static const Int MAX_NUM_PICS_IN_SOP = 1024; 144 145 static const Int MAX_NESTING_NUM_OPS = 1024; 146 static const Int MAX_NESTING_NUM_LAYER = 64; 147 148 static const Int MAX_VPS_NUM_HRD_PARAMETERS = 1; 149 static const Int MAX_VPS_OP_SETS_PLUS1 = 1024; 150 static const Int MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 = 1; 151 152 static const Int MAXIMUM_INTRA_FILTERED_WIDTH = 16; 153 static const Int MAXIMUM_INTRA_FILTERED_HEIGHT = 16; 154 155 static const Int MAX_CPB_CNT = 32; ///< Upper bound of (cpb_cnt_minus1 + 1) 156 #if SVC_EXTENSION 157 static const Int MAX_NUM_LAYER_IDS = 63; 158 #else 159 static const Int MAX_NUM_LAYER_IDS = 64; 160 #endif 161 162 static const Int COEF_REMAIN_BIN_REDUCTION = 3; ///< indicates the level at which the VLC transitions from Golomb-Rice to TU+EG(k) 163 164 static const Int CU_DQP_TU_CMAX = 5; ///< max number bins for truncated unary 165 static const Int CU_DQP_EG_k = 0; ///< expgolomb order 166 167 static const Int SBH_THRESHOLD = 4; ///< value of the fixed SBH controlling threshold 168 169 static const Int C1FLAG_NUMBER = 8; // maximum number of largerThan1 flag coded in one chunk: 16 in HM5 170 static const Int C2FLAG_NUMBER = 1; // maximum number of largerThan2 flag coded in one chunk: 16 in HM5 171 172 static const Int MAX_NUM_VPS = 16; 173 static const Int MAX_NUM_SPS = 16; 174 static const Int MAX_NUM_PPS = 64; 175 176 177 static const Int MLS_GRP_NUM = 64; ///< Max number of coefficient groups, max(16, 64) 178 static const Int MLS_CG_LOG2_WIDTH = 2; 179 static const Int MLS_CG_LOG2_HEIGHT = 2; 180 static const Int MLS_CG_SIZE = 4; ///< Coefficient group size of 4x4; = MLS_CG_LOG2_WIDTH + MLS_CG_LOG2_HEIGHT 181 182 #if ADAPTIVE_QP_SELECTION 183 static const Int ARL_C_PRECISION = 7; ///< G382: 7-bit arithmetic precision 184 static const Int LEVEL_RANGE = 30; ///< G382: max coefficient level in statistics collection 185 #endif 186 187 static const Int RVM_VCEGAM10_M = 4; 188 189 static const Int FAST_UDI_MAX_RDMODE_NUM = 35; ///< maximum number of RD comparison in fast-UDI estimation loop 190 191 static const Int NUM_INTRA_MODE = 36; 192 static const Int PLANAR_IDX = 0; 193 static const Int VER_IDX = 26; ///< index for intra VERTICAL mode 194 static const Int HOR_IDX = 10; ///< index for intra HORIZONTAL mode 195 static const Int DC_IDX = 1; ///< index for intra DC mode 196 static const Int NUM_CHROMA_MODE = 5; ///< total number of chroma modes 197 static const Int DM_CHROMA_IDX = 36; ///< chroma mode index for derived from luma intra mode 198 199 static const Int MDCS_ANGLE_LIMIT = 4; ///< 0 = Horizontal/vertical only, 1 = Horizontal/vertical +/- 1, 2 = Horizontal/vertical +/- 2 etc... 200 static const Int MDCS_MAXIMUM_WIDTH = 8; ///< (measured in pixels) TUs with width greater than this can only use diagonal scan 201 static const Int MDCS_MAXIMUM_HEIGHT = 8; ///< (measured in pixels) TUs with height greater than this can only use diagonal scan 202 203 204 static const Int LOG2_MAX_NUM_COLUMNS_MINUS1 = 7; 205 static const Int LOG2_MAX_NUM_ROWS_MINUS1 = 7; 206 207 static const Int CABAC_INIT_PRESENT_FLAG = 1; 208 209 static const Int LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 4; 210 static const Int CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 8; 211 212 static const Int MAX_NUM_LONG_TERM_REF_PICS = 33; 213 static const Int NUM_LONG_TERM_REF_PIC_SPS = 0; 214 215 216 static const Int MAX_QP_OFFSET_LIST_SIZE = 6; ///< Maximum size of QP offset list is 6 entries 217 218 // Cost mode support 219 static const Int LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP = 0; ///< QP to use for lossless coding. 220 static const Int LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME =4; ///< QP' to use for mixed_lossy_lossless coding. 221 222 static const Int RExt__GOLOMB_RICE_ADAPTATION_STATISTICS_SETS = 4; 223 static const Int RExt__GOLOMB_RICE_INCREMENT_DIVISOR = 4; 224 225 static const Int RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION = 0; ///< Additional fixed bit precision used during encoder-side weighting prediction analysis. Currently only used when high_precision_prediction_weighting_flag is set, for backwards compatibility reasons. 226 227 static const Int MAX_TIMECODE_SEI_SETS = 3; ///< Maximum number of time sets 228 229 static const Int MAX_CU_DEPTH = 6; ///< log2(CTUSize) 230 static const Int MAX_CU_SIZE = 64; ///< = 1<<(MAX_CU_DEPTH) 231 static const Int MIN_PU_SIZE = 4; 232 static const Int MIN_TU_SIZE = 4; 233 static const Int MAX_TU_SIZE = 32; 234 static const Int MAX_NUM_PART_IDXS_IN_CTU_WIDTH = MAX_CU_SIZE/MIN_PU_SIZE; ///< maximum number of partition indices across the width of a CTU (or height of a CTU) 235 static const Int SCALING_LIST_REM_NUM = 6; 236 237 static const Int QUANT_SHIFT = 14; ///< Q(4) = 2^14 238 static const Int IQUANT_SHIFT = 6; 239 static const Int SCALE_BITS = 15; ///< For fractional bit estimates in RDOQ 240 241 static const Int SCALING_LIST_NUM = MAX_NUM_COMPONENT * NUMBER_OF_PREDICTION_MODES; ///< list number for quantization matrix 242 243 static const Int SCALING_LIST_START_VALUE = 8 ; ///< start value for dpcm mode 244 static const Int MAX_MATRIX_COEF_NUM = 64 ; ///< max coefficient number for quantization matrix 245 static const Int MAX_MATRIX_SIZE_NUM = 8 ; ///< max size number for quantization matrix 246 static const Int SCALING_LIST_BITS = 8 ; ///< bit depth of scaling list entries 247 static const Int LOG2_SCALING_LIST_NEUTRAL_VALUE = 4 ; ///< log2 of the value that, when used in a scaling list, has no effect on quantisation 248 static const Int SCALING_LIST_DC = 16 ; ///< default DC value 249 250 static const Int CONTEXT_STATE_BITS = 6 ; 251 static const Int LAST_SIGNIFICANT_GROUPS = 10 ; 252 138 253 139 254 // ==================================================================================================================== … … 180 295 template <typename ValueType> inline ValueType rightShiftEvenRounding(const ValueType value, const UInt shift) { return (shift == 0) ? value : ((value + (1<<(shift-1))-1 + ((value>>shift)&1)) >> shift) ; } 181 296 #endif 182 183 // ====================================================================================================================184 // Coding tool configuration185 // ====================================================================================================================186 187 // AMVP: advanced motion vector prediction188 #define AMVP_MAX_NUM_CANDS 2 ///< max number of final candidates189 #define AMVP_MAX_NUM_CANDS_MEM 3 ///< max number of candidates190 // MERGE191 #define MRG_MAX_NUM_CANDS 5192 193 // Reference memory management194 #define DYN_REF_FREE 0 ///< dynamic free of reference memories195 196 // Explicit temporal layer QP offset197 #define MAX_TLAYER 7 ///< max number of temporal layer198 199 // Fast estimation of generalized B in low-delay mode200 #define GPB_SIMPLE_UNI 1 ///< Simple mode for uni-direction201 202 // Adaptive search range depending on POC difference203 #define ADAPT_SR_SCALE 1 ///< division factor for adaptive search range204 205 // Early-skip threshold (encoder)206 #define EARLY_SKIP_THRES 1.50 ///< if RD < thres*avg[BestSkipRD]207 208 209 #define MAX_CHROMA_FORMAT_IDC 3210 211 // TODO: Existing names used for the different NAL unit types can be altered to better reflect the names in the spec.212 // However, the names in the spec are not yet stable at this point. Once the names are stable, a cleanup213 // effort can be done without use of macros to alter the names used to indicate the different NAL unit types.214 enum NalUnitType215 {216 NAL_UNIT_CODED_SLICE_TRAIL_N = 0, // 0217 NAL_UNIT_CODED_SLICE_TRAIL_R, // 1218 219 NAL_UNIT_CODED_SLICE_TSA_N, // 2220 NAL_UNIT_CODED_SLICE_TSA_R, // 3221 222 NAL_UNIT_CODED_SLICE_STSA_N, // 4223 NAL_UNIT_CODED_SLICE_STSA_R, // 5224 225 NAL_UNIT_CODED_SLICE_RADL_N, // 6226 NAL_UNIT_CODED_SLICE_RADL_R, // 7227 228 NAL_UNIT_CODED_SLICE_RASL_N, // 8229 NAL_UNIT_CODED_SLICE_RASL_R, // 9230 231 NAL_UNIT_RESERVED_VCL_N10,232 NAL_UNIT_RESERVED_VCL_R11,233 NAL_UNIT_RESERVED_VCL_N12,234 NAL_UNIT_RESERVED_VCL_R13,235 NAL_UNIT_RESERVED_VCL_N14,236 NAL_UNIT_RESERVED_VCL_R15,237 238 NAL_UNIT_CODED_SLICE_BLA_W_LP, // 16239 NAL_UNIT_CODED_SLICE_BLA_W_RADL, // 17240 NAL_UNIT_CODED_SLICE_BLA_N_LP, // 18241 NAL_UNIT_CODED_SLICE_IDR_W_RADL, // 19242 NAL_UNIT_CODED_SLICE_IDR_N_LP, // 20243 NAL_UNIT_CODED_SLICE_CRA, // 21244 NAL_UNIT_RESERVED_IRAP_VCL22,245 NAL_UNIT_RESERVED_IRAP_VCL23,246 247 NAL_UNIT_RESERVED_VCL24,248 NAL_UNIT_RESERVED_VCL25,249 NAL_UNIT_RESERVED_VCL26,250 NAL_UNIT_RESERVED_VCL27,251 NAL_UNIT_RESERVED_VCL28,252 NAL_UNIT_RESERVED_VCL29,253 NAL_UNIT_RESERVED_VCL30,254 NAL_UNIT_RESERVED_VCL31,255 256 NAL_UNIT_VPS, // 32257 NAL_UNIT_SPS, // 33258 NAL_UNIT_PPS, // 34259 NAL_UNIT_ACCESS_UNIT_DELIMITER, // 35260 NAL_UNIT_EOS, // 36261 NAL_UNIT_EOB, // 37262 NAL_UNIT_FILLER_DATA, // 38263 NAL_UNIT_PREFIX_SEI, // 39264 NAL_UNIT_SUFFIX_SEI, // 40265 266 NAL_UNIT_RESERVED_NVCL41,267 NAL_UNIT_RESERVED_NVCL42,268 NAL_UNIT_RESERVED_NVCL43,269 NAL_UNIT_RESERVED_NVCL44,270 NAL_UNIT_RESERVED_NVCL45,271 NAL_UNIT_RESERVED_NVCL46,272 NAL_UNIT_RESERVED_NVCL47,273 NAL_UNIT_UNSPECIFIED_48,274 NAL_UNIT_UNSPECIFIED_49,275 NAL_UNIT_UNSPECIFIED_50,276 NAL_UNIT_UNSPECIFIED_51,277 NAL_UNIT_UNSPECIFIED_52,278 NAL_UNIT_UNSPECIFIED_53,279 NAL_UNIT_UNSPECIFIED_54,280 NAL_UNIT_UNSPECIFIED_55,281 NAL_UNIT_UNSPECIFIED_56,282 NAL_UNIT_UNSPECIFIED_57,283 NAL_UNIT_UNSPECIFIED_58,284 NAL_UNIT_UNSPECIFIED_59,285 NAL_UNIT_UNSPECIFIED_60,286 NAL_UNIT_UNSPECIFIED_61,287 NAL_UNIT_UNSPECIFIED_62,288 NAL_UNIT_UNSPECIFIED_63,289 NAL_UNIT_INVALID,290 };291 297 292 298 #if SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibCommon/Debug.cpp
r1286 r1335 47 47 static const UInt settingValueWidth = 3; 48 48 49 #if defDEBUG_STRING49 #if DEBUG_STRING 50 50 // these strings are used to reorder the debug output so that the encoder and decoder match. 51 51 const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1] … … 153 153 EnvVar DebugOptionList::ForceChromaMode ("FORCE_CHROMA_MODE", "0", "Force a particular intra direction for chroma (0-5)" ); 154 154 155 #if defDEBUG_STRING155 #if DEBUG_STRING 156 156 EnvVar DebugOptionList::DebugString_Structure ("DEBUG_STRUCTURE", "0", "Produce output on chosen structure bit0=intra, bit1=inter"); 157 157 EnvVar DebugOptionList::DebugString_Pred ("DEBUG_PRED", "0", "Produce output on prediction data. bit0=intra, bit1=inter"); … … 179 179 PRINT_CONSTANT(O0043_BEST_EFFORT_DECODING, settingNameWidth, settingValueWidth); 180 180 181 PRINT_CONSTANT(RD_TEST_SAO_DISABLE_AT_PICTURE_LEVEL, settingNameWidth, settingValueWidth);182 183 181 //------------------------------------------------ 184 182 … … 193 191 UInt g_debugCounter = 0; 194 192 195 #if defDEBUG_ENCODER_SEARCH_BINS193 #if DEBUG_ENCODER_SEARCH_BINS 196 194 const UInt debugEncoderSearchBinTargetLine = 0; 197 195 const UInt debugEncoderSearchBinWindow = 1000000; 198 196 #endif 199 197 200 #if defDEBUG_CABAC_BINS198 #if DEBUG_CABAC_BINS 201 199 const UInt debugCabacBinTargetLine = 0; 202 200 const UInt debugCabacBinWindow = 1000000; … … 458 456 } 459 457 460 #if defDEBUG_STRING458 #if DEBUG_STRING 461 459 Int DebugStringGetPredModeMask(PredMode mode) 462 460 { -
branches/SHM-dev/source/Lib/TLibCommon/Debug.h
r1286 r1335 47 47 #include <TLibCommon/CommonDef.h> 48 48 49 #if defDEBUG_STRING49 #if DEBUG_STRING 50 50 extern const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1]; 51 51 extern const Char *partSizeToString[NUMBER_OF_PART_SIZES]; … … 103 103 extern EnvVar ForceChromaMode; 104 104 105 #if defDEBUG_STRING105 #if DEBUG_STRING 106 106 extern EnvVar DebugString_Structure; 107 107 extern EnvVar DebugString_Pred; … … 122 122 extern UInt g_debugCounter; 123 123 124 #if defDEBUG_ENCODER_SEARCH_BINS124 #if DEBUG_ENCODER_SEARCH_BINS 125 125 extern const UInt debugEncoderSearchBinTargetLine; 126 126 extern const UInt debugEncoderSearchBinWindow; 127 127 #endif 128 128 129 #if defDEBUG_CABAC_BINS129 #if DEBUG_CABAC_BINS 130 130 extern const UInt debugCabacBinTargetLine; 131 131 extern const UInt debugCabacBinWindow; … … 270 270 // ---------------------------------------------------------------------------------------------- // 271 271 272 #if defDEBUG_STRING272 #if DEBUG_STRING 273 273 Int DebugStringGetPredModeMask(PredMode mode); 274 274 Void DebugInterPredResiReco(std::string &sDebug, TComYuv &pred, TComYuv &resi, TComYuv &reco, Int predmode_mask); -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r1302 r1335 40 40 #include <cstring> 41 41 42 #include " TypeDef.h"42 #include "CommonDef.h" 43 43 #include "libmd5/MD5.h" 44 44 #if SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
r1297 r1335 42 42 #include <algorithm> 43 43 44 #include " TypeDef.h"44 #include "CommonDef.h" 45 45 #include "TCom3DAsymLUT.h" 46 46 #include "TComPicYuv.h" -
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h
r1297 r1335 40 40 #define __TCOM3DASYMLUT__ 41 41 42 #include " TypeDef.h"42 #include "CommonDef.h" 43 43 44 44 #if CGS_3D_ASYMLUT -
branches/SHM-dev/source/Lib/TLibCommon/TComCodingStatistics.h
r1259 r1335 35 35 #define __TCOMCODINGSTATISTICS__ 36 36 37 #include " TypeDef.h"37 #include "CommonDef.h" 38 38 #include <stdio.h> 39 39 #include <string> -
branches/SHM-dev/source/Lib/TLibCommon/TComInterpolationFilter.h
r1287 r1335 40 40 #define __TCOMINTERPOLATIONFILTER__ 41 41 42 #include " TypeDef.h"42 #include "CommonDef.h" 43 43 44 44 //! \ingroup TLibCommon -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1315 r1335 146 146 147 147 Int iPicStride = pcCU->getPic()->getStride(compID); 148 Bool bNeighborFlags[4 * MAX_NUM_ SPU_W+ 1];148 Bool bNeighborFlags[4 * MAX_NUM_PART_IDXS_IN_CTU_WIDTH + 1]; 149 149 Int iNumIntraNeighbor = 0; 150 150 … … 164 164 assert(uiROIWidth*uiROIHeight <= m_iYuvExtSize); 165 165 166 #if defDEBUG_STRING166 #if DEBUG_STRING 167 167 std::stringstream ss(stringstream::out); 168 168 #endif … … 181 181 182 182 183 #if defDEBUG_STRING183 #if DEBUG_STRING 184 184 if (DebugOptionList::DebugString_Pred.getInt()&DebugStringGetPredModeMask(MODE_INTRA)) 185 185 { … … 301 301 *piDestPtr=*piSrcPtr; // far right is not filtered 302 302 303 #if defDEBUG_STRING303 #if DEBUG_STRING 304 304 if (DebugOptionList::DebugString_Pred.getInt()&DebugStringGetPredModeMask(MODE_INTRA)) 305 305 { -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1327 r1335 249 249 // ==================================================================================================================== 250 250 251 UInt g_auiZscanToRaster [ MAX_NUM_ SPU_W*MAX_NUM_SPU_W] = { 0, };252 UInt g_auiRasterToZscan [ MAX_NUM_ SPU_W*MAX_NUM_SPU_W] = { 0, };253 UInt g_auiRasterToPelX [ MAX_NUM_ SPU_W*MAX_NUM_SPU_W] = { 0, };254 UInt g_auiRasterToPelY [ MAX_NUM_ SPU_W*MAX_NUM_SPU_W] = { 0, };251 UInt g_auiZscanToRaster [ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ] = { 0, }; 252 UInt g_auiRasterToZscan [ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ] = { 0, }; 253 UInt g_auiRasterToPelX [ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ] = { 0, }; 254 UInt g_auiRasterToPelY [ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ] = { 0, }; 255 255 256 256 const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES] = { 0, 8, 4, 4, 2, 10, 1, 5}; … … 668 668 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 669 669 670 std::string NaluToStr( NalUnitType nalu ) 671 { 672 switch( nalu ) 673 { 674 case NAL_UNIT_CODED_SLICE_TRAIL_N: 675 return "TRAIL_N"; 676 case NAL_UNIT_CODED_SLICE_TRAIL_R: 677 return "TRAIL_R"; 678 679 case NAL_UNIT_CODED_SLICE_TSA_N: 680 return " TSA_N"; 681 case NAL_UNIT_CODED_SLICE_TSA_R: 682 return " TSA_R"; 683 684 case NAL_UNIT_CODED_SLICE_STSA_N: 685 return " STSA_N"; 686 case NAL_UNIT_CODED_SLICE_STSA_R: 687 return " STSA_R"; 688 689 case NAL_UNIT_CODED_SLICE_RADL_N: 690 return " RADL_N"; 691 case NAL_UNIT_CODED_SLICE_RADL_R: 692 return " RADL_R"; 693 694 case NAL_UNIT_CODED_SLICE_RASL_N: 695 return " RASL_N"; 696 case NAL_UNIT_CODED_SLICE_RASL_R: 697 return " RASL_R"; 698 699 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 700 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 701 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 702 return " BLA"; 703 704 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 705 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 706 return " IDR"; 707 708 case NAL_UNIT_CODED_SLICE_CRA: 709 return " CRA"; 710 711 default: 712 return " "; 713 }; 670 std::string NaluToStr( NalUnitType type ) 671 { 672 switch (type) 673 { 674 case NAL_UNIT_CODED_SLICE_TRAIL_R: return " TRAIL_R"; 675 case NAL_UNIT_CODED_SLICE_TRAIL_N: return " TRAIL_N"; 676 case NAL_UNIT_CODED_SLICE_TSA_R: return " TSA_R"; 677 case NAL_UNIT_CODED_SLICE_TSA_N: return " TSA_N"; 678 case NAL_UNIT_CODED_SLICE_STSA_R: return " STSA_R"; 679 case NAL_UNIT_CODED_SLICE_STSA_N: return " STSA_N"; 680 case NAL_UNIT_CODED_SLICE_BLA_W_LP: return " BLA_W_LP"; 681 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: return "BLA_W_RADL"; 682 case NAL_UNIT_CODED_SLICE_BLA_N_LP: return " BLA_N_LP"; 683 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: return "IDR_W_RADL"; 684 case NAL_UNIT_CODED_SLICE_IDR_N_LP: return " IDR_N_LP"; 685 case NAL_UNIT_CODED_SLICE_CRA: return " CRA"; 686 case NAL_UNIT_CODED_SLICE_RADL_R: return " RADL_R"; 687 case NAL_UNIT_CODED_SLICE_RADL_N: return " RADL_N"; 688 case NAL_UNIT_CODED_SLICE_RASL_R: return " RASL_R"; 689 case NAL_UNIT_CODED_SLICE_RASL_N: return " RASL_N"; 690 case NAL_UNIT_VPS: return " VPS"; 691 case NAL_UNIT_SPS: return " SPS"; 692 case NAL_UNIT_PPS: return " PPS"; 693 case NAL_UNIT_ACCESS_UNIT_DELIMITER: return " AUD"; 694 case NAL_UNIT_EOS: return " EOS"; 695 case NAL_UNIT_EOB: return " EOB"; 696 case NAL_UNIT_FILLER_DATA: return " FILLER"; 697 case NAL_UNIT_PREFIX_SEI: return " SEI"; 698 case NAL_UNIT_SUFFIX_SEI: return " SEI"; 699 default: return " UNK"; 700 } 714 701 } 715 702 #if LAYER_CTB -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1327 r1335 48 48 49 49 // ==================================================================================================================== 50 // Macros51 // ====================================================================================================================52 53 #define MAX_CU_DEPTH 6 // log2(CTUSize)54 #define MAX_CU_SIZE (1<<(MAX_CU_DEPTH)) // maximum allowable size of CU, surely 64? (not 1<<7 = 128)55 #define MIN_PU_SIZE 456 #define MIN_TU_SIZE 457 #define MAX_TU_SIZE 3258 #define MAX_NUM_SPU_W (MAX_CU_SIZE/MIN_PU_SIZE) // maximum number of SPU in horizontal line59 60 #define SCALING_LIST_REM_NUM 661 62 // ====================================================================================================================63 50 // Initialize / destroy functions 64 51 // ==================================================================================================================== … … 72 59 73 60 // flexible conversion from relative to absolute index 74 extern UInt g_auiZscanToRaster[ MAX_NUM_ SPU_W*MAX_NUM_SPU_W];75 extern UInt g_auiRasterToZscan[ MAX_NUM_ SPU_W*MAX_NUM_SPU_W];61 extern UInt g_auiZscanToRaster[ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ]; 62 extern UInt g_auiRasterToZscan[ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ]; 76 63 extern UInt* g_scanOrder[SCAN_NUMBER_OF_GROUP_TYPES][SCAN_NUMBER_OF_TYPES][ MAX_CU_DEPTH ][ MAX_CU_DEPTH ]; 77 64 … … 80 67 81 68 // conversion of partition index to picture pel position 82 extern UInt g_auiRasterToPelX[ MAX_NUM_ SPU_W*MAX_NUM_SPU_W];83 extern UInt g_auiRasterToPelY[ MAX_NUM_ SPU_W*MAX_NUM_SPU_W];69 extern UInt g_auiRasterToPelX[ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ]; 70 extern UInt g_auiRasterToPelY[ MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH ]; 84 71 85 72 Void initRasterToPelXY ( UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxDepth ); 86 73 87 74 extern const UInt g_auiPUOffset[NUMBER_OF_PART_SIZES]; 88 89 #define QUANT_SHIFT 14 // Q(4) = 2^1490 #define IQUANT_SHIFT 691 #define SCALE_BITS 15 // Inherited from TMuC, pressumably for fractional bit estimates in RDOQ92 93 #define SQRT2 1158594 #define SQRT2_SHIFT 1395 #define INVSQRT2 1158596 #define INVSQRT2_SHIFT 1497 #define ADDITIONAL_MULTIPLIER_BITS 1498 99 #define SHIFT_INV_1ST 7 // Shift after first inverse transform stage100 #define SHIFT_INV_2ND 12 // Shift after second inverse transform stage101 75 102 76 extern const Int g_quantScales[SCALING_LIST_REM_NUM]; // Q(QP%6) … … 122 96 extern const UChar g_aucChromaScale[NUM_CHROMA_FORMAT][chromaQPMappingTableSize]; 123 97 124 // ====================================================================================================================125 // Entropy Coding126 // ====================================================================================================================127 128 #define CONTEXT_STATE_BITS 6129 #define LAST_SIGNIFICANT_GROUPS 10130 98 131 99 // ==================================================================================================================== … … 158 126 159 127 extern Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; // from width to log2(width)-2 160 161 #ifndef ENC_DEC_TRACE162 #define ENC_DEC_TRACE 0163 #endif164 128 165 129 … … 195 159 #endif 196 160 197 198 #define SCALING_LIST_NUM (MAX_NUM_COMPONENT * NUMBER_OF_PREDICTION_MODES) ///< list number for quantization matrix199 200 #define SCALING_LIST_START_VALUE 8 ///< start value for dpcm mode201 #define MAX_MATRIX_COEF_NUM 64 ///< max coefficient number for quantization matrix202 #define MAX_MATRIX_SIZE_NUM 8 ///< max size number for quantization matrix203 #define SCALING_LIST_BITS 8 ///< bit depth of scaling list entries204 #define LOG2_SCALING_LIST_NEUTRAL_VALUE 4 ///< log2 of the value that, when used in a scaling list, has no effect on quantisation205 #define SCALING_LIST_DC 16 ///< default DC value206 207 161 extern const Char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 208 162 extern const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1325 r1335 1429 1429 TComSPSRExt m_spsRangeExtension; 1430 1430 1431 static const Int m_winUnitX[ MAX_CHROMA_FORMAT_IDC+1];1432 static const Int m_winUnitY[ MAX_CHROMA_FORMAT_IDC+1];1431 static const Int m_winUnitX[NUM_CHROMA_FORMAT]; 1432 static const Int m_winUnitY[NUM_CHROMA_FORMAT]; 1433 1433 TComPTL m_pcPTL; 1434 1434 … … 1465 1465 Void setChromaFormatIdc (ChromaFormat i) { m_chromaFormatIdc = i; } 1466 1466 1467 static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < = MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; }1468 static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < = MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; }1467 static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < NUM_CHROMA_FORMAT); return m_winUnitX[chromaFormatIdc]; } 1468 static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc < NUM_CHROMA_FORMAT); return m_winUnitY[chromaFormatIdc]; } 1469 1469 1470 1470 // structure -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1316 r1335 1516 1516 else 1517 1517 { 1518 #if defDEBUG_TRANSFORM_AND_QUANTISE1518 #if DEBUG_TRANSFORM_AND_QUANTISE 1519 1519 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU at input to transform\n"; 1520 1520 printBlock(pcResidual, uiWidth, uiHeight, uiStride); … … 1537 1537 } 1538 1538 1539 #if defDEBUG_TRANSFORM_AND_QUANTISE1539 #if DEBUG_TRANSFORM_AND_QUANTISE 1540 1540 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU between transform and quantiser\n"; 1541 1541 printBlock(m_plTempCoeff, uiWidth, uiHeight, uiWidth); … … 1549 1549 uiAbsSum, compID, cQP ); 1550 1550 1551 #if defDEBUG_TRANSFORM_AND_QUANTISE1551 #if DEBUG_TRANSFORM_AND_QUANTISE 1552 1552 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU at output of quantiser\n"; 1553 1553 printBlock(rpcCoeff, uiWidth, uiHeight, uiWidth); … … 1603 1603 } 1604 1604 1605 #if definedDEBUG_STRING1605 #if DEBUG_STRING 1606 1606 if (psDebug) 1607 1607 { … … 1627 1627 else 1628 1628 { 1629 #if defDEBUG_TRANSFORM_AND_QUANTISE1629 #if DEBUG_TRANSFORM_AND_QUANTISE 1630 1630 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU at input to dequantiser\n"; 1631 1631 printBlock(pcCoeff, uiWidth, uiHeight, uiWidth); … … 1634 1634 xDeQuant(rTu, pcCoeff, m_plTempCoeff, compID, cQP); 1635 1635 1636 #if defDEBUG_TRANSFORM_AND_QUANTISE1636 #if DEBUG_TRANSFORM_AND_QUANTISE 1637 1637 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU between dequantiser and inverse-transform\n"; 1638 1638 printBlock(m_plTempCoeff, uiWidth, uiHeight, uiWidth); 1639 1639 #endif 1640 1640 1641 #if definedDEBUG_STRING1641 #if DEBUG_STRING 1642 1642 if (psDebug) 1643 1643 { … … 1652 1652 xITransformSkip( m_plTempCoeff, pcResidual, uiStride, rTu, compID ); 1653 1653 1654 #if definedDEBUG_STRING1654 #if DEBUG_STRING 1655 1655 if (psDebug) 1656 1656 { … … 1675 1675 xIT( channelBitDepth, rTu.useDST(compID), m_plTempCoeff, pcResidual, uiStride, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)) ); 1676 1676 1677 #if definedDEBUG_STRING1677 #if DEBUG_STRING 1678 1678 if (psDebug) 1679 1679 { … … 1686 1686 } 1687 1687 1688 #if defDEBUG_TRANSFORM_AND_QUANTISE1688 #if DEBUG_TRANSFORM_AND_QUANTISE 1689 1689 std::cout << g_debugCounter << ": " << uiWidth << "x" << uiHeight << " channel " << compID << " TU at output of inverse-transform\n"; 1690 1690 printBlock(pcResidual, uiWidth, uiHeight, uiStride); … … 1727 1727 { 1728 1728 DEBUG_STRING_NEW(sTemp) 1729 #if defDEBUG_STRING1729 #if DEBUG_STRING 1730 1730 std::string *psDebug=((DebugOptionList::DebugString_InvTran.getInt()&(pcCU->isIntra(absPartIdxTU)?1:(pcCU->isInter(absPartIdxTU)?2:4)))!=0) ? &sTemp : 0; 1731 1731 #endif … … 1733 1733 invTransformNxN( rTu, compID, pResi, uiStride, pcCoeff, cQP DEBUG_STRING_PASS_INTO(psDebug) ); 1734 1734 1735 #if defDEBUG_STRING1735 #if DEBUG_STRING 1736 1736 if (psDebug != 0) 1737 1737 { … … 2289 2289 const Int64 tmpLevel = Int64(abs(plSrcCoeff[ uiBlkPos ])) * quantisationCoefficient; 2290 2290 2291 const Intermediate_Int lLevelDouble = (Intermediate_Int)min<Int64>(tmpLevel, MAX_INTERMEDIATE_INT- (Intermediate_Int(1) << (iQBits - 1)));2291 const Intermediate_Int lLevelDouble = (Intermediate_Int)min<Int64>(tmpLevel, std::numeric_limits<Intermediate_Int>::max() - (Intermediate_Int(1) << (iQBits - 1))); 2292 2292 2293 2293 #if ADAPTIVE_QP_SELECTION … … 2621 2621 { 2622 2622 // calculate the cost 2623 Int64 minCostInc = MAX_INT64, curCost = MAX_INT64;2623 Int64 minCostInc = std::numeric_limits<Int64>::max(), curCost = std::numeric_limits<Int64>::max(); 2624 2624 Int minPos = -1, finalChange = 0, curChange = 0; 2625 2625 … … 2648 2648 if(n==firstNZPosInCG && abs(piDstCoeff[uiBlkPos])==1) 2649 2649 { 2650 curCost = MAX_INT64;2650 curCost = std::numeric_limits<Int64>::max(); 2651 2651 } 2652 2652 else … … 2666 2666 if(thissignbit != signbit ) 2667 2667 { 2668 curCost = MAX_INT64;2668 curCost = std::numeric_limits<Int64>::max(); 2669 2669 } 2670 2670 } -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1287 r1335 1 #include " TypeDef.h"1 #include "CommonDef.h" 2 2 #if SVC_EXTENSION 3 3 #include "TComUpsampleFilter.h" -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1334 r1335 33 33 34 34 /** \file TypeDef.h 35 \brief Define basic types, new types and enumerations35 \brief Define macros, basic types, new types and enumerations 36 36 */ 37 37 38 38 #ifndef __TYPEDEF__ 39 39 #define __TYPEDEF__ 40 41 #ifndef __COMMONDEF__ 42 #error Include CommonDef.h not TypeDef.h 43 #endif 40 44 41 45 #include <vector> … … 117 121 #define MAX_VPS_NUM_SCALABILITY_TYPES 16 118 122 #define MAX_REF_LAYERS 7 123 #define MAX_VPS_OP_LAYER_SETS_PLUS1 (MAX_LAYERS+1) 124 #define MAX_VPS_LAYER_SETS_PLUS1 1024 125 #define MAX_VPS_OUTPUT_LAYER_SETS_PLUS1 1024 126 #define MAX_VPS_LAYER_IDX_PLUS1 MAX_LAYERS 119 127 120 128 #endif // SVC_EXTENSION … … 128 136 // ==================================================================================================================== 129 137 130 // #define DEBUG_STRING // enable to print out final decision debug info at encoder and decoder 131 // #define DEBUG_ENCODER_SEARCH_BINS // enable to print out each bin as it is coded during encoder search 132 // #define DEBUG_CABAC_BINS // enable to print out each bin as it is coded during final encode and decode 133 // #define DEBUG_INTRA_SEARCH_COSTS // enable to print out the cost for each mode during encoder search 134 // #define DEBUG_TRANSFORM_AND_QUANTISE // enable to print out each TU as it passes through the transform-quantise-dequantise-inverseTransform process 135 136 #ifdef DEBUG_STRING 138 #define DEBUG_STRING 0 ///< When enabled, prints out final decision debug info at encoder and decoder 139 #define DEBUG_ENCODER_SEARCH_BINS 0 ///< When enabled, prints out each bin as it is coded during encoder search 140 #define DEBUG_CABAC_BINS 0 ///< When enabled, prints out each bin as it is coded during final encode and decode 141 #define DEBUG_INTRA_SEARCH_COSTS 0 ///< When enabled, prints out the cost for each mode during encoder search 142 #define DEBUG_TRANSFORM_AND_QUANTISE 0 ///< When enabled, prints out each TU as it passes through the transform-quantise-dequantise-inverseTransform process 143 144 #define ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 0 ///< When enabled, allows control of debug modifications via environment variables 145 #define PRINT_MACRO_VALUES 1 ///< When enabled, the encoder prints out a list of the non-environment-variable controlled macros and their values on startup 146 147 // TODO: rename this macro to DECODER_DEBUG_BIT_STATISTICS (may currently cause merge issues with other branches) 148 // This can be enabled by the makefile 149 #ifndef RExt__DECODER_DEBUG_BIT_STATISTICS 150 #define RExt__DECODER_DEBUG_BIT_STATISTICS 0 ///< 0 (default) = decoder reports as normal, 1 = decoder produces bit usage statistics (will impact decoder run time by up to ~10%) 151 #endif 152 153 // This can be enabled by the makefile 154 #ifndef ENC_DEC_TRACE 155 #define ENC_DEC_TRACE 0 156 #endif 157 158 #define PRINT_RPS_INFO 0 ///< Enable/disable the printing of bits used to send the RPS. 159 160 // ==================================================================================================================== 161 // Tool Switches - transitory (these macros are likely to be removed in future revisions) 162 // ==================================================================================================================== 163 164 #define ALLOW_RECOVERY_POINT_AS_RAP 1 165 #define AMP_SAD 1 ///< dedicated SAD functions for AMP 166 #define BUGFIX_INTRAPERIOD 1 167 #define DECODER_CHECK_SUBSTREAM_AND_SLICE_TRAILING_BYTES 1 168 #define DYN_REF_FREE 0 ///< Reference memory management - dynamic free of reference memories 169 #define RDO_WITHOUT_DQP_BITS 0 ///< Disable counting dQP bits in RDO-based mode decision 170 #define SAO_ENCODE_ALLOW_USE_PREDEBLOCK 1 171 #define T0196_SELECTIVE_RDOQ 1 ///< selective RDOQ 172 #define TILE_SIZE_CHECK 1 173 #define WRITE_BACK 1 ///< Enable/disable the encoder to replace the deltaPOC and Used by current from the config file with the values derived by the refIdc parameter. 174 175 // ==================================================================================================================== 176 // Tool Switches 177 // ==================================================================================================================== 178 179 #define ADAPTIVE_QP_SELECTION 1 ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection 180 181 #define AMP_ENC_SPEEDUP 1 ///< encoder only speed-up by AMP mode skipping 182 #if AMP_ENC_SPEEDUP 183 #define AMP_MRG 1 ///< encoder only force merge for AMP partition (no motion search for AMP) 184 #endif 185 186 #define FAST_BIT_EST 1 ///< G763: Table-based bit estimation for CABAC 187 188 #define HHI_RQT_INTRA_SPEEDUP 1 ///< tests one best mode with full rqt 189 #define HHI_RQT_INTRA_SPEEDUP_MOD 0 ///< tests two best modes with full rqt 190 191 #if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP 192 #error 193 #endif 194 195 #define MATRIX_MULT 0 ///< Brute force matrix multiplication instead of partial butterfly 196 197 #define O0043_BEST_EFFORT_DECODING 0 ///< 0 (default) = disable code related to best effort decoding, 1 = enable code relating to best effort decoding [ decode-side only ]. 198 199 #define RDOQ_CHROMA_LAMBDA 1 ///< F386: weighting of chroma for RDOQ 200 201 // This can be enabled by the makefile 202 #ifndef RExt__HIGH_BIT_DEPTH_SUPPORT 203 #define RExt__HIGH_BIT_DEPTH_SUPPORT 0 ///< 0 (default) use data type definitions for 8-10 bit video, 1 = use larger data types to allow for up to 16-bit video (originally developed as part of N0188) 204 #endif 205 206 207 // ==================================================================================================================== 208 // Derived macros 209 // ==================================================================================================================== 210 211 #if RExt__HIGH_BIT_DEPTH_SUPPORT 212 #define FULL_NBIT 1 ///< When enabled, use distortion measure derived from all bits of source data, otherwise discard (bitDepth - 8) least-significant bits of distortion 213 #define RExt__HIGH_PRECISION_FORWARD_TRANSFORM 1 ///< 0 use original 6-bit transform matrices for both forward and inverse transform, 1 (default) = use original matrices for inverse transform and high precision matrices for forward transform 214 #else 215 #define FULL_NBIT 0 ///< When enabled, use distortion measure derived from all bits of source data, otherwise discard (bitDepth - 8) least-significant bits of distortion 216 #define RExt__HIGH_PRECISION_FORWARD_TRANSFORM 0 ///< 0 (default) use original 6-bit transform matrices for both forward and inverse transform, 1 = use original matrices for inverse transform and high precision matrices for forward transform 217 #endif 218 219 #if FULL_NBIT 220 # define DISTORTION_PRECISION_ADJUSTMENT(x) 0 221 #else 222 # define DISTORTION_PRECISION_ADJUSTMENT(x) (x) 223 #endif 224 225 #if DEBUG_STRING 137 226 #define DEBUG_STRING_PASS_INTO(name) , name 138 227 #define DEBUG_STRING_PASS_INTO_OPTIONAL(name, exp) , (exp==0)?0:name … … 158 247 #endif 159 248 160 161 // ==================================================================================================================== 162 // Tool Switches 163 // ==================================================================================================================== 164 #define T0196_SELECTIVE_RDOQ 1 ///< selective RDOQ 165 166 #define ALLOW_RECOVERY_POINT_AS_RAP 1 167 #define BUGFIX_INTRAPERIOD 1 168 169 #define SAO_ENCODE_ALLOW_USE_PREDEBLOCK 1 170 171 #define TILE_SIZE_CHECK 1 172 173 #define MAX_NUM_PICS_IN_SOP 1024 174 175 #define MAX_NESTING_NUM_OPS 1024 176 #define MAX_NESTING_NUM_LAYER 64 177 178 #if SVC_EXTENSION 179 #define MAX_VPS_OP_LAYER_SETS_PLUS1 (MAX_LAYERS+1) 180 #define MAX_VPS_LAYER_SETS_PLUS1 1024 181 #define MAX_VPS_OUTPUT_LAYER_SETS_PLUS1 1024 182 #define MAX_VPS_LAYER_IDX_PLUS1 MAX_LAYERS 183 #else 184 #define MAX_VPS_NUM_HRD_PARAMETERS 1 185 #define MAX_VPS_OP_SETS_PLUS1 1024 186 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 1 187 #endif 188 189 #define MAXIMUM_INTRA_FILTERED_WIDTH 16 190 #define MAXIMUM_INTRA_FILTERED_HEIGHT 16 191 192 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 193 194 #if SVC_EXTENSION 195 #define MAX_NUM_LAYER_IDS 63 196 #else 197 #define MAX_NUM_LAYER_IDS 64 198 #endif 199 200 #define COEF_REMAIN_BIN_REDUCTION 3 ///< indicates the level at which the VLC 201 ///< transitions from Golomb-Rice to TU+EG(k) 202 203 #define CU_DQP_TU_CMAX 5 ///< max number bins for truncated unary 204 #define CU_DQP_EG_k 0 ///< expgolomb order 205 206 #define SBH_THRESHOLD 4 ///< I0156: value of the fixed SBH controlling threshold 207 208 #define C1FLAG_NUMBER 8 // maximum number of largerThan1 flag coded in one chunk : 16 in HM5 209 #define C2FLAG_NUMBER 1 // maximum number of largerThan2 flag coded in one chunk: 16 in HM5 210 211 #define SAO_ENCODING_CHOICE 1 ///< I0184: picture early termination 212 #if SAO_ENCODING_CHOICE 213 #define SAO_ENCODING_RATE 0.75 214 #define SAO_ENCODING_CHOICE_CHROMA 1 ///< J0044: picture early termination Luma and Chroma are handled separately 215 #if SAO_ENCODING_CHOICE_CHROMA 216 #define SAO_ENCODING_RATE_CHROMA 0.5 217 #endif 218 #endif 219 220 #define MAX_NUM_SAO_OFFSETS 4 221 222 #define MAX_NUM_VPS 16 223 #define MAX_NUM_SPS 16 224 #define MAX_NUM_PPS 64 225 226 #define RDOQ_CHROMA_LAMBDA 1 ///< F386: weighting of chroma for RDOQ 227 228 #define MIN_SCAN_POS_CROSS 4 229 230 #define FAST_BIT_EST 1 ///< G763: Table-based bit estimation for CABAC 231 232 #define MLS_GRP_NUM 64 ///< G644 : Max number of coefficient groups, max(16, 64) 233 #define MLS_CG_LOG2_WIDTH 2 234 #define MLS_CG_LOG2_HEIGHT 2 235 #define MLS_CG_SIZE (MLS_CG_LOG2_WIDTH + MLS_CG_LOG2_HEIGHT) ///< G644 : Coefficient group size of 4x4 236 237 #define ADAPTIVE_QP_SELECTION 1 ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection 238 #if ADAPTIVE_QP_SELECTION 239 #define ARL_C_PRECISION 7 ///< G382: 7-bit arithmetic precision 240 #define LEVEL_RANGE 30 ///< G382: max coefficient level in statistics collection 241 #endif 242 243 #define HHI_RQT_INTRA_SPEEDUP 1 ///< tests one best mode with full rqt 244 #define HHI_RQT_INTRA_SPEEDUP_MOD 0 ///< tests two best modes with full rqt 245 246 #if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP 247 #error 248 #endif 249 250 #define AMVP_DECIMATION_FACTOR 4 251 252 #define SCAN_SET_SIZE 16 253 #define LOG2_SCAN_SET_SIZE 4 254 255 #define FAST_UDI_MAX_RDMODE_NUM 35 ///< maximum number of RD comparison in fast-UDI estimation loop 256 257 #define NUM_INTRA_MODE 36 258 259 #define WRITE_BACK 1 ///< Enable/disable the encoder to replace the deltaPOC and Used by current from the config file with the values derived by the refIdc parameter. 260 #define PRINT_RPS_INFO 0 ///< Enable/disable the printing of bits used to send the RPS. 261 // using one nearest frame as reference frame, and the other frames are high quality (POC%4==0) frames (1+X) 262 // this should be done with encoder only decision 263 // but because of the absence of reference frame management, the related code was hard coded currently 264 265 #define RVM_VCEGAM10_M 4 266 267 #define PLANAR_IDX 0 268 #define VER_IDX 26 // index for intra VERTICAL mode 269 #define HOR_IDX 10 // index for intra HORIZONTAL mode 270 #define DC_IDX 1 // index for intra DC mode 271 #define NUM_CHROMA_MODE 5 // total number of chroma modes 272 #define DM_CHROMA_IDX 36 // chroma mode index for derived from luma intra mode 273 #define INVALID_MODE_IDX (NUM_INTRA_MODE+1) // value used to indicate an invalid intra mode 274 #define STOPCHROMASEARCH_MODE_IDX (INVALID_MODE_IDX+1) // value used to signal the end of a chroma mode search 275 276 #define MDCS_ANGLE_LIMIT 4 ///< (default 4) 0 = Horizontal/vertical only, 1 = Horizontal/vertical +/- 1, 2 = Horizontal/vertical +/- 2 etc... 277 #define MDCS_MAXIMUM_WIDTH 8 ///< (default 8) (measured in pixels) TUs with width greater than this can only use diagonal scan 278 #define MDCS_MAXIMUM_HEIGHT 8 ///< (default 8) (measured in pixels) TUs with height greater than this can only use diagonal scan 279 280 #define RDO_WITHOUT_DQP_BITS 0 ///< Disable counting dQP bits in RDO-based mode decision 281 282 #define LOG2_MAX_NUM_COLUMNS_MINUS1 7 283 #define LOG2_MAX_NUM_ROWS_MINUS1 7 284 #define LOG2_MAX_COLUMN_WIDTH 13 285 #define LOG2_MAX_ROW_HEIGHT 13 286 287 #define MATRIX_MULT 0 // Brute force matrix multiplication instead of partial butterfly 288 289 #define AMP_SAD 1 ///< dedicated SAD functions for AMP 290 #define AMP_ENC_SPEEDUP 1 ///< encoder only speed-up by AMP mode skipping 291 #if AMP_ENC_SPEEDUP 292 #define AMP_MRG 1 ///< encoder only force merge for AMP partition (no motion search for AMP) 293 #endif 294 295 #define CABAC_INIT_PRESENT_FLAG 1 296 297 #define LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS 4 298 #define CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS 8 299 300 #define MAX_NUM_LONG_TERM_REF_PICS 33 301 #define NUM_LONG_TERM_REF_PIC_SPS 0 302 303 #define DECODER_CHECK_SUBSTREAM_AND_SLICE_TRAILING_BYTES 1 304 305 #define RD_TEST_SAO_DISABLE_AT_PICTURE_LEVEL 0 ///< 1 = tests whether SAO should be disabled at the picture level, 0 (default) = does not apply this additional test 306 307 #define O0043_BEST_EFFORT_DECODING 0 ///< 0 (default) = disable code related to best effort decoding, 1 = enable code relating to best effort decoding [ decode-side only ]. 308 309 #define MAX_QP_OFFSET_LIST_SIZE 6 ///< Maximum size of QP offset list is 6 entries 310 // Cost mode support 311 312 #define LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP 0 ///< QP to use for lossless coding. 313 #define LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME 4 ///< QP' to use for mixed_lossy_lossless coding. 314 315 // Debug support 316 317 #define ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 0 ///< When enabled, allows control of debug modifications via environment variables 318 319 #define PRINT_MACRO_VALUES 1 ///< When enabled, the encoder prints out a list of the non-environment-variable controlled macros and their values on startup 320 321 // TODO: rename this macro to DECODER_DEBUG_BIT_STATISTICS (may currently cause merge issues with other branches) 322 // This can be enabled by the makefile 323 #ifndef RExt__DECODER_DEBUG_BIT_STATISTICS 324 #define RExt__DECODER_DEBUG_BIT_STATISTICS 0 ///< 0 (default) = decoder reports as normal, 1 = decoder produces bit usage statistics (will impact decoder run time by up to ~10%) 325 #endif 326 327 // This can be enabled by the makefile 328 #ifndef RExt__HIGH_BIT_DEPTH_SUPPORT 329 #define RExt__HIGH_BIT_DEPTH_SUPPORT 0 ///< 0 (default) use data type definitions for 8-10 bit video, 1 = use larger data types to allow for up to 16-bit video (originally developed as part of N0188) 330 #endif 331 332 #define RExt__GOLOMB_RICE_ADAPTATION_STATISTICS_SETS 4 333 #define RExt__GOLOMB_RICE_INCREMENT_DIVISOR 4 334 335 #define RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION 0 ///< Additional fixed bit precision used during encoder-side weighting prediction analysis. Currently only used when high_precision_prediction_weighting_flag is set, for backwards compatibility reasons. 336 337 #define MAX_TIMECODE_SEI_SETS 3 ///< Maximum number of time sets 338 339 //------------------------------------------------ 340 // Derived macros 341 //------------------------------------------------ 342 343 #if RExt__HIGH_BIT_DEPTH_SUPPORT 344 #define FULL_NBIT 1 ///< When enabled, use distortion measure derived from all bits of source data, otherwise discard (bitDepth - 8) least-significant bits of distortion 345 #define RExt__HIGH_PRECISION_FORWARD_TRANSFORM 1 ///< 0 use original 6-bit transform matrices for both forward and inverse transform, 1 (default) = use original matrices for inverse transform and high precision matrices for forward transform 346 #else 347 #define FULL_NBIT 0 ///< When enabled, use distortion measure derived from all bits of source data, otherwise discard (bitDepth - 8) least-significant bits of distortion 348 #define RExt__HIGH_PRECISION_FORWARD_TRANSFORM 0 ///< 0 (default) use original 6-bit transform matrices for both forward and inverse transform, 1 = use original matrices for inverse transform and high precision matrices for forward transform 349 #endif 350 351 #if FULL_NBIT 352 # define DISTORTION_PRECISION_ADJUSTMENT(x) 0 353 #else 354 # define DISTORTION_PRECISION_ADJUSTMENT(x) (x) 355 #endif 356 357 358 //------------------------------------------------ 249 // ==================================================================================================================== 359 250 // Error checks 360 // ------------------------------------------------251 // ==================================================================================================================== 361 252 362 253 #if ((RExt__HIGH_PRECISION_FORWARD_TRANSFORM != 0) && (RExt__HIGH_BIT_DEPTH_SUPPORT == 0)) … … 405 296 #endif 406 297 298 // ==================================================================================================================== 299 // Named numerical types 300 // ==================================================================================================================== 301 302 #if RExt__HIGH_BIT_DEPTH_SUPPORT 303 typedef Int Pel; ///< pixel type 304 typedef Int64 TCoeff; ///< transform coefficient 305 typedef Int TMatrixCoeff; ///< transform matrix coefficient 306 typedef Short TFilterCoeff; ///< filter coefficient 307 typedef Int64 Intermediate_Int; ///< used as intermediate value in calculations 308 typedef UInt64 Intermediate_UInt; ///< used as intermediate value in calculations 309 #else 310 typedef Short Pel; ///< pixel type 311 typedef Int TCoeff; ///< transform coefficient 312 typedef Short TMatrixCoeff; ///< transform matrix coefficient 313 typedef Short TFilterCoeff; ///< filter coefficient 314 typedef Int Intermediate_Int; ///< used as intermediate value in calculations 315 typedef UInt Intermediate_UInt; ///< used as intermediate value in calculations 316 #endif 317 318 #if FULL_NBIT 319 typedef UInt64 Distortion; ///< distortion measurement 320 #else 321 typedef UInt Distortion; ///< distortion measurement 322 #endif 407 323 408 324 // ==================================================================================================================== … … 776 692 }; 777 693 694 // TODO: Existing names used for the different NAL unit types can be altered to better reflect the names in the spec. 695 // However, the names in the spec are not yet stable at this point. Once the names are stable, a cleanup 696 // effort can be done without use of macros to alter the names used to indicate the different NAL unit types. 697 enum NalUnitType 698 { 699 NAL_UNIT_CODED_SLICE_TRAIL_N = 0, // 0 700 NAL_UNIT_CODED_SLICE_TRAIL_R, // 1 701 702 NAL_UNIT_CODED_SLICE_TSA_N, // 2 703 NAL_UNIT_CODED_SLICE_TSA_R, // 3 704 705 NAL_UNIT_CODED_SLICE_STSA_N, // 4 706 NAL_UNIT_CODED_SLICE_STSA_R, // 5 707 708 NAL_UNIT_CODED_SLICE_RADL_N, // 6 709 NAL_UNIT_CODED_SLICE_RADL_R, // 7 710 711 NAL_UNIT_CODED_SLICE_RASL_N, // 8 712 NAL_UNIT_CODED_SLICE_RASL_R, // 9 713 714 NAL_UNIT_RESERVED_VCL_N10, 715 NAL_UNIT_RESERVED_VCL_R11, 716 NAL_UNIT_RESERVED_VCL_N12, 717 NAL_UNIT_RESERVED_VCL_R13, 718 NAL_UNIT_RESERVED_VCL_N14, 719 NAL_UNIT_RESERVED_VCL_R15, 720 721 NAL_UNIT_CODED_SLICE_BLA_W_LP, // 16 722 NAL_UNIT_CODED_SLICE_BLA_W_RADL, // 17 723 NAL_UNIT_CODED_SLICE_BLA_N_LP, // 18 724 NAL_UNIT_CODED_SLICE_IDR_W_RADL, // 19 725 NAL_UNIT_CODED_SLICE_IDR_N_LP, // 20 726 NAL_UNIT_CODED_SLICE_CRA, // 21 727 NAL_UNIT_RESERVED_IRAP_VCL22, 728 NAL_UNIT_RESERVED_IRAP_VCL23, 729 730 NAL_UNIT_RESERVED_VCL24, 731 NAL_UNIT_RESERVED_VCL25, 732 NAL_UNIT_RESERVED_VCL26, 733 NAL_UNIT_RESERVED_VCL27, 734 NAL_UNIT_RESERVED_VCL28, 735 NAL_UNIT_RESERVED_VCL29, 736 NAL_UNIT_RESERVED_VCL30, 737 NAL_UNIT_RESERVED_VCL31, 738 739 NAL_UNIT_VPS, // 32 740 NAL_UNIT_SPS, // 33 741 NAL_UNIT_PPS, // 34 742 NAL_UNIT_ACCESS_UNIT_DELIMITER, // 35 743 NAL_UNIT_EOS, // 36 744 NAL_UNIT_EOB, // 37 745 NAL_UNIT_FILLER_DATA, // 38 746 NAL_UNIT_PREFIX_SEI, // 39 747 NAL_UNIT_SUFFIX_SEI, // 40 748 749 NAL_UNIT_RESERVED_NVCL41, 750 NAL_UNIT_RESERVED_NVCL42, 751 NAL_UNIT_RESERVED_NVCL43, 752 NAL_UNIT_RESERVED_NVCL44, 753 NAL_UNIT_RESERVED_NVCL45, 754 NAL_UNIT_RESERVED_NVCL46, 755 NAL_UNIT_RESERVED_NVCL47, 756 NAL_UNIT_UNSPECIFIED_48, 757 NAL_UNIT_UNSPECIFIED_49, 758 NAL_UNIT_UNSPECIFIED_50, 759 NAL_UNIT_UNSPECIFIED_51, 760 NAL_UNIT_UNSPECIFIED_52, 761 NAL_UNIT_UNSPECIFIED_53, 762 NAL_UNIT_UNSPECIFIED_54, 763 NAL_UNIT_UNSPECIFIED_55, 764 NAL_UNIT_UNSPECIFIED_56, 765 NAL_UNIT_UNSPECIFIED_57, 766 NAL_UNIT_UNSPECIFIED_58, 767 NAL_UNIT_UNSPECIFIED_59, 768 NAL_UNIT_UNSPECIFIED_60, 769 NAL_UNIT_UNSPECIFIED_61, 770 NAL_UNIT_UNSPECIFIED_62, 771 NAL_UNIT_UNSPECIFIED_63, 772 NAL_UNIT_INVALID, 773 }; 774 778 775 // ==================================================================================================================== 779 776 // Type definition 780 777 // ==================================================================================================================== 781 782 #if RExt__HIGH_BIT_DEPTH_SUPPORT783 typedef Int Pel; ///< pixel type784 typedef Int64 TCoeff; ///< transform coefficient785 typedef Int TMatrixCoeff; ///< transform matrix coefficient786 typedef Short TFilterCoeff; ///< filter coefficient787 typedef Int64 Intermediate_Int; ///< used as intermediate value in calculations788 typedef UInt64 Intermediate_UInt; ///< used as intermediate value in calculations789 #else790 typedef Short Pel; ///< pixel type791 typedef Int TCoeff; ///< transform coefficient792 typedef Short TMatrixCoeff; ///< transform matrix coefficient793 typedef Short TFilterCoeff; ///< filter coefficient794 typedef Int Intermediate_Int; ///< used as intermediate value in calculations795 typedef UInt Intermediate_UInt; ///< used as intermediate value in calculations796 #endif797 798 #if FULL_NBIT799 typedef UInt64 Distortion; ///< distortion measurement800 #else801 typedef UInt Distortion; ///< distortion measurement802 #endif803 778 804 779 /// parameters for adaptive loop filter -
branches/SHM-dev/source/Lib/TLibDecoder/AnnexBread.h
r1259 r1335 46 46 #include <vector> 47 47 48 #include "TLibCommon/ TypeDef.h"48 #include "TLibCommon/CommonDef.h" 49 49 50 50 //! \ingroup TLibDecoder -
branches/SHM-dev/source/Lib/TLibDecoder/NALread.h
r1319 r1335 42 42 #define __NALREAD__ 43 43 44 #include "TLibCommon/ TypeDef.h"44 #include "TLibCommon/CommonDef.h" 45 45 #include "TLibCommon/TComBitStream.h" 46 46 #include "TLibCommon/NAL.h" -
branches/SHM-dev/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r1259 r1335 111 111 #endif 112 112 { 113 #if defDEBUG_CABAC_BINS113 #if DEBUG_CABAC_BINS 114 114 const UInt startingRange = m_uiRange; 115 115 #endif … … 161 161 } 162 162 163 #if defDEBUG_CABAC_BINS163 #if DEBUG_CABAC_BINS 164 164 if ((g_debugCounter + debugCabacBinWindow) >= debugCabacBinTargetLine) 165 165 { -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1316 r1335 457 457 } 458 458 459 #if defDEBUG_STRING459 #if DEBUG_STRING 460 460 const PredMode predMode=m_ppcCU[uiDepth]->getPredictionMode(0); 461 461 if (DebugOptionList::DebugString_Structure.getInt()&DebugStringGetPredModeMask(predMode)) … … 482 482 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 483 483 484 #if defDEBUG_STRING484 #if DEBUG_STRING 485 485 const Int debugPredModeMask=DebugStringGetPredModeMask(MODE_INTER); 486 486 if (DebugOptionList::DebugString_Pred.getInt()&debugPredModeMask) … … 493 493 xDecodeInterTexture( pcCU, uiDepth ); 494 494 495 #if defDEBUG_STRING495 #if DEBUG_STRING 496 496 if (DebugOptionList::DebugString_Resi.getInt()&debugPredModeMask) 497 497 { … … 513 513 m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 )); 514 514 } 515 #if defDEBUG_STRING515 #if DEBUG_STRING 516 516 if (DebugOptionList::DebugString_Reco.getInt()&debugPredModeMask) 517 517 { … … 578 578 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 579 579 580 #if defDEBUG_STRING580 #if DEBUG_STRING 581 581 std::ostream &ss(std::cout); 582 582 #endif … … 590 590 m_pcPrediction->predIntraAng( compID, uiChFinalMode, 0 /* Decoder does not have an original image */, 0, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions ); 591 591 592 #if defDEBUG_STRING592 #if DEBUG_STRING 593 593 ss << sTemp; 594 594 #endif … … 602 602 603 603 DEBUG_STRING_NEW(sDebug); 604 #if defDEBUG_STRING604 #if DEBUG_STRING 605 605 const Int debugPredModeMask=DebugStringGetPredModeMask(MODE_INTRA); 606 606 std::string *psDebug=(DebugOptionList::DebugString_InvTran.getInt()&debugPredModeMask) ? &sDebug : 0; … … 622 622 } 623 623 624 #if defDEBUG_STRING624 #if DEBUG_STRING 625 625 if (psDebug) 626 626 { … … 642 642 643 643 644 #if defDEBUG_STRING644 #if DEBUG_STRING 645 645 const Bool bDebugPred=((DebugOptionList::DebugString_Pred.getInt()&debugPredModeMask) && DEBUG_STRING_CHANNEL_CONDITION(compID)); 646 646 const Bool bDebugResi=((DebugOptionList::DebugString_Resi.getInt()&debugPredModeMask) && DEBUG_STRING_CHANNEL_CONDITION(compID)); … … 668 668 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 669 669 { 670 #if defDEBUG_STRING670 #if DEBUG_STRING 671 671 if (bDebugPred || bDebugResi || bDebugReco) 672 672 { … … 690 690 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 691 691 { 692 #if defDEBUG_STRING692 #if DEBUG_STRING 693 693 if (bDebugResi) 694 694 { … … 703 703 pRecIPred[ uiX ] = pReco[ uiX ]; 704 704 } 705 #if defDEBUG_STRING705 #if DEBUG_STRING 706 706 if (bDebugReco) 707 707 { -
branches/SHM-dev/source/Lib/TLibEncoder/NALwrite.h
r1259 r1335 39 39 #include <ostream> 40 40 41 #include "TLibCommon/ TypeDef.h"41 #include "TLibCommon/CommonDef.h" 42 42 #include "TLibCommon/TComBitStream.h" 43 43 #include "TLibCommon/NAL.h" -
branches/SHM-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r1259 r1335 196 196 //} 197 197 198 #if defDEBUG_CABAC_BINS198 #if DEBUG_CABAC_BINS 199 199 const UInt startingRange = m_uiRange; 200 200 #endif … … 228 228 } 229 229 230 #if defDEBUG_CABAC_BINS230 #if DEBUG_CABAC_BINS 231 231 if ((g_debugCounter + debugCabacBinWindow) >= debugCabacBinTargetLine) 232 232 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
r1307 r1335 74 74 Void TEncBinCABACCounter::encodeBin( UInt binValue, ContextModel &rcCtxModel ) 75 75 { 76 #if defDEBUG_ENCODER_SEARCH_BINS76 #if DEBUG_ENCODER_SEARCH_BINS 77 77 const UInt64 startingFracBits = m_fracBits; 78 78 #endif … … 82 82 rcCtxModel.update( binValue ); 83 83 84 #if defDEBUG_ENCODER_SEARCH_BINS84 #if DEBUG_ENCODER_SEARCH_BINS 85 85 if ((g_debugCounter + debugEncoderSearchBinWindow) >= debugEncoderSearchBinTargetLine) 86 86 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1316 r1335 1376 1376 (uiNoResidual != 0) DEBUG_STRING_PASS_INTO(tmpStr) ); 1377 1377 1378 #if defDEBUG_STRING1378 #if DEBUG_STRING 1379 1379 DebugInterPredResiReco(tmpStr, *(m_ppcPredYuvTemp[uhDepth]), *(m_ppcResiYuvBest[uhDepth]), *(m_ppcRecoYuvTemp[uhDepth]), DebugStringGetPredModeMask(rpcTempCU->getPredictionMode(0))); 1380 1380 #endif … … 1486 1486 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1487 1487 1488 #if defDEBUG_STRING1488 #if DEBUG_STRING 1489 1489 DebugInterPredResiReco(sTest, *(m_ppcPredYuvTemp[uhDepth]), *(m_ppcResiYuvBest[uhDepth]), *(m_ppcRecoYuvTemp[uhDepth]), DebugStringGetPredModeMask(rpcTempCU->getPredictionMode(0))); 1490 1490 #endif … … 1635 1635 1636 1636 1637 #if defDEBUG_STRING1637 #if DEBUG_STRING 1638 1638 DEBUG_STRING_SWAP(sParent, sTest) 1639 1639 const PredMode predMode=rpcBestCU->getPredictionMode(0); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r1307 r1335 37 37 38 38 #include "TEncEntropy.h" 39 #include "TLibCommon/ TypeDef.h"39 #include "TLibCommon/CommonDef.h" 40 40 #include "TLibCommon/TComSampleAdaptiveOffset.h" 41 41 #include "TLibCommon/TComTU.h" -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1328 r1335 36 36 */ 37 37 38 #include "TLibCommon/ TypeDef.h"38 #include "TLibCommon/CommonDef.h" 39 39 #include "TLibCommon/TComRom.h" 40 40 #include "TLibCommon/TComMotionInfo.h" … … 1153 1153 Pel *const lumaResidualForEstimate = bUseReconstructedResidualForEstimate ? reconstructedLumaResidual : encoderLumaResidual; 1154 1154 1155 #if defDEBUG_STRING1155 #if DEBUG_STRING 1156 1156 const Int debugPredModeMask=DebugStringGetPredModeMask(MODE_INTRA); 1157 1157 #endif … … 1163 1163 DEBUG_STRING_NEW(sTemp) 1164 1164 1165 #if ndefDEBUG_STRING1165 #if !DEBUG_STRING 1166 1166 if( default0Save1Load2 != 2 ) 1167 1167 #endif … … 1190 1190 } 1191 1191 } 1192 #if ndefDEBUG_STRING1192 #if !DEBUG_STRING 1193 1193 else 1194 1194 { … … 1273 1273 //--- inverse transform --- 1274 1274 1275 #if defDEBUG_STRING1275 #if DEBUG_STRING 1276 1276 if ( (uiAbsSum > 0) || (DebugOptionList::DebugString_InvTran.getInt()&debugPredModeMask) ) 1277 1277 #else … … 1313 1313 } 1314 1314 1315 #if defDEBUG_STRING1315 #if DEBUG_STRING 1316 1316 std::stringstream ss(stringstream::out); 1317 1317 const Bool bDebugPred=((DebugOptionList::DebugString_Pred.getInt()&debugPredModeMask) && DEBUG_STRING_CHANNEL_CONDITION(compID)); … … 2331 2331 Double cost = (Double)uiSad + (Double)iModeBits * sqrtLambdaForFirstPass; 2332 2332 2333 #if defDEBUG_INTRA_SEARCH_COSTS2333 #if DEBUG_INTRA_SEARCH_COSTS 2334 2334 std::cout << "1st pass mode " << uiMode << " SAD = " << uiSad << ", mode bits = " << iModeBits << ", cost = " << cost << "\n"; 2335 2335 #endif … … 2412 2412 #endif 2413 2413 2414 #if defDEBUG_INTRA_SEARCH_COSTS2414 #if DEBUG_INTRA_SEARCH_COSTS 2415 2415 std::cout << "2nd pass [luma,chroma] mode [" << Int(pcCU->getIntraDir(CHANNEL_TYPE_LUMA, uiPartOffset)) << "," << Int(pcCU->getIntraDir(CHANNEL_TYPE_CHROMA, uiPartOffset)) << "] cost = " << dPUCost << "\n"; 2416 2416 #endif … … 4550 4550 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_TEMP_BEST]); 4551 4551 4552 #if defDEBUG_STRING4552 #if DEBUG_STRING 4553 4553 pcYuvResiBest->clear(); // Clear the residual image, if we didn't code it. 4554 4554 for(UInt i=0; i<MAX_NUM_COMPONENT+1; i++) … … 4598 4598 static const UInt useTS[MAX_NUM_COMPONENT]={0,0,0}; 4599 4599 pcCU->setTransformSkipSubParts ( useTS, 0, pcCU->getDepth(0) ); 4600 #if defDEBUG_STRING4600 #if DEBUG_STRING 4601 4601 sDebug.clear(); 4602 4602 for(UInt i=0; i<MAX_NUM_COMPONENT+1; i++) … … 4674 4674 4675 4675 UInt SplitFlag = ((pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && pcCU->isInter(uiAbsPartIdx) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )); 4676 #if defDEBUG_STRING4676 #if DEBUG_STRING 4677 4677 const Int debugPredModeMask = DebugStringGetPredModeMask(pcCU->getPredictionMode(uiAbsPartIdx)); 4678 4678 #endif … … 5002 5002 } 5003 5003 5004 #if defDEBUG_STRING5004 #if DEBUG_STRING 5005 5005 if (currAbsSum > 0) 5006 5006 { … … 5167 5167 DEBUG_STRING_NEW(childString) 5168 5168 xEstimateInterResidualQT( pcResi, dSubdivCost, uiSubdivBits, uiSubdivDist, bCheckFull ? NULL : puiZeroDist, tuRecurseChild DEBUG_STRING_PASS_INTO(childString)); 5169 #if defDEBUG_STRING5169 #if DEBUG_STRING 5170 5170 // split the string by component and append to the relevant output (because decoder decodes in channel order, whereas this search searches by TU-order) 5171 5171 std::size_t lastPos=0; … … 5223 5223 ruiBits += uiSubdivBits; 5224 5224 ruiDist += uiSubdivDist; 5225 #if defDEBUG_STRING5225 #if DEBUG_STRING 5226 5226 for(UInt ch = 0; ch < numValidComp; ch++) 5227 5227 { … … 5283 5283 ruiBits += uiSingleBits; 5284 5284 ruiDist += uiSingleDist; 5285 #if defDEBUG_STRING5285 #if DEBUG_STRING 5286 5286 for(UInt ch = 0; ch < numValidComp; ch++) 5287 5287 { -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1316 r1335 36 36 */ 37 37 38 #include "../TLibCommon/ TypeDef.h"38 #include "../TLibCommon/CommonDef.h" 39 39 #include "../TLibCommon/TComSlice.h" 40 40 #include "../TLibCommon/TComPic.h" -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.h
r1259 r1335 38 38 #define __WEIGHTPREDANALYSIS__ 39 39 40 #include "../TLibCommon/ TypeDef.h"40 #include "../TLibCommon/CommonDef.h" 41 41 #include "../TLibCommon/TComSlice.h" 42 42 #include "TEncCavlc.h" … … 46 46 private: 47 47 48 // member variables 48 // member variables 49 49 WPScalingParam m_wp[NUM_REF_PIC_LIST_01][MAX_NUM_REF][MAX_NUM_COMPONENT]; 50 50
Note: See TracChangeset for help on using the changeset viewer.