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


Ignore:
Timestamp:
21 Jan 2014, 18:47:46 (11 years ago)
Author:
seregin
Message:

merge from trunk

Location:
branches/SHM-5.0-dev/source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source

  • branches/SHM-5.0-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r540 r550  
    144144  m_tgtLayerId = nLayerNum - 1;
    145145  assert( m_tgtLayerId >= 0 );
     146#if O0137_MAX_LAYERID
     147  assert( m_tgtLayerId < MAX_NUM_LAYER_IDS );
     148#endif
    146149#if OUTPUT_LAYER_SET_INDEX 
    147150  this->getCommonDecoderParams()->setOutputLayerSetIdx( olsIdx       );
  • branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r540 r550  
    25792579  printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE);
    25802580  printf("REF_IDX_MFM: %d ", REF_IDX_MFM);
    2581 #else
    2582   printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
    2583 #endif
    25842581  printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL);
    25852582  printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT);
    25862583  printf("O0194_WEIGHTED_PREDICTION_CGS: %d ",O0194_WEIGHTED_PREDICTION_CGS);
     2584#else
     2585  printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
     2586#endif
    25872587  printf("\n\n");
    25882588 
  • branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r540 r550  
    11711171  vps->setNumOutputLayerSets(vps->getNumLayerSets());
    11721172  vps->setNumProfileTierLevel(vps->getNumLayerSets());
     1173#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1174  vps->setDefaultOneTargetOutputLayerIdc(1);
     1175#else
    11731176  vps->setDefaultOneTargetOutputLayerFlag(true);
     1177#endif
    11741178  for(i = 1; i < vps->getNumLayerSets(); i++)
    11751179  {
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r540 r550  
    20382038, m_moreOutputLayerSetsThanDefaultFlag (false)
    20392039, m_numAddOutputLayerSets     (0)
     2040#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     2041, m_defaultOneTargetOutputLayerIdc     (0)
     2042#else
    20402043, m_defaultOneTargetOutputLayerFlag    (false)
     2044#endif
    20412045#if VPS_VUI_BITRATE_PICRATE
    20422046, m_bitRatePresentVpsFlag     (false)
     
    20482052#endif
    20492053#if VIEW_ID_RELATED_SIGNALING
     2054#if O0109_VIEW_ID_LEN
     2055, m_viewIdLen                (0)
     2056#else
    20502057, m_viewIdLenMinus1           (0)
     2058#endif
     2059#endif
     2060#if VPS_VUI_OFFSET
     2061, m_vpsVuiOffset (0)
    20512062#endif
    20522063{
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h

    r540 r550  
    540540  Bool       m_moreOutputLayerSetsThanDefaultFlag;
    541541  Int        m_numAddOutputLayerSets;
     542#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     543  UInt       m_defaultOneTargetOutputLayerIdc;
     544#else
    542545  Bool       m_defaultOneTargetOutputLayerFlag;
     546#endif
    543547  Int        m_profileLevelTierIdx[64];     
    544548#if JCTVC_M0458_INTERLAYER_RPS_SIG
     
    622626#endif
    623627#if VIEW_ID_RELATED_SIGNALING
     628#if O0109_VIEW_ID_LEN
     629  Int         m_viewIdLen;
     630#else
    624631  Int         m_viewIdLenMinus1;
     632#endif
    625633  Int         m_viewIdVal                [MAX_LAYERS];
    626634#endif
     
    642650  Int     m_numSubDpbs                  [MAX_VPS_OP_LAYER_SETS_PLUS1];
    643651#endif
     652
     653#if O0109_MOVE_VPS_VUI_FLAG
     654  Bool       m_vpsVuiPresentFlag;
     655#endif
     656
    644657#endif //SVC_EXTENSION
     658#if VPS_VUI_OFFSET
     659  Int     m_vpsVuiOffset;
     660#endif
    645661public:
    646662  TComVPS();
     
    811827  Void   setNumAddOutputLayerSets(Int x)                         { m_numAddOutputLayerSets = x   ; }
    812828
     829#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     830  UInt   getDefaultOneTargetOutputLayerIdc()                 { return m_defaultOneTargetOutputLayerIdc;}
     831  Void   setDefaultOneTargetOutputLayerIdc(UInt x)           { m_defaultOneTargetOutputLayerIdc= x    ;}
     832#else
    813833  Bool   getDefaultOneTargetOutputLayerFlag()                 { return m_defaultOneTargetOutputLayerFlag;}
    814834  Void   setDefaultOneTargetOutputLayerFlag(Bool x)           { m_defaultOneTargetOutputLayerFlag= x    ;}
    815 
     835#endif
    816836  Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
    817837  Void   setProfileLevelTierIdx(Int i, Int x)                 { m_profileLevelTierIdx[i] = x   ; }
     
    946966#endif
    947967#if VIEW_ID_RELATED_SIGNALING
     968#if O0109_VIEW_ID_LEN
     969  Void    setViewIdLen( Int  val )                                   { m_viewIdLen = val; }
     970  Int     getViewIdLen(  )                                           { return m_viewIdLen; }
     971#else
    948972  Void    setViewIdLenMinus1( Int  val )                                   { m_viewIdLenMinus1 = val; }
    949973  Int     getViewIdLenMinus1(  )                                           { return m_viewIdLenMinus1; }
     974#endif
    950975
    951976  Void    setViewIdVal( Int viewOrderIndex, Int  val )                     { m_viewIdVal[viewOrderIndex] = val; }
     
    9851010  Int     getNumSubDpbs(Int i)                          { return m_numSubDpbs[i]; }
    9861011  Void    setNumSubDpbs(Int i, Int x)                   { m_numSubDpbs[i] = x;    }
     1012#endif
     1013
     1014#if O0109_MOVE_VPS_VUI_FLAG
     1015  Bool   getVpsVuiPresentFlag()                                 { return m_vpsVuiPresentFlag; }
     1016  Void   setVpsVuiPresentFlag(Bool x)                           { m_vpsVuiPresentFlag = x; }
     1017#endif
     1018
     1019#if VPS_VUI_OFFSET
     1020  Int     getVpsVuiOffset()         { return m_vpsVuiOffset; }
     1021  Void    setVpsVuiOffset(Int x)    { m_vpsVuiOffset = x; }
    9871022#endif
    9881023#endif //SVC_EXTENSION
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h

    r549 r550  
    4343#define SYNTAX_BYTES                     10      ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
    4444
     45#define VPS_VUI_OFFSET                   1      ///< N0085: Signal VPS VUI offset in the VPS extension
     46
    4547#define RANDOM_ACCESS_SEI_FIX            1
    4648#if SVC_EXTENSION
    4749#define MAX_LAYERS                       8      ///< max number of layers the codec is supposed to handle
     50
     51#define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
     52
     53#define O0109_O0199_FLAGS_TO_VUI         1      ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui
     54#define O0109_VIEW_ID_LEN                1      ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews
     55#define O0109_PROF_REF_MINUS1            1      ///< JCTVC-O0109: constraint that profile_ref_minus1[i] shall be less than or equal to i
     56#define O0109_DEFAULT_ONE_OUT_LAYER_IDC  1      ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc
     57#define O0109_MOVE_VPS_VUI_FLAG          1      ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset
     58
     59#define O0135_DEFAULT_ONE_OUT_SEMANTIC   1      ///< JCTVC-O0135: semantics change of default_one_target_output_layer_idc for auxiliary pictures
    4860
    4961#define O0194_DIFFERENT_BITDEPTH_EL_BL   1      ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled)
     
    96108
    97109#if VPS_VUI
    98 #define VPS_VUI_TILES_NOT_IN_USE__FLAG    1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    99 #define VPS_VUI_WPP_NOT_IN_USE__FLAG    1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
     110#define VPS_VUI_TILES_NOT_IN_USE__FLAG   1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
     111#define VPS_VUI_WPP_NOT_IN_USE__FLAG     1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    100112#define TILE_BOUNDARY_ALIGNED_FLAG       1      ///< JCTVC-N0160/JCTVC-N0199 proposal 2 variant 2: VPS VUI flag to indicate tile boundary alignment
    101113#define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
     
    177189#define RC_SHVC_HARMONIZATION            1      ///< JCTVC-M0037: rate control for SHVC
    178190
    179 #define VIEW_ID_RELATED_SIGNALING        1      ///< Introduce syntax elements view_id_len_minus1 and view_id_val
     191#define VIEW_ID_RELATED_SIGNALING        1      ///< Introduce syntax elements view_id and view_id_val
    180192#define M0043_LAYERS_PRESENT_SEI         0      ///< JCTVC-M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed.
    181193#define N0383_IL_CONSTRAINED_TILE_SETS_SEI  1
     
    243255
    244256#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
     257#if O0137_MAX_LAYERID
     258#define MAX_NUM_LAYER_IDS                63
     259#else
    245260#define MAX_NUM_LAYER_IDS                64
    246 
     261#endif
    247262#define COEF_REMAIN_BIN_REDUCTION        3 ///< indicates the level at which the VLC
    248263                                           ///< transitions from Golomb-Rice to TU+EG(k)
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r540 r550  
    866866  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    867867#if VPS_RENAME
    868   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1);
     868#if O0137_MAX_LAYERID
     869  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( min( 62u, uiCode) + 1 );
     870#else
     871  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
     872#endif
    869873#else
    870874  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     
    990994
    991995  READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
     996
     997#if O0109_MOVE_VPS_VUI_FLAG
     998  READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false);
     999  if ( uiCode )
     1000  {
     1001#endif
     1002#if VPS_VUI_OFFSET
     1003  READ_CODE( 16, uiCode, "vps_vui_offset" );  vps->setVpsVuiOffset( uiCode );
     1004#endif
     1005#if O0109_MOVE_VPS_VUI_FLAG
     1006  }
     1007#endif
    9921008  READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false);
    9931009
     
    10481064  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
    10491065  {
     1066#if O0109_VIEW_ID_LEN
     1067    READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode );
     1068#else
    10501069    READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode );
    1051   }
    1052 
     1070#endif
     1071  }
     1072
     1073#if O0109_VIEW_ID_LEN
     1074  if ( vps->getViewIdLen() > 0 )
     1075  {
     1076    for(  i = 0; i < vps->getNumViews(); i++ )
     1077    {
     1078      READ_CODE( vps->getViewIdLen( ), uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode );
     1079    }
     1080  }
     1081#else
    10531082  for(  i = 0; i < vps->getNumViews(); i++ )
    10541083  {
     
    10561085  }
    10571086#endif
     1087#endif // view id related signaling
    10581088#if VPS_EXTN_DIRECT_REF_LAYERS
    10591089  // For layer 0
     
    11651195    {
    11661196      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
     1197#if O0109_PROF_REF_MINUS1
     1198      assert( vps->getProfileLayerSetRef(idx) <= idx );
     1199#else
    11671200      assert( vps->getProfileLayerSetRef(idx) < idx );
    1168 
     1201#endif
    11691202      // Copy profile information as indicated
    11701203      vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) );
     
    11871220  if( numOutputLayerSets > 1 )
    11881221  {
     1222#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1223    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" );   vps->setDefaultOneTargetOutputLayerIdc( uiCode );
     1224#else
    11891225    READ_FLAG( uiCode, "default_one_target_output_layer_flag" );   vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false );
     1226#endif
    11901227  }
    11911228  vps->setNumOutputLayerSets( numOutputLayerSets );
     
    12151252      // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
    12161253      Int lsIdx = i;
     1254#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     1255      if( vps->getDefaultOneTargetOutputLayerIdc() == 1 )
     1256      {
     1257        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1258        {
     1259#if O0135_DEFAULT_ONE_OUT_SEMANTIC
     1260          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1)==0) );
     1261#else
     1262          vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
     1263#endif
     1264        }
     1265      }
     1266      else if ( vps->getDefaultOneTargetOutputLayerIdc() == 0 )
     1267      {
     1268        for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
     1269        {
     1270          vps->setOutputLayerFlag(i, j, 1);
     1271        }
     1272      }
     1273      else
     1274      {
     1275        // Other values of default_one_target_output_layer_idc than 0 and 1 are reserved for future use.
     1276      }
     1277#else
    12171278      if( vps->getDefaultOneTargetOutputLayerFlag() )
    12181279      {
     
    12291290        }
    12301291      }
     1292#endif
    12311293    }
    12321294    Int numBits = 1;
     
    14081470#endif
    14091471
     1472#if !O0109_O0199_FLAGS_TO_VUI
    14101473#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    14111474  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     
    14141477  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
    14151478#endif
    1416 
     1479#endif
     1480
     1481#if O0109_MOVE_VPS_VUI_FLAG
     1482  if ( vps->getVpsVuiPresentFlag() )
     1483#else
    14171484  READ_FLAG( uiCode,  "vps_vui_present_flag" );
    14181485  if (uiCode)
     1486#endif
    14191487  {
    14201488#if VPS_VUI
     
    15931661  }
    15941662#endif
     1663
     1664#if O0109_O0199_FLAGS_TO_VUI
     1665#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1666  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     1667#endif
     1668#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1669  READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false);
     1670#endif
     1671#endif
     1672
    15951673#if N0160_VUI_EXT_ILP_REF
    15961674    READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 );
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r549 r550  
    17341734  m_cEntropyDecoder.setBitstream      (nalu.m_Bitstream);
    17351735
     1736#if O0137_MAX_LAYERID
     1737  // ignore any NAL units with nuh_layer_id == 63
     1738  if (nalu.m_layerId == 63 )
     1739  { 
     1740    return false;
     1741  }
     1742#endif
    17361743  switch (nalu.m_nalUnitType)
    17371744  {
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r540 r550  
    669669  UInt numBytesInVps = this->m_pcBitIf->getNumberOfWrittenBits();
    670670#endif
     671#if VPS_VUI_OFFSET
     672   m_vpsVuiCounter = this->m_pcBitIf->getNumberOfWrittenBits();
     673#endif
    671674  WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
    672675  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     
    795798
    796799  WRITE_FLAG( vps->getAvcBaseLayerFlag(),              "avc_base_layer_flag" );
     800#if O0109_MOVE_VPS_VUI_FLAG
     801#if !VPS_VUI
     802  WRITE_FLAG( 0,                     "vps_vui_present_flag" );
     803  vps->setVpsVuiPresentFlag(false);
     804#else
     805  WRITE_FLAG( 1,                     "vps_vui_present_flag" );
     806  vps->setVpsVuiPresentFlag(true);
     807#endif
     808  if ( vps->getVpsVuiPresentFlag() )
     809  {
     810#if VPS_VUI_OFFSET
     811    WRITE_CODE( vps->getVpsVuiOffset(  ), 16,             "vps_vui_offset" );
     812#endif
     813    WRITE_FLAG( vps->getSplittingFlag(),                 "splitting_flag" );
     814  }
     815#else
     816#if VPS_VUI_OFFSET
     817  WRITE_CODE( vps->getVpsVuiOffset(  ), 16,             "vps_vui_offset" ); 
     818#endif
    797819  WRITE_FLAG( vps->getSplittingFlag(),                 "splitting_flag" );
     820#endif // O0109_MOVE_VPS_VUI_FLAG
    798821
    799822  for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++)
     
    841864  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
    842865  {
     866#if O0109_VIEW_ID_LEN
     867    WRITE_CODE( vps->getViewIdLen( ), 4, "view_id_len" );
     868    assert ( vps->getNumViews() >= (1<<vps->getViewIdLen()) );
     869#else
    843870    WRITE_CODE( vps->getViewIdLenMinus1( ), 4, "view_id_len_minus1" );
    844   }
    845 
     871#endif
     872  }
     873
     874#if O0109_VIEW_ID_LEN
     875  if ( vps->getViewIdLen() > 0 )
     876  {
     877#endif
    846878  for(  i = 0; i < vps->getNumViews(); i++ )
    847879  {
     880#if O0109_VIEW_ID_LEN
     881    WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLen( ), "view_id_val[i]" );
     882#else
    848883    WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLenMinus1( ) + 1, "view_id_val[i]" );
    849   }
    850 #endif
     884#endif
     885  }
     886#if O0109_VIEW_ID_LEN
     887  }
     888#endif
     889#endif // VIEW_ID_RELATED_SIGNALING
     890
    851891#if VPS_EXTN_DIRECT_REF_LAYERS
    852892  for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)
     
    931971  if( numOutputLayerSets > 1 )
    932972  {
     973#if O0109_DEFAULT_ONE_OUT_LAYER_IDC
     974    WRITE_CODE( vps->getDefaultOneTargetOutputLayerIdc(), 2, "default_one_target_output_layer_idc" );   
     975#else
    933976    WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" );   
     977#endif
    934978  }
    935979
     
    10721116#endif
    10731117#endif
     1118
     1119#if !O0109_O0199_FLAGS_TO_VUI
    10741120#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    10751121  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
     
    10781124  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
    10791125#endif
    1080 
     1126#endif
     1127
     1128#if !O0109_MOVE_VPS_VUI_FLAG
    10811129#if !VPS_VUI
    10821130  WRITE_FLAG( 0,                     "vps_vui_present_flag" );
     
    10891137      WRITE_FLAG(1,                  "vps_vui_alignment_bit_equal_to_one");
    10901138    }
     1139#if VPS_VUI_OFFSET
     1140    Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH
     1141    assert( vpsVuiOffsetValeInBits % 8 == 0 );
     1142    vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 );
     1143#endif
    10911144    codeVPSVUI(vps); 
    10921145  }
    10931146#endif
     1147#else
     1148  if(vps->getVpsVuiPresentFlag())   // Should be conditioned on the value of vps_vui_present_flag
     1149  {
     1150    while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 )
     1151    {
     1152      WRITE_FLAG(1,                  "vps_vui_alignment_bit_equal_to_one");
     1153    }
     1154#if VPS_VUI_OFFSET
     1155    Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH
     1156    assert( vpsVuiOffsetValeInBits % 8 == 0 );
     1157    vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 );
     1158#endif
     1159    codeVPSVUI(vps); 
     1160  }
     1161#endif // 0109_MOVE_VPS_FLAG
    10941162}
    10951163#endif
     
    12251293    }
    12261294  }
     1295#endif
     1296
     1297#if O0109_O0199_FLAGS_TO_VUI
     1298#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1299  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
     1300#endif
     1301#if HIGHER_LAYER_IRAP_SKIP_FLAG
     1302  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
     1303#endif
    12271304#endif
    12281305#if N0160_VUI_EXT_ILP_REF
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.h

    r540 r550  
    6868  TComSlice*    m_pcSlice;
    6969  UInt          m_uiCoeffCost;
    70 
     70#if VPS_VUI_OFFSET
     71  Int m_vpsVuiCounter;
     72#endif
    7173  Void codeShortTermRefPicSet              ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx );
    7274  Bool findMatchingLTRP ( TComSlice* pcSlice, UInt *ltrpsIndex, Int ltrpPOC, Bool usedFlag );
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r549 r550  
    17531753      OutputNALUnit nalu(NAL_UNIT_VPS);
    17541754#endif
     1755#if VPS_VUI_OFFSET
     1756      // The following code also calculates the VPS VUI offset
     1757#endif
    17551758#if VPS_EXTN_OFFSET_CALC
    17561759      OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0        ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
Note: See TracChangeset for help on using the changeset viewer.