Ignore:
Timestamp:
15 Nov 2013, 14:55:37 (11 years ago)
Author:
nokia
Message:

Integrate auxiliary picture layers (JCTVC-O0041)

File:
1 edited

Legend:

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

    r471 r475  
    224224}
    225225
     226#if AUXILIARY_PICTURES
     227static inline ChromaFormat numberToChromaFormat(const Int val)
     228{
     229  switch (val)
     230  {
     231    case 400: return CHROMA_400; break;
     232    case 420: return CHROMA_420; break;
     233    case 422: return CHROMA_422; break;
     234    case 444: return CHROMA_444; break;
     235    default:  return NUM_CHROMA_FORMAT;
     236  }
     237}
     238#endif
     239
    226240#if SVC_EXTENSION
    227241void TAppEncCfg::getDirFilename(string& filename, string& dir, const string path)
     
    363377  UInt*      cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS];
    364378#endif
     379#if AUXILIARY_PICTURES
     380  Int      cfg_tmpChromaFormatIDC  [MAX_LAYERS];
     381  Int      cfg_tmpInputChromaFormat[MAX_LAYERS];
     382  Int*     cfg_auxId               [MAX_LAYERS];
     383#endif
    365384#if VPS_EXTN_DIRECT_REF_LAYERS
    366385#if M0457_PREDICTION_INDICATIONS
     
    477496    cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1;
    478497#endif
     498#if AUXILIARY_PICTURES
     499    cfg_auxId[layer]                = &m_acLayerCfg[layer].m_auxId;
     500#endif
    479501  }
    480502#if AVC_BASE
     
    533555#endif
    534556  ("NumLayers",               m_numLayers, 1, "Number of layers to code")
     557#if AUXILIARY_PICTURES
     558  ("InputChromaFormat%d",     cfg_tmpInputChromaFormat,  420, MAX_LAYERS, "InputChromaFormatIDC for layer %d")
     559  ("ChromaFormatIDC%d,-cf",   cfg_tmpChromaFormatIDC,    420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d")
     560  ("AuxId%d",                 cfg_auxId,                 0,   MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh")
     561#endif
    535562  ("ConformanceMode%d",       cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
    536563#if SCALABILITY_MASK_E0104
    537564  ("ScalabilityMask1",        m_scalabilityMask[1], 0, "scalability_mask[1] (multiview)")
    538565  ("ScalabilityMask2",        m_scalabilityMask[2], 1, "scalability_mask[2] (scalable)" )
     566#if AUXILIARY_PICTURES
     567  ("ScalabilityMask3",        m_scalabilityMask[3], 0, "scalability_mask[3] (auxiliary pictures)" )
     568#endif
    539569#else
    540570  ("ScalabilityMask0",        m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)")
     
    597627  ("OutputBitDepthC",       m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    598628  ("InternalBitDepthC",     m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
     629#if AUXILIARY_PICTURES
     630  ("InputChromaFormat",     tmpInputChromaFormat,                       420, "InputChromaFormatIDC")
     631  ("ChromaFormatIDC,-cf",   tmpChromaFormat,                             0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)")
     632#endif
    599633  ("ConformanceMode",       m_conformanceMode,     0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance")
    600634  ("HorizontalPadding,-pdx",m_aiPad[0],            0, "Horizontal source padding for conformance window mode 2")
     
    12111245      m_acLayerCfg[layer].m_refLayerIds = NULL;
    12121246    }
     1247  }
     1248#endif
     1249#if AUXILIARY_PICTURES
     1250  for(UInt layer = 0; layer < MAX_LAYERS; layer++)
     1251  {
     1252    m_acLayerCfg[layer].m_InputChromaFormat =  numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]);
     1253    m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormat ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer])));
    12131254  }
    12141255#endif
     
    22512292  }
    22522293#endif
     2294#if AUXILIARY_PICTURES
     2295  for (UInt layer=0; layer < MAX_LAYERS-1; layer++)
     2296  {
     2297    xConfirmPara(m_acLayerCfg[layer].m_auxId < 0 || m_acLayerCfg[layer].m_auxId > 4, "AuxId must be in range 0 to 4");
     2298    xConfirmPara(m_acLayerCfg[layer].m_auxId > 0 && m_acLayerCfg[layer].m_chromaFormatIDC != CHROMA_400, "Auxiliary picture must be monochrome picture");
     2299  }
     2300#endif
    22532301#undef xConfirmPara
    22542302  if (check_failed)
     
    23312379  printf("Multiview                     : %d\n", m_scalabilityMask[1] );
    23322380  printf("Scalable                      : %d\n", m_scalabilityMask[2] );
     2381#if AUXILIARY_PICTURES
     2382  printf("Auxiliary pictures            : %d\n", m_scalabilityMask[3] );
     2383#endif
    23332384#else
    23342385  printf("Multiview                     : %d\n", m_scalabilityMask[0] );
Note: See TracChangeset for help on using the changeset viewer.