Ignore:
Timestamp:
14 Sep 2015, 19:41:29 (9 years ago)
Author:
tech
Message:

Integrated general SEI changes and following SEIs:

  • Multiview view position SEI
  • Multiview acquisition information SEI
  • Multiview scene information SEI
  • Inter-layer constrained tile sets SEI
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp

    r1313 r1328  
    122122    break;
    123123#if NH_MV
     124#if !NH_MV_SEI
    124125   case SEI::SUB_BITSTREAM_PROPERTY:
    125126   xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
    126127   break;
    127128#endif
     129#endif
     130#if NH_MV_SEI
     131#if NH_MV_SEI_TBD
     132   case SEI::LAYERS_NOT_PRESENT:
     133     xWriteSEILayersNotPresent(*static_cast<const SEILayersNotPresent*>(&sei));
     134     break;
     135#endif
     136   case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
     137     xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei));
     138     break;
     139#if NH_MV_SEI_TBD
     140   case SEI::BSP_NESTING:
     141     xWriteSEIBspNesting(*static_cast<const SEIBspNesting*>(&sei));
     142     break;
     143   case SEI::BSP_INITIAL_ARRIVAL_TIME:
     144     xWriteSEIBspInitialArrivalTime(*static_cast<const SEIBspInitialArrivalTime*>(&sei));
     145     break;
     146#endif
     147   case SEI::SUB_BITSTREAM_PROPERTY:
     148     xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
     149     break;
     150#if NH_MV_SEI_TBD
     151   case SEI::ALPHA_CHANNEL_INFO:
     152     xWriteSEIAlphaChannelInfo(*static_cast<const SEIAlphaChannelInfo*>(&sei));
     153     break;
     154   case SEI::OVERLAY_INFO:
     155     xWriteSEIOverlayInfo(*static_cast<const SEIOverlayInfo*>(&sei));
     156     break;
     157#endif
     158   case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS:
     159     xWriteSEITemporalMvPredictionConstraints(*static_cast<const SEITemporalMvPredictionConstraints*>(&sei));
     160     break;
     161#if NH_MV_SEI_TBD
     162   case SEI::FRAME_FIELD_INFO:
     163     xWriteSEIFrameFieldInfo(*static_cast<const SEIFrameFieldInfo*>(&sei));
     164     break;
     165   case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO:
     166     xWriteSEIThreeDimensionalReferenceDisplaysInfo(*static_cast<const SEIThreeDimensionalReferenceDisplaysInfo*>(&sei));
     167     break;
     168   case SEI::DEPTH_REPRESENTATION_INFO:
     169     xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei));
     170     break;
     171#endif
     172   case SEI::MULTIVIEW_SCENE_INFO:
     173     xWriteSEIMultiviewSceneInfo(*static_cast<const SEIMultiviewSceneInfo*>(&sei));
     174     break;
     175   case SEI::MULTIVIEW_ACQUISITION_INFO:
     176     xWriteSEIMultiviewAcquisitionInfo(*static_cast<const SEIMultiviewAcquisitionInfo*>(&sei));
     177     break;
     178
     179   case SEI::MULTIVIEW_VIEW_POSITION:
     180     xWriteSEIMultiviewViewPosition(*static_cast<const SEIMultiviewViewPosition*>(&sei));
     181     break;
     182#if NH_MV_SEI_TBD
     183   case SEI::ALTERNATIVE_DEPTH_INFO:
     184     xWriteSEIAlternativeDepthInfo(*static_cast<const SEIAlternativeDepthInfo*>(&sei));
     185     break;
     186#endif
     187#endif
     188
    128189
    129190  default:
     
    748809
    749810#if NH_MV
     811#if !NH_MV_SEI
    750812Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
    751813{
     
    764826  xWriteByteAlign();
    765827}
     828#endif
    766829#endif
    767830
     
    818881}
    819882
     883#if NH_MV_SEI_TBD
     884Void SEIWriter::xWriteSEILayersNotPresent( const SEILayersNotPresent& sei)
     885{
     886  WRITE_CODE( sei.m_lnpSeiActiveVpsId, 4, "lnp_sei_active_vps_id" );
     887  for( Int i = 0; i  <=  MaxLayersMinus1; i++ )
     888  {
     889    WRITE_FLAG( ( sei.m_layerNotPresentFlag[i] ? 1 : 0 ), "layer_not_present_flag" );
     890  }
     891};
     892#endif
     893
     894
     895
     896Void SEIWriter::xWriteSEIInterLayerConstrainedTileSets( const SEIInterLayerConstrainedTileSets& sei)
     897{
     898  WRITE_FLAG( ( sei.m_ilAllTilesExactSampleValueMatchFlag ? 1 : 0 ), "il_all_tiles_exact_sample_value_match_flag" );
     899  WRITE_FLAG( ( sei.m_ilOneTilePerTileSetFlag ? 1 : 0 ),             "il_one_tile_per_tile_set_flag" );
     900  if( !sei.m_ilOneTilePerTileSetFlag )
     901  {
     902    WRITE_UVLC( sei.m_ilNumSetsInMessageMinus1, "il_num_sets_in_message_minus1" );
     903    if( sei.m_ilNumSetsInMessageMinus1 )
     904    {
     905      WRITE_FLAG( ( sei.m_skippedTileSetPresentFlag ? 1 : 0 ), "skipped_tile_set_present_flag" );
     906    }
     907    Int numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - sei.m_skippedTileSetPresentFlag + 1;
     908    for( Int i = 0; i < numSignificantSets; i++ )
     909    {
     910      WRITE_UVLC( sei.m_ilctsId[i],                   "ilcts_id" );
     911      WRITE_UVLC( sei.m_ilNumTileRectsInSetMinus1[i], "il_num_tile_rects_in_set_minus1" );
     912      for( Int j = 0; j  <= sei.m_ilNumTileRectsInSetMinus1[ i ]; j++ )
     913      {
     914        WRITE_UVLC( sei.m_ilTopLeftTileIndex[i][j],     "il_top_left_tile_index" );
     915        WRITE_UVLC( sei.m_ilBottomRightTileIndex[i][j], "il_bottom_right_tile_index" );
     916      }
     917      WRITE_CODE( sei.m_ilcIdc[i], 2, "ilc_idc" );
     918      if ( !sei.m_ilAllTilesExactSampleValueMatchFlag )
     919      {
     920        WRITE_FLAG( ( sei.m_ilExactSampleValueMatchFlag[i] ? 1 : 0 ), "il_exact_sample_value_match_flag" );
     921      }
     922    }
     923  }
     924  else
     925  {
     926    WRITE_CODE( sei.m_allTilesIlcIdc, 2, "all_tiles_ilc_idc" );
     927  }
     928};
     929
     930#if NH_MV_SEI_TBD
     931Void SEIWriter::xWriteSEIBspNesting( const SEIBspNesting& sei)
     932{
     933  WRITE_UVLC( sei.m_seiOlsIdx, "sei_ols_idx" );
     934  WRITE_UVLC( sei.m_seiPartitioningSchemeIdx, "sei_partitioning_scheme_idx" );
     935  WRITE_UVLC( sei.m_bspIdx, "bsp_idx" );
     936  while( !ByteaLigned(() ) );
     937  {
     938    WRITE_CODE( sei.m_bspNestingZeroBit, *equalto0*/u1, "bsp_nesting_zero_bit" );
     939  }
     940  WRITE_UVLC( sei.m_numSeisInBspMinus1, "num_seis_in_bsp_minus1" );
     941  for( Int i = 0; i  <=  NumSeisInBspMinus1( ); i++ )
     942  {
     943    SeiMessage(() );
     944  }
     945};
     946
     947Void SEIWriter::xWriteSEIBspInitialArrivalTime( const SEIBspInitialArrivalTime& sei)
     948{
     949  psIdx = SeiPartitioningSchemeIdx();
     950  if( nalInitialArrivalDelayPresent )
     951  {
     952    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
     953    {
     954      WRITE_CODE( sei.m_nalInitialArrivalDelay[i], getNalInitialArrivalDelayLen ), "nal_initial_arrival_delay" );
     955    }
     956  }
     957  if( vclInitialArrivalDelayPresent )
     958  {
     959    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
     960    {
     961      WRITE_CODE( sei.m_vclInitialArrivalDelay[i], getVclInitialArrivalDelayLen ), "vcl_initial_arrival_delay" );
     962    }
     963  }
     964};
     965#endif
     966Void SEIWriter::xWriteSEISubBitstreamProperty( const SEISubBitstreamProperty& sei)
     967{
     968  WRITE_CODE( sei.m_sbPropertyActiveVpsId, 4,      "sb_property_active_vps_id"         );
     969  WRITE_UVLC( sei.m_numAdditionalSubStreamsMinus1, "num_additional_sub_streams_minus1" );
     970  for( Int i = 0; i  <=  sei.m_numAdditionalSubStreamsMinus1; i++ )
     971  {
     972    WRITE_CODE( sei.m_subBitstreamMode    [i], 2,  "sub_bitstream_mode"       );
     973    WRITE_UVLC( sei.m_olsIdxToVps         [i],     "ols_idx_to_vps"           );
     974    WRITE_CODE( sei.m_highestSublayerId   [i], 3,  "highest_sublayer_id"      );
     975    WRITE_CODE( sei.m_avgSbPropertyBitRate[i], 16, "avg_sb_property_bit_rate" );
     976    WRITE_CODE( sei.m_maxSbPropertyBitRate[i], 16, "max_sb_property_bit_rate" );
     977  }
     978};
     979#if NH_MV_SEI_TBD
     980Void SEIWriter::xWriteSEIAlphaChannelInfo( const SEIAlphaChannelInfo& sei)
     981{
     982  WRITE_FLAG( ( sei.m_alphaChannelCancelFlag ? 1 : 0 ), "alpha_channel_cancel_flag" );
     983  if( !sei.m_alphaChannelCancelFlag )
     984  {
     985    WRITE_CODE( sei.m_alphaChannelUseIdc, 3, "alpha_channel_use_idc" );
     986    WRITE_CODE( sei.m_alphaChannelBitDepthMinus8, 3, "alpha_channel_bit_depth_minus8" );
     987    WRITE_CODE( sei.m_alphaTransparentValue, getAlphaTransparentValueLen ), "alpha_transparent_value" );
     988    WRITE_CODE( sei.m_alphaOpaqueValue, getAlphaOpaqueValueLen ), "alpha_opaque_value" );
     989    WRITE_FLAG( ( sei.m_alphaChannelIncrFlag ? 1 : 0 ), "alpha_channel_incr_flag" );
     990    WRITE_FLAG( ( sei.m_alphaChannelClipFlag ? 1 : 0 ), "alpha_channel_clip_flag" );
     991    if( sei.m_alphaChannelClipFlag )
     992    {
     993      WRITE_FLAG( ( sei.m_alphaChannelClipTypeFlag ? 1 : 0 ), "alpha_channel_clip_type_flag" );
     994    }
     995  }
     996};
     997
     998Void SEIWriter::xWriteSEIOverlayInfo( const SEIOverlayInfo& sei)
     999{
     1000  WRITE_FLAG( ( sei.m_overlayInfoCancelFlag ? 1 : 0 ), "overlay_info_cancel_flag" );
     1001  if( !sei.m_overlayInfoCancelFlag )
     1002  {
     1003    WRITE_UVLC( sei.m_overlayContentAuxIdMinus128, "overlay_content_aux_id_minus128" );
     1004    WRITE_UVLC( sei.m_overlayLabelAuxIdMinus128, "overlay_label_aux_id_minus128" );
     1005    WRITE_UVLC( sei.m_overlayAlphaAuxIdMinus128, "overlay_alpha_aux_id_minus128" );
     1006    WRITE_UVLC( sei.m_overlayElementLabelValueLengthMinus8, "overlay_element_label_value_length_minus8" );
     1007    WRITE_UVLC( sei.m_numOverlaysMinus1, "num_overlays_minus1" );
     1008    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
     1009    {
     1010      WRITE_UVLC( sei.m_overlayIdx[i], "overlay_idx" );
     1011      WRITE_FLAG( ( sei.m_languageOverlayPresentFlag[i] ? 1 : 0 ), "language_overlay_present_flag" );
     1012      WRITE_CODE( sei.m_overlayContentLayerId[i], 6, "overlay_content_layer_id" );
     1013      WRITE_FLAG( ( sei.m_overlayLabelPresentFlag[i] ? 1 : 0 ), "overlay_label_present_flag" );
     1014      if( sei.m_overlayLabelPresentFlag( i ) )
     1015      {
     1016        WRITE_CODE( sei.m_overlayLabelLayerId[i], 6, "overlay_label_layer_id" );
     1017      }
     1018      WRITE_FLAG( ( sei.m_overlayAlphaPresentFlag[i] ? 1 : 0 ), "overlay_alpha_present_flag" );
     1019      if( sei.m_overlayAlphaPresentFlag( i ) )
     1020      {
     1021        WRITE_CODE( sei.m_overlayAlphaLayerId[i], 6, "overlay_alpha_layer_id" );
     1022      }
     1023      if( sei.m_overlayLabelPresentFlag( i ) )
     1024      {
     1025        WRITE_UVLC( sei.m_numOverlayElementsMinus1[i], "num_overlay_elements_minus1" );
     1026        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
     1027        {
     1028          WRITE_CODE( sei.m_overlayElementLabelMin[i][j], getOverlayElementLabelMinLen ), "overlay_element_label_min" );
     1029          WRITE_CODE( sei.m_overlayElementLabelMax[i][j], getOverlayElementLabelMaxLen ), "overlay_element_label_max" );
     1030        }
     1031      }
     1032    }
     1033    while( !ByteaLigned(() ) );
     1034    {
     1035      WRITE_CODE( sei.m_overlayZeroBit, *equalto0*/f1, "overlay_zero_bit" );
     1036    }
     1037    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
     1038    {
     1039      if( sei.m_languageOverlayPresentFlag( i ) )
     1040      {
     1041        WRITE_CODE( sei.m_overlayLanguage[i], tv, "overlay_language" );
     1042      }
     1043      WRITE_CODE( sei.m_overlayName[i], tv, "overlay_name" );
     1044      if( sei.m_overlayLabelPresentFlag( i ) )
     1045      {
     1046        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
     1047        {
     1048          WRITE_CODE( sei.m_overlayElementName[i][j], tv, "overlay_element_name" );
     1049        }
     1050      }
     1051    }
     1052    WRITE_FLAG( ( sei.m_overlayInfoPersistenceFlag ? 1 : 0 ), "overlay_info_persistence_flag" );
     1053  }
     1054};
     1055#endif
     1056
     1057Void SEIWriter::xWriteSEITemporalMvPredictionConstraints( const SEITemporalMvPredictionConstraints& sei)
     1058{
     1059  WRITE_FLAG( ( sei.m_prevPicsNotUsedFlag    ? 1 : 0 ), "prev_pics_not_used_flag"     );
     1060  WRITE_FLAG( ( sei.m_noIntraLayerColPicFlag ? 1 : 0 ), "no_intra_layer_col_pic_flag" );
     1061};
     1062
     1063#if NH_MV_SEI_TBD
     1064Void SEIWriter::xWriteSEIFrameFieldInfo( const SEIFrameFieldInfo& sei)
     1065{
     1066  WRITE_CODE( sei.m_ffinfoPicStruct, 4, "ffinfo_pic_struct" );
     1067  WRITE_CODE( sei.m_ffinfoSourceScanType, 2, "ffinfo_source_scan_type" );
     1068  WRITE_FLAG( ( sei.m_ffinfoDuplicateFlag ? 1 : 0 ), "ffinfo_duplicate_flag" );
     1069};
     1070
     1071Void SEIWriter::xWriteSEIThreeDimensionalReferenceDisplaysInfo( const SEIThreeDimensionalReferenceDisplaysInfo& sei)
     1072{
     1073  WRITE_UVLC( sei.m_precRefDisplayWidth, "prec_ref_display_width" );
     1074  WRITE_FLAG( ( sei.m_refViewingDistanceFlag ? 1 : 0 ), "ref_viewing_distance_flag" );
     1075  if( sei.m_refViewingDistanceFlag )
     1076  {
     1077    WRITE_UVLC( sei.m_precRefViewingDist, "prec_ref_viewing_dist" );
     1078  }
     1079  WRITE_UVLC( sei.m_numRefDisplaysMinus1, "num_ref_displays_minus1" );
     1080  for( Int i = 0; i  <=  NumRefDisplaysMinus1( ); i++ )
     1081  {
     1082    WRITE_UVLC( sei.m_leftViewId[i], "left_view_id" );
     1083    WRITE_UVLC( sei.m_rightViewId[i], "right_view_id" );
     1084    WRITE_CODE( sei.m_exponentRefDisplayWidth[i], 6, "exponent_ref_display_width" );
     1085    WRITE_CODE( sei.m_mantissaRefDisplayWidth[i], getMantissaRefDisplayWidthLen ), "mantissa_ref_display_width" );
     1086    if( sei.m_refViewingDistanceFlag )
     1087    {
     1088      WRITE_CODE( sei.m_exponentRefViewingDistance[i], 6, "exponent_ref_viewing_distance" );
     1089      WRITE_CODE( sei.m_mantissaRefViewingDistance[i], getMantissaRefViewingDistanceLen ), "mantissa_ref_viewing_distance" );
     1090    }
     1091    WRITE_FLAG( ( sei.m_additionalShiftPresentFlag[i] ? 1 : 0 ), "additional_shift_present_flag" );
     1092    if( sei.m_additionalShiftPresentFlag( i ) )
     1093    {
     1094      WRITE_CODE( sei.m_numSampleShiftPlus512[i], 10, "num_sample_shift_plus512" );
     1095    }
     1096  }
     1097  WRITE_FLAG( ( sei.m_threeDimensionalReferenceDisplaysExtensionFlag ? 1 : 0 ), "three_dimensional_reference_displays_extension_flag" );
     1098};
     1099
     1100Void SEIWriter::xWriteSEIDepthRepresentationInfo( const SEIDepthRepresentationInfo& sei)
     1101{
     1102  WRITE_FLAG( ( sei.m_zNearFlag ? 1 : 0 ), "z_near_flag" );
     1103  WRITE_FLAG( ( sei.m_zFarFlag ? 1 : 0 ), "z_far_flag" );
     1104  WRITE_FLAG( ( sei.m_dMinFlag ? 1 : 0 ), "d_min_flag" );
     1105  WRITE_FLAG( ( sei.m_dMaxFlag ? 1 : 0 ), "d_max_flag" );
     1106  WRITE_UVLC( sei.m_depthRepresentationType, "depth_representation_type" );
     1107  if( sei.m_dMinFlag  | |  sei.m_dMaxFlag )
     1108  {
     1109    WRITE_UVLC( sei.m_disparityRefViewId, "disparity_ref_view_id" );
     1110  }
     1111  if( sei.m_zNearFlag )
     1112  {
     1113    DepthRepInfoElement(() ZNearSign, ZNearExp, ZNearMantissa, ZNearManLen );
     1114  }
     1115  if( sei.m_zFarFlag )
     1116  {
     1117    DepthRepInfoElement(() ZFarSign, ZFarExp, ZFarMantissa, ZFarManLen );
     1118  }
     1119  if( sei.m_dMinFlag )
     1120  {
     1121    DepthRepInfoElement(() DMinSign, DMinExp, DMinMantissa, DMinManLen );
     1122  }
     1123  if( sei.m_dMaxFlag )
     1124  {
     1125    DepthRepInfoElement(() DMaxSign, DMaxExp, DMaxMantissa, DMaxManLen );
     1126  }
     1127  if( sei.m_depthRepresentationType  ==  3 )
     1128  {
     1129    WRITE_UVLC( sei.m_depthNonlinearRepresentationNumMinus1, "depth_nonlinear_representation_num_minus1" );
     1130    for( Int i = 1; i  <=  sei.m_depthNonlinearRepresentationNumMinus1 + 1; i++ )
     1131    {
     1132      DepthNonlinearRepresentationModel( i );
     1133    }
     1134  }
     1135};
     1136
     1137Void SEIWriter::xWriteSEIDepthRepInfoElement( const SEIDepthRepInfoElement& sei)
     1138{
     1139  WRITE_FLAG( ( sei.m_daSignFlag ? 1 : 0 ), "da_sign_flag" );
     1140  WRITE_CODE( sei.m_daExponent, 7, "da_exponent" );
     1141  WRITE_CODE( sei.m_daMantissaLenMinus1, 5, "da_mantissa_len_minus1" );
     1142  WRITE_CODE( sei.m_daMantissa, getDaMantissaLen ), "da_mantissa" );
     1143};
     1144
     1145#endif
     1146Void SEIWriter::xWriteSEIMultiviewSceneInfo( const SEIMultiviewSceneInfo& sei)
     1147{
     1148  WRITE_SVLC( sei.m_minDisparity     , "min_disparity"       );
     1149  WRITE_UVLC( sei.m_maxDisparityRange, "max_disparity_range" );
     1150};
     1151
     1152
     1153Void SEIWriter::xWriteSEIMultiviewAcquisitionInfo( const SEIMultiviewAcquisitionInfo& sei)
     1154{
     1155  WRITE_FLAG( ( sei.m_intrinsicParamFlag ? 1 : 0 ), "intrinsic_param_flag" );
     1156  WRITE_FLAG( ( sei.m_extrinsicParamFlag ? 1 : 0 ), "extrinsic_param_flag" );
     1157  if( sei.m_intrinsicParamFlag )
     1158  {
     1159    WRITE_FLAG( ( sei.m_intrinsicParamsEqualFlag ? 1 : 0 ), "intrinsic_params_equal_flag" );
     1160    WRITE_UVLC(   sei.m_precFocalLength                   , "prec_focal_length"           );
     1161    WRITE_UVLC(   sei.m_precPrincipalPoint                , "prec_principal_point"        );
     1162    WRITE_UVLC(   sei.m_precSkewFactor                    , "prec_skew_factor"            );
     1163
     1164    for( Int i = 0; i  <=  ( sei.m_intrinsicParamsEqualFlag ? 0 : sei.getNumViewsMinus1() ); i++ )
     1165    {
     1166      WRITE_FLAG( ( sei.m_signFocalLengthX       [i] ? 1 : 0 ),                                         "sign_focal_length_x"        );
     1167      WRITE_CODE(   sei.m_exponentFocalLengthX   [i]          , 6                                  ,    "exponent_focal_length_x"    );
     1168      WRITE_CODE(   sei.m_mantissaFocalLengthX   [i]          , sei.getMantissaFocalLengthXLen( i ),    "mantissa_focal_length_x"    );
     1169      WRITE_FLAG( ( sei.m_signFocalLengthY       [i] ? 1 : 0 ),                                         "sign_focal_length_y"        );
     1170      WRITE_CODE(   sei.m_exponentFocalLengthY   [i]          , 6                                  ,    "exponent_focal_length_y"    );
     1171      WRITE_CODE(   sei.m_mantissaFocalLengthY   [i]          , sei.getMantissaFocalLengthYLen( i ),    "mantissa_focal_length_y"    );
     1172      WRITE_FLAG( ( sei.m_signPrincipalPointX    [i] ? 1 : 0 ),                                         "sign_principal_point_x"     );
     1173      WRITE_CODE(   sei.m_exponentPrincipalPointX[i]          , 6,                                      "exponent_principal_point_x" );
     1174      WRITE_CODE(   sei.m_mantissaPrincipalPointX[i]          , sei.getMantissaPrincipalPointXLen( i ), "mantissa_principal_point_x" );
     1175      WRITE_FLAG( ( sei.m_signPrincipalPointY    [i] ? 1 : 0 ),                                         "sign_principal_point_y"     );
     1176      WRITE_CODE(   sei.m_exponentPrincipalPointY[i]          , 6,                                      "exponent_principal_point_y" );
     1177      WRITE_CODE(   sei.m_mantissaPrincipalPointY[i]          , sei.getMantissaPrincipalPointYLen( i ), "mantissa_principal_point_y" );
     1178      WRITE_FLAG( ( sei.m_signSkewFactor         [i] ? 1 : 0 ),                                         "sign_skew_factor"           );
     1179      WRITE_CODE(   sei.m_exponentSkewFactor     [i]          , 6,                                      "exponent_skew_factor"       );
     1180      WRITE_CODE(   sei.m_mantissaSkewFactor     [i]          , sei.getMantissaSkewFactorLen( i )  ,    "mantissa_skew_factor"       );
     1181    }
     1182  }
     1183  if( sei.m_extrinsicParamFlag )
     1184  {
     1185    WRITE_UVLC( sei.m_precRotationParam   , "prec_rotation_param"    );
     1186    WRITE_UVLC( sei.m_precTranslationParam, "prec_translation_param" );
     1187    for( Int i = 0; i  <=  sei.getNumViewsMinus1(); i++ )
     1188    {
     1189      for( Int j = 0; j  <=  2; j++ )  /* row */
     1190      {
     1191        for( Int k = 0; k  <=  2; k++ )  /* column */
     1192        {
     1193          WRITE_FLAG( ( sei.m_signR    [i][j][k] ? 1 : 0 ),                                "sign_r"     );
     1194          WRITE_CODE(   sei.m_exponentR[i][j][k]          , 6,                             "exponent_r" );
     1195          WRITE_CODE(   sei.m_mantissaR[i][j][k]          , sei.getMantissaRLen( i,j,k ) , "mantissa_r" );
     1196        }
     1197        WRITE_FLAG( ( sei.m_signT    [i][j] ? 1 : 0 ),                          "sign_t"     );
     1198        WRITE_CODE(   sei.m_exponentT[i][j]          , 6,                       "exponent_t" );
     1199        WRITE_CODE(   sei.m_mantissaT[i][j]          , sei.getMantissaTLen( i,j ),"mantissa_t" );
     1200      }
     1201    }
     1202  }
     1203};
     1204
     1205
     1206#if NH_MV_SEI
     1207Void SEIWriter::xWriteSEIMultiviewViewPosition( const SEIMultiviewViewPosition& sei)
     1208{
     1209  WRITE_UVLC( sei.m_numViewsMinus1, "num_views_minus1" );
     1210  for( Int i = 0; i  <=  sei.m_numViewsMinus1; i++ )
     1211  {
     1212    WRITE_UVLC( sei.m_viewPosition[i], "view_position" );
     1213  }
     1214};
     1215#endif
     1216
     1217#if NH_MV_SEI_TBD
     1218Void SEIWriter::xWriteSEIAlternativeDepthInfo( const SEIAlternativeDepthInfo& sei)
     1219{
     1220  WRITE_FLAG( ( sei.m_alternativeDepthInfoCancelFlag ? 1 : 0 ), "alternative_depth_info_cancel_flag" );
     1221  if( sei.m_alternativeDepthInfoCancelFlag  ==  0 )
     1222  {
     1223    WRITE_CODE( sei.m_depthType, 2, "depth_type" );
     1224    if( sei.m_depthType  ==  0 )
     1225    {
     1226      WRITE_UVLC( sei.m_numConstituentViewsGvdMinus1, "num_constituent_views_gvd_minus1" );
     1227      WRITE_FLAG( ( sei.m_depthPresentGvdFlag ? 1 : 0 ), "depth_present_gvd_flag" );
     1228      WRITE_FLAG( ( sei.m_zGvdFlag ? 1 : 0 ), "z_gvd_flag" );
     1229      WRITE_FLAG( ( sei.m_intrinsicParamGvdFlag ? 1 : 0 ), "intrinsic_param_gvd_flag" );
     1230      WRITE_FLAG( ( sei.m_rotationGvdFlag ? 1 : 0 ), "rotation_gvd_flag" );
     1231      WRITE_FLAG( ( sei.m_translationGvdFlag ? 1 : 0 ), "translation_gvd_flag" );
     1232      if( sei.m_zGvdFlag )
     1233      {
     1234        for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
     1235        {
     1236          WRITE_FLAG( ( sei.m_signGvdZNearFlag[i] ? 1 : 0 ), "sign_gvd_z_near_flag" );
     1237          WRITE_CODE( sei.m_expGvdZNear[i], 7, "exp_gvd_z_near" );
     1238          WRITE_CODE( sei.m_manLenGvdZNearMinus1[i], 5, "man_len_gvd_z_near_minus1" );
     1239          WRITE_CODE( sei.m_manGvdZNear[i], getManGvdZNearLen ), "man_gvd_z_near" );
     1240          WRITE_FLAG( ( sei.m_signGvdZFarFlag[i] ? 1 : 0 ), "sign_gvd_z_far_flag" );
     1241          WRITE_CODE( sei.m_expGvdZFar[i], 7, "exp_gvd_z_far" );
     1242          WRITE_CODE( sei.m_manLenGvdZFarMinus1[i], 5, "man_len_gvd_z_far_minus1" );
     1243          WRITE_CODE( sei.m_manGvdZFar[i], getManGvdZFarLen ), "man_gvd_z_far" );
     1244        }
     1245      }
     1246      if( sei.m_intrinsicParamGvdFlag )
     1247      {
     1248        WRITE_UVLC( sei.m_precGvdFocalLength, "prec_gvd_focal_length" );
     1249        WRITE_UVLC( sei.m_precGvdPrincipalPoint, "prec_gvd_principal_point" );
     1250      }
     1251      if( sei.m_rotationGvdFlag )
     1252      {
     1253        WRITE_UVLC( sei.m_precGvdRotationParam, "prec_gvd_rotation_param" );
     1254      }
     1255      if( sei.m_translationGvdFlag )
     1256      {
     1257        WRITE_UVLC( sei.m_precGvdTranslationParam, "prec_gvd_translation_param" );
     1258      }
     1259      for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
     1260      {
     1261        if( sei.m_intrinsicParamGvdFlag )
     1262        {
     1263          WRITE_FLAG( ( sei.m_signGvdFocalLengthX[i] ? 1 : 0 ), "sign_gvd_focal_length_x" );
     1264          WRITE_CODE( sei.m_expGvdFocalLengthX[i], 6, "exp_gvd_focal_length_x" );
     1265          WRITE_CODE( sei.m_manGvdFocalLengthX[i], getManGvdFocalLengthXLen ), "man_gvd_focal_length_x" );
     1266          WRITE_FLAG( ( sei.m_signGvdFocalLengthY[i] ? 1 : 0 ), "sign_gvd_focal_length_y" );
     1267          WRITE_CODE( sei.m_expGvdFocalLengthY[i], 6, "exp_gvd_focal_length_y" );
     1268          WRITE_CODE( sei.m_manGvdFocalLengthY[i], getManGvdFocalLengthYLen ), "man_gvd_focal_length_y" );
     1269          WRITE_FLAG( ( sei.m_signGvdPrincipalPointX[i] ? 1 : 0 ), "sign_gvd_principal_point_x" );
     1270          WRITE_CODE( sei.m_expGvdPrincipalPointX[i], 6, "exp_gvd_principal_point_x" );
     1271          WRITE_CODE( sei.m_manGvdPrincipalPointX[i], getManGvdPrincipalPointXLen ), "man_gvd_principal_point_x" );
     1272          WRITE_FLAG( ( sei.m_signGvdPrincipalPointY[i] ? 1 : 0 ), "sign_gvd_principal_point_y" );
     1273          WRITE_CODE( sei.m_expGvdPrincipalPointY[i], 6, "exp_gvd_principal_point_y" );
     1274          WRITE_CODE( sei.m_manGvdPrincipalPointY[i], getManGvdPrincipalPointYLen ), "man_gvd_principal_point_y" );
     1275        }
     1276        if( sei.m_rotationGvdFlag )
     1277        {
     1278          for( Int j = 10; j  <=  3; j++ ) /* row */
     1279          {
     1280            for( Int k = 10; k  <=  3; k++ )  /* column */
     1281            {
     1282              WRITE_FLAG( ( sei.m_signGvdR[i][j][k] ? 1 : 0 ), "sign_gvd_r" );
     1283              WRITE_CODE( sei.m_expGvdR[i][j][k], 6, "exp_gvd_r" );
     1284              WRITE_CODE( sei.m_manGvdR[i][j][k], getManGvdRLen ), "man_gvd_r" );
     1285            }
     1286          }
     1287        }
     1288        if( sei.m_translationGvdFlag )
     1289        {
     1290          WRITE_FLAG( ( sei.m_signGvdTX[i] ? 1 : 0 ), "sign_gvd_t_x" );
     1291          WRITE_CODE( sei.m_expGvdTX[i], 6, "exp_gvd_t_x" );
     1292          WRITE_CODE( sei.m_manGvdTX[i], getManGvdTXLen ), "man_gvd_t_x" );
     1293        }
     1294      }
     1295    }
     1296    if( sei.m_depthType  ==  1 )
     1297    {
     1298      WRITE_SVLC( sei.m_minOffsetXInt, "min_offset_x_int" );
     1299      WRITE_CODE( sei.m_minOffsetXFrac, 8, "min_offset_x_frac" );
     1300      WRITE_SVLC( sei.m_maxOffsetXInt, "max_offset_x_int" );
     1301      WRITE_CODE( sei.m_maxOffsetXFrac, 8, "max_offset_x_frac" );
     1302      WRITE_FLAG( ( sei.m_offsetYPresentFlag ? 1 : 0 ), "offset_y_present_flag" );
     1303      if( sei.m_offsetYPresentFlag )
     1304      {
     1305        WRITE_SVLC( sei.m_minOffsetYInt, "min_offset_y_int" );
     1306        WRITE_CODE( sei.m_minOffsetYFrac, 8, "min_offset_y_frac" );
     1307        WRITE_SVLC( sei.m_maxOffsetYInt, "max_offset_y_int" );
     1308        WRITE_CODE( sei.m_maxOffsetYFrac, 8, "max_offset_y_frac" );
     1309      }
     1310      WRITE_FLAG( ( sei.m_warpMapSizePresentFlag ? 1 : 0 ), "warp_map_size_present_flag" );
     1311      if( sei.m_warpMapSizePresentFlag )
     1312      {
     1313        WRITE_UVLC( sei.m_warpMapWidthMinus2, "warp_map_width_minus2" );
     1314        WRITE_UVLC( sei.m_warpMapHeightMinus2, "warp_map_height_minus2" );
     1315      }
     1316    }
     1317  }
     1318};
     1319
     1320#endif
     1321
    8201322//! \}
Note: See TracChangeset for help on using the changeset viewer.