Changeset 529 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
25 Dec 2013, 05:53:40 (11 years ago)
Author:
seregin
Message:

remove IL_SL_SIGNALLING_N0371 macro and related code

Location:
branches/SHM-4.1-dev/source/Lib/TLibDecoder
Files:
2 edited

Legend:

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

    r528 r529  
    313313  READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" );           pcPPS->setScalingListPresentFlag( uiCode ? true : false );
    314314
    315 #if IL_SL_SIGNALLING_N0371
    316   pcPPS->setPPS( pcPPS->getLayerId(), pcPPS );
    317 #endif
    318 
    319315  if(pcPPS->getScalingListPresentFlag ())
    320316  {
    321 #if IL_SL_SIGNALLING_N0371
    322     pcPPS->getScalingList()->setLayerId( pcPPS->getLayerId() );
    323 
    324     if( pcPPS->getLayerId() > 0 )
    325     {
    326       READ_FLAG( uiCode, "pps_pred_scaling_list_flag" );           pcPPS->setPredScalingListFlag( uiCode ? true : false );
    327       pcPPS->getScalingList()->setPredScalingListFlag( pcPPS->getPredScalingListFlag() );
    328 
    329       if( pcPPS->getPredScalingListFlag() )
    330       {
    331         READ_UVLC ( uiCode, "scaling_list_pps_ref_layer_id" );   pcPPS->setScalingListRefLayerId( uiCode );
    332 
    333         // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive
    334         assert( /*pcPPS->getScalingListRefLayerId() >= 0 &&*/ pcPPS->getScalingListRefLayerId() <= 62 );
    335 
    336         // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of pps_scaling_list_ref_layer_id shall be greater than 0
    337         if( pcPPS->getSPS()->getVPS()->getAvcBaseLayerFlag() )
    338         {
    339           assert( pcPPS->getScalingListRefLayerId() > 0 );
    340         }
    341 
    342         // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and
    343         // pps_infer_scaling_list_flag in the PPS is equal to 1, pps_infer_scaling_list_flag shall be equal to 0 for the PPS that is active for the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id
    344         assert( pcPPS->getPPS( pcPPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false );
    345 
    346         // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB,
    347         // the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB
    348         assert( pcPPS->getSPS()->getVPS()->getScalingListLayerDependency( pcPPS->getLayerId(), pcPPS->getScalingListRefLayerId() ) == true );
    349 
    350         pcPPS->getScalingList()->setScalingListRefLayerId( pcPPS->getScalingListRefLayerId() );
    351         parseScalingList( pcPPS->getScalingList() );
    352       }
    353       else
    354       {
    355         parseScalingList( pcPPS->getScalingList() );
    356       }
    357     }
    358     else
    359     {
    360       parseScalingList( pcPPS->getScalingList() );
    361     }
    362 #else
    363317    parseScalingList( pcPPS->getScalingList() );
    364 #endif
    365318  }
    366319
     
    588541    pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() );
    589542  }
    590 #if IL_SL_SIGNALLING_N0371
    591   pcSPS->setVPS( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId()) );
    592   pcSPS->setSPS( pcSPS->getLayerId(), pcSPS );
    593 #endif
    594543#endif
    595544  if ( pcSPS->getMaxTLayers() == 1 )
     
    762711    if(pcSPS->getScalingListPresentFlag ())
    763712    {
    764 
    765 #if IL_SL_SIGNALLING_N0371
    766       pcSPS->getScalingList()->setLayerId( pcSPS->getLayerId() );
    767 
    768       if( pcSPS->getLayerId() > 0 )
    769       {
    770         READ_FLAG( uiCode, "sps_pred_scaling_list_flag" );  pcSPS->setPredScalingListFlag ( uiCode );
    771         pcSPS->getScalingList()->setPredScalingListFlag( pcSPS->getPredScalingListFlag() );
    772 
    773         if( pcSPS->getPredScalingListFlag() )
    774         {
    775           READ_UVLC( uiCode, "scaling_list_sps_ref_layer_id" );    pcSPS->setScalingListRefLayerId( uiCode );
    776 
    777           // The value of sps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive
    778           assert( /*pcSPS->getScalingListRefLayerId() >= 0 &&*/ pcSPS->getScalingListRefLayerId() <= 62 );
    779 
    780           // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
    781           if( pcSPS->getVPS()->getAvcBaseLayerFlag() )
    782           {
    783             assert( pcSPS->getScalingListRefLayerId() > 0 );
    784           }
    785 
    786           // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and
    787           // sps_infer_scaling_list_flag in the SPS is equal to 1, sps_infer_scaling_list_flag shall be equal to 0 for the SPS that is active for the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id
    788           assert( pcSPS->getSPS( pcSPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false );
    789 
    790           // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB,
    791           // the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB
    792           assert( pcSPS->getVPS()->getScalingListLayerDependency( pcSPS->getLayerId(), pcSPS->getScalingListRefLayerId() ) == true );
    793 
    794           pcSPS->getScalingList()->setScalingListRefLayerId( pcSPS->getScalingListRefLayerId() );
    795           parseScalingList( pcSPS->getScalingList() );
    796         }
    797         else
    798         {
    799           parseScalingList( pcSPS->getScalingList() );
    800         }
    801       }
    802       else
    803       {
    804         parseScalingList( pcSPS->getScalingList() );
    805       }
    806 #else
    807713      parseScalingList( pcSPS->getScalingList() );
    808 #endif
    809 
    810714    }
    811715#if SCALINGLIST_INFERRING
     
    15021406    }
    15031407  }
    1504 #endif
    1505 
    1506 #if IL_SL_SIGNALLING_N0371
    1507   for(i = 1; i < vps->getMaxLayers(); i++)
    1508     {
    1509       for(j = 0; j < i; j++)
    1510         {
    1511           vps->setScalingListLayerDependency( i, j, vps->checkLayerDependency( i,j ) );
    1512         }
    1513     }
    15141408#endif
    15151409
     
    29302824    for(listId = 0; listId <  g_scalingListNum[sizeId]; listId++)
    29312825    {
    2932 #if IL_SL_SIGNALLING_N0371
    2933       if ( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )
    2934       {
    2935         READ_FLAG( code, "scaling_list_pred_mode_flag");
    2936         scalingListPredModeFlag = (code) ? true : false;
    2937         if(!scalingListPredModeFlag) //Copy Mode
    2938         {
    2939           READ_UVLC( code, "scaling_list_pred_matrix_id_delta");
    2940           scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code)));
    2941           if( sizeId > SCALING_LIST_8x8 )
    2942           {
    2943             scalingList->setScalingListDC(sizeId,listId,((listId == scalingList->getRefMatrixId (sizeId,listId))? 16 :scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))));
    2944           }
    2945           scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));
    2946 
    2947         }
    2948         else //DPCM Mode
    2949         {
    2950           xDecodeScalingList(scalingList, sizeId, listId);
    2951         }
    2952       }
    2953       else
    2954       {
    2955         READ_FLAG( code, "scaling_list_pred_mode_flag");
    2956         scalingListPredModeFlag = (code) ? true : false;
    2957         if(!scalingListPredModeFlag) //Copy Mode
    2958         {
    2959           READ_UVLC( code, "scaling_list_pred_matrix_id_delta");
    2960           scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code)));
    2961           if( sizeId > SCALING_LIST_8x8 )
    2962           {
    2963             scalingList->setScalingListDC(sizeId,listId,((listId == scalingList->getRefMatrixId (sizeId,listId))? 16 :scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))));
    2964           }
    2965           scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));
    2966 
    2967         }
    2968         else //DPCM Mode
    2969         {
    2970           xDecodeScalingList(scalingList, sizeId, listId);
    2971         }
    2972       }
    2973 #else
    29742826      READ_FLAG( code, "scaling_list_pred_mode_flag");
    29752827      scalingListPredModeFlag = (code) ? true : false;
     
    29892841        xDecodeScalingList(scalingList, sizeId, listId);
    29902842      }
    2991 #endif
    29922843    }
    29932844  }
     
    30112862  if( sizeId > SCALING_LIST_8x8 )
    30122863  {
    3013 #if IL_SL_SIGNALLING_N0371
    3014     if( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )
    3015     {
    3016       ref_scalingListDC[scalingList->getLayerId()][sizeId][listId] = scalingList->getScalingListDC(sizeId,listId);
    3017       scalingList->setScalingListDC(sizeId,listId,ref_scalingListDC[scalingList->getScalingListRefLayerId()][sizeId][listId]);
    3018     }
    3019     else
    3020     {
    3021       READ_SVLC( scalingListDcCoefMinus8, "scaling_list_dc_coef_minus8");
    3022       scalingList->setScalingListDC(sizeId,listId,scalingListDcCoefMinus8 + 8);
    3023       nextCoef = scalingList->getScalingListDC(sizeId,listId);
    3024       ref_scalingListDC[scalingList->getLayerId()][sizeId][listId] = scalingList->getScalingListDC(sizeId,listId);
    3025     }
    3026 #else
    30272864    READ_SVLC( scalingListDcCoefMinus8, "scaling_list_dc_coef_minus8");
    30282865    scalingList->setScalingListDC(sizeId,listId,scalingListDcCoefMinus8 + 8);
    30292866    nextCoef = scalingList->getScalingListDC(sizeId,listId);
    3030 #endif
    30312867  }
    30322868
    30332869  for(i = 0; i < coefNum; i++)
    30342870  {
    3035 #if IL_SL_SIGNALLING_N0371
    3036     if( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )
    3037     {
    3038       ref_scalingListCoef[scalingList->getLayerId()][sizeId][listId][i] = dst[scan[i]];
    3039       dst[scan[i]] = ref_scalingListCoef[scalingList->getScalingListRefLayerId()][sizeId][listId][i];
    3040     }
    3041     else
    3042     {
    3043       READ_SVLC( data, "scaling_list_delta_coef");
    3044       nextCoef = (nextCoef + data + 256 ) % 256;
    3045       dst[scan[i]] = nextCoef;
    3046       ref_scalingListCoef[scalingList->getLayerId()][sizeId][listId][i] = dst[scan[i]];
    3047     }
    3048 #else
    30492871    READ_SVLC( data, "scaling_list_delta_coef");
    30502872    nextCoef = (nextCoef + data + 256 ) % 256;
    30512873    dst[scan[i]] = nextCoef;
    3052 #endif
    30532874  }
    30542875}
  • branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r528 r529  
    14651465  if(pcSlice->getSPS()->getScalingListFlag())
    14661466  {
    1467 #if IL_SL_SIGNALLING_N0371
    1468     pcSlice->getSPS()->getScalingList()->setLayerId( m_layerId );
    1469 #endif
    1470 
    14711467    pcSlice->setScalingList ( pcSlice->getSPS()->getScalingList()  );
    14721468
    14731469    if(pcSlice->getPPS()->getScalingListPresentFlag())
    14741470    {
    1475 #if IL_SL_SIGNALLING_N0371
    1476       pcSlice->getPPS()->getScalingList()->setLayerId( m_layerId );
    1477 #endif
    1478 
    14791471      pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList()  );
    14801472    }
     
    14841476    if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag())
    14851477    {
    1486 #if IL_SL_SIGNALLING_N0371
    1487       pcSlice->setDefaultScalingList( m_layerId );
    1488 #else
    14891478      pcSlice->setDefaultScalingList();
    1490 #endif
    14911479    }
    14921480    m_cTrQuant.setScalingListDec(pcSlice->getScalingList());
     
    14951483  else
    14961484  {
    1497 #if IL_SL_SIGNALLING_N0371
    1498     m_cTrQuant.setFlatScalingList( m_layerId );
    1499 #else
    15001485    m_cTrQuant.setFlatScalingList();
    1501 #endif
    15021486    m_cTrQuant.setUseScalingList(false);
    15031487  }
     
    15431527  TComPPS* pps = new TComPPS();
    15441528
    1545 #if SCALINGLIST_INFERRING || IL_SL_SIGNALLING_N0371
     1529#if SCALINGLIST_INFERRING
    15461530  pps->setLayerId( m_layerId );
    15471531#endif
Note: See TracChangeset for help on using the changeset viewer.