Ignore:
Timestamp:
11 Aug 2015, 20:47:57 (9 years ago)
Author:
seregin
Message:

port rev 4588

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r1379 r1434  
    299299      xParseSEITimeCode((SEITimeCode&) *sei, payloadSize, pDecodedMessageOutputStream);
    300300      break;
    301     case SEI::CHROMA_SAMPLING_FILTER_HINT:
    302       sei = new SEIChromaSamplingFilterHint;
    303       xParseSEIChromaSamplingFilterHint((SEIChromaSamplingFilterHint&) *sei, payloadSize/*, sps*/, pDecodedMessageOutputStream);
     301    case SEI::CHROMA_RESAMPLING_FILTER_HINT:
     302      sei = new SEIChromaResamplingFilterHint;
     303      xParseSEIChromaResamplingFilterHint((SEIChromaResamplingFilterHint&) *sei, payloadSize, pDecodedMessageOutputStream);
    304304      //}
    305305      break;
     
    12601260}
    12611261
    1262 Void SEIReader::xParseSEIChromaSamplingFilterHint(SEIChromaSamplingFilterHint& sei, UInt payloadSize/*, TComSPS* sps*/, std::ostream *pDecodedMessageOutputStream)
     1262Void SEIReader::xParseSEIChromaResamplingFilterHint(SEIChromaResamplingFilterHint& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
    12631263{
    12641264  UInt uiCode;
     
    12671267  sei_read_code( pDecodedMessageOutputStream, 8, uiCode, "ver_chroma_filter_idc"); sei.m_verChromaFilterIdc = uiCode;
    12681268  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;
    12701270  if(sei.m_verChromaFilterIdc == 1 || sei.m_horChromaFilterIdc == 1)
    12711271  {
     
    12731273    if(sei.m_verChromaFilterIdc == 1)
    12741274    {
    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++)
    12851284          {
    12861285            sei_read_svlc( pDecodedMessageOutputStream, sei.m_verFilterCoeff[i][j], "ver_filter_coeff");
     
    12911290    if(sei.m_horChromaFilterIdc == 1)
    12921291    {
    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++)
    13031301          {
    13041302            sei_read_svlc( pDecodedMessageOutputStream, sei.m_horFilterCoeff[i][j], "hor_filter_coeff");
Note: See TracChangeset for help on using the changeset viewer.