source: SHVCSoftware/branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp @ 1437

Last change on this file since 1437 was 1437, checked in by seregin, 9 years ago

formatting of printing output

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1/** \file     TAppEncLayerCfg.cpp
2\brief    Handle encoder configuration parameters
3*/
4
5#include <stdlib.h>
6#include <cassert>
7#include <cstring>
8#include <string>
9#include "TLibCommon/TComRom.h"
10#include "TAppEncCfg.h"
11#include "TAppEncLayerCfg.h"
12#include "TAppCommon/program_options_lite.h"
13
14#ifdef WIN32
15#define strdup _strdup
16#endif
17
18using namespace std;
19namespace po = df::program_options_lite;
20
21//! \ingroup TAppEncoder
22//! \{
23
24
25#if AUXILIARY_PICTURES
26static inline ChromaFormat numberToChromaFormat(const Int val)
27{
28  switch (val)
29  {
30    case 400: return CHROMA_400; break;
31    case 420: return CHROMA_420; break;
32    case 422: return CHROMA_422; break;
33    case 444: return CHROMA_444; break;
34    default:  return NUM_CHROMA_FORMAT;
35  }
36}
37#endif
38
39// ====================================================================================================================
40// Constructor / destructor / initialization / destroy
41// ====================================================================================================================
42#if SVC_EXTENSION
43TAppEncLayerCfg::TAppEncLayerCfg()
44: m_cInputFile(string(""))
45, m_cReconFile(string(""))
46, m_conformanceWindowMode(0)
47, m_scalingListFile(NULL)
48, m_pchdQPFile(NULL)
49, m_aidQP(NULL)
50, m_repFormatIdx(-1)
51#if Q0074_COLOUR_REMAPPING_SEI
52, m_colourRemapSEIFileRoot(string(""))
53#endif
54{
55#if Q0074_COLOUR_REMAPPING_SEI
56  memset( m_colourRemapSEIPreLutCodedValue,   0, sizeof(m_colourRemapSEIPreLutCodedValue) );
57  memset( m_colourRemapSEIPreLutTargetValue,  0, sizeof(m_colourRemapSEIPreLutTargetValue) );
58  memset( m_colourRemapSEIPostLutCodedValue,  0, sizeof(m_colourRemapSEIPostLutCodedValue) );
59  memset( m_colourRemapSEIPostLutTargetValue, 0, sizeof(m_colourRemapSEIPostLutTargetValue) );
60#endif
61  m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;
62  m_aiPad[1] = m_aiPad[0] = 0;
63  m_numRefLayerLocationOffsets = 0;
64  ::memset(m_refLocationOffsetLayerId,   0, sizeof(m_refLocationOffsetLayerId));
65  ::memset(m_scaledRefLayerLeftOffset,   0, sizeof(m_scaledRefLayerLeftOffset));
66  ::memset(m_scaledRefLayerTopOffset,    0, sizeof(m_scaledRefLayerTopOffset));
67  ::memset(m_scaledRefLayerRightOffset,  0, sizeof(m_scaledRefLayerRightOffset));
68  ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset));
69  ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag));
70  ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag));
71  ::memset(m_refRegionLeftOffset,   0, sizeof(m_refRegionLeftOffset));
72  ::memset(m_refRegionTopOffset,    0, sizeof(m_refRegionTopOffset));
73  ::memset(m_refRegionRightOffset,  0, sizeof(m_refRegionRightOffset));
74  ::memset(m_refRegionBottomOffset, 0, sizeof(m_refRegionBottomOffset));
75  ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag));
76  ::memset(m_phaseHorLuma,   0, sizeof(m_phaseHorLuma));
77  ::memset(m_phaseVerLuma,   0, sizeof(m_phaseVerLuma));
78  ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma));
79  ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma));
80}
81
82TAppEncLayerCfg::~TAppEncLayerCfg()
83{
84  if ( m_aidQP )
85  {
86    delete[] m_aidQP;
87  }
88#if Q0074_COLOUR_REMAPPING_SEI
89  for( Int c=0 ; c<3 ; c++)
90  {
91    if ( m_colourRemapSEIPreLutCodedValue[c] )
92    {
93      delete[] m_colourRemapSEIPreLutCodedValue[c];
94    }
95    if ( m_colourRemapSEIPreLutTargetValue[c] )
96    {
97      delete[] m_colourRemapSEIPreLutTargetValue[c];
98    }
99    if ( m_colourRemapSEIPostLutCodedValue[c] )
100    {
101      delete[] m_colourRemapSEIPostLutCodedValue[c];
102    }
103    if ( m_colourRemapSEIPostLutTargetValue[c] )
104    {
105      delete[] m_colourRemapSEIPostLutTargetValue[c];
106    }
107  }
108#endif
109  free(m_scalingListFile);
110}
111
112Void TAppEncLayerCfg::create()
113{
114}
115
116Void TAppEncLayerCfg::destroy()
117{
118}
119
120#endif //SVC_EXTENSION
121
122
123//! \}
Note: See TracBrowser for help on using the repository browser.