Changeset 165 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
8 May 2013, 22:13:18 (12 years ago)
Author:
qualcomm
Message:

Profile and output-layer signalling in VPS (MACRO: VPS_PROFILE_OUTPUT_LAYERS)

M0268: Signaling of profile and output layers in VPS as in Section 3 of M0268v2.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r160 r165  
    3939#include "TEncCavlc.h"
    4040#include "SEIwrite.h"
    41 
     41#include <iostream>
    4242//! \ingroup TLibEncoder
    4343//! \{
     
    718718#if VPS_EXTN_PROFILE_INFO
    719719  // Profile-tier-level signalling
     720#if VPS_PROFILE_OUTPUT_LAYERS
     721  WRITE_CODE( vps->getNumLayerSets() - 1   , 10, "vps_number_layer_sets_minus1" );     
     722  WRITE_CODE( vps->getNumProfileTierLevel() - 1,  6, "vps_num_profile_tier_level_minus1");
     723  for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
     724#else
    720725  for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++)
     726#endif
    721727  {
    722728    WRITE_FLAG( vps->getProfilePresentFlag(idx),       "vps_profile_present_flag[i]" );
    723729    if( !vps->getProfilePresentFlag(idx) )
    724730    {
     731#if VPS_PROFILE_OUTPUT_LAYERS
     732      WRITE_CODE( vps->getProfileLayerSetRef(idx) - 1, 6, "profile_ref_minus1[i]" );
     733#else
    725734      WRITE_UVLC( vps->getProfileLayerSetRef(idx) - 1, "vps_profile_layer_set_ref_minus1[i]" );
     735#endif
    726736    }
    727737    codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    728738  }
    729739#endif
     740
     741#if VPS_PROFILE_OUTPUT_LAYERS
     742  Int numOutputLayerSets = vps->getNumOutputLayerSets() ;
     743  WRITE_FLAG(  (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" );
     744  if(numOutputLayerSets > vps->getNumLayerSets())
     745  {
     746    WRITE_CODE( numOutputLayerSets - vps->getNumLayerSets(), 10, "num_add_output_layer_sets" );
     747  }
     748  if( numOutputLayerSets > 1 )
     749  {
     750    WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" );   
     751  }
     752
     753  for(i = 1; i < numOutputLayerSets; i++)
     754  {
     755    if( i > (vps->getNumLayerSets() - 1) )
     756    {
     757      Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) ));
     758      WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 
     759      Int lsIdx = vps->getOutputLayerSetIdx(i);
     760      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
     761      {
     762        WRITE_FLAG( vps->getOutputLayerFlag(i,j), "output_layer_flag[i][j]");
     763      }
     764    }
     765    Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) ));
     766    WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" );     
     767  }
     768#else
    730769#if VPS_EXTN_OP_LAYER_SETS
    731770  // Target output layer signalling
     
    748787    }
    749788  }
     789#endif
    750790#endif
    751791#if !VPS_MOVE_DIR_DEPENDENCY_FLAG
Note: See TracChangeset for help on using the changeset viewer.