Changeset 245 in SHVCSoftware for branches/SHM-2.1-dev/source


Ignore:
Timestamp:
30 May 2013, 02:09:16 (11 years ago)
Author:
seregin
Message:

add config parameter for scalability_mask update

Location:
branches/SHM-2.1-dev/source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r244 r245  
    8080    m_acLayerCfg[layer].setAppEncCfg(this);
    8181  }
     82  memset( m_scalabilityMask, 0, sizeof(m_scalabilityMask) );
    8283}
    8384#else
     
    424425  ("NumLayers",               m_numLayers, 1, "Number of layers to code")
    425426  ("ConformanceMode%d",       cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
    426   ("ScalabilityMask",       m_scalabilityMask, 1, "scalability_mask")
    427   ("BitstreamFile,b",       cfg_BitstreamFile, string(""), "Bitstream output file name")
    428   ("InputBitDepth",         m_inputBitDepthY,    8, "Bit-depth of input file")
    429   ("OutputBitDepth",        m_outputBitDepthY,   0, "Bit-depth of output file (default:InternalBitDepth)")
    430   ("InternalBitDepth",      m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)"
     427  ("ScalabilityMask0",        m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)")
     428  ("ScalabilityMask1",        m_scalabilityMask[1], 1, "scalability_mask[1] (scalable)" )
     429  ("BitstreamFile,b",         cfg_BitstreamFile, string(""), "Bitstream output file name")
     430  ("InputBitDepth",           m_inputBitDepthY,    8, "Bit-depth of input file")
     431  ("OutputBitDepth",          m_outputBitDepthY,   0, "Bit-depth of output file (default:InternalBitDepth)")
     432  ("InternalBitDepth",        m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)"
    431433                                                       "If different to InputBitDepth, source data will be converted")
    432   ("InputBitDepthC",        m_inputBitDepthC,    0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
    433   ("OutputBitDepthC",       m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    434   ("InternalBitDepthC",     m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
     434  ("InputBitDepthC",          m_inputBitDepthC,    0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
     435  ("OutputBitDepthC",         m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
     436  ("InternalBitDepthC",       m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    435437#if SCALED_REF_LAYER_OFFSETS
    436438  ("ScaledRefLayerLeftOffset%d",   cfg_scaledRefLayerLeftOffset,  0, MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"
     
    18741876  printf("\n");
    18751877#if SVC_EXTENSION 
    1876   printf("Total number of layers        : %d\n", m_numLayers            );
     1878  printf("Total number of layers        : %d\n", m_numLayers       );
     1879  printf("Multiview                     : %d\n", m_scalabilityMask[0] );
     1880  printf("Scalable                      : %d\n", m_scalabilityMask[1] );
    18771881  for(UInt layer=0; layer<m_numLayers; layer++)
    18781882  {
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r244 r245  
    6161  TAppEncLayerCfg m_acLayerCfg [MAX_LAYERS];
    6262  Int       m_numLayers;                                      ///< number of layers
    63   Int       m_scalabilityMask;                                ///< scalability_mask
     63  Int       m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask
    6464  Char*     m_pBitstreamFile;                                 ///< output bitstream file
    6565  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r244 r245  
    844844  if(m_numLayers > 1)
    845845  {
    846     vps->setScalabilityMask(m_scalabilityMask, true);
    847     vps->setNumScalabilityTypes(1);
     846    Int scalabilityTypes = 0;
     847    for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++)
     848    {
     849      vps->setScalabilityMask(i, m_scalabilityMask[i]);
     850      scalabilityTypes += m_scalabilityMask[i];
     851    }
     852    assert( scalabilityTypes == 1 );
     853    vps->setNumScalabilityTypes(scalabilityTypes);
    848854  }
    849855  else
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r228 r245  
    913913    READ_FLAG( uiCode, "scalability_mask[i]" ); vps->setScalabilityMask(i, uiCode ? true : false);
    914914    numScalabilityTypes += uiCode;
    915     if( i != 1 )
    916     {
    917       // Multiview and reserved masks are not used in this version of software
    918       assert( uiCode == 0 );
    919     }
    920915  }
    921916  vps->setNumScalabilityTypes(numScalabilityTypes);
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r240 r245  
    258258      {
    259259        rpcPic->setSpatialEnhLayerFlag( true );
     260
     261        //only for scalable extension
     262        assert( pcSlice->getVPS()->getScalabilityMask(1) == true );
    260263      }
    261264    }
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r238 r245  
    515515        {
    516516          pcEPic->setSpatialEnhLayerFlag( true );
     517
     518          //only for scalable extension
     519          assert( m_cVPS.getScalabilityMask(1) == true );
    517520        }
    518521      }
     
    543546        {
    544547          rpcPic->setSpatialEnhLayerFlag( true );
     548
     549          //only for scalable extension
     550          assert( m_cVPS.getScalabilityMask(1) == true );
    545551        }
    546552      }
Note: See TracChangeset for help on using the changeset viewer.