[5] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
| 4 | * granted under this license. |
---|
| 5 | * |
---|
[1313] | 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
---|
[5] | 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Redistribution and use in source and binary forms, with or without |
---|
| 10 | * modification, are permitted provided that the following conditions are met: |
---|
| 11 | * |
---|
| 12 | * * Redistributions of source code must retain the above copyright notice, |
---|
| 13 | * this list of conditions and the following disclaimer. |
---|
| 14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
| 15 | * this list of conditions and the following disclaimer in the documentation |
---|
| 16 | * and/or other materials provided with the distribution. |
---|
[56] | 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
[5] | 18 | * be used to endorse or promote products derived from this software without |
---|
| 19 | * specific prior written permission. |
---|
| 20 | * |
---|
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
| 31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 32 | */ |
---|
[2] | 33 | |
---|
[1313] | 34 | #ifndef __SEI__ |
---|
| 35 | #define __SEI__ |
---|
| 36 | |
---|
[56] | 37 | #pragma once |
---|
[608] | 38 | #include <list> |
---|
| 39 | #include <vector> |
---|
| 40 | #include <cstring> |
---|
[2] | 41 | |
---|
[1313] | 42 | #include "CommonDef.h" |
---|
| 43 | #include "libmd5/MD5.h" |
---|
[1328] | 44 | |
---|
| 45 | |
---|
| 46 | #if NH_MV_SEI |
---|
| 47 | #include "TAppCommon/program_options_lite.h" |
---|
| 48 | using namespace std; |
---|
| 49 | namespace po = df::program_options_lite; |
---|
| 50 | #endif |
---|
| 51 | |
---|
[56] | 52 | //! \ingroup TLibCommon |
---|
| 53 | //! \{ |
---|
[608] | 54 | class TComSPS; |
---|
[1328] | 55 | #if NH_MV_SEI |
---|
| 56 | class TComSlice; |
---|
| 57 | class SEIScalableNesting; |
---|
| 58 | #endif |
---|
[5] | 59 | |
---|
[2] | 60 | /** |
---|
| 61 | * Abstract class representing an SEI message with lightweight RTTI. |
---|
| 62 | */ |
---|
| 63 | class SEI |
---|
| 64 | { |
---|
| 65 | public: |
---|
[56] | 66 | enum PayloadType |
---|
| 67 | { |
---|
[608] | 68 | BUFFERING_PERIOD = 0, |
---|
| 69 | PICTURE_TIMING = 1, |
---|
| 70 | PAN_SCAN_RECT = 2, |
---|
| 71 | FILLER_PAYLOAD = 3, |
---|
| 72 | USER_DATA_REGISTERED_ITU_T_T35 = 4, |
---|
| 73 | USER_DATA_UNREGISTERED = 5, |
---|
| 74 | RECOVERY_POINT = 6, |
---|
| 75 | SCENE_INFO = 9, |
---|
| 76 | FULL_FRAME_SNAPSHOT = 15, |
---|
| 77 | PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, |
---|
| 78 | PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, |
---|
| 79 | FILM_GRAIN_CHARACTERISTICS = 19, |
---|
| 80 | POST_FILTER_HINT = 22, |
---|
| 81 | TONE_MAPPING_INFO = 23, |
---|
| 82 | FRAME_PACKING = 45, |
---|
| 83 | DISPLAY_ORIENTATION = 47, |
---|
| 84 | SOP_DESCRIPTION = 128, |
---|
| 85 | ACTIVE_PARAMETER_SETS = 129, |
---|
| 86 | DECODING_UNIT_INFO = 130, |
---|
| 87 | TEMPORAL_LEVEL0_INDEX = 131, |
---|
| 88 | DECODED_PICTURE_HASH = 132, |
---|
| 89 | SCALABLE_NESTING = 133, |
---|
| 90 | REGION_REFRESH_INFO = 134, |
---|
[1313] | 91 | NO_DISPLAY = 135, |
---|
| 92 | TIME_CODE = 136, |
---|
| 93 | MASTERING_DISPLAY_COLOUR_VOLUME = 137, |
---|
| 94 | SEGM_RECT_FRAME_PACKING = 138, |
---|
| 95 | TEMP_MOTION_CONSTRAINED_TILE_SETS = 139, |
---|
| 96 | CHROMA_SAMPLING_FILTER_HINT = 140, |
---|
| 97 | KNEE_FUNCTION_INFO = 141 |
---|
[1328] | 98 | #if NH_MV_SEI |
---|
| 99 | ,COLOUR_REMAPPING_INFO = 142, |
---|
| 100 | DEINTERLACED_FIELD_IDENTIFICATION = 143, |
---|
| 101 | LAYERS_NOT_PRESENT = 160, |
---|
| 102 | INTER_LAYER_CONSTRAINED_TILE_SETS = 161, |
---|
| 103 | BSP_NESTING = 162, |
---|
| 104 | BSP_INITIAL_ARRIVAL_TIME = 163, |
---|
| 105 | SUB_BITSTREAM_PROPERTY = 164, |
---|
| 106 | ALPHA_CHANNEL_INFO = 165, |
---|
| 107 | OVERLAY_INFO = 166, |
---|
| 108 | TEMPORAL_MV_PREDICTION_CONSTRAINTS = 167, |
---|
| 109 | FRAME_FIELD_INFO = 168, |
---|
| 110 | THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO = 176, |
---|
| 111 | DEPTH_REPRESENTATION_INFO = 177, |
---|
| 112 | MULTIVIEW_SCENE_INFO = 178, |
---|
| 113 | MULTIVIEW_ACQUISITION_INFO = 179, |
---|
| 114 | MULTIVIEW_VIEW_POSITION = 180 |
---|
| 115 | #if NH_3D |
---|
[1345] | 116 | ,ALTERNATIVE_DEPTH_INFO = 181 |
---|
[872] | 117 | #endif |
---|
[1328] | 118 | #endif |
---|
[1313] | 119 | |
---|
[2] | 120 | }; |
---|
[1313] | 121 | |
---|
[1328] | 122 | SEI(); |
---|
| 123 | |
---|
[2] | 124 | virtual ~SEI() {} |
---|
[1328] | 125 | virtual SEI* getCopy( ) const; |
---|
| 126 | static const Char *getSEIMessageString(SEI::PayloadType payloadType ); |
---|
| 127 | virtual PayloadType payloadType() const = 0; |
---|
[1313] | 128 | |
---|
[1328] | 129 | #if NH_MV_SEI |
---|
| 130 | static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); |
---|
| 131 | Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; |
---|
[1313] | 132 | |
---|
[1328] | 133 | |
---|
| 134 | virtual Void setupFromSlice ( const TComSlice* slice ); |
---|
| 135 | virtual Void setupFromCfgFile ( const Char* cfgFile ); |
---|
| 136 | virtual Bool checkCfg ( const TComSlice* slice ); |
---|
| 137 | |
---|
| 138 | Void xPrintCfgErrorIntro(); |
---|
| 139 | Void xCheckCfgRange ( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName ); |
---|
| 140 | Void xCheckCfg ( Bool& wrongConfig, Bool cond, const Char* errStr ); |
---|
| 141 | Void xAddGeneralOpts ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, |
---|
| 142 | Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder ); |
---|
| 143 | // Filters where to insert SEI in the bitstream. |
---|
| 144 | // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. |
---|
| 145 | IntAry1d m_applicableLayerIds; |
---|
| 146 | IntAry1d m_applicablePocs; |
---|
| 147 | IntAry1d m_applicableTids; |
---|
| 148 | IntAry1d m_applicableVclNaluTypes; |
---|
| 149 | |
---|
| 150 | Int m_payloadType; // Payload type |
---|
| 151 | Int m_seiNaluId; // Identifies to which NAL unit the SEI is added. |
---|
| 152 | Int m_positionInSeiNalu; // Identifies the order within the NAL unit |
---|
| 153 | Bool m_modifyByEncoder; // Don't use the SEI cfg-file, but let let the encoder setup the NALU. |
---|
| 154 | |
---|
| 155 | SEIScalableNesting* m_scalNestSeiContThisSei; // Pointer to scalable nesting SEI containing the SEI. When NULL, the SEI is not nested. |
---|
| 156 | #endif |
---|
[2] | 157 | }; |
---|
| 158 | |
---|
[1313] | 159 | static const UInt ISO_IEC_11578_LEN=16; |
---|
| 160 | |
---|
[2] | 161 | class SEIuserDataUnregistered : public SEI |
---|
| 162 | { |
---|
| 163 | public: |
---|
| 164 | PayloadType payloadType() const { return USER_DATA_UNREGISTERED; } |
---|
| 165 | |
---|
| 166 | SEIuserDataUnregistered() |
---|
| 167 | : userData(0) |
---|
| 168 | {} |
---|
| 169 | |
---|
| 170 | virtual ~SEIuserDataUnregistered() |
---|
| 171 | { |
---|
| 172 | delete userData; |
---|
| 173 | } |
---|
| 174 | |
---|
[1313] | 175 | UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN]; |
---|
| 176 | UInt userDataLength; |
---|
[608] | 177 | UChar *userData; |
---|
[2] | 178 | }; |
---|
| 179 | |
---|
[608] | 180 | class SEIDecodedPictureHash : public SEI |
---|
[2] | 181 | { |
---|
| 182 | public: |
---|
[608] | 183 | PayloadType payloadType() const { return DECODED_PICTURE_HASH; } |
---|
[2] | 184 | |
---|
[608] | 185 | SEIDecodedPictureHash() {} |
---|
| 186 | virtual ~SEIDecodedPictureHash() {} |
---|
[1313] | 187 | |
---|
[56] | 188 | enum Method |
---|
| 189 | { |
---|
[2] | 190 | MD5, |
---|
[608] | 191 | CRC, |
---|
| 192 | CHECKSUM, |
---|
[2] | 193 | RESERVED, |
---|
| 194 | } method; |
---|
| 195 | |
---|
[1313] | 196 | TComPictureHash m_pictureHash; |
---|
[2] | 197 | }; |
---|
| 198 | |
---|
[1313] | 199 | class SEIActiveParameterSets : public SEI |
---|
[2] | 200 | { |
---|
| 201 | public: |
---|
[608] | 202 | PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } |
---|
| 203 | |
---|
[1313] | 204 | SEIActiveParameterSets() |
---|
[608] | 205 | : activeVPSId (0) |
---|
[964] | 206 | , m_selfContainedCvsFlag (false) |
---|
| 207 | , m_noParameterSetUpdateFlag (false) |
---|
[608] | 208 | , numSpsIdsMinus1 (0) |
---|
| 209 | {} |
---|
| 210 | virtual ~SEIActiveParameterSets() {} |
---|
| 211 | |
---|
[1313] | 212 | Int activeVPSId; |
---|
[964] | 213 | Bool m_selfContainedCvsFlag; |
---|
| 214 | Bool m_noParameterSetUpdateFlag; |
---|
[608] | 215 | Int numSpsIdsMinus1; |
---|
[964] | 216 | std::vector<Int> activeSeqParameterSetId; |
---|
[608] | 217 | }; |
---|
| 218 | |
---|
| 219 | class SEIBufferingPeriod : public SEI |
---|
| 220 | { |
---|
| 221 | public: |
---|
| 222 | PayloadType payloadType() const { return BUFFERING_PERIOD; } |
---|
[1313] | 223 | void copyTo (SEIBufferingPeriod& target); |
---|
[608] | 224 | |
---|
| 225 | SEIBufferingPeriod() |
---|
| 226 | : m_bpSeqParameterSetId (0) |
---|
| 227 | , m_rapCpbParamsPresentFlag (false) |
---|
| 228 | , m_cpbDelayOffset (0) |
---|
| 229 | , m_dpbDelayOffset (0) |
---|
| 230 | { |
---|
| 231 | ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay)); |
---|
| 232 | ::memset(m_initialCpbRemovalDelayOffset, 0, sizeof(m_initialCpbRemovalDelayOffset)); |
---|
| 233 | ::memset(m_initialAltCpbRemovalDelay, 0, sizeof(m_initialAltCpbRemovalDelay)); |
---|
| 234 | ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset)); |
---|
| 235 | } |
---|
| 236 | virtual ~SEIBufferingPeriod() {} |
---|
| 237 | |
---|
| 238 | UInt m_bpSeqParameterSetId; |
---|
| 239 | Bool m_rapCpbParamsPresentFlag; |
---|
[1084] | 240 | UInt m_cpbDelayOffset; |
---|
| 241 | UInt m_dpbDelayOffset; |
---|
[608] | 242 | UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 243 | UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; |
---|
| 244 | UInt m_initialAltCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 245 | UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]; |
---|
| 246 | Bool m_concatenationFlag; |
---|
| 247 | UInt m_auCpbRemovalDelayDelta; |
---|
| 248 | }; |
---|
| 249 | class SEIPictureTiming : public SEI |
---|
| 250 | { |
---|
| 251 | public: |
---|
| 252 | PayloadType payloadType() const { return PICTURE_TIMING; } |
---|
[1313] | 253 | void copyTo (SEIPictureTiming& target); |
---|
[608] | 254 | |
---|
| 255 | SEIPictureTiming() |
---|
| 256 | : m_picStruct (0) |
---|
| 257 | , m_sourceScanType (0) |
---|
| 258 | , m_duplicateFlag (false) |
---|
| 259 | , m_picDpbOutputDuDelay (0) |
---|
| 260 | {} |
---|
| 261 | virtual ~SEIPictureTiming() |
---|
| 262 | { |
---|
| 263 | } |
---|
| 264 | |
---|
| 265 | UInt m_picStruct; |
---|
| 266 | UInt m_sourceScanType; |
---|
| 267 | Bool m_duplicateFlag; |
---|
| 268 | |
---|
| 269 | UInt m_auCpbRemovalDelay; |
---|
| 270 | UInt m_picDpbOutputDelay; |
---|
| 271 | UInt m_picDpbOutputDuDelay; |
---|
| 272 | UInt m_numDecodingUnitsMinus1; |
---|
| 273 | Bool m_duCommonCpbRemovalDelayFlag; |
---|
| 274 | UInt m_duCommonCpbRemovalDelayMinus1; |
---|
[1313] | 275 | std::vector<UInt> m_numNalusInDuMinus1; |
---|
| 276 | std::vector<UInt> m_duCpbRemovalDelayMinus1; |
---|
[608] | 277 | }; |
---|
| 278 | |
---|
| 279 | class SEIDecodingUnitInfo : public SEI |
---|
| 280 | { |
---|
| 281 | public: |
---|
| 282 | PayloadType payloadType() const { return DECODING_UNIT_INFO; } |
---|
| 283 | |
---|
| 284 | SEIDecodingUnitInfo() |
---|
| 285 | : m_decodingUnitIdx(0) |
---|
| 286 | , m_duSptCpbRemovalDelay(0) |
---|
| 287 | , m_dpbOutputDuDelayPresentFlag(false) |
---|
| 288 | , m_picSptDpbOutputDuDelay(0) |
---|
| 289 | {} |
---|
| 290 | virtual ~SEIDecodingUnitInfo() {} |
---|
| 291 | Int m_decodingUnitIdx; |
---|
| 292 | Int m_duSptCpbRemovalDelay; |
---|
| 293 | Bool m_dpbOutputDuDelayPresentFlag; |
---|
| 294 | Int m_picSptDpbOutputDuDelay; |
---|
| 295 | }; |
---|
| 296 | |
---|
| 297 | class SEIRecoveryPoint : public SEI |
---|
| 298 | { |
---|
| 299 | public: |
---|
| 300 | PayloadType payloadType() const { return RECOVERY_POINT; } |
---|
| 301 | |
---|
| 302 | SEIRecoveryPoint() {} |
---|
| 303 | virtual ~SEIRecoveryPoint() {} |
---|
| 304 | |
---|
| 305 | Int m_recoveryPocCnt; |
---|
| 306 | Bool m_exactMatchingFlag; |
---|
| 307 | Bool m_brokenLinkFlag; |
---|
| 308 | }; |
---|
[1313] | 309 | |
---|
[608] | 310 | class SEIFramePacking : public SEI |
---|
| 311 | { |
---|
| 312 | public: |
---|
| 313 | PayloadType payloadType() const { return FRAME_PACKING; } |
---|
| 314 | |
---|
| 315 | SEIFramePacking() {} |
---|
| 316 | virtual ~SEIFramePacking() {} |
---|
| 317 | |
---|
| 318 | Int m_arrangementId; |
---|
| 319 | Bool m_arrangementCancelFlag; |
---|
| 320 | Int m_arrangementType; |
---|
| 321 | Bool m_quincunxSamplingFlag; |
---|
| 322 | Int m_contentInterpretationType; |
---|
| 323 | Bool m_spatialFlippingFlag; |
---|
| 324 | Bool m_frame0FlippedFlag; |
---|
| 325 | Bool m_fieldViewsFlag; |
---|
| 326 | Bool m_currentFrameIsFrame0Flag; |
---|
| 327 | Bool m_frame0SelfContainedFlag; |
---|
| 328 | Bool m_frame1SelfContainedFlag; |
---|
| 329 | Int m_frame0GridPositionX; |
---|
| 330 | Int m_frame0GridPositionY; |
---|
| 331 | Int m_frame1GridPositionX; |
---|
| 332 | Int m_frame1GridPositionY; |
---|
| 333 | Int m_arrangementReservedByte; |
---|
| 334 | Bool m_arrangementPersistenceFlag; |
---|
| 335 | Bool m_upsampledAspectRatio; |
---|
| 336 | }; |
---|
| 337 | |
---|
[1313] | 338 | class SEISegmentedRectFramePacking : public SEI |
---|
| 339 | { |
---|
| 340 | public: |
---|
| 341 | PayloadType payloadType() const { return SEGM_RECT_FRAME_PACKING; } |
---|
| 342 | |
---|
| 343 | SEISegmentedRectFramePacking() {} |
---|
| 344 | virtual ~SEISegmentedRectFramePacking() {} |
---|
| 345 | |
---|
| 346 | Bool m_arrangementCancelFlag; |
---|
| 347 | Int m_contentInterpretationType; |
---|
| 348 | Bool m_arrangementPersistenceFlag; |
---|
| 349 | }; |
---|
| 350 | |
---|
[608] | 351 | class SEIDisplayOrientation : public SEI |
---|
| 352 | { |
---|
| 353 | public: |
---|
| 354 | PayloadType payloadType() const { return DISPLAY_ORIENTATION; } |
---|
| 355 | |
---|
| 356 | SEIDisplayOrientation() |
---|
| 357 | : cancelFlag(true) |
---|
| 358 | , persistenceFlag(0) |
---|
| 359 | , extensionFlag(false) |
---|
[2] | 360 | {} |
---|
[608] | 361 | virtual ~SEIDisplayOrientation() {} |
---|
[2] | 362 | |
---|
[608] | 363 | Bool cancelFlag; |
---|
| 364 | Bool horFlip; |
---|
| 365 | Bool verFlip; |
---|
| 366 | |
---|
| 367 | UInt anticlockwiseRotation; |
---|
| 368 | Bool persistenceFlag; |
---|
| 369 | Bool extensionFlag; |
---|
| 370 | }; |
---|
| 371 | |
---|
| 372 | class SEITemporalLevel0Index : public SEI |
---|
| 373 | { |
---|
| 374 | public: |
---|
| 375 | PayloadType payloadType() const { return TEMPORAL_LEVEL0_INDEX; } |
---|
| 376 | |
---|
| 377 | SEITemporalLevel0Index() |
---|
| 378 | : tl0Idx(0) |
---|
| 379 | , rapIdx(0) |
---|
| 380 | {} |
---|
| 381 | virtual ~SEITemporalLevel0Index() {} |
---|
| 382 | |
---|
| 383 | UInt tl0Idx; |
---|
| 384 | UInt rapIdx; |
---|
| 385 | }; |
---|
| 386 | |
---|
| 387 | class SEIGradualDecodingRefreshInfo : public SEI |
---|
| 388 | { |
---|
| 389 | public: |
---|
| 390 | PayloadType payloadType() const { return REGION_REFRESH_INFO; } |
---|
| 391 | |
---|
| 392 | SEIGradualDecodingRefreshInfo() |
---|
| 393 | : m_gdrForegroundFlag(0) |
---|
| 394 | {} |
---|
| 395 | virtual ~SEIGradualDecodingRefreshInfo() {} |
---|
| 396 | |
---|
| 397 | Bool m_gdrForegroundFlag; |
---|
| 398 | }; |
---|
| 399 | |
---|
[1313] | 400 | class SEINoDisplay : public SEI |
---|
| 401 | { |
---|
| 402 | public: |
---|
| 403 | PayloadType payloadType() const { return NO_DISPLAY; } |
---|
| 404 | |
---|
| 405 | SEINoDisplay() |
---|
| 406 | : m_noDisplay(false) |
---|
| 407 | {} |
---|
| 408 | virtual ~SEINoDisplay() {} |
---|
| 409 | |
---|
| 410 | Bool m_noDisplay; |
---|
| 411 | }; |
---|
| 412 | |
---|
[608] | 413 | class SEISOPDescription : public SEI |
---|
| 414 | { |
---|
| 415 | public: |
---|
| 416 | PayloadType payloadType() const { return SOP_DESCRIPTION; } |
---|
| 417 | |
---|
| 418 | SEISOPDescription() {} |
---|
| 419 | virtual ~SEISOPDescription() {} |
---|
| 420 | |
---|
| 421 | UInt m_sopSeqParameterSetId; |
---|
| 422 | UInt m_numPicsInSopMinus1; |
---|
| 423 | |
---|
| 424 | UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP]; |
---|
| 425 | UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP]; |
---|
| 426 | UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP]; |
---|
| 427 | Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]; |
---|
| 428 | }; |
---|
| 429 | |
---|
| 430 | class SEIToneMappingInfo : public SEI |
---|
| 431 | { |
---|
| 432 | public: |
---|
| 433 | PayloadType payloadType() const { return TONE_MAPPING_INFO; } |
---|
| 434 | SEIToneMappingInfo() {} |
---|
| 435 | virtual ~SEIToneMappingInfo() {} |
---|
| 436 | |
---|
| 437 | Int m_toneMapId; |
---|
| 438 | Bool m_toneMapCancelFlag; |
---|
| 439 | Bool m_toneMapPersistenceFlag; |
---|
| 440 | Int m_codedDataBitDepth; |
---|
| 441 | Int m_targetBitDepth; |
---|
| 442 | Int m_modelId; |
---|
| 443 | Int m_minValue; |
---|
| 444 | Int m_maxValue; |
---|
| 445 | Int m_sigmoidMidpoint; |
---|
| 446 | Int m_sigmoidWidth; |
---|
| 447 | std::vector<Int> m_startOfCodedInterval; |
---|
| 448 | Int m_numPivots; |
---|
| 449 | std::vector<Int> m_codedPivotValue; |
---|
| 450 | std::vector<Int> m_targetPivotValue; |
---|
| 451 | Int m_cameraIsoSpeedIdc; |
---|
| 452 | Int m_cameraIsoSpeedValue; |
---|
[964] | 453 | Int m_exposureIndexIdc; |
---|
| 454 | Int m_exposureIndexValue; |
---|
[1313] | 455 | Bool m_exposureCompensationValueSignFlag; |
---|
[608] | 456 | Int m_exposureCompensationValueNumerator; |
---|
| 457 | Int m_exposureCompensationValueDenomIdc; |
---|
| 458 | Int m_refScreenLuminanceWhite; |
---|
| 459 | Int m_extendedRangeWhiteLevel; |
---|
| 460 | Int m_nominalBlackLevelLumaCodeValue; |
---|
| 461 | Int m_nominalWhiteLevelLumaCodeValue; |
---|
| 462 | Int m_extendedWhiteLevelLumaCodeValue; |
---|
| 463 | }; |
---|
| 464 | |
---|
[1313] | 465 | class SEIKneeFunctionInfo : public SEI |
---|
| 466 | { |
---|
| 467 | public: |
---|
| 468 | PayloadType payloadType() const { return KNEE_FUNCTION_INFO; } |
---|
| 469 | SEIKneeFunctionInfo() {} |
---|
| 470 | virtual ~SEIKneeFunctionInfo() {} |
---|
| 471 | |
---|
| 472 | Int m_kneeId; |
---|
| 473 | Bool m_kneeCancelFlag; |
---|
| 474 | Bool m_kneePersistenceFlag; |
---|
| 475 | Int m_kneeInputDrange; |
---|
| 476 | Int m_kneeInputDispLuminance; |
---|
| 477 | Int m_kneeOutputDrange; |
---|
| 478 | Int m_kneeOutputDispLuminance; |
---|
| 479 | Int m_kneeNumKneePointsMinus1; |
---|
| 480 | std::vector<Int> m_kneeInputKneePoint; |
---|
| 481 | std::vector<Int> m_kneeOutputKneePoint; |
---|
| 482 | }; |
---|
| 483 | |
---|
| 484 | class SEIChromaSamplingFilterHint : public SEI |
---|
| 485 | { |
---|
| 486 | public: |
---|
| 487 | PayloadType payloadType() const {return CHROMA_SAMPLING_FILTER_HINT;} |
---|
| 488 | SEIChromaSamplingFilterHint() {} |
---|
| 489 | virtual ~SEIChromaSamplingFilterHint() { |
---|
| 490 | if(m_verChromaFilterIdc == 1) |
---|
| 491 | { |
---|
| 492 | for(Int i = 0; i < m_numVerticalFilters; i ++) |
---|
| 493 | { |
---|
| 494 | free(m_verFilterCoeff[i]); |
---|
| 495 | } |
---|
| 496 | free(m_verFilterCoeff); |
---|
| 497 | free(m_verTapLengthMinus1); |
---|
| 498 | } |
---|
| 499 | if(m_horChromaFilterIdc == 1) |
---|
| 500 | { |
---|
| 501 | for(Int i = 0; i < m_numHorizontalFilters; i ++) |
---|
| 502 | { |
---|
| 503 | free(m_horFilterCoeff[i]); |
---|
| 504 | } |
---|
| 505 | free(m_horFilterCoeff); |
---|
| 506 | free(m_horTapLengthMinus1); |
---|
| 507 | } |
---|
| 508 | } |
---|
| 509 | |
---|
| 510 | Int m_verChromaFilterIdc; |
---|
| 511 | Int m_horChromaFilterIdc; |
---|
| 512 | Bool m_verFilteringProcessFlag; |
---|
| 513 | Int m_targetFormatIdc; |
---|
| 514 | Bool m_perfectReconstructionFlag; |
---|
| 515 | Int m_numVerticalFilters; |
---|
| 516 | Int* m_verTapLengthMinus1; |
---|
| 517 | Int** m_verFilterCoeff; |
---|
| 518 | Int m_numHorizontalFilters; |
---|
| 519 | Int* m_horTapLengthMinus1; |
---|
| 520 | Int** m_horFilterCoeff; |
---|
| 521 | }; |
---|
| 522 | |
---|
| 523 | class SEIMasteringDisplayColourVolume : public SEI |
---|
| 524 | { |
---|
| 525 | public: |
---|
| 526 | PayloadType payloadType() const { return MASTERING_DISPLAY_COLOUR_VOLUME; } |
---|
| 527 | SEIMasteringDisplayColourVolume() {} |
---|
| 528 | virtual ~SEIMasteringDisplayColourVolume(){} |
---|
| 529 | |
---|
| 530 | TComSEIMasteringDisplay values; |
---|
| 531 | }; |
---|
| 532 | |
---|
| 533 | #if NH_MV |
---|
[1328] | 534 | #if !NH_MV_SEI |
---|
[872] | 535 | class SEISubBitstreamProperty : public SEI |
---|
| 536 | { |
---|
| 537 | public: |
---|
| 538 | PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; } |
---|
| 539 | |
---|
| 540 | SEISubBitstreamProperty(): m_activeVpsId(-1), m_numAdditionalSubStreams(0) {} |
---|
| 541 | virtual ~SEISubBitstreamProperty() {} |
---|
| 542 | |
---|
| 543 | Int m_activeVpsId; |
---|
| 544 | Int m_numAdditionalSubStreams; |
---|
| 545 | std::vector<Int> m_subBitstreamMode; |
---|
| 546 | std::vector<Int> m_outputLayerSetIdxToVps; |
---|
| 547 | std::vector<Int> m_highestSublayerId; |
---|
| 548 | std::vector<Int> m_avgBitRate; |
---|
| 549 | std::vector<Int> m_maxBitRate; |
---|
| 550 | }; |
---|
| 551 | #endif |
---|
[1328] | 552 | #endif |
---|
[872] | 553 | |
---|
[608] | 554 | typedef std::list<SEI*> SEIMessages; |
---|
| 555 | |
---|
| 556 | /// output a selection of SEI messages by payload type. Ownership stays in original message list. |
---|
| 557 | SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
| 558 | |
---|
[1313] | 559 | /// remove a selection of SEI messages by payload type from the original list and return them in a new list. |
---|
[608] | 560 | SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
| 561 | |
---|
| 562 | /// delete list of SEI messages (freeing the referenced objects) |
---|
| 563 | Void deleteSEIs (SEIMessages &seiList); |
---|
| 564 | |
---|
| 565 | class SEIScalableNesting : public SEI |
---|
| 566 | { |
---|
| 567 | public: |
---|
| 568 | PayloadType payloadType() const { return SCALABLE_NESTING; } |
---|
| 569 | |
---|
| 570 | SEIScalableNesting() {} |
---|
[1313] | 571 | |
---|
[608] | 572 | virtual ~SEIScalableNesting() |
---|
[2] | 573 | { |
---|
[1313] | 574 | deleteSEIs(m_nestedSEIs); |
---|
[2] | 575 | } |
---|
| 576 | |
---|
[608] | 577 | Bool m_bitStreamSubsetFlag; |
---|
| 578 | Bool m_nestingOpFlag; |
---|
| 579 | Bool m_defaultOpFlag; //value valid if m_nestingOpFlag != 0 |
---|
| 580 | UInt m_nestingNumOpsMinus1; // -"- |
---|
| 581 | UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]; // -"- |
---|
| 582 | UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]; // -"- |
---|
| 583 | |
---|
| 584 | Bool m_allLayersFlag; //value valid if m_nestingOpFlag == 0 |
---|
| 585 | UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
| 586 | UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
[1313] | 587 | UChar m_nestingLayerId[MAX_NESTING_NUM_LAYER]; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0. This can e.g. be a static array of 64 UChar values |
---|
[608] | 588 | |
---|
| 589 | SEIMessages m_nestedSEIs; |
---|
[2] | 590 | }; |
---|
[608] | 591 | |
---|
[1313] | 592 | class SEITimeCode : public SEI |
---|
| 593 | { |
---|
| 594 | public: |
---|
| 595 | PayloadType payloadType() const { return TIME_CODE; } |
---|
| 596 | SEITimeCode() {} |
---|
| 597 | virtual ~SEITimeCode(){} |
---|
| 598 | |
---|
| 599 | UInt numClockTs; |
---|
| 600 | TComSEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS]; |
---|
| 601 | }; |
---|
| 602 | |
---|
| 603 | //definition according to P1005_v1; |
---|
| 604 | class SEITempMotionConstrainedTileSets: public SEI |
---|
| 605 | { |
---|
| 606 | struct TileSetData |
---|
| 607 | { |
---|
| 608 | protected: |
---|
| 609 | std::vector<Int> m_top_left_tile_index; //[tileSetIdx][tileIdx]; |
---|
| 610 | std::vector<Int> m_bottom_right_tile_index; |
---|
| 611 | |
---|
| 612 | public: |
---|
| 613 | Int m_mcts_id; |
---|
| 614 | Bool m_display_tile_set_flag; |
---|
| 615 | Int m_num_tile_rects_in_set; //_minus1; |
---|
| 616 | Bool m_exact_sample_value_match_flag; |
---|
| 617 | Bool m_mcts_tier_level_idc_present_flag; |
---|
| 618 | Bool m_mcts_tier_flag; |
---|
| 619 | Int m_mcts_level_idc; |
---|
| 620 | |
---|
| 621 | Void setNumberOfTileRects(const Int number) |
---|
| 622 | { |
---|
| 623 | m_top_left_tile_index .resize(number); |
---|
| 624 | m_bottom_right_tile_index.resize(number); |
---|
| 625 | } |
---|
| 626 | |
---|
| 627 | Int getNumberOfTileRects() const |
---|
| 628 | { |
---|
| 629 | assert(m_top_left_tile_index.size() == m_bottom_right_tile_index.size()); |
---|
| 630 | return Int(m_top_left_tile_index.size()); |
---|
| 631 | } |
---|
| 632 | |
---|
| 633 | Int &topLeftTileIndex (const Int tileRectIndex) { return m_top_left_tile_index [tileRectIndex]; } |
---|
| 634 | Int &bottomRightTileIndex(const Int tileRectIndex) { return m_bottom_right_tile_index[tileRectIndex]; } |
---|
| 635 | const Int &topLeftTileIndex (const Int tileRectIndex) const { return m_top_left_tile_index [tileRectIndex]; } |
---|
| 636 | const Int &bottomRightTileIndex(const Int tileRectIndex) const { return m_bottom_right_tile_index[tileRectIndex]; } |
---|
| 637 | }; |
---|
| 638 | |
---|
| 639 | protected: |
---|
| 640 | std::vector<TileSetData> m_tile_set_data; |
---|
| 641 | |
---|
| 642 | public: |
---|
| 643 | |
---|
| 644 | Bool m_mc_all_tiles_exact_sample_value_match_flag; |
---|
| 645 | Bool m_each_tile_one_tile_set_flag; |
---|
| 646 | Bool m_limited_tile_set_display_flag; |
---|
| 647 | Bool m_max_mcs_tier_level_idc_present_flag; |
---|
| 648 | Bool m_max_mcts_tier_flag; |
---|
| 649 | Int m_max_mcts_level_idc; |
---|
| 650 | |
---|
| 651 | PayloadType payloadType() const { return TEMP_MOTION_CONSTRAINED_TILE_SETS; } |
---|
| 652 | |
---|
| 653 | Void setNumberOfTileSets(const Int number) { m_tile_set_data.resize(number); } |
---|
| 654 | Int getNumberOfTileSets() const { return Int(m_tile_set_data.size()); } |
---|
| 655 | |
---|
| 656 | TileSetData &tileSetData (const Int index) { return m_tile_set_data[index]; } |
---|
| 657 | const TileSetData &tileSetData (const Int index) const { return m_tile_set_data[index]; } |
---|
| 658 | |
---|
| 659 | }; |
---|
| 660 | |
---|
[1328] | 661 | #if NH_MV_SEI |
---|
[1331] | 662 | #if NH_MV_LAYERS_NOT_PRESENT_SEI |
---|
[1328] | 663 | class SEILayersNotPresent : public SEI |
---|
| 664 | { |
---|
| 665 | public: |
---|
| 666 | PayloadType payloadType( ) const { return LAYERS_NOT_PRESENT; } |
---|
| 667 | SEILayersNotPresent ( ) { }; |
---|
| 668 | ~SEILayersNotPresent( ) { }; |
---|
| 669 | SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; |
---|
| 670 | |
---|
| 671 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 672 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 673 | |
---|
| 674 | Int m_lnpSeiActiveVpsId; |
---|
[1331] | 675 | UInt m_lnpSeiMaxLayers; |
---|
[1328] | 676 | BoolAry1d m_layerNotPresentFlag; |
---|
[1331] | 677 | |
---|
[1332] | 678 | Void resizeDimI( Int sizeDimI ) |
---|
[1331] | 679 | { |
---|
| 680 | m_layerNotPresentFlag.resize( sizeDimI ); |
---|
| 681 | } |
---|
[1328] | 682 | }; |
---|
[1313] | 683 | #endif |
---|
| 684 | |
---|
[1328] | 685 | class SEIInterLayerConstrainedTileSets : public SEI |
---|
| 686 | { |
---|
| 687 | public: |
---|
| 688 | PayloadType payloadType( ) const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } |
---|
| 689 | SEIInterLayerConstrainedTileSets ( ) { }; |
---|
| 690 | ~SEIInterLayerConstrainedTileSets( ) { }; |
---|
| 691 | SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; |
---|
| 692 | |
---|
| 693 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 694 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 695 | |
---|
| 696 | Bool m_ilAllTilesExactSampleValueMatchFlag; |
---|
| 697 | Bool m_ilOneTilePerTileSetFlag; |
---|
| 698 | Int m_ilNumSetsInMessageMinus1; |
---|
| 699 | Bool m_skippedTileSetPresentFlag; |
---|
| 700 | IntAry1d m_ilctsId; |
---|
| 701 | IntAry1d m_ilNumTileRectsInSetMinus1; |
---|
| 702 | IntAry2d m_ilTopLeftTileIndex; |
---|
| 703 | IntAry2d m_ilBottomRightTileIndex; |
---|
| 704 | IntAry1d m_ilcIdc; |
---|
| 705 | BoolAry1d m_ilExactSampleValueMatchFlag; |
---|
| 706 | Int m_allTilesIlcIdc; |
---|
| 707 | |
---|
| 708 | Void resizeDimI( Int sizeDimI ) |
---|
| 709 | { |
---|
| 710 | m_ilctsId .resize( sizeDimI ); |
---|
| 711 | m_ilNumTileRectsInSetMinus1 .resize( sizeDimI ); |
---|
| 712 | m_ilTopLeftTileIndex .resize( sizeDimI ); |
---|
| 713 | m_ilBottomRightTileIndex .resize( sizeDimI ); |
---|
| 714 | m_ilcIdc .resize( sizeDimI ); |
---|
| 715 | m_ilExactSampleValueMatchFlag.resize( sizeDimI ); |
---|
| 716 | } |
---|
| 717 | |
---|
| 718 | Void resizeDimJ( Int i, Int sizeDimJ ) |
---|
| 719 | { |
---|
| 720 | m_ilTopLeftTileIndex [i].resize( sizeDimJ ); |
---|
| 721 | m_ilBottomRightTileIndex[i].resize( sizeDimJ ); |
---|
| 722 | } |
---|
| 723 | |
---|
| 724 | }; |
---|
| 725 | |
---|
| 726 | #if NH_MV_TBD |
---|
| 727 | class SEIBspNesting : public SEI |
---|
| 728 | { |
---|
| 729 | public: |
---|
| 730 | PayloadType payloadType( ) const { return BSP_NESTING; } |
---|
| 731 | SEIBspNesting ( ) { }; |
---|
| 732 | ~SEIBspNesting( ) { }; |
---|
| 733 | SEI* getCopy( ) const { return new SEIBspNesting(*this); }; |
---|
| 734 | |
---|
| 735 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 736 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 737 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 738 | |
---|
| 739 | Int m_seiOlsIdx; |
---|
| 740 | Int m_seiPartitioningSchemeIdx; |
---|
| 741 | Int m_bspIdx; |
---|
| 742 | Int m_bspNestingZeroBit; |
---|
| 743 | Int m_numSeisInBspMinus1; |
---|
| 744 | }; |
---|
| 745 | |
---|
| 746 | class SEIBspInitialArrivalTime : public SEI |
---|
| 747 | { |
---|
| 748 | public: |
---|
| 749 | PayloadType payloadType( ) const { return BSP_INITIAL_ARRIVAL_TIME; } |
---|
| 750 | SEIBspInitialArrivalTime ( ) { }; |
---|
| 751 | ~SEIBspInitialArrivalTime( ) { }; |
---|
| 752 | SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; |
---|
| 753 | |
---|
| 754 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 755 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 756 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 757 | |
---|
| 758 | IntAry1d m_nalInitialArrivalDelay; |
---|
| 759 | IntAry1d m_vclInitialArrivalDelay; |
---|
| 760 | }; |
---|
| 761 | #endif |
---|
| 762 | |
---|
| 763 | class SEISubBitstreamProperty : public SEI |
---|
| 764 | { |
---|
| 765 | public: |
---|
| 766 | PayloadType payloadType( ) const { return SUB_BITSTREAM_PROPERTY; } |
---|
| 767 | SEISubBitstreamProperty ( ) { }; |
---|
| 768 | ~SEISubBitstreamProperty( ) { }; |
---|
| 769 | SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; |
---|
| 770 | |
---|
| 771 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 772 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 773 | Void resizeArrays ( ); |
---|
| 774 | |
---|
| 775 | Int m_sbPropertyActiveVpsId; |
---|
| 776 | Int m_numAdditionalSubStreamsMinus1; |
---|
| 777 | IntAry1d m_subBitstreamMode; |
---|
| 778 | IntAry1d m_olsIdxToVps; |
---|
| 779 | IntAry1d m_highestSublayerId; |
---|
| 780 | IntAry1d m_avgSbPropertyBitRate; |
---|
| 781 | IntAry1d m_maxSbPropertyBitRate; |
---|
| 782 | }; |
---|
| 783 | |
---|
| 784 | class SEIAlphaChannelInfo : public SEI |
---|
| 785 | { |
---|
| 786 | public: |
---|
| 787 | PayloadType payloadType( ) const { return ALPHA_CHANNEL_INFO; } |
---|
| 788 | SEIAlphaChannelInfo ( ) { }; |
---|
| 789 | ~SEIAlphaChannelInfo( ) { }; |
---|
| 790 | SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; |
---|
| 791 | |
---|
| 792 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 793 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 794 | |
---|
| 795 | Bool m_alphaChannelCancelFlag; |
---|
| 796 | Int m_alphaChannelUseIdc; |
---|
| 797 | Int m_alphaChannelBitDepthMinus8; |
---|
| 798 | Int m_alphaTransparentValue; |
---|
| 799 | Int m_alphaOpaqueValue; |
---|
| 800 | Bool m_alphaChannelIncrFlag; |
---|
| 801 | Bool m_alphaChannelClipFlag; |
---|
| 802 | Bool m_alphaChannelClipTypeFlag; |
---|
| 803 | }; |
---|
| 804 | |
---|
| 805 | class SEIOverlayInfo : public SEI |
---|
| 806 | { |
---|
| 807 | public: |
---|
| 808 | PayloadType payloadType( ) const { return OVERLAY_INFO; } |
---|
[1342] | 809 | SEIOverlayInfo ( ); |
---|
[1328] | 810 | ~SEIOverlayInfo( ) { }; |
---|
| 811 | SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; |
---|
| 812 | |
---|
[1342] | 813 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
[1345] | 814 | Bool checkCfg ( const TComSlice* slice ); |
---|
[1328] | 815 | |
---|
[1342] | 816 | const Int m_numOverlaysMax; |
---|
| 817 | const Int m_numOverlayElementsMax; |
---|
| 818 | const Int m_numStringBytesMax; //incl. null termination byte |
---|
| 819 | |
---|
[1328] | 820 | Bool m_overlayInfoCancelFlag; |
---|
| 821 | Int m_overlayContentAuxIdMinus128; |
---|
| 822 | Int m_overlayLabelAuxIdMinus128; |
---|
| 823 | Int m_overlayAlphaAuxIdMinus128; |
---|
| 824 | Int m_overlayElementLabelValueLengthMinus8; |
---|
| 825 | Int m_numOverlaysMinus1; |
---|
| 826 | IntAry1d m_overlayIdx; |
---|
| 827 | BoolAry1d m_languageOverlayPresentFlag; |
---|
| 828 | IntAry1d m_overlayContentLayerId; |
---|
| 829 | BoolAry1d m_overlayLabelPresentFlag; |
---|
| 830 | IntAry1d m_overlayLabelLayerId; |
---|
| 831 | BoolAry1d m_overlayAlphaPresentFlag; |
---|
| 832 | IntAry1d m_overlayAlphaLayerId; |
---|
| 833 | IntAry1d m_numOverlayElementsMinus1; |
---|
| 834 | IntAry2d m_overlayElementLabelMin; |
---|
[1342] | 835 | IntAry2d m_overlayElementLabelMax; |
---|
[1344] | 836 | StringAry1d m_overlayLanguage; |
---|
| 837 | StringAry1d m_overlayName; |
---|
| 838 | StringAry2d m_overlayElementName; |
---|
[1328] | 839 | Bool m_overlayInfoPersistenceFlag; |
---|
| 840 | }; |
---|
| 841 | |
---|
| 842 | class SEITemporalMvPredictionConstraints : public SEI |
---|
| 843 | { |
---|
| 844 | public: |
---|
| 845 | PayloadType payloadType( ) const { return TEMPORAL_MV_PREDICTION_CONSTRAINTS; } |
---|
| 846 | SEITemporalMvPredictionConstraints ( ) { }; |
---|
| 847 | ~SEITemporalMvPredictionConstraints( ) { }; |
---|
| 848 | SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; |
---|
| 849 | |
---|
| 850 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 851 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 852 | |
---|
| 853 | Bool m_prevPicsNotUsedFlag; |
---|
| 854 | Bool m_noIntraLayerColPicFlag; |
---|
| 855 | }; |
---|
| 856 | |
---|
| 857 | #if NH_MV_SEI_TBD |
---|
| 858 | class SEIFrameFieldInfo : public SEI |
---|
| 859 | { |
---|
| 860 | public: |
---|
| 861 | PayloadType payloadType( ) const { return FRAME_FIELD_INFO; } |
---|
| 862 | SEIFrameFieldInfo ( ) { }; |
---|
| 863 | ~SEIFrameFieldInfo( ) { }; |
---|
| 864 | SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; |
---|
| 865 | |
---|
| 866 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 867 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 868 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 869 | |
---|
| 870 | Int m_ffinfoPicStruct; |
---|
| 871 | Int m_ffinfoSourceScanType; |
---|
| 872 | Bool m_ffinfoDuplicateFlag; |
---|
| 873 | }; |
---|
[1337] | 874 | #endif |
---|
[1328] | 875 | |
---|
| 876 | class SEIThreeDimensionalReferenceDisplaysInfo : public SEI |
---|
| 877 | { |
---|
| 878 | public: |
---|
| 879 | PayloadType payloadType( ) const { return THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO; } |
---|
| 880 | SEIThreeDimensionalReferenceDisplaysInfo ( ) { }; |
---|
| 881 | ~SEIThreeDimensionalReferenceDisplaysInfo( ) { }; |
---|
| 882 | SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; |
---|
| 883 | |
---|
| 884 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 885 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 886 | |
---|
[1337] | 887 | Int getNumRefDisplaysMinus1( ) const |
---|
| 888 | { |
---|
| 889 | return m_numRefDisplaysMinus1; |
---|
| 890 | } |
---|
| 891 | |
---|
[1328] | 892 | Int m_precRefDisplayWidth; |
---|
| 893 | Bool m_refViewingDistanceFlag; |
---|
| 894 | Int m_precRefViewingDist; |
---|
| 895 | Int m_numRefDisplaysMinus1; |
---|
| 896 | IntAry1d m_leftViewId; |
---|
| 897 | IntAry1d m_rightViewId; |
---|
| 898 | IntAry1d m_exponentRefDisplayWidth; |
---|
| 899 | IntAry1d m_mantissaRefDisplayWidth; |
---|
| 900 | IntAry1d m_exponentRefViewingDistance; |
---|
| 901 | IntAry1d m_mantissaRefViewingDistance; |
---|
| 902 | BoolAry1d m_additionalShiftPresentFlag; |
---|
| 903 | IntAry1d m_numSampleShiftPlus512; |
---|
| 904 | Bool m_threeDimensionalReferenceDisplaysExtensionFlag; |
---|
[1337] | 905 | |
---|
| 906 | Void resizeArrays( ) |
---|
| 907 | { |
---|
| 908 | Int numReferenceDiaplays = getNumRefDisplaysMinus1() + 1; |
---|
| 909 | |
---|
| 910 | m_leftViewId .resize( numReferenceDiaplays ); |
---|
| 911 | m_rightViewId .resize( numReferenceDiaplays ); |
---|
| 912 | m_exponentRefDisplayWidth .resize( numReferenceDiaplays ); |
---|
| 913 | m_mantissaRefDisplayWidth .resize( numReferenceDiaplays ); |
---|
| 914 | m_exponentRefViewingDistance .resize( numReferenceDiaplays ); |
---|
| 915 | m_mantissaRefViewingDistance .resize( numReferenceDiaplays ); |
---|
| 916 | m_additionalShiftPresentFlag .resize( numReferenceDiaplays ); |
---|
| 917 | m_numSampleShiftPlus512 .resize( numReferenceDiaplays ); |
---|
| 918 | } |
---|
| 919 | |
---|
| 920 | UInt getMantissaReferenceDisplayWidthLen ( Int i ) const ; |
---|
| 921 | UInt getMantissaReferenceViewingDistanceLen ( Int i ) const ; |
---|
| 922 | private: |
---|
| 923 | UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; |
---|
[1328] | 924 | }; |
---|
| 925 | |
---|
[1339] | 926 | #if SEI_DRI_F0169 |
---|
[1328] | 927 | class SEIDepthRepresentationInfo : public SEI |
---|
| 928 | { |
---|
[1339] | 929 | public: |
---|
| 930 | PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; } |
---|
| 931 | SEIDepthRepresentationInfo ( ) |
---|
| 932 | { |
---|
| 933 | m_currLayerID=-1; |
---|
| 934 | }; |
---|
| 935 | ~SEIDepthRepresentationInfo( ) { }; |
---|
| 936 | SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; |
---|
[1328] | 937 | |
---|
[1339] | 938 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 939 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 940 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 941 | Void clear() |
---|
| 942 | { |
---|
| 943 | int i; |
---|
| 944 | m_zNearFlag.clear(); |
---|
| 945 | m_zFarFlag.clear(); |
---|
| 946 | m_dMinFlag.clear(); |
---|
| 947 | m_dMaxFlag.clear(); |
---|
[1328] | 948 | |
---|
[1339] | 949 | for(i=0;i<m_zNear.size();i++) |
---|
| 950 | m_zNear[i].clear(); |
---|
| 951 | m_zNear.clear(); |
---|
[1328] | 952 | |
---|
[1339] | 953 | for(i=0;i<m_zFar.size();i++) |
---|
| 954 | m_zFar[i].clear(); |
---|
| 955 | m_zFar.clear(); |
---|
[1328] | 956 | |
---|
[1339] | 957 | for(i=0;i<m_dMin.size();i++) |
---|
| 958 | m_dMin[i].clear(); |
---|
| 959 | m_dMin.clear(); |
---|
[1328] | 960 | |
---|
[1339] | 961 | for(i=0;i<m_dMax.size();i++) |
---|
| 962 | m_dMax[i].clear(); |
---|
| 963 | m_dMax.clear(); |
---|
| 964 | |
---|
| 965 | for(i=0;i<m_depthRepresentationType.size();i++) |
---|
| 966 | m_depthRepresentationType[i].clear(); |
---|
| 967 | m_depthRepresentationType.clear(); |
---|
| 968 | |
---|
| 969 | for(i=0;i<m_disparityRefViewId.size();i++) |
---|
| 970 | m_disparityRefViewId[i].clear(); |
---|
| 971 | m_disparityRefViewId.clear(); |
---|
| 972 | |
---|
| 973 | for(i=0;i<m_depthNonlinearRepresentationNumMinus1.size();i++) |
---|
| 974 | m_depthNonlinearRepresentationNumMinus1[i].clear(); |
---|
| 975 | m_depthNonlinearRepresentationNumMinus1.clear(); |
---|
| 976 | |
---|
| 977 | for(i=0;i<m_depth_nonlinear_representation_model.size();i++) |
---|
| 978 | m_depth_nonlinear_representation_model[i].clear(); |
---|
| 979 | m_depth_nonlinear_representation_model.clear(); |
---|
| 980 | |
---|
| 981 | } |
---|
[1344] | 982 | Int m_currLayerID; |
---|
[1339] | 983 | BoolAry1d m_zNearFlag; |
---|
| 984 | BoolAry1d m_zFarFlag; |
---|
| 985 | BoolAry1d m_dMinFlag; |
---|
| 986 | BoolAry1d m_dMaxFlag; |
---|
| 987 | BoolAry2d m_depthRepresentationInfoSeiPresentFlag; |
---|
[1347] | 988 | std::vector< std::vector<Double> > m_zNear,m_zFar,m_dMin,m_dMax; |
---|
[1339] | 989 | |
---|
| 990 | IntAry2d m_depthRepresentationType; |
---|
| 991 | IntAry2d m_disparityRefViewId; |
---|
| 992 | IntAry2d m_depthNonlinearRepresentationNumMinus1; |
---|
[1344] | 993 | IntAry2d m_depth_nonlinear_representation_model; |
---|
[1328] | 994 | }; |
---|
| 995 | #endif |
---|
| 996 | |
---|
| 997 | class SEIMultiviewSceneInfo : public SEI |
---|
| 998 | { |
---|
| 999 | public: |
---|
| 1000 | PayloadType payloadType( ) const { return MULTIVIEW_SCENE_INFO; } |
---|
| 1001 | SEIMultiviewSceneInfo ( ) { }; |
---|
| 1002 | ~SEIMultiviewSceneInfo( ) { }; |
---|
| 1003 | SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; |
---|
| 1004 | |
---|
| 1005 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 1006 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1007 | |
---|
| 1008 | Int m_minDisparity; |
---|
| 1009 | Int m_maxDisparityRange; |
---|
| 1010 | }; |
---|
| 1011 | |
---|
| 1012 | |
---|
| 1013 | class SEIMultiviewAcquisitionInfo : public SEI |
---|
| 1014 | { |
---|
| 1015 | public: |
---|
| 1016 | PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; } |
---|
| 1017 | SEIMultiviewAcquisitionInfo ( ) { }; |
---|
| 1018 | ~SEIMultiviewAcquisitionInfo( ) { }; |
---|
| 1019 | SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; |
---|
| 1020 | |
---|
| 1021 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 1022 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1023 | |
---|
| 1024 | Int getNumViewsMinus1( ) const |
---|
| 1025 | { |
---|
| 1026 | Int numViewsMinus1; |
---|
| 1027 | if( m_scalNestSeiContThisSei != NULL ) |
---|
| 1028 | { |
---|
| 1029 | numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1; |
---|
| 1030 | } |
---|
| 1031 | else |
---|
| 1032 | { |
---|
| 1033 | numViewsMinus1 = 0; |
---|
| 1034 | } |
---|
| 1035 | return numViewsMinus1; |
---|
| 1036 | } |
---|
| 1037 | |
---|
| 1038 | Void resizeArrays( ) |
---|
| 1039 | { |
---|
| 1040 | Int numViews = getNumViewsMinus1() + 1; |
---|
| 1041 | m_signFocalLengthX .resize( numViews ); |
---|
| 1042 | m_exponentFocalLengthX .resize( numViews ); |
---|
| 1043 | m_mantissaFocalLengthX .resize( numViews ); |
---|
| 1044 | m_signFocalLengthY .resize( numViews ); |
---|
| 1045 | m_exponentFocalLengthY .resize( numViews ); |
---|
| 1046 | m_mantissaFocalLengthY .resize( numViews ); |
---|
| 1047 | m_signPrincipalPointX .resize( numViews ); |
---|
| 1048 | m_exponentPrincipalPointX.resize( numViews ); |
---|
| 1049 | m_mantissaPrincipalPointX.resize( numViews ); |
---|
| 1050 | m_signPrincipalPointY .resize( numViews ); |
---|
| 1051 | m_exponentPrincipalPointY.resize( numViews ); |
---|
| 1052 | m_mantissaPrincipalPointY.resize( numViews ); |
---|
| 1053 | m_signSkewFactor .resize( numViews ); |
---|
| 1054 | m_exponentSkewFactor .resize( numViews ); |
---|
| 1055 | m_mantissaSkewFactor .resize( numViews ); |
---|
| 1056 | |
---|
| 1057 | m_signR .resize( numViews ); |
---|
| 1058 | m_exponentR .resize( numViews ); |
---|
| 1059 | m_mantissaR .resize( numViews ); |
---|
| 1060 | m_signT .resize( numViews ); |
---|
| 1061 | m_exponentT .resize( numViews ); |
---|
| 1062 | m_mantissaT .resize( numViews ); |
---|
| 1063 | |
---|
| 1064 | for( Int i = 0; i < numViews ; i++ ) |
---|
| 1065 | { |
---|
| 1066 | m_signR [i].resize( 3 ); |
---|
| 1067 | m_exponentR[i].resize( 3 ); |
---|
| 1068 | m_mantissaR[i].resize( 3 ); |
---|
| 1069 | m_signT [i].resize( 3 ); |
---|
| 1070 | m_exponentT[i].resize( 3 ); |
---|
| 1071 | m_mantissaT[i].resize( 3 ); |
---|
| 1072 | |
---|
| 1073 | for (Int j = 0; j < 3; j++) |
---|
| 1074 | { |
---|
| 1075 | m_signR [i][j].resize( 3 ); |
---|
| 1076 | m_exponentR[i][j].resize( 3 ); |
---|
| 1077 | m_mantissaR[i][j].resize( 3 ); |
---|
| 1078 | } |
---|
| 1079 | } |
---|
| 1080 | } |
---|
| 1081 | |
---|
| 1082 | UInt getMantissaFocalLengthXLen ( Int i ) const ; |
---|
| 1083 | UInt getMantissaFocalLengthYLen ( Int i ) const ; |
---|
| 1084 | UInt getMantissaPrincipalPointXLen( Int i ) const ; |
---|
| 1085 | UInt getMantissaPrincipalPointYLen( Int i ) const ; |
---|
| 1086 | UInt getMantissaSkewFactorLen ( Int i ) const ; |
---|
| 1087 | UInt getMantissaRLen ( Int i, Int j, Int k ) const ; |
---|
| 1088 | UInt getMantissaTLen ( Int i, Int j ) const ; |
---|
| 1089 | |
---|
| 1090 | Bool m_intrinsicParamFlag; |
---|
| 1091 | Bool m_extrinsicParamFlag; |
---|
| 1092 | Bool m_intrinsicParamsEqualFlag; |
---|
| 1093 | Int m_precFocalLength; |
---|
| 1094 | Int m_precPrincipalPoint; |
---|
| 1095 | Int m_precSkewFactor; |
---|
| 1096 | BoolAry1d m_signFocalLengthX; |
---|
| 1097 | IntAry1d m_exponentFocalLengthX; |
---|
| 1098 | IntAry1d m_mantissaFocalLengthX; |
---|
| 1099 | BoolAry1d m_signFocalLengthY; |
---|
| 1100 | IntAry1d m_exponentFocalLengthY; |
---|
| 1101 | IntAry1d m_mantissaFocalLengthY; |
---|
| 1102 | BoolAry1d m_signPrincipalPointX; |
---|
| 1103 | IntAry1d m_exponentPrincipalPointX; |
---|
| 1104 | IntAry1d m_mantissaPrincipalPointX; |
---|
| 1105 | BoolAry1d m_signPrincipalPointY; |
---|
| 1106 | IntAry1d m_exponentPrincipalPointY; |
---|
| 1107 | IntAry1d m_mantissaPrincipalPointY; |
---|
| 1108 | BoolAry1d m_signSkewFactor; |
---|
| 1109 | IntAry1d m_exponentSkewFactor; |
---|
| 1110 | IntAry1d m_mantissaSkewFactor; |
---|
| 1111 | Int m_precRotationParam; |
---|
| 1112 | Int m_precTranslationParam; |
---|
| 1113 | BoolAry3d m_signR; |
---|
| 1114 | IntAry3d m_exponentR; |
---|
| 1115 | IntAry3d m_mantissaR; |
---|
| 1116 | BoolAry2d m_signT; |
---|
| 1117 | IntAry2d m_exponentT; |
---|
| 1118 | IntAry2d m_mantissaT; |
---|
| 1119 | private: |
---|
| 1120 | UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; |
---|
| 1121 | }; |
---|
| 1122 | |
---|
| 1123 | |
---|
| 1124 | |
---|
| 1125 | class SEIMultiviewViewPosition : public SEI |
---|
| 1126 | { |
---|
| 1127 | public: |
---|
| 1128 | PayloadType payloadType( ) const { return MULTIVIEW_VIEW_POSITION; } |
---|
| 1129 | SEIMultiviewViewPosition ( ) { }; |
---|
| 1130 | ~SEIMultiviewViewPosition( ) { }; |
---|
| 1131 | SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; |
---|
| 1132 | |
---|
| 1133 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
| 1134 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 1135 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1136 | |
---|
| 1137 | Int m_numViewsMinus1; |
---|
| 1138 | IntAry1d m_viewPosition; |
---|
| 1139 | }; |
---|
| 1140 | |
---|
[1344] | 1141 | #if NH_3D |
---|
[1328] | 1142 | class SEIAlternativeDepthInfo : public SEI |
---|
| 1143 | { |
---|
| 1144 | public: |
---|
| 1145 | PayloadType payloadType( ) const { return ALTERNATIVE_DEPTH_INFO; } |
---|
| 1146 | SEIAlternativeDepthInfo ( ) { }; |
---|
| 1147 | ~SEIAlternativeDepthInfo( ) { }; |
---|
| 1148 | SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; |
---|
| 1149 | |
---|
[1343] | 1150 | Void setupFromCfgFile( const Char* cfgFile ); |
---|
[1328] | 1151 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1152 | |
---|
| 1153 | Bool m_alternativeDepthInfoCancelFlag; |
---|
| 1154 | Int m_depthType; |
---|
[1343] | 1155 | #if NH_MV_SEI_TBD |
---|
[1328] | 1156 | Int m_numConstituentViewsGvdMinus1; |
---|
| 1157 | Bool m_depthPresentGvdFlag; |
---|
| 1158 | Bool m_zGvdFlag; |
---|
| 1159 | Bool m_intrinsicParamGvdFlag; |
---|
| 1160 | Bool m_rotationGvdFlag; |
---|
| 1161 | Bool m_translationGvdFlag; |
---|
| 1162 | BoolAry1d m_signGvdZNearFlag; |
---|
| 1163 | IntAry1d m_expGvdZNear; |
---|
| 1164 | IntAry1d m_manLenGvdZNearMinus1; |
---|
| 1165 | IntAry1d m_manGvdZNear; |
---|
| 1166 | BoolAry1d m_signGvdZFarFlag; |
---|
| 1167 | IntAry1d m_expGvdZFar; |
---|
| 1168 | IntAry1d m_manLenGvdZFarMinus1; |
---|
| 1169 | IntAry1d m_manGvdZFar; |
---|
| 1170 | Int m_precGvdFocalLength; |
---|
| 1171 | Int m_precGvdPrincipalPoint; |
---|
| 1172 | Int m_precGvdRotationParam; |
---|
| 1173 | Int m_precGvdTranslationParam; |
---|
| 1174 | BoolAry1d m_signGvdFocalLengthX; |
---|
| 1175 | IntAry1d m_expGvdFocalLengthX; |
---|
| 1176 | IntAry1d m_manGvdFocalLengthX; |
---|
| 1177 | BoolAry1d m_signGvdFocalLengthY; |
---|
| 1178 | IntAry1d m_expGvdFocalLengthY; |
---|
| 1179 | IntAry1d m_manGvdFocalLengthY; |
---|
| 1180 | BoolAry1d m_signGvdPrincipalPointX; |
---|
| 1181 | IntAry1d m_expGvdPrincipalPointX; |
---|
| 1182 | IntAry1d m_manGvdPrincipalPointX; |
---|
| 1183 | BoolAry1d m_signGvdPrincipalPointY; |
---|
| 1184 | IntAry1d m_expGvdPrincipalPointY; |
---|
| 1185 | IntAry1d m_manGvdPrincipalPointY; |
---|
| 1186 | BoolAry3d m_signGvdR; |
---|
| 1187 | IntAry3d m_expGvdR; |
---|
| 1188 | IntAry3d m_manGvdR; |
---|
| 1189 | BoolAry1d m_signGvdTX; |
---|
| 1190 | IntAry1d m_expGvdTX; |
---|
| 1191 | IntAry1d m_manGvdTX; |
---|
[1343] | 1192 | #endif |
---|
[1328] | 1193 | Int m_minOffsetXInt; |
---|
| 1194 | Int m_minOffsetXFrac; |
---|
| 1195 | Int m_maxOffsetXInt; |
---|
| 1196 | Int m_maxOffsetXFrac; |
---|
| 1197 | Bool m_offsetYPresentFlag; |
---|
| 1198 | Int m_minOffsetYInt; |
---|
| 1199 | Int m_minOffsetYFrac; |
---|
| 1200 | Int m_maxOffsetYInt; |
---|
| 1201 | Int m_maxOffsetYFrac; |
---|
| 1202 | Bool m_warpMapSizePresentFlag; |
---|
| 1203 | Int m_warpMapWidthMinus2; |
---|
| 1204 | Int m_warpMapHeightMinus2; |
---|
| 1205 | }; |
---|
| 1206 | |
---|
| 1207 | #endif |
---|
[1344] | 1208 | #endif |
---|
[1328] | 1209 | |
---|
| 1210 | #endif |
---|
[56] | 1211 | //! \} |
---|