Changeset 1353 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 22 Jul 2015, 03:47:00 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1335 r1353 50 50 //! \ingroup TLibCommon 51 51 //! \{ 52 53 const Char* nalUnitTypeToString(NalUnitType type) 54 { 55 #if SVC_EXTENSION 56 switch (type) 57 { 58 case NAL_UNIT_CODED_SLICE_TRAIL_R: return "TRAIL_R"; 59 case NAL_UNIT_CODED_SLICE_TRAIL_N: return "TRAIL_N"; 60 case NAL_UNIT_CODED_SLICE_TSA_R: return "TSA_R"; 61 case NAL_UNIT_CODED_SLICE_TSA_N: return "TSA_N"; 62 case NAL_UNIT_CODED_SLICE_STSA_R: return "STSA_R"; 63 case NAL_UNIT_CODED_SLICE_STSA_N: return "STSA_N"; 64 case NAL_UNIT_CODED_SLICE_BLA_W_LP: return "BLA_W_LP"; 65 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: return "BLA_W_RADL"; 66 case NAL_UNIT_CODED_SLICE_BLA_N_LP: return "BLA_N_LP"; 67 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: return "IDR_W_RADL"; 68 case NAL_UNIT_CODED_SLICE_IDR_N_LP: return "IDR_N_LP"; 69 case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; 70 case NAL_UNIT_CODED_SLICE_RADL_R: return "RADL_R"; 71 case NAL_UNIT_CODED_SLICE_RADL_N: return "RADL_N"; 72 case NAL_UNIT_CODED_SLICE_RASL_R: return "RASL_R"; 73 case NAL_UNIT_CODED_SLICE_RASL_N: return "RASL_N"; 74 case NAL_UNIT_VPS: return "VPS"; 75 case NAL_UNIT_SPS: return "SPS"; 76 case NAL_UNIT_PPS: return "PPS"; 77 case NAL_UNIT_ACCESS_UNIT_DELIMITER: return "AUD"; 78 case NAL_UNIT_EOS: return "EOS"; 79 case NAL_UNIT_EOB: return "EOB"; 80 case NAL_UNIT_FILLER_DATA: return "FILLER"; 81 case NAL_UNIT_PREFIX_SEI: return "Prefix SEI"; 82 case NAL_UNIT_SUFFIX_SEI: return "Suffix SEI"; 83 default: return "UNK"; 84 } 85 #else 86 switch (type) 87 { 88 case NAL_UNIT_CODED_SLICE_TRAIL_R: return " TRAIL_R"; 89 case NAL_UNIT_CODED_SLICE_TRAIL_N: return " TRAIL_N"; 90 case NAL_UNIT_CODED_SLICE_TSA_R: return " TSA_R"; 91 case NAL_UNIT_CODED_SLICE_TSA_N: return " TSA_N"; 92 case NAL_UNIT_CODED_SLICE_STSA_R: return " STSA_R"; 93 case NAL_UNIT_CODED_SLICE_STSA_N: return " STSA_N"; 94 case NAL_UNIT_CODED_SLICE_BLA_W_LP: return " BLA_W_LP"; 95 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: return "BLA_W_RADL"; 96 case NAL_UNIT_CODED_SLICE_BLA_N_LP: return " BLA_N_LP"; 97 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: return "IDR_W_RADL"; 98 case NAL_UNIT_CODED_SLICE_IDR_N_LP: return " IDR_N_LP"; 99 case NAL_UNIT_CODED_SLICE_CRA: return " CRA"; 100 case NAL_UNIT_CODED_SLICE_RADL_R: return " RADL_R"; 101 case NAL_UNIT_CODED_SLICE_RADL_N: return " RADL_N"; 102 case NAL_UNIT_CODED_SLICE_RASL_R: return " RASL_R"; 103 case NAL_UNIT_CODED_SLICE_RASL_N: return " RASL_N"; 104 case NAL_UNIT_VPS: return " VPS"; 105 case NAL_UNIT_SPS: return " SPS"; 106 case NAL_UNIT_PPS: return " PPS"; 107 case NAL_UNIT_ACCESS_UNIT_DELIMITER: return " AUD"; 108 case NAL_UNIT_EOS: return " EOS"; 109 case NAL_UNIT_EOB: return " EOB"; 110 case NAL_UNIT_FILLER_DATA: return " FILLER"; 111 case NAL_UNIT_PREFIX_SEI: return " SEI"; 112 case NAL_UNIT_SUFFIX_SEI: return " SEI"; 113 default: return " UNK"; 114 } 115 #endif 116 } 52 117 53 118 class ScanGenerator … … 667 732 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 668 733 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 669 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 }701 }702 734 #if LAYER_CTB 703 735 UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1335 r1353 159 159 #endif 160 160 161 const Char* nalUnitTypeToString(NalUnitType type); 162 161 163 extern const Char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 162 164 extern const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; … … 177 179 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 178 180 extern Int g_posScalingFactor [MAX_LAYERS][2]; 179 std::string NaluToStr( NalUnitType nalu );180 181 #if LAYER_CTB 181 182 extern UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1345 r1353 155 155 #define ENC_DEC_TRACE 0 156 156 #endif 157 #define DEC_NUH_TRACE 0 ///< When trace enabled, enable tracing of NAL unit headers at the decoder (currently not possible at the encoder) 157 158 158 159 #define PRINT_RPS_INFO 0 ///< Enable/disable the printing of bits used to send the RPS. -
branches/SHM-dev/source/Lib/TLibDecoder/NALread.cpp
r1319 r1353 48 48 #include "TLibCommon/TComCodingStatistics.h" 49 49 #endif 50 #if ENC_DEC_TRACE && DEC_NUH_TRACE 51 #include "TLibCommon/TComRom.h" 52 #endif 50 53 51 54 using namespace std; … … 102 105 nalUnitBuf.resize(it_write - nalUnitBuf.begin()); 103 106 } 107 108 #if ENC_DEC_TRACE && DEC_NUH_TRACE 109 void xTraceNalUnitHeader(InputNALUnit& nalu) 110 { 111 fprintf( g_hTrace, "*********** NAL UNIT (%s) ***********\n", nalUnitTypeToString(nalu.m_nalUnitType) ); 112 113 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 114 fprintf( g_hTrace, "%-50s u(%d) : %u\n", "forbidden_zero_bit", 1, 0 ); 115 116 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 117 fprintf( g_hTrace, "%-50s u(%d) : %u\n", "nal_unit_type", 6, nalu.m_nalUnitType ); 118 119 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 120 fprintf( g_hTrace, "%-50s u(%d) : %u\n", "nuh_layer_id", 6, nalu.m_nuhLayerId ); 121 122 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 123 fprintf( g_hTrace, "%-50s u(%d) : %u\n", "nuh_temporal_id_plus1", 3, nalu.m_temporalId + 1 ); 124 125 fflush ( g_hTrace ); 126 } 127 #endif 104 128 105 129 Void readNalUnitHeader(InputNALUnit& nalu) … … 114 138 #if RExt__DECODER_DEBUG_BIT_STATISTICS 115 139 TComCodingStatistics::IncrementStatisticEP(STATS__NAL_UNIT_HEADER_BITS, 1+6+6+3, 0); 140 #endif 141 142 #if ENC_DEC_TRACE && DEC_NUH_TRACE 143 xTraceNalUnitHeader(nalu); 116 144 #endif 117 145 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1319 r1353 193 193 pcSlice->getTLayer(), 194 194 c, 195 NaluToStr( pcSlice->getNalUnitType() ).data(),195 nalUnitTypeToString( pcSlice->getNalUnitType() ), 196 196 pcSlice->getSliceQp() ); 197 197 #else -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1352 r1353 3057 3057 } 3058 3058 3059 static const Char* nalUnitTypeToString(NalUnitType type)3060 {3061 switch (type)3062 {3063 case NAL_UNIT_CODED_SLICE_TRAIL_R: return "TRAIL_R";3064 case NAL_UNIT_CODED_SLICE_TRAIL_N: return "TRAIL_N";3065 case NAL_UNIT_CODED_SLICE_TSA_R: return "TSA_R";3066 case NAL_UNIT_CODED_SLICE_TSA_N: return "TSA_N";3067 case NAL_UNIT_CODED_SLICE_STSA_R: return "STSA_R";3068 case NAL_UNIT_CODED_SLICE_STSA_N: return "STSA_N";3069 case NAL_UNIT_CODED_SLICE_BLA_W_LP: return "BLA_W_LP";3070 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: return "BLA_W_RADL";3071 case NAL_UNIT_CODED_SLICE_BLA_N_LP: return "BLA_N_LP";3072 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: return "IDR_W_RADL";3073 case NAL_UNIT_CODED_SLICE_IDR_N_LP: return "IDR_N_LP";3074 case NAL_UNIT_CODED_SLICE_CRA: return "CRA";3075 case NAL_UNIT_CODED_SLICE_RADL_R: return "RADL_R";3076 case NAL_UNIT_CODED_SLICE_RADL_N: return "RADL_N";3077 case NAL_UNIT_CODED_SLICE_RASL_R: return "RASL_R";3078 case NAL_UNIT_CODED_SLICE_RASL_N: return "RASL_N";3079 case NAL_UNIT_VPS: return "VPS";3080 case NAL_UNIT_SPS: return "SPS";3081 case NAL_UNIT_PPS: return "PPS";3082 case NAL_UNIT_ACCESS_UNIT_DELIMITER: return "AUD";3083 case NAL_UNIT_EOS: return "EOS";3084 case NAL_UNIT_EOB: return "EOB";3085 case NAL_UNIT_FILLER_DATA: return "FILLER";3086 case NAL_UNIT_PREFIX_SEI: return "SEI";3087 case NAL_UNIT_SUFFIX_SEI: return "SEI";3088 default: return "UNK";3089 }3090 }3091 3092 3059 Void TEncGOP::xCalculateAddPSNRs( const Bool isField, const Bool isFieldTopFieldFirst, const Int iGOPid, TComPic* pcPic, const AccessUnit&accessUnit, TComList<TComPic*> &rcListPic, const Double dEncTime, const InputColourSpaceConversion snr_conversion, const Bool printFrameMSE ) 3093 3060 { … … 3262 3229 pcSlice->getTLayer(), 3263 3230 c, 3264 NaluToStr( pcSlice->getNalUnitType() ).data(),3231 nalUnitTypeToString( pcSlice->getNalUnitType() ), 3265 3232 pcSlice->getSliceQpBase(), 3266 3233 pcSlice->getSliceQp(), … … 3272 3239 pcSlice->getTLayer(), 3273 3240 c, 3274 NaluToStr( pcSlice->getNalUnitType() ).data(),3241 nalUnitTypeToString( pcSlice->getNalUnitType() ), 3275 3242 pcSlice->getSliceQp(), 3276 3243 uibits );
Note: See TracChangeset for help on using the changeset viewer.