Changeset 633 in SHVCSoftware for branches/SHM-5.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
17 Mar 2014, 19:12:54 (11 years ago)
Author:
seregin
Message:

add scaled_ref_layer_id[ i ] into vert_phase_position_enable_flag, RefPicLayerId[ i ]] into vert_phase_position_flag, and encoder setting for vert_phase_position_in_use_flag

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

Legend:

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

    r632 r633  
    853853      Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i);
    854854#if O0098_SCALED_REF_LAYER_ID
    855       READ_CODE( 6,  uiCode,  "scaled_ref_layer_left_id" );  pcSPS->setScaledRefLayerId( i, uiCode );
     855      READ_CODE( 6,  uiCode,  "scaled_ref_layer_id" );       pcSPS->setScaledRefLayerId( i, uiCode );
    856856#endif
    857857      READ_SVLC( iCode, "scaled_ref_layer_left_offset" );    scaledWindow.setWindowLeftOffset  (iCode << 1);
     
    860860      READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );  scaledWindow.setWindowBottomOffset(iCode << 1);
    861861#if P0312_VERT_PHASE_ADJ
    862       READ_FLAG( uiCode, "vert_phase_pos_enable_flag" );scaledWindow.setVertPhasePositionEnableFlag  (uiCode);  pcSPS->setVertPhasePositionEnableFlag(i,uiCode);
     862      READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode);  pcSPS->setVertPhasePositionEnableFlag( pcSPS->getScaledRefLayerId(i), uiCode);   
    863863#endif
    864864    }
     
    19431943#endif
    19441944
    1945 #if P0312_VERT_PHASE_ADJ
    1946   READ_FLAG( uiCode, "vps_vui_vert_phase_in_use_flag" ); vps->setVpsVuiVertPhaseInUseFlag(uiCode);
    1947 #endif
    1948 
    19491945#if O0109_O0199_FLAGS_TO_VUI
    19501946#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     
    19551951#endif
    19561952#endif
    1957 
     1953#if P0312_VERT_PHASE_ADJ
     1954  READ_FLAG( uiCode, "vps_vui_vert_phase_in_use_flag" ); vps->setVpsVuiVertPhaseInUseFlag(uiCode);
     1955#endif
    19581956#if N0160_VUI_EXT_ILP_REF
    19591957  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); vps->setIlpRestrictedRefLayersFlag( uiCode == 1 );
     
    25392537    for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
    25402538    {
    2541       if (rpcSlice->getSPS()->getVertPhasePositionEnableFlag(rpcSlice->getInterLayerPredLayerIdc(i)))
    2542       {
    2543         READ_FLAG( uiCode, "phase_pos_flag" ); rpcSlice->setVertPhasePositionFlag( uiCode? true: false, i);
     2539      UInt refLayerIdc = rpcSlice->getInterLayerPredLayerIdc(i);
     2540      if( rpcSlice->getSPS()->getVertPhasePositionEnableFlag(refLayerIdc) )
     2541      {
     2542        READ_FLAG( uiCode, "vert_phase_position_flag" ); rpcSlice->setVertPhasePositionFlag( uiCode? true : false, refLayerIdc );
    25442543      }
    25452544    }
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r627 r633  
    729729#endif
    730730
     731#if P0312_VERT_PHASE_ADJ
     732  if( activeVPS->getVpsVuiVertPhaseInUseFlag() == 0 )
     733  {   
     734    for(Int i = 0; i < activeSPS->getNumScaledRefLayerOffsets(); i++)
     735    {
     736      UInt scaledRefLayerId = activeSPS->getScaledRefLayerId(i);
     737      if( activeSPS->getVertPhasePositionEnableFlag( scaledRefLayerId ) )
     738      {
     739        printf("\nWarning: LayerId = %d: vert_phase_position_enable_flag[%d] = 1, however indication vert_phase_position_in_use_flag = 0\n", m_layerId, scaledRefLayerId );
     740        break;
     741      }
     742    }
     743  }
     744#endif
     745
    731746  if( pps->getDependentSliceSegmentsEnabledFlag() )
    732747  {
     
    14671482#endif
    14681483
    1469 #if P0312_VERT_PHASE_ADJ
    1470 #if O0098_SCALED_REF_LAYER_ID
    1471         Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
    1472 #else
    1473         Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    1474 #endif
    1475 #else
    14761484#if O0098_SCALED_REF_LAYER_ID
    14771485        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
    14781486#else
    14791487        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    1480 #endif
    14811488#endif
    14821489
     
    15011508          Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    15021509#endif*/
    1503 #if P0312_VERT_PHASE_ADJ
    1504           scalEL.setVertPhasePositionFlag (pcSlice->getVertPhasePositionFlag(i));
    1505 #endif
    15061510#if O0215_PHASE_ALIGNMENT
    15071511#if O0194_JOINT_US_BITSHIFT
Note: See TracChangeset for help on using the changeset viewer.