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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r856 r868  
    936936  {
    937937    READ_FLAG( uiVal, "colour_remap_persistence_flag" );                sei.m_colourRemapPersistenceFlag = uiVal;
    938     READ_FLAG( uiVal, "colour_remap_video_signal_type_present_flag" );  sei.m_colourRemapVideoSignalTypePresentFlag = uiVal;
    939     if ( sei.m_colourRemapVideoSignalTypePresentFlag )
    940     {
    941       READ_FLAG( uiVal,    "colour_remap_video_full_range_flag" );     sei.m_colourRemapVideoFullRangeFlag = uiVal;
     938    READ_FLAG( uiVal, "colour_remap_video_signal_info_present_flag" );  sei.m_colourRemapVideoSignalInfoPresentFlag = uiVal;
     939    if ( sei.m_colourRemapVideoSignalInfoPresentFlag )
     940    {
     941      READ_FLAG( uiVal,    "colour_remap_full_range_flag" );           sei.m_colourRemapFullRangeFlag = uiVal;
    942942      READ_CODE( 8, uiVal, "colour_remap_primaries" );                 sei.m_colourRemapPrimaries = uiVal;
    943       READ_CODE( 8, uiVal, "colour_remap_transfer_characteristics" );  sei.m_colourRemapTransferCharacteristics = uiVal;
    944       READ_CODE( 8, uiVal, "colour_remap_matrix_coeffs" );             sei.m_colourRemapMatrixCoeffs = uiVal;
    945     }
    946     READ_CODE( 8, uiVal, "colour_remap_coded_data_bit_depth" );  sei.m_colourRemapCodedDataBitDepth = uiVal;
    947     READ_CODE( 8, uiVal, "colour_remap_target_bit_depth" );      sei.m_colourRemapTargetBitDepth = uiVal;
     943      READ_CODE( 8, uiVal, "colour_remap_transfer_function" );         sei.m_colourRemapTransferFunction = uiVal;
     944      READ_CODE( 8, uiVal, "colour_remap_matrix_coefficients" );       sei.m_colourRemapMatrixCoefficients = uiVal;
     945    }
     946    READ_CODE( 8, uiVal, "colour_remap_input_bit_depth" ); sei.m_colourRemapInputBitDepth = uiVal;
     947    READ_CODE( 8, uiVal, "colour_remap_bit_depth" ); sei.m_colourRemapBitDepth = uiVal;
    948948 
    949949    for( Int c=0 ; c<3 ; c++ )
     
    955955        for ( Int i=0 ; i<=sei.m_preLutNumValMinus1[c] ; i++ )
    956956        {
    957           READ_CODE( (( sei.m_colourRemapCodedDataBitDepth   + 7 ) >> 3 ) << 3, uiVal, "pre_lut_coded_value[c][i]" );  sei.m_preLutCodedValue[c][i]  = uiVal;
    958           READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_target_value[c][i]" ); sei.m_preLutTargetValue[c][i] = uiVal;
     957          READ_CODE( (( sei.m_colourRemapInputBitDepth   + 7 ) >> 3 ) << 3, uiVal, "pre_lut_coded_value[c][i]" );  sei.m_preLutCodedValue[c][i]  = uiVal;
     958          READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_target_value[c][i]" ); sei.m_preLutTargetValue[c][i] = uiVal;
    959959        }
    960960      else // pre_lut_num_val_minus1[c] == 0
     
    962962        sei.m_preLutCodedValue[c][0]  = 0;
    963963        sei.m_preLutTargetValue[c][0] = 0;
    964         sei.m_preLutCodedValue[c][1]  = (1 << sei.m_colourRemapCodedDataBitDepth) - 1 ;
    965         sei.m_preLutTargetValue[c][1] = (1 << sei.m_colourRemapTargetBitDepth) - 1 ;
     964        sei.m_preLutCodedValue[c][1]  = (1 << sei.m_colourRemapInputBitDepth) - 1 ;
     965        sei.m_preLutTargetValue[c][1] = (1 << sei.m_colourRemapBitDepth) - 1 ;
    966966      }
    967967    }
     
    992992        for ( Int i=0 ; i<=sei.m_postLutNumValMinus1[c] ; i++ )
    993993        {
    994           READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_coded_value[c][i]" );  sei.m_postLutCodedValue[c][i] = uiVal;
    995           READ_CODE( (( sei.m_colourRemapTargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_target_value[c][i]" ); sei.m_postLutTargetValue[c][i] = uiVal;
     994          READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_coded_value[c][i]" );  sei.m_postLutCodedValue[c][i] = uiVal;
     995          READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_target_value[c][i]" ); sei.m_postLutTargetValue[c][i] = uiVal;
    996996        }
    997997      else
     
    999999        sei.m_postLutCodedValue[c][0]  = 0;
    10001000        sei.m_postLutTargetValue[c][0] = 0;
    1001         sei.m_postLutTargetValue[c][1] = (1 << sei.m_colourRemapTargetBitDepth) - 1;
    1002         sei.m_postLutCodedValue[c][1]  = (1 << sei.m_colourRemapTargetBitDepth) - 1;
     1001        sei.m_postLutTargetValue[c][1] = (1 << sei.m_colourRemapBitDepth) - 1;
     1002        sei.m_postLutCodedValue[c][1]  = (1 << sei.m_colourRemapBitDepth) - 1;
    10031003      }
    10041004    }
Note: See TracChangeset for help on using the changeset viewer.