Changeset 1351 in SHVCSoftware
- Timestamp:
- 22 Jul 2015, 03:18:37 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r1259 r1351 104 104 } 105 105 106 Void xTraceAccessUnitDelimiter () 107 { 108 fprintf( g_hTrace, "=========== Access Unit Delimiter ===========\n"); 109 } 110 111 Void xTraceFillerData () 112 { 113 fprintf( g_hTrace, "=========== Filler Data ===========\n"); 114 } 115 106 116 #if Q0096_OVERLAY_SEI 107 117 Void SyntaxElementParser::xReadStringTr (UInt buSize, UChar *pValue, UInt& rLength, const Char *pSymbolName) … … 223 233 TComCodingStatistics::IncrementStatisticEP(pSymbolName, 1, Int(ruiCode)); 224 234 #endif 235 } 236 237 Void SyntaxElementParser::xReadRbspTrailingBits() 238 { 239 UInt bit; 240 READ_FLAG( bit, "rbsp_stop_one_bit"); 241 assert (bit==1); 242 Int cnt = 0; 243 while (m_pcBitstream->getNumBitsUntilByteAligned()) 244 { 245 READ_FLAG( bit, "rbsp_alignment_zero_bit"); 246 assert (bit==0); 247 cnt++; 248 } 249 assert(cnt<8); 250 } 251 252 Void AUDReader::parseAccessUnitDelimiter(TComInputBitstream* bs, UInt &picType) 253 { 254 setBitstream(bs); 255 256 #if ENC_DEC_TRACE 257 xTraceAccessUnitDelimiter(); 258 #endif 259 260 READ_CODE (3, picType, "pic_type"); 261 xReadRbspTrailingBits(); 262 } 263 264 Void FDReader::parseFillerData(TComInputBitstream* bs, UInt &fdSize) 265 { 266 setBitstream(bs); 267 #if ENC_DEC_TRACE 268 xTraceFillerData(); 269 #endif 270 UInt ffByte; 271 fdSize = 0; 272 while( m_pcBitstream->getNumBitsLeft() >8 ) 273 { 274 READ_CODE (8, ffByte, "ff_byte"); 275 assert (ffByte==0xff); 276 fdSize++; 277 } 278 xReadRbspTrailingBits(); 225 279 } 226 280 -
branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.h
r1259 r1351 126 126 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; } 127 127 TComInputBitstream* getBitstream() { return m_pcBitstream; } 128 129 protected: 130 Void xReadRbspTrailingBits(); 128 131 }; 132 133 class AUDReader: public SyntaxElementParser 134 { 135 public: 136 AUDReader() {}; 137 virtual ~AUDReader() {}; 138 Void parseAccessUnitDelimiter(TComInputBitstream* bs, UInt &picType); 139 }; 140 141 class FDReader: public SyntaxElementParser 142 { 143 public: 144 FDReader() {}; 145 virtual ~FDReader() {}; 146 Void parseFillerData(TComInputBitstream* bs, UInt &fdSize); 147 }; 148 129 149 130 150 //! \} -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1316 r1351 52 52 #if ENC_DEC_TRACE 53 53 54 Void xTraceSPSHeader (const TComSPS *pSPS) 55 { 56 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 57 } 58 59 Void xTracePPSHeader (const TComPPS *pPPS) 60 { 61 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); 62 } 63 64 Void xTraceSliceHeader (const TComSlice *pSlice) 54 Void xTraceVPSHeader () 55 { 56 fprintf( g_hTrace, "=========== Video Parameter Set ===========\n" ); 57 } 58 59 Void xTraceSPSHeader () 60 { 61 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 62 } 63 64 Void xTracePPSHeader () 65 { 66 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n"); 67 } 68 69 Void xTraceSliceHeader () 65 70 { 66 71 fprintf( g_hTrace, "=========== Slice ===========\n"); … … 190 195 { 191 196 #if ENC_DEC_TRACE 192 xTracePPSHeader ( pcPPS);197 xTracePPSHeader (); 193 198 #endif 194 199 UInt uiCode; … … 678 683 { 679 684 #if ENC_DEC_TRACE 680 xTraceSPSHeader ( pcSPS);685 xTraceSPSHeader (); 681 686 #endif 682 687 … … 1025 1030 Void TDecCavlc::parseVPS(TComVPS* pcVPS) 1026 1031 { 1032 #if ENC_DEC_TRACE 1033 xTraceVPSHeader (); 1034 #endif 1027 1035 UInt uiCode; 1028 1036 … … 1179 1187 1180 1188 #if ENC_DEC_TRACE 1181 xTraceSliceHeader( pcSlice);1189 xTraceSliceHeader(); 1182 1190 #endif 1183 1191 TComPPS* pps = NULL; -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1321 r1351 2070 2070 2071 2071 case NAL_UNIT_ACCESS_UNIT_DELIMITER: 2072 // TODO: process AU delimiter 2073 return false; 2072 { 2073 AUDReader audReader; 2074 UInt picType; 2075 audReader.parseAccessUnitDelimiter(&(nalu.getBitstream()),picType); 2076 printf ("Note: found NAL_UNIT_ACCESS_UNIT_DELIMITER\n"); 2077 return false; 2078 } 2074 2079 2075 2080 case NAL_UNIT_EOB: … … 2084 2089 2085 2090 case NAL_UNIT_FILLER_DATA: 2086 #if SVC_EXTENSION 2087 assert( m_isLastNALWasEos == false ); 2088 #endif 2089 return false; 2091 { 2092 FDReader fdReader; 2093 UInt size; 2094 fdReader.parseFillerData(&(nalu.getBitstream()),size); 2095 printf ("Note: found NAL_UNIT_FILLER_DATA with %u bytes payload.\n", size); 2096 #if SVC_EXTENSION 2097 assert( m_isLastNALWasEos == false ); 2098 #endif 2099 return false; 2100 } 2090 2101 2091 2102 case NAL_UNIT_RESERVED_VCL_N10: -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1316 r1351 45 45 #if ENC_DEC_TRACE 46 46 47 Void xTraceSPSHeader (const TComSPS *pSPS) 48 { 49 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 50 } 51 52 Void xTracePPSHeader (const TComPPS *pPPS) 53 { 54 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); 55 } 56 57 Void xTraceSliceHeader (const TComSlice *pSlice) 47 Void xTraceVPSHeader () 48 { 49 fprintf( g_hTrace, "=========== Video Parameter Set ===========\n" ); 50 } 51 52 Void xTraceSPSHeader () 53 { 54 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 55 } 56 57 Void xTracePPSHeader () 58 { 59 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n"); 60 } 61 62 Void xTraceSliceHeader () 58 63 { 59 64 fprintf( g_hTrace, "=========== Slice ===========\n"); … … 151 156 { 152 157 #if ENC_DEC_TRACE 153 xTracePPSHeader ( pcPPS);158 xTracePPSHeader (); 154 159 #endif 155 160 … … 533 538 534 539 #if ENC_DEC_TRACE 535 xTraceSPSHeader ( pcSPS);540 xTraceSPSHeader (); 536 541 #endif 537 542 WRITE_CODE( pcSPS->getVPSId (), 4, "sps_video_parameter_set_id" ); … … 779 784 Void TEncCavlc::codeVPS( const TComVPS* pcVPS ) 780 785 { 786 #if ENC_DEC_TRACE 787 xTraceVPSHeader(); 788 #endif 781 789 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 782 790 #if SVC_EXTENSION … … 892 900 { 893 901 #if ENC_DEC_TRACE 894 xTraceSliceHeader ( pcSlice);902 xTraceSliceHeader (); 895 903 #endif 896 904
Note: See TracChangeset for help on using the changeset viewer.