Changeset 868 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder


Ignore:
Timestamp:
13 Aug 2014, 18:37:06 (10 years ago)
Author:
seregin
Message:

update for CRI SEI, provided by Andrivon Pierre <Pierre.Andrivon@…>

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
5 edited

Legend:

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

    r863 r868  
    20762076#if !SVC_EXTENSION
    20772077  // reading external Colour Remapping Information SEI message parameters from file
    2078   if( m_colourRemapSEIFile.length() )
     2078  if( m_colourRemapSEIFile.size() > 0 )
    20792079  {
    20802080    FILE* fic;
     
    20912091    {
    20922092      retval = fscanf( fic, "%d", &m_colourRemapSEIPersistenceFlag );
    2093       retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignalTypePresentFlag);
    2094       if( m_colourRemapSEIVideoSignalTypePresentFlag )
    2095       {
    2096         retval = fscanf( fic, "%d", &m_colourRemapSEIVideoFullRangeFlag  );
     2093      retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignalInfoPresentFlag);
     2094      if( m_colourRemapSEIVideoSignalInfoPresentFlag )
     2095      {
     2096        retval = fscanf( fic, "%d", &m_colourRemapSEIFullRangeFlag  );
    20972097        retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries );
    2098         retval = fscanf( fic, "%d", &m_colourRemapSEITransferCharacteristics );
    2099         retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeffs );
    2100       }
    2101 
    2102       retval = fscanf( fic, "%d", &m_colourRemapSEICodedDataBitDepth );
    2103       retval = fscanf( fic, "%d", &m_colourRemapSEITargetBitDepth );
     2098        retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction );
     2099        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients );
     2100      }
     2101
     2102      retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth );
     2103      retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth );
    21042104 
    21052105      for( Int c=0 ; c<3 ; c++ )
     
    21702170      {
    21712171        retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0;
    2172         retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag = tempCode ? 1 : 0;
    2173         if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag )
    2174         {
    2175           retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoFullRangeFlag = tempCode ? 1 : 0;
     2172        retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0;
     2173        if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag )
     2174        {
     2175          retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0;
    21762176          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIPrimaries );
    2177           retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransferCharacteristics );
    2178           retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeffs );
    2179         }
    2180 
    2181         retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEICodedDataBitDepth );
    2182         retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITargetBitDepth );
     2177          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransferFunction );
     2178          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients );
     2179        }
     2180
     2181        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth );
     2182        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIBitDepth );
    21832183 
    21842184        for( Int c=0 ; c<3 ; c++ )
     
    33243324#if Q0074_COLOUR_REMAPPING_SEI
    33253325#if !SVC_EXTENSION
    3326   if ( m_colourRemapSEIFile.c_str() && !m_colourRemapSEICancelFlag )
    3327   {
    3328     xConfirmPara( m_colourRemapSEICodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");
    3329     xConfirmPara( m_colourRemapSEITargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");
     3326  if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag )
     3327  {
     3328    xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive");
     3329    xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive");
    33303330    for( Int c=0 ; c<3 ; c++)
    33313331    {
     
    33343334        for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++)
    33353335        {
    3336           xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
    3337           xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
     3336          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive");
     3337          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
    33383338        }
    33393339      xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive");
     
    33413341        for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++)
    33423342        {
    3343           xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
    3344           xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
     3343          xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
     3344          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
    33453345        }
    33463346    }
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r861 r868  
    381381  Bool      m_colourRemapSEICancelFlag;
    382382  Bool      m_colourRemapSEIPersistenceFlag;
    383   Bool      m_colourRemapSEIVideoSignalTypePresentFlag;
    384   Bool      m_colourRemapSEIVideoFullRangeFlag;
     383  Bool      m_colourRemapSEIVideoSignalInfoPresentFlag;
     384  Bool      m_colourRemapSEIFullRangeFlag;
    385385  Int       m_colourRemapSEIPrimaries;
    386   Int       m_colourRemapSEITransferCharacteristics;
    387   Int       m_colourRemapSEIMatrixCoeffs;
    388   Int       m_colourRemapSEICodedDataBitDepth;
    389   Int       m_colourRemapSEITargetBitDepth;
     386  Int       m_colourRemapSEITransferFunction;
     387  Int       m_colourRemapSEIMatrixCoefficients;
     388  Int       m_colourRemapSEIInputBitDepth;
     389  Int       m_colourRemapSEIBitDepth;
    390390  Int       m_colourRemapSEIPreLutNumValMinus1[3];
    391391  Int*      m_colourRemapSEIPreLutCodedValue[3];
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r860 r868  
    218218
    219219#if Q0074_COLOUR_REMAPPING_SEI
    220   if( m_colourRemapSEIFile.c_str() )
     220  if( m_colourRemapSEIFile.size() > 0 )
    221221  {
    222222    FILE* fic;
     
    234234    {
    235235      retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0;
    236       retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignalTypePresentFlag = tempCode ? 1 : 0;
    237       if( m_colourRemapSEIVideoSignalTypePresentFlag )
    238       {
    239         retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoFullRangeFlag = tempCode ? 1 : 0;
     236      retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0;
     237      if( m_colourRemapSEIVideoSignalInfoPresentFlag )
     238      {
     239        retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0;
    240240        retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries );
    241         retval = fscanf( fic, "%d", &m_colourRemapSEITransferCharacteristics );
    242         retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeffs );
    243       }
    244 
    245       retval = fscanf( fic, "%d", &m_colourRemapSEICodedDataBitDepth );
    246       retval = fscanf( fic, "%d", &m_colourRemapSEITargetBitDepth );
     241        retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction );
     242        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients );
     243      }
     244
     245      retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth );
     246      retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth );
    247247 
    248248      for( Int c=0 ; c<3 ; c++ )
     
    518518#endif
    519519#if Q0074_COLOUR_REMAPPING_SEI
    520   if ( m_colourRemapSEIFile.length() && !m_colourRemapSEICancelFlag )
    521   {
    522     xConfirmPara( m_colourRemapSEICodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");
    523     xConfirmPara( m_colourRemapSEITargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");
     520  if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag )
     521  {
     522    xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive");
     523    xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive");
    524524    for( Int c=0 ; c<3 ; c++)
    525525    {
     
    528528        for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++)
    529529        {
    530           xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
    531           xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
     530          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive");
     531          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
    532532        }
    533533      xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive");
    534534      if( m_colourRemapSEIPostLutNumValMinus1[c]>0 )
    535535        for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++)
    536         {
    537           if( m_colourRemapSEIPreLutNumValMinus1[c]>0 || m_colourRemapSEIMatrixPresentFlag )
    538             xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
    539           else
    540             xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
    541           xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
     536        {
     537          xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
     538          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
    542539        }
    543540    }
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r856 r868  
    130130  Bool      m_colourRemapSEICancelFlag;
    131131  Bool      m_colourRemapSEIPersistenceFlag;
    132   Bool      m_colourRemapSEIVideoSignalTypePresentFlag;
    133   Bool      m_colourRemapSEIVideoFullRangeFlag;
     132  Bool      m_colourRemapSEIVideoSignalInfoPresentFlag;
     133  Bool      m_colourRemapSEIFullRangeFlag;
    134134  Int       m_colourRemapSEIPrimaries;
    135   Int       m_colourRemapSEITransferCharacteristics;
    136   Int       m_colourRemapSEIMatrixCoeffs;
    137   Int       m_colourRemapSEICodedDataBitDepth;
    138   Int       m_colourRemapSEITargetBitDepth;
     135  Int       m_colourRemapSEITransferFunction;
     136  Int       m_colourRemapSEIMatrixCoefficients;
     137  Int       m_colourRemapSEIInputBitDepth;
     138  Int       m_colourRemapSEIBitDepth;
    139139  Int       m_colourRemapSEIPreLutNumValMinus1[3];
    140140  Int*      m_colourRemapSEIPreLutCodedValue[3];
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r866 r868  
    539539    m_acTEncTop[layer].setCRISEICancelFlag                          ( m_acLayerCfg[layer].m_colourRemapSEICancelFlag );
    540540    m_acTEncTop[layer].setCRISEIPersistenceFlag                     ( m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag );
    541     m_acTEncTop[layer].setCRISEIVideoSignalTypePresentFlag          ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag );
    542     m_acTEncTop[layer].setCRISEIVideoFullRangeFlag                  ( m_acLayerCfg[layer].m_colourRemapSEIVideoFullRangeFlag );
     541    m_acTEncTop[layer].setCRISEIVideoSignalInfoPresentFlag          ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag );
     542    m_acTEncTop[layer].setCRISEIFullRangeFlag                       ( m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag );
    543543    m_acTEncTop[layer].setCRISEIPrimaries                           ( m_acLayerCfg[layer].m_colourRemapSEIPrimaries );
    544     m_acTEncTop[layer].setCRISEITransferCharacteristics             ( m_acLayerCfg[layer].m_colourRemapSEITransferCharacteristics );
    545     m_acTEncTop[layer].setCRISEIMatrixCoeffs                        ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeffs );
    546     m_acTEncTop[layer].setCRISEICodedDataBitDepth                   ( m_acLayerCfg[layer].m_colourRemapSEICodedDataBitDepth );
    547     m_acTEncTop[layer].setCRISEITargetBitDepth                      ( m_acLayerCfg[layer].m_colourRemapSEITargetBitDepth );
     544    m_acTEncTop[layer].setCRISEITransferFunction                    ( m_acLayerCfg[layer].m_colourRemapSEITransferFunction );
     545    m_acTEncTop[layer].setCRISEIMatrixCoefficients                  ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients );
     546    m_acTEncTop[layer].setCRISEIInputBitDepth                       ( m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth );
     547    m_acTEncTop[layer].setCRISEIBitDepth                            ( m_acLayerCfg[layer].m_colourRemapSEIBitDepth );
    548548    m_acTEncTop[layer].setCRISEIPreLutNumValMinus1                  ( m_acLayerCfg[layer].m_colourRemapSEIPreLutNumValMinus1 );
    549549    m_acTEncTop[layer].setCRISEIPreLutCodedValue                    ( m_acLayerCfg[layer].m_colourRemapSEIPreLutCodedValue );
     
    924924  m_cTEncTop.setCRISEICancelFlag                 ( m_colourRemapSEICancelFlag );
    925925  m_cTEncTop.setCRISEIPersistenceFlag            ( m_colourRemapSEIPersistenceFlag );
    926   m_cTEncTop.setCRISEIVideoSignalTypePresentFlag ( m_colourRemapSEIVideoSignalTypePresentFlag );
    927   m_cTEncTop.setCRISEIVideoFullRangeFlag         ( m_colourRemapSEIVideoFullRangeFlag );
     926  m_cTEncTop.setCRISEIVideoSignalInfoPresentFlag ( m_colourRemapSEIVideoSignalInfoPresentFlag );
     927  m_cTEncTop.setCRISEIFullRangeFlag              ( m_colourRemapSEIFullRangeFlag );
    928928  m_cTEncTop.setCRISEIPrimaries                  ( m_colourRemapSEIPrimaries );
    929   m_cTEncTop.setCRISEITransferCharacteristics    ( m_colourRemapSEITransferCharacteristics );
    930   m_cTEncTop.setCRISEIMatrixCoeffs               ( m_colourRemapSEIMatrixCoeffs );
    931   m_cTEncTop.setCRISEICodedDataBitDepth          ( m_colourRemapSEICodedDataBitDepth );
    932   m_cTEncTop.setCRISEITargetBitDepth             ( m_colourRemapSEITargetBitDepth );
     929  m_cTEncTop.setCRISEITransferFunction           ( m_colourRemapSEITransferFunction );
     930  m_cTEncTop.setCRISEIMatrixCoefficients         ( m_colourRemapSEIMatrixCoefficients );
     931  m_cTEncTop.setCRISEIInputBitDepth              ( m_colourRemapSEIInputBitDepth );
     932  m_cTEncTop.setCRISEIBitDepth                   ( m_colourRemapSEIBitDepth );
    933933  m_cTEncTop.setCRISEIPreLutNumValMinus1         ( m_colourRemapSEIPreLutNumValMinus1 );
    934934  m_cTEncTop.setCRISEIPreLutCodedValue           ( m_colourRemapSEIPreLutCodedValue );
Note: See TracChangeset for help on using the changeset viewer.