Changeset 659 in SHVCSoftware for branches/SHM-6-dev


Ignore:
Timestamp:
9 Apr 2014, 21:42:54 (11 years ago)
Author:
seregin
Message:

fix for the ticket #21

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

Legend:

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

    r652 r659  
    16231623#endif
    16241624#if REPN_FORMAT_IN_VPS
    1625 Void  TDecCavlc::parseRepFormat      ( RepFormat *repFormat )
     1625Void  TDecCavlc::parseRepFormat( RepFormat *repFormat )
    16261626{
    16271627  UInt uiCode;
    1628 #if REPN_FORMAT_CONTROL_FLAG
    1629   READ_FLAG ( uiCode, "chroma_and_bit_depth_vps_present_flag");   repFormat->setChromaAndBitDepthVpsPresentFlag(uiCode ? true : false);
    1630   READ_CODE ( 16, uiCode, "pic_width_in_luma_samples" );          repFormat->setPicWidthVpsInLumaSamples ( uiCode );
    1631   READ_CODE ( 16, uiCode, "pic_height_in_luma_samples" );         repFormat->setPicHeightVpsInLumaSamples( uiCode );
     1628#if REPN_FORMAT_CONTROL_FLAG 
     1629  READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );        repFormat->setPicWidthVpsInLumaSamples ( uiCode );
     1630  READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" );       repFormat->setPicHeightVpsInLumaSamples( uiCode );
     1631  READ_FLAG( uiCode, "chroma_and_bit_depth_vps_present_flag" );    repFormat->setChromaAndBitDepthVpsPresentFlag( uiCode ? true : false );
    16321632
    16331633  if( repFormat->getChromaAndBitDepthVpsPresentFlag() )
    16341634  {
     1635    READ_CODE( 2, uiCode, "chroma_format_vps_idc" );
    16351636#if AUXILIARY_PICTURES
    1636     READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( ChromaFormat(uiCode) );
    1637 #else
    1638     READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( uiCode );
     1637    repFormat->setChromaFormatVpsIdc( ChromaFormat(uiCode) );
     1638#else
     1639    repFormat->setChromaFormatVpsIdc( uiCode );
    16391640#endif
    16401641
    16411642    if( repFormat->getChromaFormatVpsIdc() == 3 )
    16421643    {
    1643       READ_FLAG( uiCode, "separate_colour_plane_flag");        repFormat->setSeparateColourPlaneVpsFlag(uiCode ? true : false);
    1644     }
    1645 
    1646 
    1647     READ_CODE( 4, uiCode, "bit_depth_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
    1648     READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
     1644      READ_FLAG( uiCode, "separate_colour_plane_vps_flag" );       repFormat->setSeparateColourPlaneVpsFlag( uiCode ? true : false );
     1645    }
     1646
     1647    READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
     1648    READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
    16491649  }
    16501650#else
  • branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r653 r659  
    12381238#endif
    12391239#if REPN_FORMAT_IN_VPS
    1240 Void  TEncCavlc::codeRepFormat      ( RepFormat *repFormat )
     1240Void  TEncCavlc::codeRepFormat( RepFormat *repFormat )
    12411241{
    12421242#if REPN_FORMAT_CONTROL_FLAG
    1243    WRITE_FLAG ( repFormat->getChromaAndBitDepthVpsPresentFlag(), "chroma_and_bit_depth_vps_presenet_flag");
    1244 
    1245    WRITE_CODE ( repFormat->getPicWidthVpsInLumaSamples (), 16, "pic_width_in_luma_samples" );   
    1246    WRITE_CODE ( repFormat->getPicHeightVpsInLumaSamples(), 16, "pic_height_in_luma_samples" ); 
    1247 
    1248    if ( repFormat->getChromaAndBitDepthVpsPresentFlag() )
    1249    {
    1250      WRITE_CODE( repFormat->getChromaFormatVpsIdc(), 2, "chroma_format_idc" );   
    1251 
    1252      if( repFormat->getChromaFormatVpsIdc() == 3 )
    1253      {
    1254        WRITE_FLAG( repFormat->getSeparateColourPlaneVpsFlag(), "separate_colour_plane_flag");     
    1255      }
    1256 
    1257      assert( repFormat->getBitDepthVpsLuma() >= 8 );
    1258      assert( repFormat->getBitDepthVpsChroma() >= 8 );
    1259      WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_luma_minus8" );           
    1260      WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );
    1261    }
     1243  WRITE_CODE( repFormat->getPicWidthVpsInLumaSamples (), 16, "pic_width_vps_in_luma_samples" );   
     1244  WRITE_CODE( repFormat->getPicHeightVpsInLumaSamples(), 16, "pic_height_vps_in_luma_samples" ); 
     1245  WRITE_FLAG( repFormat->getChromaAndBitDepthVpsPresentFlag(), "chroma_and_bit_depth_vps_present_flag" );
     1246
     1247  if( repFormat->getChromaAndBitDepthVpsPresentFlag() )
     1248  {
     1249    WRITE_CODE( repFormat->getChromaFormatVpsIdc(), 2, "chroma_format_vps_idc" );   
     1250
     1251    if( repFormat->getChromaFormatVpsIdc() == 3 )
     1252    {
     1253      WRITE_FLAG( repFormat->getSeparateColourPlaneVpsFlag(), "separate_colour_plane_vps_flag" );     
     1254    }
     1255
     1256    assert( repFormat->getBitDepthVpsLuma() >= 8 );
     1257    assert( repFormat->getBitDepthVpsChroma() >= 8 );
     1258    WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_vps_luma_minus8" );           
     1259    WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_vps_chroma_minus8" );
     1260  }
    12621261#else
    12631262  WRITE_CODE( repFormat->getChromaFormatVpsIdc(), 2, "chroma_format_idc" );   
     
    12751274  WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_luma_minus8" );           
    12761275  WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );
    1277 #endif
    1278 
     1276#endif
    12791277}
    12801278#endif
Note: See TracChangeset for help on using the changeset viewer.