Changeset 1434 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
- Timestamp:
- 11 Aug 2015, 20:47:57 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r1379 r1434 299 299 xParseSEITimeCode((SEITimeCode&) *sei, payloadSize, pDecodedMessageOutputStream); 300 300 break; 301 case SEI::CHROMA_ SAMPLING_FILTER_HINT:302 sei = new SEIChroma SamplingFilterHint;303 xParseSEIChroma SamplingFilterHint((SEIChromaSamplingFilterHint&) *sei, payloadSize/*, sps*/, pDecodedMessageOutputStream);301 case SEI::CHROMA_RESAMPLING_FILTER_HINT: 302 sei = new SEIChromaResamplingFilterHint; 303 xParseSEIChromaResamplingFilterHint((SEIChromaResamplingFilterHint&) *sei, payloadSize, pDecodedMessageOutputStream); 304 304 //} 305 305 break; … … 1260 1260 } 1261 1261 1262 Void SEIReader::xParseSEIChroma SamplingFilterHint(SEIChromaSamplingFilterHint& sei, UInt payloadSize/*, TComSPS* sps*/, std::ostream *pDecodedMessageOutputStream)1262 Void SEIReader::xParseSEIChromaResamplingFilterHint(SEIChromaResamplingFilterHint& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 1263 1263 { 1264 1264 UInt uiCode; … … 1267 1267 sei_read_code( pDecodedMessageOutputStream, 8, uiCode, "ver_chroma_filter_idc"); sei.m_verChromaFilterIdc = uiCode; 1268 1268 sei_read_code( pDecodedMessageOutputStream, 8, uiCode, "hor_chroma_filter_idc"); sei.m_horChromaFilterIdc = uiCode; 1269 sei_read_flag( pDecodedMessageOutputStream, uiCode, "ver_filtering_ process_flag"); sei.m_verFilteringProcessFlag = uiCode;1269 sei_read_flag( pDecodedMessageOutputStream, uiCode, "ver_filtering_field_processing_flag"); sei.m_verFilteringFieldProcessingFlag = uiCode; 1270 1270 if(sei.m_verChromaFilterIdc == 1 || sei.m_horChromaFilterIdc == 1) 1271 1271 { … … 1273 1273 if(sei.m_verChromaFilterIdc == 1) 1274 1274 { 1275 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_vertical_filters"); sei.m_numVerticalFilters = uiCode; 1276 if(sei.m_numVerticalFilters > 0) 1277 { 1278 sei.m_verTapLengthMinus1 = (Int*)malloc(sei.m_numVerticalFilters * sizeof(Int)); 1279 sei.m_verFilterCoeff = (Int**)malloc(sei.m_numVerticalFilters * sizeof(Int*)); 1280 for(Int i = 0; i < sei.m_numVerticalFilters; i ++) 1281 { 1282 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "ver_tap_length_minus_1"); sei.m_verTapLengthMinus1[i] = uiCode; 1283 sei.m_verFilterCoeff[i] = (Int*)malloc(sei.m_verTapLengthMinus1[i] * sizeof(Int)); 1284 for(Int j = 0; j < sei.m_verTapLengthMinus1[i]; j ++) 1275 UInt numVerticalFilters; 1276 sei_read_uvlc( pDecodedMessageOutputStream, numVerticalFilters, "num_vertical_filters"); sei.m_verFilterCoeff.resize(numVerticalFilters); 1277 if(numVerticalFilters > 0) 1278 { 1279 for(Int i = 0; i < numVerticalFilters; i++) 1280 { 1281 UInt verTapLengthMinus1; 1282 sei_read_uvlc( pDecodedMessageOutputStream, verTapLengthMinus1, "ver_tap_length_minus_1"); sei.m_verFilterCoeff[i].resize(verTapLengthMinus1+1); 1283 for(Int j = 0; j < (verTapLengthMinus1 + 1); j++) 1285 1284 { 1286 1285 sei_read_svlc( pDecodedMessageOutputStream, sei.m_verFilterCoeff[i][j], "ver_filter_coeff"); … … 1291 1290 if(sei.m_horChromaFilterIdc == 1) 1292 1291 { 1293 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "num_horizontal_filters"); sei.m_numHorizontalFilters = uiCode; 1294 if(sei.m_numHorizontalFilters > 0) 1295 { 1296 sei.m_horTapLengthMinus1 = (Int*)malloc(sei.m_numHorizontalFilters * sizeof(Int)); 1297 sei.m_horFilterCoeff = (Int**)malloc(sei.m_numHorizontalFilters * sizeof(Int*)); 1298 for(Int i = 0; i < sei.m_numHorizontalFilters; i ++) 1299 { 1300 sei_read_uvlc( pDecodedMessageOutputStream, uiCode, "hor_tap_length_minus_1"); sei.m_horTapLengthMinus1[i] = uiCode; 1301 sei.m_horFilterCoeff[i] = (Int*)malloc(sei.m_horTapLengthMinus1[i] * sizeof(Int)); 1302 for(Int j = 0; j < sei.m_horTapLengthMinus1[i]; j ++) 1292 UInt numHorizontalFilters; 1293 sei_read_uvlc( pDecodedMessageOutputStream, numHorizontalFilters, "num_horizontal_filters"); sei.m_horFilterCoeff.resize(numHorizontalFilters); 1294 if(numHorizontalFilters > 0) 1295 { 1296 for(Int i = 0; i < numHorizontalFilters; i++) 1297 { 1298 UInt horTapLengthMinus1; 1299 sei_read_uvlc( pDecodedMessageOutputStream, horTapLengthMinus1, "hor_tap_length_minus_1"); sei.m_horFilterCoeff[i].resize(horTapLengthMinus1+1); 1300 for(Int j = 0; j < (horTapLengthMinus1 + 1); j++) 1303 1301 { 1304 1302 sei_read_svlc( pDecodedMessageOutputStream, sei.m_horFilterCoeff[i][j], "hor_filter_coeff");
Note: See TracChangeset for help on using the changeset viewer.