Changeset 1213 in SHVCSoftware


Ignore:
Timestamp:
8 Jul 2015, 23:18:57 (9 years ago)
Author:
seregin
Message:

macro cleanup: R0150_CGS_SIGNAL_CONSTRAINTS

Location:
branches/SHM-dev/source/Lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp

    r1212 r1213  
    285285  rYUVP.U = sPred.U + ( deltaU << m_nResQuanBit );
    286286  rYUVP.V = sPred.V + ( deltaV << m_nResQuanBit );
    287 #if R0150_CGS_SIGNAL_CONSTRAINTS
     287
    288288  // LUT coefficients are less than 12-bit
    289289  assert( -2048 <= rYUVP.Y && rYUVP.Y <= 2047 );
    290290  assert( -2048 <= rYUVP.U && rYUVP.U <= 2047 );
    291291  assert( -2048 <= rYUVP.V && rYUVP.V <= 2047 );
    292 #endif
    293292}
    294293
     
    413412#endif
    414413
    415 #if R0150_CGS_SIGNAL_CONSTRAINTS
    416414Bool TCom3DAsymLUT::isRefLayer( UInt uiRefLayerId )
    417415{
     
    428426  return( bIsRefLayer );
    429427}
    430 #endif
    431428
    432429#if R0164_CGS_LUT_BUGFIX_CHECK
  • branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h

    r1212 r1213  
    44
    55#include "TypeDef.h"
    6 #if R0150_CGS_SIGNAL_CONSTRAINTS
     6
     7#if CGS_3D_ASYMLUT
    78#include <cassert>
    89#include <vector>
    9 #endif
    10 
    11 #if CGS_3D_ASYMLUT
    1210
    1311typedef struct _SYUVP
     
    2927  virtual ~TCom3DAsymLUT();
    3028
    31   virtual Void  create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2
    32 #if R0151_CGS_3D_ASYMLUT_IMPROVE
    33   , Int nAdaptCThresholdU , Int nAdaptCThresholdV
    34 #endif
    35     );
     29  virtual Void  create( Int nMaxOctantDepth, Int nInputBitDepth, Int nInputBitDepthC, Int nOutputBitDepth, Int nOutputBitDepthC, Int nMaxYPartNumLog2, Int nAdaptCThresholdU, Int nAdaptCThresholdV );
    3630  virtual Void  destroy();
    3731
     
    5145  Int   getMaxYPartNumLog2() { return m_nMaxYPartNumLog2; }
    5246  Int   getCurYPartNumLog2() { return m_nCurYPartNumLog2; }
    53 #if R0150_CGS_SIGNAL_CONSTRAINTS
     47
    5448  Void  addRefLayerId( UInt uiRefLayerId ) 
    5549  {
     
    6054  UInt  getRefLayerId( UInt n )  { assert( n < m_vRefLayerId.size() ); return m_vRefLayerId[n];   }
    6155  Bool  isRefLayer( UInt uiRefLayerId );
    62 #endif
     56
    6357#if R0151_CGS_3D_ASYMLUT_IMPROVE
    6458  Void  setAdaptChromaThresholdU( Int n ) { m_nAdaptCThresholdU = n; }
     
    113107  SCuboid *** m_pCuboid;
    114108  const static Int m_nVertexIdxOffset[4][3];
    115 #if R0150_CGS_SIGNAL_CONSTRAINTS
    116109  std::vector<UInt> m_vRefLayerId;
    117 #endif
    118110#if R0151_CGS_3D_ASYMLUT_IMPROVE
    119111  Int   m_nAdaptCThresholdU;
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1212 r1213  
    5858#if CGS_3D_ASYMLUT
    5959#define CGS_GCC_NO_VECTORIZATION         1
    60 #define R0150_CGS_SIGNAL_CONSTRAINTS     1      ///< JCTVC-R0150: CGS signaling improvement and constraints
    6160#define R0151_CGS_3D_ASYMLUT_IMPROVE     1      ///< JCTVC-R0151: Non-uniform chroma partitioning and improved LUT coefficient coding
    6261#define R0164_CGS_LUT_BUGFIX             1      ///< JCTVC-R0164: Bug fix with LUT syntax
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1212 r1213  
    35063506Void TDecCavlc::xParse3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT )
    35073507{
    3508 #if R0150_CGS_SIGNAL_CONSTRAINTS
    35093508  UInt uiNumRefLayersM1;
    35103509  READ_UVLC( uiNumRefLayersM1 , "num_cm_ref_layers_minus1" );
     
    35163515    pc3DAsymLUT->addRefLayerId( uiRefLayerId );
    35173516  }
    3518 #endif
     3517
    35193518  UInt uiCurOctantDepth , uiCurPartNumLog2 , uiInputBitDepthM8 , uiOutputBitDepthM8 , uiResQaunBit;
    35203519#if R0300_CGS_RES_COEFF_CODING
     
    35233522  READ_CODE( 2 , uiCurOctantDepth , "cm_octant_depth" );
    35243523  READ_CODE( 2 , uiCurPartNumLog2 , "cm_y_part_num_log2" );     
    3525 #if R0150_CGS_SIGNAL_CONSTRAINTS
     3524
    35263525  UInt uiChromaInputBitDepthM8 , uiChromaOutputBitDepthM8;
     3526
    35273527  READ_UVLC( uiInputBitDepthM8 , "cm_input_luma_bit_depth_minus8" );
    35283528  READ_UVLC( uiChromaInputBitDepthM8 , "cm_input_chroma_bit_depth_minus8" );
    35293529  READ_UVLC( uiOutputBitDepthM8 , "cm_output_luma_bit_depth_minus8" );
    35303530  READ_UVLC( uiChromaOutputBitDepthM8 , "cm_output_chroma_bit_depth_minus8" );
    3531 #else
    3532   READ_CODE( 3 , uiInputBitDepthM8 , "cm_input_bit_depth_minus8" );
    3533   Int iInputBitDepthCDelta;
    3534   READ_SVLC(iInputBitDepthCDelta, "cm_input_bit_depth_chroma delta");
    3535   READ_CODE( 3 , uiOutputBitDepthM8 , "cm_output_bit_depth_minus8" );
    3536   Int iOutputBitDepthCDelta;
    3537   READ_SVLC(iOutputBitDepthCDelta, "cm_output_bit_depth_chroma_delta");
    3538 #endif
    35393531  READ_CODE( 2 , uiResQaunBit , "cm_res_quant_bit" );
    35403532#if R0300_CGS_RES_COEFF_CODING
     
    35443536
    35453537#if R0151_CGS_3D_ASYMLUT_IMPROVE
    3546 #if R0150_CGS_SIGNAL_CONSTRAINTS
    35473538  Int nAdaptCThresholdU = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 );
    35483539  Int nAdaptCThresholdV = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 );
    3549 #else
    3550   Int nAdaptCThresholdU = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 );
    3551   Int nAdaptCThresholdV = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 );
    3552 #endif
     3540
    35533541  if( uiCurOctantDepth == 1 )
    35543542  {
     
    35623550  pc3DAsymLUT->destroy();
    35633551  pc3DAsymLUT->create( uiCurOctantDepth , uiInputBitDepthM8 + 8 , 
    3564 #if R0150_CGS_SIGNAL_CONSTRAINTS
    35653552    uiChromaInputBitDepthM8 + 8 ,
    3566 #else
    3567     uiInputBitDepthM8 + 8 + iInputBitDepthCDelta,
    3568 #endif
    35693553    uiOutputBitDepthM8 + 8 ,
    3570 #if R0150_CGS_SIGNAL_CONSTRAINTS
    35713554    uiChromaOutputBitDepthM8 + 8 ,
    3572 #else
    3573     uiOutputBitDepthM8 + 8 + iOutputBitDepthCDelta ,
    3574 #endif
    35753555    uiCurPartNumLog2
    35763556#if R0151_CGS_3D_ASYMLUT_IMPROVE
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1212 r1213  
    16361636#if CGS_3D_ASYMLUT
    16371637        TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
    1638         if( pcSlice->getPPS()->getCGSFlag()
    1639 #if R0150_CGS_SIGNAL_CONSTRAINTS
    1640           && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) )
    1641 #endif
    1642           )
    1643         {
    1644 #if R0150_CGS_SIGNAL_CONSTRAINTS
     1638        if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) )
     1639        {
    16451640          assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthY() == m_c3DAsymLUTPPS.getInputBitDepthY() );
    16461641          assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthC() == m_c3DAsymLUTPPS.getInputBitDepthC() );
    16471642          assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthY() );
    16481643          assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthC() );
    1649 #endif
    1650           if(!m_pColorMappedPic)
     1644
     1645          if( !m_pColorMappedPic )
    16511646          {
    16521647            initAsymLut(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0));
    16531648          }
     1649
    16541650          m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(),  m_pColorMappedPic );
    16551651          pBaseColRec = m_pColorMappedPic;
    16561652        }
    16571653#endif
     1654
    16581655        if( m_pcPic->isSpatialEnhLayer(refLayerIdc) )
    16591656        {
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1212 r1213  
    24702470Void TEncCavlc::xCode3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT )
    24712471{
    2472 #if R0150_CGS_SIGNAL_CONSTRAINTS
    24732472  UInt uiNumRefLayers = ( UInt )pc3DAsymLUT->getRefLayerNum();
    24742473  WRITE_UVLC( uiNumRefLayers - 1 , "num_cm_ref_layers_minus1" );
     
    24772476    WRITE_CODE( pc3DAsymLUT->getRefLayerId( i ) , 6 , "cm_ref_layer_id" );
    24782477  }
    2479 #endif
     2478
    24802479  assert( pc3DAsymLUT->getCurOctantDepth() < 4 );
    24812480  WRITE_CODE( pc3DAsymLUT->getCurOctantDepth() , 2 , "cm_octant_depth" );
     
    24832482  WRITE_CODE( pc3DAsymLUT->getCurYPartNumLog2() , 2 , "cm_y_part_num_log2" );
    24842483  assert( pc3DAsymLUT->getInputBitDepthY() < 16 );
    2485 #if R0150_CGS_SIGNAL_CONSTRAINTS
     2484
    24862485  WRITE_UVLC( pc3DAsymLUT->getInputBitDepthY() - 8 , "cm_input_luma_bit_depth_minus8" );
    24872486  WRITE_UVLC( pc3DAsymLUT->getInputBitDepthC() - 8 , "cm_input_chroma_bit_depth_minus8" );
    24882487  WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthY() - 8 , "cm_output_luma_bit_depth_minus8" );
    24892488  WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthC() - 8 , "cm_output_chroma_bit_depth_minus8" );
    2490 #else
    2491   WRITE_CODE( pc3DAsymLUT->getInputBitDepthY() - 8 , 3 , "cm_input_bit_depth_minus8" );
    2492   WRITE_SVLC(pc3DAsymLUT->getInputBitDepthC()-pc3DAsymLUT->getInputBitDepthY(), "cm_input_bit_depth_chroma delta");
    2493   assert( pc3DAsymLUT->getOutputBitDepthY() < 16 );
    2494   WRITE_CODE( pc3DAsymLUT->getOutputBitDepthY() - 8 , 3 , "cm_output_bit_depth_minus8" );
    2495   WRITE_SVLC(pc3DAsymLUT->getOutputBitDepthC()-pc3DAsymLUT->getOutputBitDepthY(), "cm_output_bit_depth_chroma_delta");
    2496 #endif
     2489
    24972490  assert( pc3DAsymLUT->getResQuantBit() < 4 );
    24982491  WRITE_CODE( pc3DAsymLUT->getResQuantBit() , 2 , "cm_res_quant_bit" );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1212 r1213  
    13981398        if( pcSlice->getPPS()->getCGSFlag() )
    13991399        {
    1400 #if R0150_CGS_SIGNAL_CONSTRAINTS
    14011400          // all reference layers are currently taken as CGS reference layers
    14021401          m_Enc3DAsymLUTPPS.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
    14031402          m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
    1404 #endif
    1405           if(g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16)) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
     1403
     1404          if( g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
    14061405          {
    1407             //downsampling;
     1406            //downsampling
    14081407            downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
    1409             //pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()->dump("ds.yuv", true, true);
     1408           
    14101409            m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
    14111410            m_Enc3DAsymLUTPicUpdate.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
Note: See TracChangeset for help on using the changeset viewer.