Changeset 570 in SHVCSoftware for branches/SHM-5.0-dev/source


Ignore:
Timestamp:
28 Jan 2014, 05:08:27 (11 years ago)
Author:
etri
Message:

JCTVC-P0076: Move video signal information syntax structure earlier in the VPS VUI (Macro: VPS_VUI_VIDEO_SIGNAL_MOVE)
provided by H.Lee <hanilee@…>

Location:
branches/SHM-5.0-dev/source/Lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h

    r569 r570  
    124124#endif
    125125#define VPS_VUI_VIDEO_SIGNAL             1      ///< JCTVC-O0118 video signal information
     126#if VPS_VUI_VIDEO_SIGNAL
     127#define VPS_VUI_VIDEO_SIGNAL_MOVE        1      ///< JCTVC-P0076 Move video signal information syntax structure earlier in the VPS VUI
     128#endif
    126129#endif //VPS_VUI
    127130
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r569 r570  
    16031603  }
    16041604#endif
     1605#if VPS_VUI_VIDEO_SIGNAL_MOVE
     1606  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); vps->setVideoSigPresentVpsFlag( uiCode == 1 );
     1607  if (vps->getVideoSigPresentVpsFlag())
     1608  {
     1609    READ_CODE(4, uiCode, "vps_num_video_signal_info_minus1" ); vps->setNumVideoSignalInfo(uiCode + 1);
     1610  }
     1611  else
     1612  {
     1613    vps->setNumVideoSignalInfo(vps->getMaxLayers());
     1614  }
     1615
     1616
     1617  for(i = 0; i < vps->getNumVideoSignalInfo(); i++)
     1618  {
     1619    READ_CODE(3, uiCode, "video_vps_format" ); vps->setVideoVPSFormat(i,uiCode);
     1620    READ_FLAG(uiCode, "video_full_range_vps_flag" ); vps->setVideoFullRangeVpsFlag(i,uiCode);
     1621    READ_CODE(8, uiCode, "color_primaries_vps" ); vps->setColorPrimaries(i,uiCode);
     1622    READ_CODE(8, uiCode, "transfer_characteristics_vps" ); vps->setTransCharacter(i,uiCode);
     1623    READ_CODE(8, uiCode, "matrix_coeffs_vps" );vps->setMaxtrixCoeff(i,uiCode);
     1624  }
     1625  if(!vps->getVideoSigPresentVpsFlag())
     1626  {
     1627    for (i=0; i < vps->getMaxLayers(); i++)
     1628    {
     1629      vps->setVideoSignalInfoIdx(i,i);
     1630    }
     1631  }
     1632  else {
     1633    vps->setVideoSignalInfoIdx(0,0);
     1634    if (vps->getNumVideoSignalInfo() > 1 )
     1635    {
     1636      for (i=1; i < vps->getMaxLayers(); i++)
     1637        READ_CODE(4, uiCode, "vps_video_signal_info_idx" ); vps->setVideoSignalInfoIdx(i, uiCode);
     1638    }
     1639    else {
     1640      for (i=1; i < vps->getMaxLayers(); i++)
     1641      {
     1642        vps->setVideoSignalInfoIdx(i,0);
     1643      }
     1644    }
     1645  }
     1646#endif
    16051647#if VPS_VUI_TILES_NOT_IN_USE__FLAG
    16061648  UInt layerIdx;
     
    16821724#endif
    16831725#if VPS_VUI_VIDEO_SIGNAL
     1726#if VPS_VUI_VIDEO_SIGNAL_MOVE
     1727#else
    16841728    READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); vps->setVideoSigPresentVpsFlag( uiCode == 1 );
    16851729    if (vps->getVideoSigPresentVpsFlag())
     
    17221766        }
    17231767    }
     1768#endif
    17241769#endif
    17251770}
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r568 r570  
    12471247  }
    12481248#endif
     1249#if VPS_VUI_VIDEO_SIGNAL_MOVE
     1250  WRITE_FLAG( vps->getVideoSigPresentVpsFlag(), "video_signal_info_idx_present_flag" );
     1251  if (vps->getVideoSigPresentVpsFlag())
     1252  {
     1253    WRITE_CODE(vps->getNumVideoSignalInfo()-1, 4, "vps_num_video_signal_info_minus1" );
     1254  }
     1255
     1256  for(i = 0; i < vps->getNumVideoSignalInfo(); i++)
     1257  {
     1258    WRITE_CODE(vps->getVideoVPSFormat(i), 3, "video_vps_format" );
     1259    WRITE_FLAG(vps->getVideoFullRangeVpsFlag(i), "video_full_range_vps_flag" );
     1260    WRITE_CODE(vps->getColorPrimaries(i), 8, "color_primaries_vps" );
     1261    WRITE_CODE(vps->getTransCharacter(i), 8, "transfer_characteristics_vps" );
     1262    WRITE_CODE(vps->getMaxtrixCoeff(i), 8, "matrix_coeffs_vps" );
     1263  }
     1264
     1265  if (vps->getVideoSigPresentVpsFlag() && vps->getNumVideoSignalInfo() > 1 )
     1266  {
     1267    for (i=1; i < vps->getMaxLayers(); i++)
     1268      WRITE_CODE(vps->getVideoSignalInfoIdx(i), 4, "vps_video_signal_info_idx" );
     1269  }
     1270#endif
    12491271#if VPS_VUI_TILES_NOT_IN_USE__FLAG
    12501272  UInt layerIdx;
     
    13231345#endif
    13241346#if VPS_VUI_VIDEO_SIGNAL
     1347#if VPS_VUI_VIDEO_SIGNAL_MOVE
     1348#else
    13251349    WRITE_FLAG( vps->getVideoSigPresentVpsFlag(), "video_signal_info_idx_present_flag" );
    13261350    if (vps->getVideoSigPresentVpsFlag())
     
    13431367            WRITE_CODE(vps->getVideoSignalInfoIdx(i), 4, "vps_video_signal_info_idx" );
    13441368    }
     1369#endif
    13451370#endif
    13461371}
Note: See TracChangeset for help on using the changeset viewer.