Changeset 502 in SHVCSoftware


Ignore:
Timestamp:
20 Nov 2013, 02:32:16 (11 years ago)
Author:
etri
Message:

Add chroma and bit-depth control flag in representation format.(JCTVC-O0179)

Location:
branches/SHM-4.1-dev/source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r498 r502  
    148148  {
    149149    RepFormat *repFormat = vps->getVpsRepFormat( idx );
     150#if REPN_FORMAT_CONTROL_FLAG
     151    repFormat->setChromaAndBitDepthVpsPresentFlag( true );
     152    if (idx==0)
     153    {
     154      assert(repFormat->getChromaAndBitDepthVpsPresentFlag() == true);
     155    }
     156#endif
    150157    repFormat->setPicWidthVpsInLumaSamples  ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceWidth()   );
    151158    repFormat->setPicHeightVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceHeight()  );
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h

    r494 r502  
    436436class RepFormat
    437437{
     438#if REPN_FORMAT_CONTROL_FLAG
     439  Bool m_chromaAndBitDepthVpsPresentFlag;
     440#endif
    438441#if AUXILIARY_PICTURES
    439442  ChromaFormat m_chromaFormatVpsIdc;
     
    449452public:
    450453  RepFormat();
     454
     455#if REPN_FORMAT_CONTROL_FLAG
     456  Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; }
     457  void setChromaAndBitDepthVpsPresentFlag(Bool x) { m_chromaAndBitDepthVpsPresentFlag = x; }
     458#endif
    451459
    452460#if AUXILIARY_PICTURES
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h

    r494 r502  
    5757#define ALIGN_TSA_STSA_PICS              1      ///< JCTVC-N0084: Alignment of TSA and STSA pictures across AU.
    5858#define REPN_FORMAT_IN_VPS               1      ///< JCTVC-N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS
     59#if REPN_FORMAT_IN_VPS
     60#define REPN_FORMAT_CONTROL_FLAG         1      ///< JCTVC-O0179: Add control flag in representation format to control sending of chroma and bitdepth parameters
     61#endif
    5962#define TIMING_INFO_NONZERO_LAYERID_SPS  1      ///< JCTVC-N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS
    6063#define RPL_INIT_N0316_N0082             1      ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction
  • branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r494 r502  
    13511351{
    13521352  UInt uiCode;
     1353#if REPN_FORMAT_CONTROL_FLAG
     1354  READ_FLAG ( uiCode, "chroma_and_bit_depth_vps_present_flag");   repFormat->setChromaAndBitDepthVpsPresentFlag(uiCode ? true : false);
     1355  READ_CODE ( 16, uiCode, "pic_width_in_luma_samples" );          repFormat->setPicWidthVpsInLumaSamples ( uiCode );
     1356  READ_CODE ( 16, uiCode, "pic_height_in_luma_samples" );         repFormat->setPicHeightVpsInLumaSamples( uiCode );
     1357
     1358  if( repFormat->getChromaAndBitDepthVpsPresentFlag() )
     1359  {
     1360#if AUXILIARY_PICTURES
     1361    READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( ChromaFormat(uiCode) );
     1362#else
     1363    READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( uiCode );
     1364#endif
     1365
     1366    if( repFormat->getChromaFormatVpsIdc() == 3 )
     1367    {
     1368      READ_FLAG( uiCode, "separate_colour_plane_flag");        repFormat->setSeparateColourPlaneVpsFlag(uiCode ? true : false);
     1369    }
     1370
     1371
     1372    READ_CODE( 4, uiCode, "bit_depth_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
     1373    READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
     1374  }
     1375#else
    13531376#if AUXILIARY_PICTURES
    13541377  READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( ChromaFormat(uiCode) );
     
    13671390  READ_CODE( 4, uiCode, "bit_depth_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
    13681391  READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
    1369 
     1392#endif
    13701393}
    13711394#endif
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r494 r502  
    10711071Void  TEncCavlc::codeRepFormat      ( RepFormat *repFormat )
    10721072{
     1073#if REPN_FORMAT_CONTROL_FLAG
     1074   WRITE_FLAG ( repFormat->getChromaAndBitDepthVpsPresentFlag(), "chroma_and_bit_depth_vps_presenet_flag");
     1075
     1076   WRITE_CODE ( repFormat->getPicWidthVpsInLumaSamples (), 16, "pic_width_in_luma_samples" );   
     1077   WRITE_CODE ( repFormat->getPicHeightVpsInLumaSamples(), 16, "pic_height_in_luma_samples" ); 
     1078
     1079   if ( repFormat->getChromaAndBitDepthVpsPresentFlag() )
     1080   {
     1081     WRITE_CODE( repFormat->getChromaFormatVpsIdc(), 2, "chroma_format_idc" );   
     1082
     1083     if( repFormat->getChromaFormatVpsIdc() == 3 )
     1084     {
     1085       WRITE_FLAG( repFormat->getSeparateColourPlaneVpsFlag(), "separate_colour_plane_flag");     
     1086     }
     1087
     1088     assert( repFormat->getBitDepthVpsLuma() >= 8 );
     1089     assert( repFormat->getBitDepthVpsChroma() >= 8 );
     1090     WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_luma_minus8" );           
     1091     WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );
     1092   }
     1093#else
    10731094  WRITE_CODE( repFormat->getChromaFormatVpsIdc(), 2, "chroma_format_idc" );   
    10741095 
     
    10841105  assert( repFormat->getBitDepthVpsChroma() >= 8 );
    10851106  WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_luma_minus8" );           
    1086   WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );         
     1107  WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );
     1108#endif
    10871109
    10881110}
Note: See TracChangeset for help on using the changeset viewer.