[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 | * |
---|
[1413] | 6 | * Copyright (c) 2010-2017, 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" |
---|
[1356] | 44 | |
---|
| 45 | |
---|
[1386] | 46 | #if NH_MV |
---|
[1356] | 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; |
---|
[1386] | 55 | #if NH_MV |
---|
[1356] | 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, |
---|
[1413] | 70 | PAN_SCAN_RECT = 2, // TODO: add encoder command line control to create these messages |
---|
| 71 | FILLER_PAYLOAD = 3, // TODO: add encoder command line control to create these messages |
---|
| 72 | USER_DATA_REGISTERED_ITU_T_T35 = 4, // TODO: add encoder command line control to create these messages |
---|
| 73 | USER_DATA_UNREGISTERED = 5, // TODO: add encoder command line control to create these messages |
---|
[608] | 74 | RECOVERY_POINT = 6, |
---|
[1413] | 75 | SCENE_INFO = 9, // TODO: add encoder command line control to create these messages |
---|
| 76 | PICTURE_SNAPSHOT = 15, // TODO: add encoder command line control to create these messages |
---|
| 77 | PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, // TODO: add encoder command line control to create these messages |
---|
| 78 | PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, // TODO: add encoder command line control to create these messages |
---|
| 79 | FILM_GRAIN_CHARACTERISTICS = 19, // TODO: add encoder command line control to create these messages |
---|
| 80 | POST_FILTER_HINT = 22, // TODO: add encoder command line control to create these messages |
---|
[608] | 81 | TONE_MAPPING_INFO = 23, |
---|
| 82 | FRAME_PACKING = 45, |
---|
| 83 | DISPLAY_ORIENTATION = 47, |
---|
[1413] | 84 | GREEN_METADATA = 56, |
---|
[608] | 85 | SOP_DESCRIPTION = 128, |
---|
| 86 | ACTIVE_PARAMETER_SETS = 129, |
---|
| 87 | DECODING_UNIT_INFO = 130, |
---|
| 88 | TEMPORAL_LEVEL0_INDEX = 131, |
---|
| 89 | DECODED_PICTURE_HASH = 132, |
---|
| 90 | SCALABLE_NESTING = 133, |
---|
| 91 | REGION_REFRESH_INFO = 134, |
---|
[1313] | 92 | NO_DISPLAY = 135, |
---|
| 93 | TIME_CODE = 136, |
---|
| 94 | MASTERING_DISPLAY_COLOUR_VOLUME = 137, |
---|
| 95 | SEGM_RECT_FRAME_PACKING = 138, |
---|
| 96 | TEMP_MOTION_CONSTRAINED_TILE_SETS = 139, |
---|
[1386] | 97 | CHROMA_RESAMPLING_FILTER_HINT = 140, |
---|
| 98 | KNEE_FUNCTION_INFO = 141, |
---|
| 99 | COLOUR_REMAPPING_INFO = 142, |
---|
[1413] | 100 | DEINTERLACE_FIELD_IDENTIFICATION = 143, // TODO: add encoder command line control to create these messages |
---|
| 101 | CONTENT_LIGHT_LEVEL_INFO = 144, // TODO: add encoder command line control to create these messages |
---|
| 102 | DEPENDENT_RAP_INDICATION = 145, // TODO: add encoder command line control to create these messages |
---|
| 103 | CODED_REGION_COMPLETION = 146, // TODO: add encoder command line control to create these messages |
---|
| 104 | ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147, |
---|
| 105 | AMBIENT_VIEWING_ENVIRONMENT = 148, // TODO: add encoder command line control to create these messages |
---|
| 106 | #if NH_MV |
---|
[1356] | 107 | LAYERS_NOT_PRESENT = 160, |
---|
| 108 | INTER_LAYER_CONSTRAINED_TILE_SETS = 161, |
---|
| 109 | BSP_NESTING = 162, |
---|
| 110 | BSP_INITIAL_ARRIVAL_TIME = 163, |
---|
| 111 | SUB_BITSTREAM_PROPERTY = 164, |
---|
| 112 | ALPHA_CHANNEL_INFO = 165, |
---|
| 113 | OVERLAY_INFO = 166, |
---|
| 114 | TEMPORAL_MV_PREDICTION_CONSTRAINTS = 167, |
---|
| 115 | FRAME_FIELD_INFO = 168, |
---|
| 116 | THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO = 176, |
---|
| 117 | DEPTH_REPRESENTATION_INFO = 177, |
---|
| 118 | MULTIVIEW_SCENE_INFO = 178, |
---|
| 119 | MULTIVIEW_ACQUISITION_INFO = 179, |
---|
| 120 | MULTIVIEW_VIEW_POSITION = 180 |
---|
| 121 | #if NH_3D |
---|
| 122 | ,ALTERNATIVE_DEPTH_INFO = 181 |
---|
[872] | 123 | #endif |
---|
[1413] | 124 | #endif |
---|
[1313] | 125 | |
---|
[2] | 126 | }; |
---|
[1313] | 127 | |
---|
[1386] | 128 | #if NH_MV |
---|
[1356] | 129 | SEI(); |
---|
[1386] | 130 | #else |
---|
| 131 | SEI() {} |
---|
| 132 | #endif |
---|
[1356] | 133 | |
---|
[1386] | 134 | |
---|
[2] | 135 | virtual ~SEI() {} |
---|
[1386] | 136 | |
---|
| 137 | static const TChar *getSEIMessageString(SEI::PayloadType payloadType); |
---|
| 138 | |
---|
[1356] | 139 | virtual PayloadType payloadType() const = 0; |
---|
[1313] | 140 | |
---|
[1386] | 141 | #if NH_MV |
---|
| 142 | virtual SEI* getCopy( ) const; |
---|
[1356] | 143 | static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); |
---|
| 144 | Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; |
---|
[1313] | 145 | |
---|
[1356] | 146 | |
---|
| 147 | virtual Void setupFromSlice ( const TComSlice* slice ); |
---|
[1386] | 148 | virtual Void setupFromCfgFile ( const TChar* cfgFile ); |
---|
[1356] | 149 | virtual Bool checkCfg ( const TComSlice* slice ); |
---|
| 150 | |
---|
| 151 | Void xPrintCfgErrorIntro(); |
---|
[1386] | 152 | Void xCheckCfgRange ( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const TChar* seName ); |
---|
| 153 | Void xCheckCfg ( Bool& wrongConfig, Bool cond, const TChar* errStr ); |
---|
[1356] | 154 | Void xAddGeneralOpts ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, |
---|
| 155 | Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder ); |
---|
| 156 | // Filters where to insert SEI in the bitstream. |
---|
| 157 | // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. |
---|
| 158 | IntAry1d m_applicableLayerIds; |
---|
| 159 | IntAry1d m_applicablePocs; |
---|
| 160 | IntAry1d m_applicableTids; |
---|
| 161 | IntAry1d m_applicableVclNaluTypes; |
---|
| 162 | |
---|
| 163 | Int m_payloadType; // Payload type |
---|
| 164 | Int m_seiNaluId; // Identifies to which NAL unit the SEI is added. |
---|
| 165 | Int m_positionInSeiNalu; // Identifies the order within the NAL unit |
---|
| 166 | Bool m_modifyByEncoder; // Don't use the SEI cfg-file, but let let the encoder setup the NALU. |
---|
| 167 | |
---|
| 168 | SEIScalableNesting* m_scalNestSeiContThisSei; // Pointer to scalable nesting SEI containing the SEI. When NULL, the SEI is not nested. |
---|
| 169 | #endif |
---|
[2] | 170 | }; |
---|
| 171 | |
---|
[1313] | 172 | |
---|
[1413] | 173 | typedef std::list<SEI*> SEIMessages; |
---|
[2] | 174 | |
---|
[1413] | 175 | /// output a selection of SEI messages by payload type. Ownership stays in original message list. |
---|
| 176 | SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
[2] | 177 | |
---|
[1413] | 178 | /// remove a selection of SEI messages by payload type from the original list and return them in a new list. |
---|
| 179 | SEIMessages extractSeisByType(SEIMessages &seiList, SEI::PayloadType seiType); |
---|
[2] | 180 | |
---|
[1413] | 181 | /// delete list of SEI messages (freeing the referenced objects) |
---|
| 182 | Void deleteSEIs (SEIMessages &seiList); |
---|
[2] | 183 | |
---|
| 184 | |
---|
[608] | 185 | class SEIBufferingPeriod : public SEI |
---|
| 186 | { |
---|
| 187 | public: |
---|
| 188 | PayloadType payloadType() const { return BUFFERING_PERIOD; } |
---|
[1313] | 189 | void copyTo (SEIBufferingPeriod& target); |
---|
[608] | 190 | |
---|
| 191 | SEIBufferingPeriod() |
---|
| 192 | : m_bpSeqParameterSetId (0) |
---|
| 193 | , m_rapCpbParamsPresentFlag (false) |
---|
| 194 | , m_cpbDelayOffset (0) |
---|
| 195 | , m_dpbDelayOffset (0) |
---|
| 196 | { |
---|
| 197 | ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay)); |
---|
| 198 | ::memset(m_initialCpbRemovalDelayOffset, 0, sizeof(m_initialCpbRemovalDelayOffset)); |
---|
| 199 | ::memset(m_initialAltCpbRemovalDelay, 0, sizeof(m_initialAltCpbRemovalDelay)); |
---|
| 200 | ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset)); |
---|
| 201 | } |
---|
| 202 | virtual ~SEIBufferingPeriod() {} |
---|
| 203 | |
---|
| 204 | UInt m_bpSeqParameterSetId; |
---|
| 205 | Bool m_rapCpbParamsPresentFlag; |
---|
[1084] | 206 | UInt m_cpbDelayOffset; |
---|
| 207 | UInt m_dpbDelayOffset; |
---|
[608] | 208 | UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 209 | UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; |
---|
| 210 | UInt m_initialAltCpbRemovalDelay [MAX_CPB_CNT][2]; |
---|
| 211 | UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]; |
---|
| 212 | Bool m_concatenationFlag; |
---|
| 213 | UInt m_auCpbRemovalDelayDelta; |
---|
| 214 | }; |
---|
| 215 | class SEIPictureTiming : public SEI |
---|
| 216 | { |
---|
| 217 | public: |
---|
| 218 | PayloadType payloadType() const { return PICTURE_TIMING; } |
---|
[1313] | 219 | void copyTo (SEIPictureTiming& target); |
---|
[608] | 220 | |
---|
| 221 | SEIPictureTiming() |
---|
| 222 | : m_picStruct (0) |
---|
| 223 | , m_sourceScanType (0) |
---|
| 224 | , m_duplicateFlag (false) |
---|
| 225 | , m_picDpbOutputDuDelay (0) |
---|
| 226 | {} |
---|
| 227 | virtual ~SEIPictureTiming() |
---|
| 228 | { |
---|
| 229 | } |
---|
| 230 | |
---|
| 231 | UInt m_picStruct; |
---|
| 232 | UInt m_sourceScanType; |
---|
| 233 | Bool m_duplicateFlag; |
---|
| 234 | |
---|
| 235 | UInt m_auCpbRemovalDelay; |
---|
| 236 | UInt m_picDpbOutputDelay; |
---|
| 237 | UInt m_picDpbOutputDuDelay; |
---|
| 238 | UInt m_numDecodingUnitsMinus1; |
---|
| 239 | Bool m_duCommonCpbRemovalDelayFlag; |
---|
| 240 | UInt m_duCommonCpbRemovalDelayMinus1; |
---|
[1313] | 241 | std::vector<UInt> m_numNalusInDuMinus1; |
---|
| 242 | std::vector<UInt> m_duCpbRemovalDelayMinus1; |
---|
[608] | 243 | }; |
---|
| 244 | |
---|
[1413] | 245 | class SEIPanScanRect : public SEI |
---|
[608] | 246 | { |
---|
| 247 | public: |
---|
[1413] | 248 | PayloadType payloadType() const { return PAN_SCAN_RECT; } |
---|
[608] | 249 | |
---|
[1413] | 250 | SEIPanScanRect() {} |
---|
| 251 | virtual ~SEIPanScanRect() {} |
---|
| 252 | |
---|
| 253 | struct PanScanRect |
---|
| 254 | { |
---|
| 255 | Int leftOffset; |
---|
| 256 | Int rightOffset; |
---|
| 257 | Int topOffset; |
---|
| 258 | Int bottomOffset; |
---|
| 259 | }; |
---|
| 260 | |
---|
| 261 | UInt m_panScanRectId; |
---|
| 262 | Bool m_panScanRectCancelFlag; |
---|
| 263 | std::vector<PanScanRect> m_panScanRectRegions; |
---|
| 264 | Bool m_panScanRectPersistenceFlag; |
---|
[608] | 265 | }; |
---|
| 266 | |
---|
[1413] | 267 | |
---|
| 268 | class SEIFillerPayload : public SEI |
---|
| 269 | { |
---|
| 270 | public: |
---|
| 271 | PayloadType payloadType() const { return FILLER_PAYLOAD; } |
---|
| 272 | |
---|
| 273 | SEIFillerPayload() {} |
---|
| 274 | virtual ~SEIFillerPayload() {} |
---|
| 275 | |
---|
| 276 | UInt m_numFillerFFBytes; |
---|
| 277 | }; |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | class SEIUserDataRegistered : public SEI |
---|
| 281 | { |
---|
| 282 | public: |
---|
| 283 | PayloadType payloadType() const { return USER_DATA_REGISTERED_ITU_T_T35; } |
---|
| 284 | |
---|
| 285 | SEIUserDataRegistered() {} |
---|
| 286 | virtual ~SEIUserDataRegistered() {} |
---|
| 287 | |
---|
| 288 | UShort m_ituCountryCode; |
---|
| 289 | std::vector<UChar> m_userData; |
---|
| 290 | }; |
---|
| 291 | |
---|
| 292 | |
---|
| 293 | static const UInt ISO_IEC_11578_LEN=16; |
---|
| 294 | |
---|
| 295 | class SEIUserDataUnregistered : public SEI |
---|
| 296 | { |
---|
| 297 | public: |
---|
| 298 | PayloadType payloadType() const { return USER_DATA_UNREGISTERED; } |
---|
| 299 | |
---|
| 300 | SEIUserDataUnregistered() {} |
---|
| 301 | virtual ~SEIUserDataUnregistered() { } |
---|
| 302 | |
---|
| 303 | UChar m_uuid_iso_iec_11578[ISO_IEC_11578_LEN]; |
---|
| 304 | std::vector<UChar> m_userData; |
---|
| 305 | }; |
---|
| 306 | |
---|
| 307 | |
---|
[608] | 308 | class SEIRecoveryPoint : public SEI |
---|
| 309 | { |
---|
| 310 | public: |
---|
| 311 | PayloadType payloadType() const { return RECOVERY_POINT; } |
---|
| 312 | |
---|
| 313 | SEIRecoveryPoint() {} |
---|
| 314 | virtual ~SEIRecoveryPoint() {} |
---|
| 315 | |
---|
| 316 | Int m_recoveryPocCnt; |
---|
| 317 | Bool m_exactMatchingFlag; |
---|
| 318 | Bool m_brokenLinkFlag; |
---|
| 319 | }; |
---|
[1313] | 320 | |
---|
[1413] | 321 | class SEISceneInfo : public SEI |
---|
[608] | 322 | { |
---|
| 323 | public: |
---|
[1413] | 324 | PayloadType payloadType() const { return SCENE_INFO; } |
---|
[608] | 325 | |
---|
[1413] | 326 | SEISceneInfo() {} |
---|
| 327 | virtual ~SEISceneInfo() {} |
---|
[608] | 328 | |
---|
[1413] | 329 | Bool m_bSceneInfoPresentFlag; |
---|
| 330 | Bool m_bPrevSceneIdValidFlag; |
---|
| 331 | UInt m_sceneId; |
---|
| 332 | UInt m_sceneTransitionType; |
---|
| 333 | UInt m_secondSceneId; |
---|
[608] | 334 | }; |
---|
| 335 | |
---|
[1413] | 336 | class SEIPictureSnapshot : public SEI |
---|
[1313] | 337 | { |
---|
| 338 | public: |
---|
[1413] | 339 | PayloadType payloadType() const { return PICTURE_SNAPSHOT; } |
---|
[1313] | 340 | |
---|
[1413] | 341 | SEIPictureSnapshot() {} |
---|
| 342 | virtual ~SEIPictureSnapshot() {} |
---|
[1313] | 343 | |
---|
[1413] | 344 | UInt m_snapshotId; |
---|
[1313] | 345 | }; |
---|
| 346 | |
---|
[1413] | 347 | |
---|
| 348 | class SEIProgressiveRefinementSegmentStart : public SEI |
---|
[608] | 349 | { |
---|
| 350 | public: |
---|
[1413] | 351 | PayloadType payloadType() const { return PROGRESSIVE_REFINEMENT_SEGMENT_START; } |
---|
[608] | 352 | |
---|
[1413] | 353 | SEIProgressiveRefinementSegmentStart() {} |
---|
| 354 | virtual ~SEIProgressiveRefinementSegmentStart() {} |
---|
[2] | 355 | |
---|
[1413] | 356 | UInt m_progressiveRefinementId; |
---|
| 357 | UInt m_picOrderCntDelta; |
---|
[608] | 358 | }; |
---|
| 359 | |
---|
[1413] | 360 | |
---|
| 361 | class SEIProgressiveRefinementSegmentEnd: public SEI |
---|
[608] | 362 | { |
---|
| 363 | public: |
---|
[1413] | 364 | PayloadType payloadType() const { return PROGRESSIVE_REFINEMENT_SEGMENT_END; } |
---|
[608] | 365 | |
---|
[1413] | 366 | SEIProgressiveRefinementSegmentEnd() {} |
---|
| 367 | virtual ~SEIProgressiveRefinementSegmentEnd() {} |
---|
[608] | 368 | |
---|
[1413] | 369 | UInt m_progressiveRefinementId; |
---|
[608] | 370 | }; |
---|
| 371 | |
---|
[1413] | 372 | |
---|
| 373 | class SEIFilmGrainCharacteristics: public SEI |
---|
[608] | 374 | { |
---|
| 375 | public: |
---|
[1413] | 376 | PayloadType payloadType() const { return FILM_GRAIN_CHARACTERISTICS; } |
---|
[608] | 377 | |
---|
[1413] | 378 | SEIFilmGrainCharacteristics() {} |
---|
| 379 | virtual ~SEIFilmGrainCharacteristics() {} |
---|
[608] | 380 | |
---|
[1413] | 381 | Bool m_filmGrainCharacteristicsCancelFlag; |
---|
| 382 | UChar m_filmGrainModelId; |
---|
| 383 | Bool m_separateColourDescriptionPresentFlag; |
---|
| 384 | UChar m_filmGrainBitDepthLumaMinus8; |
---|
| 385 | UChar m_filmGrainBitDepthChromaMinus8; |
---|
| 386 | Bool m_filmGrainFullRangeFlag; |
---|
| 387 | UChar m_filmGrainColourPrimaries; |
---|
| 388 | UChar m_filmGrainTransferCharacteristics; |
---|
| 389 | UChar m_filmGrainMatrixCoeffs; |
---|
| 390 | UChar m_blendingModeId; |
---|
| 391 | UChar m_log2ScaleFactor; |
---|
[608] | 392 | |
---|
[1413] | 393 | struct CompModelIntensityValues |
---|
[1313] | 394 | { |
---|
[1413] | 395 | UChar intensityIntervalLowerBound; |
---|
| 396 | UChar intensityIntervalUpperBound; |
---|
| 397 | std::vector<Int> compModelValue; |
---|
| 398 | }; |
---|
[1313] | 399 | |
---|
[1413] | 400 | struct CompModel |
---|
| 401 | { |
---|
| 402 | Bool bPresentFlag; |
---|
| 403 | UChar numModelValues; // this must be the same as intensityValues[*].compModelValue.size() |
---|
| 404 | std::vector<CompModelIntensityValues> intensityValues; |
---|
| 405 | }; |
---|
[1313] | 406 | |
---|
[1413] | 407 | CompModel m_compModel[MAX_NUM_COMPONENT]; |
---|
| 408 | Bool m_filmGrainCharacteristicsPersistenceFlag; |
---|
| 409 | |
---|
[1313] | 410 | }; |
---|
| 411 | |
---|
[1413] | 412 | |
---|
| 413 | class SEIPostFilterHint: public SEI |
---|
[608] | 414 | { |
---|
| 415 | public: |
---|
[1413] | 416 | PayloadType payloadType() const { return POST_FILTER_HINT; } |
---|
[608] | 417 | |
---|
[1413] | 418 | SEIPostFilterHint() {} |
---|
| 419 | virtual ~SEIPostFilterHint() {} |
---|
[608] | 420 | |
---|
[1413] | 421 | UInt m_filterHintSizeY; |
---|
| 422 | UInt m_filterHintSizeX; |
---|
| 423 | UInt m_filterHintType; |
---|
| 424 | Bool m_bIsMonochrome; |
---|
| 425 | std::vector<Int> m_filterHintValues; // values stored in linear array, [ ( ( component * sizeY + y ) * SizeX ) + x ] |
---|
[608] | 426 | }; |
---|
| 427 | |
---|
| 428 | class SEIToneMappingInfo : public SEI |
---|
| 429 | { |
---|
| 430 | public: |
---|
| 431 | PayloadType payloadType() const { return TONE_MAPPING_INFO; } |
---|
| 432 | SEIToneMappingInfo() {} |
---|
| 433 | virtual ~SEIToneMappingInfo() {} |
---|
| 434 | |
---|
| 435 | Int m_toneMapId; |
---|
| 436 | Bool m_toneMapCancelFlag; |
---|
| 437 | Bool m_toneMapPersistenceFlag; |
---|
| 438 | Int m_codedDataBitDepth; |
---|
| 439 | Int m_targetBitDepth; |
---|
| 440 | Int m_modelId; |
---|
| 441 | Int m_minValue; |
---|
| 442 | Int m_maxValue; |
---|
| 443 | Int m_sigmoidMidpoint; |
---|
| 444 | Int m_sigmoidWidth; |
---|
| 445 | std::vector<Int> m_startOfCodedInterval; |
---|
| 446 | Int m_numPivots; |
---|
| 447 | std::vector<Int> m_codedPivotValue; |
---|
| 448 | std::vector<Int> m_targetPivotValue; |
---|
| 449 | Int m_cameraIsoSpeedIdc; |
---|
| 450 | Int m_cameraIsoSpeedValue; |
---|
[964] | 451 | Int m_exposureIndexIdc; |
---|
| 452 | Int m_exposureIndexValue; |
---|
[1313] | 453 | Bool m_exposureCompensationValueSignFlag; |
---|
[608] | 454 | Int m_exposureCompensationValueNumerator; |
---|
| 455 | Int m_exposureCompensationValueDenomIdc; |
---|
| 456 | Int m_refScreenLuminanceWhite; |
---|
| 457 | Int m_extendedRangeWhiteLevel; |
---|
| 458 | Int m_nominalBlackLevelLumaCodeValue; |
---|
| 459 | Int m_nominalWhiteLevelLumaCodeValue; |
---|
| 460 | Int m_extendedWhiteLevelLumaCodeValue; |
---|
| 461 | }; |
---|
| 462 | |
---|
[1413] | 463 | class SEIFramePacking : public SEI |
---|
[1313] | 464 | { |
---|
| 465 | public: |
---|
[1413] | 466 | PayloadType payloadType() const { return FRAME_PACKING; } |
---|
[1313] | 467 | |
---|
[1413] | 468 | SEIFramePacking() {} |
---|
| 469 | virtual ~SEIFramePacking() {} |
---|
| 470 | |
---|
| 471 | Int m_arrangementId; |
---|
| 472 | Bool m_arrangementCancelFlag; |
---|
| 473 | Int m_arrangementType; |
---|
| 474 | Bool m_quincunxSamplingFlag; |
---|
| 475 | Int m_contentInterpretationType; |
---|
| 476 | Bool m_spatialFlippingFlag; |
---|
| 477 | Bool m_frame0FlippedFlag; |
---|
| 478 | Bool m_fieldViewsFlag; |
---|
| 479 | Bool m_currentFrameIsFrame0Flag; |
---|
| 480 | Bool m_frame0SelfContainedFlag; |
---|
| 481 | Bool m_frame1SelfContainedFlag; |
---|
| 482 | Int m_frame0GridPositionX; |
---|
| 483 | Int m_frame0GridPositionY; |
---|
| 484 | Int m_frame1GridPositionX; |
---|
| 485 | Int m_frame1GridPositionY; |
---|
| 486 | Int m_arrangementReservedByte; |
---|
| 487 | Bool m_arrangementPersistenceFlag; |
---|
| 488 | Bool m_upsampledAspectRatio; |
---|
[1313] | 489 | }; |
---|
| 490 | |
---|
[1413] | 491 | class SEIDisplayOrientation : public SEI |
---|
[1313] | 492 | { |
---|
| 493 | public: |
---|
[1413] | 494 | PayloadType payloadType() const { return DISPLAY_ORIENTATION; } |
---|
[1386] | 495 | |
---|
[1413] | 496 | SEIDisplayOrientation() |
---|
| 497 | : cancelFlag(true) |
---|
| 498 | , persistenceFlag(0) |
---|
| 499 | , extensionFlag(false) |
---|
| 500 | {} |
---|
| 501 | virtual ~SEIDisplayOrientation() {} |
---|
| 502 | |
---|
| 503 | Bool cancelFlag; |
---|
| 504 | Bool horFlip; |
---|
| 505 | Bool verFlip; |
---|
| 506 | |
---|
| 507 | UInt anticlockwiseRotation; |
---|
| 508 | Bool persistenceFlag; |
---|
| 509 | Bool extensionFlag; |
---|
| 510 | }; |
---|
| 511 | |
---|
| 512 | |
---|
| 513 | class SEIGreenMetadataInfo : public SEI |
---|
[1386] | 514 | { |
---|
[1413] | 515 | public: |
---|
| 516 | PayloadType payloadType() const { return GREEN_METADATA; } |
---|
| 517 | SEIGreenMetadataInfo() {} |
---|
| 518 | |
---|
| 519 | virtual ~SEIGreenMetadataInfo() {} |
---|
| 520 | |
---|
| 521 | UInt m_greenMetadataType; |
---|
| 522 | UInt m_xsdMetricType; |
---|
| 523 | UInt m_xsdMetricValue; |
---|
| 524 | }; |
---|
| 525 | |
---|
| 526 | |
---|
| 527 | class SEISOPDescription : public SEI |
---|
[1313] | 528 | { |
---|
[1413] | 529 | public: |
---|
| 530 | PayloadType payloadType() const { return SOP_DESCRIPTION; } |
---|
| 531 | |
---|
| 532 | SEISOPDescription() {} |
---|
| 533 | virtual ~SEISOPDescription() {} |
---|
| 534 | |
---|
| 535 | UInt m_sopSeqParameterSetId; |
---|
| 536 | UInt m_numPicsInSopMinus1; |
---|
| 537 | |
---|
| 538 | UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP]; |
---|
| 539 | UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP]; |
---|
| 540 | UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP]; |
---|
| 541 | Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]; |
---|
[1386] | 542 | }; |
---|
| 543 | |
---|
| 544 | |
---|
[1413] | 545 | class SEIActiveParameterSets : public SEI |
---|
[1313] | 546 | { |
---|
[1413] | 547 | public: |
---|
| 548 | PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } |
---|
[1313] | 549 | |
---|
[1413] | 550 | SEIActiveParameterSets() |
---|
| 551 | : activeVPSId (0) |
---|
| 552 | , m_selfContainedCvsFlag (false) |
---|
| 553 | , m_noParameterSetUpdateFlag (false) |
---|
| 554 | , numSpsIdsMinus1 (0) |
---|
| 555 | {} |
---|
| 556 | virtual ~SEIActiveParameterSets() {} |
---|
| 557 | |
---|
| 558 | Int activeVPSId; |
---|
| 559 | Bool m_selfContainedCvsFlag; |
---|
| 560 | Bool m_noParameterSetUpdateFlag; |
---|
| 561 | Int numSpsIdsMinus1; |
---|
| 562 | std::vector<Int> activeSeqParameterSetId; |
---|
[1386] | 563 | }; |
---|
| 564 | |
---|
[1413] | 565 | class SEIDecodingUnitInfo : public SEI |
---|
[1386] | 566 | { |
---|
| 567 | public: |
---|
[1413] | 568 | PayloadType payloadType() const { return DECODING_UNIT_INFO; } |
---|
[1386] | 569 | |
---|
[1413] | 570 | SEIDecodingUnitInfo() |
---|
| 571 | : m_decodingUnitIdx(0) |
---|
| 572 | , m_duSptCpbRemovalDelay(0) |
---|
| 573 | , m_dpbOutputDuDelayPresentFlag(false) |
---|
| 574 | , m_picSptDpbOutputDuDelay(0) |
---|
| 575 | {} |
---|
| 576 | virtual ~SEIDecodingUnitInfo() {} |
---|
| 577 | Int m_decodingUnitIdx; |
---|
| 578 | Int m_duSptCpbRemovalDelay; |
---|
| 579 | Bool m_dpbOutputDuDelayPresentFlag; |
---|
| 580 | Int m_picSptDpbOutputDuDelay; |
---|
[1313] | 581 | }; |
---|
| 582 | |
---|
[1413] | 583 | class SEITemporalLevel0Index : public SEI |
---|
[1313] | 584 | { |
---|
| 585 | public: |
---|
[1413] | 586 | PayloadType payloadType() const { return TEMPORAL_LEVEL0_INDEX; } |
---|
[1356] | 587 | |
---|
[1413] | 588 | SEITemporalLevel0Index() |
---|
| 589 | : tl0Idx(0) |
---|
| 590 | , rapIdx(0) |
---|
| 591 | {} |
---|
| 592 | virtual ~SEITemporalLevel0Index() {} |
---|
| 593 | |
---|
| 594 | UInt tl0Idx; |
---|
| 595 | UInt rapIdx; |
---|
[1313] | 596 | }; |
---|
| 597 | |
---|
[608] | 598 | |
---|
[1413] | 599 | class SEIDecodedPictureHash : public SEI |
---|
| 600 | { |
---|
| 601 | public: |
---|
| 602 | PayloadType payloadType() const { return DECODED_PICTURE_HASH; } |
---|
[608] | 603 | |
---|
[1413] | 604 | SEIDecodedPictureHash() {} |
---|
| 605 | virtual ~SEIDecodedPictureHash() {} |
---|
[608] | 606 | |
---|
[1413] | 607 | HashType method; |
---|
[608] | 608 | |
---|
[1413] | 609 | TComPictureHash m_pictureHash; |
---|
| 610 | }; |
---|
| 611 | |
---|
| 612 | |
---|
[608] | 613 | class SEIScalableNesting : public SEI |
---|
| 614 | { |
---|
| 615 | public: |
---|
| 616 | PayloadType payloadType() const { return SCALABLE_NESTING; } |
---|
| 617 | |
---|
| 618 | SEIScalableNesting() {} |
---|
[1313] | 619 | |
---|
[608] | 620 | virtual ~SEIScalableNesting() |
---|
[2] | 621 | { |
---|
[1313] | 622 | deleteSEIs(m_nestedSEIs); |
---|
[2] | 623 | } |
---|
| 624 | |
---|
[608] | 625 | Bool m_bitStreamSubsetFlag; |
---|
| 626 | Bool m_nestingOpFlag; |
---|
| 627 | Bool m_defaultOpFlag; //value valid if m_nestingOpFlag != 0 |
---|
| 628 | UInt m_nestingNumOpsMinus1; // -"- |
---|
| 629 | UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]; // -"- |
---|
| 630 | UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]; // -"- |
---|
| 631 | |
---|
| 632 | Bool m_allLayersFlag; //value valid if m_nestingOpFlag == 0 |
---|
| 633 | UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
| 634 | UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0 |
---|
[1313] | 635 | 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] | 636 | |
---|
| 637 | SEIMessages m_nestedSEIs; |
---|
[2] | 638 | }; |
---|
[608] | 639 | |
---|
[1413] | 640 | |
---|
| 641 | class SEIRegionRefreshInfo : public SEI |
---|
| 642 | { |
---|
| 643 | public: |
---|
| 644 | PayloadType payloadType() const { return REGION_REFRESH_INFO; } |
---|
| 645 | |
---|
| 646 | SEIRegionRefreshInfo() |
---|
| 647 | : m_gdrForegroundFlag(0) |
---|
| 648 | {} |
---|
| 649 | virtual ~SEIRegionRefreshInfo() {} |
---|
| 650 | |
---|
| 651 | Bool m_gdrForegroundFlag; |
---|
| 652 | }; |
---|
| 653 | |
---|
| 654 | |
---|
| 655 | class SEINoDisplay : public SEI |
---|
| 656 | { |
---|
| 657 | public: |
---|
| 658 | PayloadType payloadType() const { return NO_DISPLAY; } |
---|
| 659 | |
---|
| 660 | SEINoDisplay() |
---|
| 661 | : m_noDisplay(false) |
---|
| 662 | {} |
---|
| 663 | virtual ~SEINoDisplay() {} |
---|
| 664 | |
---|
| 665 | Bool m_noDisplay; |
---|
| 666 | }; |
---|
| 667 | |
---|
| 668 | |
---|
[1313] | 669 | class SEITimeCode : public SEI |
---|
| 670 | { |
---|
| 671 | public: |
---|
| 672 | PayloadType payloadType() const { return TIME_CODE; } |
---|
| 673 | SEITimeCode() {} |
---|
| 674 | virtual ~SEITimeCode(){} |
---|
| 675 | |
---|
| 676 | UInt numClockTs; |
---|
| 677 | TComSEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS]; |
---|
| 678 | }; |
---|
| 679 | |
---|
[1413] | 680 | |
---|
| 681 | class SEIMasteringDisplayColourVolume : public SEI |
---|
| 682 | { |
---|
| 683 | public: |
---|
| 684 | PayloadType payloadType() const { return MASTERING_DISPLAY_COLOUR_VOLUME; } |
---|
| 685 | SEIMasteringDisplayColourVolume() {} |
---|
| 686 | virtual ~SEIMasteringDisplayColourVolume(){} |
---|
| 687 | |
---|
| 688 | TComSEIMasteringDisplay values; |
---|
| 689 | }; |
---|
| 690 | |
---|
| 691 | |
---|
| 692 | class SEISegmentedRectFramePacking : public SEI |
---|
| 693 | { |
---|
| 694 | public: |
---|
| 695 | PayloadType payloadType() const { return SEGM_RECT_FRAME_PACKING; } |
---|
| 696 | |
---|
| 697 | SEISegmentedRectFramePacking() {} |
---|
| 698 | virtual ~SEISegmentedRectFramePacking() {} |
---|
| 699 | |
---|
| 700 | Bool m_arrangementCancelFlag; |
---|
| 701 | Int m_contentInterpretationType; |
---|
| 702 | Bool m_arrangementPersistenceFlag; |
---|
| 703 | }; |
---|
| 704 | |
---|
| 705 | |
---|
[1313] | 706 | //definition according to P1005_v1; |
---|
| 707 | class SEITempMotionConstrainedTileSets: public SEI |
---|
| 708 | { |
---|
[1413] | 709 | class TileSetData |
---|
[1313] | 710 | { |
---|
| 711 | protected: |
---|
| 712 | std::vector<Int> m_top_left_tile_index; //[tileSetIdx][tileIdx]; |
---|
| 713 | std::vector<Int> m_bottom_right_tile_index; |
---|
| 714 | |
---|
| 715 | public: |
---|
[1356] | 716 | Int m_mcts_id; |
---|
[1313] | 717 | Bool m_display_tile_set_flag; |
---|
| 718 | Int m_num_tile_rects_in_set; //_minus1; |
---|
| 719 | Bool m_exact_sample_value_match_flag; |
---|
| 720 | Bool m_mcts_tier_level_idc_present_flag; |
---|
| 721 | Bool m_mcts_tier_flag; |
---|
| 722 | Int m_mcts_level_idc; |
---|
| 723 | |
---|
| 724 | Void setNumberOfTileRects(const Int number) |
---|
| 725 | { |
---|
| 726 | m_top_left_tile_index .resize(number); |
---|
| 727 | m_bottom_right_tile_index.resize(number); |
---|
| 728 | } |
---|
| 729 | |
---|
| 730 | Int getNumberOfTileRects() const |
---|
| 731 | { |
---|
| 732 | assert(m_top_left_tile_index.size() == m_bottom_right_tile_index.size()); |
---|
| 733 | return Int(m_top_left_tile_index.size()); |
---|
| 734 | } |
---|
| 735 | |
---|
| 736 | Int &topLeftTileIndex (const Int tileRectIndex) { return m_top_left_tile_index [tileRectIndex]; } |
---|
| 737 | Int &bottomRightTileIndex(const Int tileRectIndex) { return m_bottom_right_tile_index[tileRectIndex]; } |
---|
| 738 | const Int &topLeftTileIndex (const Int tileRectIndex) const { return m_top_left_tile_index [tileRectIndex]; } |
---|
| 739 | const Int &bottomRightTileIndex(const Int tileRectIndex) const { return m_bottom_right_tile_index[tileRectIndex]; } |
---|
| 740 | }; |
---|
| 741 | |
---|
| 742 | protected: |
---|
| 743 | std::vector<TileSetData> m_tile_set_data; |
---|
| 744 | |
---|
| 745 | public: |
---|
| 746 | |
---|
| 747 | Bool m_mc_all_tiles_exact_sample_value_match_flag; |
---|
| 748 | Bool m_each_tile_one_tile_set_flag; |
---|
| 749 | Bool m_limited_tile_set_display_flag; |
---|
| 750 | Bool m_max_mcs_tier_level_idc_present_flag; |
---|
| 751 | Bool m_max_mcts_tier_flag; |
---|
| 752 | Int m_max_mcts_level_idc; |
---|
| 753 | |
---|
| 754 | PayloadType payloadType() const { return TEMP_MOTION_CONSTRAINED_TILE_SETS; } |
---|
[1413] | 755 | SEITempMotionConstrainedTileSets() { } |
---|
| 756 | virtual ~SEITempMotionConstrainedTileSets() { } |
---|
[1313] | 757 | |
---|
| 758 | Void setNumberOfTileSets(const Int number) { m_tile_set_data.resize(number); } |
---|
| 759 | Int getNumberOfTileSets() const { return Int(m_tile_set_data.size()); } |
---|
| 760 | |
---|
| 761 | TileSetData &tileSetData (const Int index) { return m_tile_set_data[index]; } |
---|
| 762 | const TileSetData &tileSetData (const Int index) const { return m_tile_set_data[index]; } |
---|
| 763 | |
---|
| 764 | }; |
---|
[1405] | 765 | |
---|
[1413] | 766 | |
---|
| 767 | class SEIChromaResamplingFilterHint : public SEI |
---|
| 768 | { |
---|
| 769 | public: |
---|
| 770 | PayloadType payloadType() const {return CHROMA_RESAMPLING_FILTER_HINT;} |
---|
| 771 | SEIChromaResamplingFilterHint() {} |
---|
| 772 | virtual ~SEIChromaResamplingFilterHint() {} |
---|
| 773 | |
---|
| 774 | Int m_verChromaFilterIdc; |
---|
| 775 | Int m_horChromaFilterIdc; |
---|
| 776 | Bool m_verFilteringFieldProcessingFlag; |
---|
| 777 | Int m_targetFormatIdc; |
---|
| 778 | Bool m_perfectReconstructionFlag; |
---|
| 779 | std::vector<std::vector<Int> > m_verFilterCoeff; |
---|
| 780 | std::vector<std::vector<Int> > m_horFilterCoeff; |
---|
| 781 | }; |
---|
| 782 | |
---|
| 783 | |
---|
| 784 | class SEIKneeFunctionInfo : public SEI |
---|
| 785 | { |
---|
| 786 | public: |
---|
| 787 | PayloadType payloadType() const { return KNEE_FUNCTION_INFO; } |
---|
| 788 | SEIKneeFunctionInfo() {} |
---|
| 789 | virtual ~SEIKneeFunctionInfo() {} |
---|
| 790 | |
---|
| 791 | Int m_kneeId; |
---|
| 792 | Bool m_kneeCancelFlag; |
---|
| 793 | Bool m_kneePersistenceFlag; |
---|
| 794 | Int m_kneeInputDrange; |
---|
| 795 | Int m_kneeInputDispLuminance; |
---|
| 796 | Int m_kneeOutputDrange; |
---|
| 797 | Int m_kneeOutputDispLuminance; |
---|
| 798 | Int m_kneeNumKneePointsMinus1; |
---|
| 799 | std::vector<Int> m_kneeInputKneePoint; |
---|
| 800 | std::vector<Int> m_kneeOutputKneePoint; |
---|
| 801 | }; |
---|
| 802 | |
---|
| 803 | |
---|
| 804 | class SEIColourRemappingInfo : public SEI |
---|
| 805 | { |
---|
| 806 | public: |
---|
| 807 | |
---|
| 808 | struct CRIlut |
---|
| 809 | { |
---|
| 810 | Int codedValue; |
---|
| 811 | Int targetValue; |
---|
| 812 | bool operator < (const CRIlut& a) const |
---|
| 813 | { |
---|
| 814 | return codedValue < a.codedValue; |
---|
| 815 | } |
---|
| 816 | }; |
---|
| 817 | |
---|
| 818 | PayloadType payloadType() const { return COLOUR_REMAPPING_INFO; } |
---|
| 819 | SEIColourRemappingInfo() {} |
---|
| 820 | ~SEIColourRemappingInfo() {} |
---|
| 821 | |
---|
| 822 | Void copyFrom( const SEIColourRemappingInfo &seiCriInput) |
---|
| 823 | { |
---|
| 824 | (*this) = seiCriInput; |
---|
| 825 | } |
---|
| 826 | |
---|
| 827 | UInt m_colourRemapId; |
---|
| 828 | Bool m_colourRemapCancelFlag; |
---|
| 829 | Bool m_colourRemapPersistenceFlag; |
---|
| 830 | Bool m_colourRemapVideoSignalInfoPresentFlag; |
---|
| 831 | Bool m_colourRemapFullRangeFlag; |
---|
| 832 | Int m_colourRemapPrimaries; |
---|
| 833 | Int m_colourRemapTransferFunction; |
---|
| 834 | Int m_colourRemapMatrixCoefficients; |
---|
| 835 | Int m_colourRemapInputBitDepth; |
---|
| 836 | Int m_colourRemapBitDepth; |
---|
| 837 | Int m_preLutNumValMinus1[3]; |
---|
| 838 | std::vector<CRIlut> m_preLut[3]; |
---|
| 839 | Bool m_colourRemapMatrixPresentFlag; |
---|
| 840 | Int m_log2MatrixDenom; |
---|
| 841 | Int m_colourRemapCoeffs[3][3]; |
---|
| 842 | Int m_postLutNumValMinus1[3]; |
---|
| 843 | std::vector<CRIlut> m_postLut[3]; |
---|
| 844 | }; |
---|
| 845 | |
---|
| 846 | |
---|
| 847 | class SEIDeinterlaceFieldIdentification : public SEI |
---|
| 848 | { |
---|
| 849 | public: |
---|
| 850 | PayloadType payloadType() const { return DEINTERLACE_FIELD_IDENTIFICATION; } |
---|
| 851 | SEIDeinterlaceFieldIdentification() { } |
---|
| 852 | |
---|
| 853 | virtual ~SEIDeinterlaceFieldIdentification() {} |
---|
| 854 | |
---|
| 855 | Bool m_deinterlacedPictureSourceParityFlag; |
---|
| 856 | }; |
---|
| 857 | |
---|
| 858 | |
---|
| 859 | class SEIContentLightLevelInfo : public SEI |
---|
| 860 | { |
---|
| 861 | public: |
---|
| 862 | PayloadType payloadType() const { return CONTENT_LIGHT_LEVEL_INFO; } |
---|
| 863 | SEIContentLightLevelInfo() { } |
---|
| 864 | |
---|
| 865 | virtual ~SEIContentLightLevelInfo() { } |
---|
| 866 | |
---|
| 867 | UInt m_maxContentLightLevel; |
---|
| 868 | UInt m_maxPicAverageLightLevel; |
---|
| 869 | }; |
---|
| 870 | |
---|
| 871 | |
---|
| 872 | class SEIDependentRAPIndication : public SEI |
---|
| 873 | { |
---|
| 874 | public: |
---|
| 875 | PayloadType payloadType() const { return DEPENDENT_RAP_INDICATION; } |
---|
| 876 | SEIDependentRAPIndication() { } |
---|
| 877 | |
---|
| 878 | virtual ~SEIDependentRAPIndication() { } |
---|
| 879 | }; |
---|
| 880 | |
---|
| 881 | |
---|
| 882 | class SEICodedRegionCompletion : public SEI |
---|
| 883 | { |
---|
| 884 | public: |
---|
| 885 | PayloadType payloadType() const { return CODED_REGION_COMPLETION; } |
---|
| 886 | SEICodedRegionCompletion() { } |
---|
| 887 | |
---|
| 888 | virtual ~SEICodedRegionCompletion() { } |
---|
| 889 | |
---|
| 890 | UInt m_nextSegmentAddress; |
---|
| 891 | Bool m_independentSliceSegmentFlag; |
---|
| 892 | }; |
---|
| 893 | |
---|
| 894 | |
---|
[1405] | 895 | class SEIAlternativeTransferCharacteristics : public SEI |
---|
| 896 | { |
---|
| 897 | public: |
---|
| 898 | PayloadType payloadType() const { return ALTERNATIVE_TRANSFER_CHARACTERISTICS; } |
---|
| 899 | |
---|
| 900 | SEIAlternativeTransferCharacteristics() : m_preferredTransferCharacteristics(18) |
---|
| 901 | { } |
---|
| 902 | |
---|
| 903 | virtual ~SEIAlternativeTransferCharacteristics() {} |
---|
| 904 | |
---|
| 905 | UInt m_preferredTransferCharacteristics; |
---|
| 906 | }; |
---|
| 907 | |
---|
| 908 | |
---|
[1413] | 909 | class SEIAmbientViewingEnvironment : public SEI |
---|
| 910 | { |
---|
| 911 | public: |
---|
| 912 | PayloadType payloadType() const { return AMBIENT_VIEWING_ENVIRONMENT; } |
---|
| 913 | SEIAmbientViewingEnvironment() { } |
---|
| 914 | |
---|
| 915 | virtual ~SEIAmbientViewingEnvironment() { } |
---|
| 916 | |
---|
| 917 | UInt m_ambientIlluminance; |
---|
| 918 | UShort m_ambientLightX; |
---|
| 919 | UShort m_ambientLightY; |
---|
| 920 | }; |
---|
| 921 | |
---|
| 922 | |
---|
[1386] | 923 | #if NH_MV |
---|
[1356] | 924 | class SEILayersNotPresent : public SEI |
---|
| 925 | { |
---|
| 926 | public: |
---|
| 927 | PayloadType payloadType( ) const { return LAYERS_NOT_PRESENT; } |
---|
| 928 | SEILayersNotPresent ( ) { }; |
---|
| 929 | ~SEILayersNotPresent( ) { }; |
---|
| 930 | SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; |
---|
| 931 | |
---|
[1386] | 932 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 933 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 934 | |
---|
| 935 | Int m_lnpSeiActiveVpsId; |
---|
| 936 | UInt m_lnpSeiMaxLayers; |
---|
| 937 | BoolAry1d m_layerNotPresentFlag; |
---|
| 938 | |
---|
| 939 | Void resizeDimI( Int sizeDimI ) |
---|
| 940 | { |
---|
| 941 | m_layerNotPresentFlag.resize( sizeDimI ); |
---|
| 942 | } |
---|
| 943 | }; |
---|
[1313] | 944 | |
---|
[1356] | 945 | class SEIInterLayerConstrainedTileSets : public SEI |
---|
| 946 | { |
---|
| 947 | public: |
---|
| 948 | PayloadType payloadType( ) const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } |
---|
| 949 | SEIInterLayerConstrainedTileSets ( ) { }; |
---|
| 950 | ~SEIInterLayerConstrainedTileSets( ) { }; |
---|
| 951 | SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; |
---|
| 952 | |
---|
[1386] | 953 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 954 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 955 | |
---|
| 956 | Bool m_ilAllTilesExactSampleValueMatchFlag; |
---|
| 957 | Bool m_ilOneTilePerTileSetFlag; |
---|
| 958 | Int m_ilNumSetsInMessageMinus1; |
---|
| 959 | Bool m_skippedTileSetPresentFlag; |
---|
| 960 | IntAry1d m_ilctsId; |
---|
| 961 | IntAry1d m_ilNumTileRectsInSetMinus1; |
---|
| 962 | IntAry2d m_ilTopLeftTileIndex; |
---|
| 963 | IntAry2d m_ilBottomRightTileIndex; |
---|
| 964 | IntAry1d m_ilcIdc; |
---|
| 965 | BoolAry1d m_ilExactSampleValueMatchFlag; |
---|
| 966 | Int m_allTilesIlcIdc; |
---|
| 967 | |
---|
| 968 | Void resizeDimI( Int sizeDimI ) |
---|
| 969 | { |
---|
| 970 | m_ilctsId .resize( sizeDimI ); |
---|
| 971 | m_ilNumTileRectsInSetMinus1 .resize( sizeDimI ); |
---|
| 972 | m_ilTopLeftTileIndex .resize( sizeDimI ); |
---|
| 973 | m_ilBottomRightTileIndex .resize( sizeDimI ); |
---|
| 974 | m_ilcIdc .resize( sizeDimI ); |
---|
| 975 | m_ilExactSampleValueMatchFlag.resize( sizeDimI ); |
---|
| 976 | } |
---|
| 977 | |
---|
| 978 | Void resizeDimJ( Int i, Int sizeDimJ ) |
---|
| 979 | { |
---|
| 980 | m_ilTopLeftTileIndex [i].resize( sizeDimJ ); |
---|
| 981 | m_ilBottomRightTileIndex[i].resize( sizeDimJ ); |
---|
| 982 | } |
---|
| 983 | |
---|
| 984 | }; |
---|
| 985 | |
---|
| 986 | #if NH_MV_TBD |
---|
| 987 | class SEIBspNesting : public SEI |
---|
| 988 | { |
---|
| 989 | public: |
---|
| 990 | PayloadType payloadType( ) const { return BSP_NESTING; } |
---|
| 991 | SEIBspNesting ( ) { }; |
---|
| 992 | ~SEIBspNesting( ) { }; |
---|
| 993 | SEI* getCopy( ) const { return new SEIBspNesting(*this); }; |
---|
| 994 | |
---|
[1386] | 995 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 996 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 997 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 998 | |
---|
| 999 | Int m_seiOlsIdx; |
---|
| 1000 | Int m_seiPartitioningSchemeIdx; |
---|
| 1001 | Int m_bspIdx; |
---|
| 1002 | Int m_bspNestingZeroBit; |
---|
| 1003 | Int m_numSeisInBspMinus1; |
---|
| 1004 | }; |
---|
| 1005 | |
---|
| 1006 | class SEIBspInitialArrivalTime : public SEI |
---|
| 1007 | { |
---|
| 1008 | public: |
---|
| 1009 | PayloadType payloadType( ) const { return BSP_INITIAL_ARRIVAL_TIME; } |
---|
| 1010 | SEIBspInitialArrivalTime ( ) { }; |
---|
| 1011 | ~SEIBspInitialArrivalTime( ) { }; |
---|
| 1012 | SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; |
---|
| 1013 | |
---|
[1386] | 1014 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1015 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 1016 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1017 | |
---|
| 1018 | IntAry1d m_nalInitialArrivalDelay; |
---|
| 1019 | IntAry1d m_vclInitialArrivalDelay; |
---|
| 1020 | }; |
---|
| 1021 | #endif |
---|
| 1022 | |
---|
| 1023 | class SEISubBitstreamProperty : public SEI |
---|
| 1024 | { |
---|
| 1025 | public: |
---|
| 1026 | PayloadType payloadType( ) const { return SUB_BITSTREAM_PROPERTY; } |
---|
| 1027 | SEISubBitstreamProperty ( ) { }; |
---|
| 1028 | ~SEISubBitstreamProperty( ) { }; |
---|
| 1029 | SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; |
---|
| 1030 | |
---|
[1386] | 1031 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1032 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1033 | Void resizeArrays ( ); |
---|
| 1034 | |
---|
| 1035 | Int m_sbPropertyActiveVpsId; |
---|
| 1036 | Int m_numAdditionalSubStreamsMinus1; |
---|
| 1037 | IntAry1d m_subBitstreamMode; |
---|
| 1038 | IntAry1d m_olsIdxToVps; |
---|
| 1039 | IntAry1d m_highestSublayerId; |
---|
| 1040 | IntAry1d m_avgSbPropertyBitRate; |
---|
| 1041 | IntAry1d m_maxSbPropertyBitRate; |
---|
| 1042 | }; |
---|
| 1043 | |
---|
| 1044 | class SEIAlphaChannelInfo : public SEI |
---|
| 1045 | { |
---|
| 1046 | public: |
---|
| 1047 | PayloadType payloadType( ) const { return ALPHA_CHANNEL_INFO; } |
---|
| 1048 | SEIAlphaChannelInfo ( ) { }; |
---|
| 1049 | ~SEIAlphaChannelInfo( ) { }; |
---|
| 1050 | SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; |
---|
| 1051 | |
---|
[1386] | 1052 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1053 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1054 | |
---|
| 1055 | Bool m_alphaChannelCancelFlag; |
---|
| 1056 | Int m_alphaChannelUseIdc; |
---|
| 1057 | Int m_alphaChannelBitDepthMinus8; |
---|
| 1058 | Int m_alphaTransparentValue; |
---|
| 1059 | Int m_alphaOpaqueValue; |
---|
| 1060 | Bool m_alphaChannelIncrFlag; |
---|
| 1061 | Bool m_alphaChannelClipFlag; |
---|
| 1062 | Bool m_alphaChannelClipTypeFlag; |
---|
| 1063 | }; |
---|
| 1064 | |
---|
| 1065 | class SEIOverlayInfo : public SEI |
---|
| 1066 | { |
---|
| 1067 | public: |
---|
| 1068 | PayloadType payloadType( ) const { return OVERLAY_INFO; } |
---|
| 1069 | SEIOverlayInfo ( ); |
---|
| 1070 | ~SEIOverlayInfo( ) { }; |
---|
| 1071 | SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; |
---|
| 1072 | |
---|
[1386] | 1073 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1074 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1075 | |
---|
| 1076 | const Int m_numOverlaysMax; |
---|
| 1077 | const Int m_numOverlayElementsMax; |
---|
| 1078 | const Int m_numStringBytesMax; //incl. null termination byte |
---|
| 1079 | |
---|
| 1080 | Bool m_overlayInfoCancelFlag; |
---|
| 1081 | Int m_overlayContentAuxIdMinus128; |
---|
| 1082 | Int m_overlayLabelAuxIdMinus128; |
---|
| 1083 | Int m_overlayAlphaAuxIdMinus128; |
---|
| 1084 | Int m_overlayElementLabelValueLengthMinus8; |
---|
| 1085 | Int m_numOverlaysMinus1; |
---|
| 1086 | IntAry1d m_overlayIdx; |
---|
| 1087 | BoolAry1d m_languageOverlayPresentFlag; |
---|
| 1088 | IntAry1d m_overlayContentLayerId; |
---|
| 1089 | BoolAry1d m_overlayLabelPresentFlag; |
---|
| 1090 | IntAry1d m_overlayLabelLayerId; |
---|
| 1091 | BoolAry1d m_overlayAlphaPresentFlag; |
---|
| 1092 | IntAry1d m_overlayAlphaLayerId; |
---|
| 1093 | IntAry1d m_numOverlayElementsMinus1; |
---|
| 1094 | IntAry2d m_overlayElementLabelMin; |
---|
| 1095 | IntAry2d m_overlayElementLabelMax; |
---|
| 1096 | StringAry1d m_overlayLanguage; |
---|
| 1097 | StringAry1d m_overlayName; |
---|
| 1098 | StringAry2d m_overlayElementName; |
---|
| 1099 | Bool m_overlayInfoPersistenceFlag; |
---|
| 1100 | }; |
---|
| 1101 | |
---|
| 1102 | class SEITemporalMvPredictionConstraints : public SEI |
---|
| 1103 | { |
---|
| 1104 | public: |
---|
| 1105 | PayloadType payloadType( ) const { return TEMPORAL_MV_PREDICTION_CONSTRAINTS; } |
---|
| 1106 | SEITemporalMvPredictionConstraints ( ) { }; |
---|
| 1107 | ~SEITemporalMvPredictionConstraints( ) { }; |
---|
| 1108 | SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; |
---|
| 1109 | |
---|
[1386] | 1110 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1111 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1112 | |
---|
| 1113 | Bool m_prevPicsNotUsedFlag; |
---|
| 1114 | Bool m_noIntraLayerColPicFlag; |
---|
| 1115 | }; |
---|
| 1116 | |
---|
| 1117 | #if NH_MV_SEI_TBD |
---|
| 1118 | class SEIFrameFieldInfo : public SEI |
---|
| 1119 | { |
---|
| 1120 | public: |
---|
| 1121 | PayloadType payloadType( ) const { return FRAME_FIELD_INFO; } |
---|
| 1122 | SEIFrameFieldInfo ( ) { }; |
---|
| 1123 | ~SEIFrameFieldInfo( ) { }; |
---|
| 1124 | SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; |
---|
| 1125 | |
---|
[1386] | 1126 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1127 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 1128 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1129 | |
---|
| 1130 | Int m_ffinfoPicStruct; |
---|
| 1131 | Int m_ffinfoSourceScanType; |
---|
| 1132 | Bool m_ffinfoDuplicateFlag; |
---|
| 1133 | }; |
---|
| 1134 | #endif |
---|
| 1135 | |
---|
| 1136 | class SEIThreeDimensionalReferenceDisplaysInfo : public SEI |
---|
| 1137 | { |
---|
| 1138 | public: |
---|
| 1139 | PayloadType payloadType( ) const { return THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO; } |
---|
| 1140 | SEIThreeDimensionalReferenceDisplaysInfo ( ) { }; |
---|
| 1141 | ~SEIThreeDimensionalReferenceDisplaysInfo( ) { }; |
---|
| 1142 | SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; |
---|
| 1143 | |
---|
[1386] | 1144 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1145 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1146 | |
---|
| 1147 | Int getNumRefDisplaysMinus1( ) const |
---|
| 1148 | { |
---|
| 1149 | return m_numRefDisplaysMinus1; |
---|
| 1150 | } |
---|
| 1151 | |
---|
| 1152 | Int m_precRefDisplayWidth; |
---|
| 1153 | Bool m_refViewingDistanceFlag; |
---|
| 1154 | Int m_precRefViewingDist; |
---|
| 1155 | Int m_numRefDisplaysMinus1; |
---|
| 1156 | IntAry1d m_leftViewId; |
---|
| 1157 | IntAry1d m_rightViewId; |
---|
| 1158 | IntAry1d m_exponentRefDisplayWidth; |
---|
| 1159 | IntAry1d m_mantissaRefDisplayWidth; |
---|
| 1160 | IntAry1d m_exponentRefViewingDistance; |
---|
| 1161 | IntAry1d m_mantissaRefViewingDistance; |
---|
| 1162 | BoolAry1d m_additionalShiftPresentFlag; |
---|
| 1163 | IntAry1d m_numSampleShiftPlus512; |
---|
| 1164 | Bool m_threeDimensionalReferenceDisplaysExtensionFlag; |
---|
| 1165 | |
---|
| 1166 | Void resizeArrays( ) |
---|
| 1167 | { |
---|
| 1168 | Int numReferenceDiaplays = getNumRefDisplaysMinus1() + 1; |
---|
| 1169 | |
---|
| 1170 | m_leftViewId .resize( numReferenceDiaplays ); |
---|
| 1171 | m_rightViewId .resize( numReferenceDiaplays ); |
---|
| 1172 | m_exponentRefDisplayWidth .resize( numReferenceDiaplays ); |
---|
| 1173 | m_mantissaRefDisplayWidth .resize( numReferenceDiaplays ); |
---|
| 1174 | m_exponentRefViewingDistance .resize( numReferenceDiaplays ); |
---|
| 1175 | m_mantissaRefViewingDistance .resize( numReferenceDiaplays ); |
---|
| 1176 | m_additionalShiftPresentFlag .resize( numReferenceDiaplays ); |
---|
| 1177 | m_numSampleShiftPlus512 .resize( numReferenceDiaplays ); |
---|
| 1178 | } |
---|
| 1179 | |
---|
| 1180 | UInt getMantissaReferenceDisplayWidthLen ( Int i ) const ; |
---|
| 1181 | UInt getMantissaReferenceViewingDistanceLen ( Int i ) const ; |
---|
| 1182 | private: |
---|
| 1183 | UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; |
---|
| 1184 | }; |
---|
| 1185 | |
---|
| 1186 | class SEIDepthRepresentationInfo : public SEI |
---|
| 1187 | { |
---|
| 1188 | public: |
---|
| 1189 | PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; } |
---|
| 1190 | SEIDepthRepresentationInfo ( ) |
---|
| 1191 | { |
---|
| 1192 | m_currLayerID=-1; |
---|
| 1193 | }; |
---|
| 1194 | ~SEIDepthRepresentationInfo( ) { }; |
---|
| 1195 | SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; |
---|
| 1196 | |
---|
[1386] | 1197 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1198 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 1199 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1200 | Void clear() |
---|
| 1201 | { |
---|
| 1202 | int i; |
---|
| 1203 | m_zNearFlag.clear(); |
---|
| 1204 | m_zFarFlag.clear(); |
---|
| 1205 | m_dMinFlag.clear(); |
---|
| 1206 | m_dMaxFlag.clear(); |
---|
| 1207 | |
---|
| 1208 | for(i=0;i<m_zNear.size();i++) |
---|
| 1209 | m_zNear[i].clear(); |
---|
| 1210 | m_zNear.clear(); |
---|
| 1211 | |
---|
| 1212 | for(i=0;i<m_zFar.size();i++) |
---|
| 1213 | m_zFar[i].clear(); |
---|
| 1214 | m_zFar.clear(); |
---|
| 1215 | |
---|
| 1216 | for(i=0;i<m_dMin.size();i++) |
---|
| 1217 | m_dMin[i].clear(); |
---|
| 1218 | m_dMin.clear(); |
---|
| 1219 | |
---|
| 1220 | for(i=0;i<m_dMax.size();i++) |
---|
| 1221 | m_dMax[i].clear(); |
---|
| 1222 | m_dMax.clear(); |
---|
| 1223 | |
---|
| 1224 | for(i=0;i<m_depthRepresentationType.size();i++) |
---|
| 1225 | m_depthRepresentationType[i].clear(); |
---|
| 1226 | m_depthRepresentationType.clear(); |
---|
| 1227 | |
---|
| 1228 | for(i=0;i<m_disparityRefViewId.size();i++) |
---|
| 1229 | m_disparityRefViewId[i].clear(); |
---|
| 1230 | m_disparityRefViewId.clear(); |
---|
| 1231 | |
---|
| 1232 | for(i=0;i<m_depthNonlinearRepresentationNumMinus1.size();i++) |
---|
| 1233 | m_depthNonlinearRepresentationNumMinus1[i].clear(); |
---|
| 1234 | m_depthNonlinearRepresentationNumMinus1.clear(); |
---|
| 1235 | |
---|
| 1236 | for(i=0;i<m_depth_nonlinear_representation_model.size();i++) |
---|
| 1237 | m_depth_nonlinear_representation_model[i].clear(); |
---|
| 1238 | m_depth_nonlinear_representation_model.clear(); |
---|
| 1239 | |
---|
| 1240 | } |
---|
| 1241 | Int m_currLayerID; |
---|
| 1242 | BoolAry1d m_zNearFlag; |
---|
| 1243 | BoolAry1d m_zFarFlag; |
---|
| 1244 | BoolAry1d m_dMinFlag; |
---|
| 1245 | BoolAry1d m_dMaxFlag; |
---|
| 1246 | BoolAry2d m_depthRepresentationInfoSeiPresentFlag; |
---|
| 1247 | std::vector< std::vector<Double> > m_zNear,m_zFar,m_dMin,m_dMax; |
---|
| 1248 | |
---|
| 1249 | IntAry2d m_depthRepresentationType; |
---|
| 1250 | IntAry2d m_disparityRefViewId; |
---|
| 1251 | IntAry2d m_depthNonlinearRepresentationNumMinus1; |
---|
| 1252 | IntAry2d m_depth_nonlinear_representation_model; |
---|
| 1253 | }; |
---|
| 1254 | |
---|
[1386] | 1255 | |
---|
[1356] | 1256 | class SEIMultiviewSceneInfo : public SEI |
---|
| 1257 | { |
---|
| 1258 | public: |
---|
| 1259 | PayloadType payloadType( ) const { return MULTIVIEW_SCENE_INFO; } |
---|
| 1260 | SEIMultiviewSceneInfo ( ) { }; |
---|
| 1261 | ~SEIMultiviewSceneInfo( ) { }; |
---|
| 1262 | SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; |
---|
| 1263 | |
---|
[1386] | 1264 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1265 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1266 | |
---|
| 1267 | Int m_minDisparity; |
---|
| 1268 | Int m_maxDisparityRange; |
---|
| 1269 | }; |
---|
| 1270 | |
---|
| 1271 | |
---|
| 1272 | class SEIMultiviewAcquisitionInfo : public SEI |
---|
| 1273 | { |
---|
| 1274 | public: |
---|
| 1275 | PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; } |
---|
| 1276 | SEIMultiviewAcquisitionInfo ( ) { }; |
---|
| 1277 | ~SEIMultiviewAcquisitionInfo( ) { }; |
---|
| 1278 | SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; |
---|
| 1279 | |
---|
[1386] | 1280 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1281 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1282 | |
---|
| 1283 | Int getNumViewsMinus1( ) const |
---|
| 1284 | { |
---|
| 1285 | Int numViewsMinus1; |
---|
| 1286 | if( m_scalNestSeiContThisSei != NULL ) |
---|
| 1287 | { |
---|
| 1288 | numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1; |
---|
| 1289 | } |
---|
| 1290 | else |
---|
| 1291 | { |
---|
| 1292 | numViewsMinus1 = 0; |
---|
| 1293 | } |
---|
| 1294 | return numViewsMinus1; |
---|
| 1295 | } |
---|
| 1296 | |
---|
| 1297 | Void resizeArrays( ) |
---|
| 1298 | { |
---|
| 1299 | Int numViews = getNumViewsMinus1() + 1; |
---|
| 1300 | m_signFocalLengthX .resize( numViews ); |
---|
| 1301 | m_exponentFocalLengthX .resize( numViews ); |
---|
| 1302 | m_mantissaFocalLengthX .resize( numViews ); |
---|
| 1303 | m_signFocalLengthY .resize( numViews ); |
---|
| 1304 | m_exponentFocalLengthY .resize( numViews ); |
---|
| 1305 | m_mantissaFocalLengthY .resize( numViews ); |
---|
| 1306 | m_signPrincipalPointX .resize( numViews ); |
---|
| 1307 | m_exponentPrincipalPointX.resize( numViews ); |
---|
| 1308 | m_mantissaPrincipalPointX.resize( numViews ); |
---|
| 1309 | m_signPrincipalPointY .resize( numViews ); |
---|
| 1310 | m_exponentPrincipalPointY.resize( numViews ); |
---|
| 1311 | m_mantissaPrincipalPointY.resize( numViews ); |
---|
| 1312 | m_signSkewFactor .resize( numViews ); |
---|
| 1313 | m_exponentSkewFactor .resize( numViews ); |
---|
| 1314 | m_mantissaSkewFactor .resize( numViews ); |
---|
| 1315 | |
---|
| 1316 | m_signR .resize( numViews ); |
---|
| 1317 | m_exponentR .resize( numViews ); |
---|
| 1318 | m_mantissaR .resize( numViews ); |
---|
| 1319 | m_signT .resize( numViews ); |
---|
| 1320 | m_exponentT .resize( numViews ); |
---|
| 1321 | m_mantissaT .resize( numViews ); |
---|
| 1322 | |
---|
| 1323 | for( Int i = 0; i < numViews ; i++ ) |
---|
| 1324 | { |
---|
| 1325 | m_signR [i].resize( 3 ); |
---|
| 1326 | m_exponentR[i].resize( 3 ); |
---|
| 1327 | m_mantissaR[i].resize( 3 ); |
---|
| 1328 | m_signT [i].resize( 3 ); |
---|
| 1329 | m_exponentT[i].resize( 3 ); |
---|
| 1330 | m_mantissaT[i].resize( 3 ); |
---|
| 1331 | |
---|
| 1332 | for (Int j = 0; j < 3; j++) |
---|
| 1333 | { |
---|
| 1334 | m_signR [i][j].resize( 3 ); |
---|
| 1335 | m_exponentR[i][j].resize( 3 ); |
---|
| 1336 | m_mantissaR[i][j].resize( 3 ); |
---|
| 1337 | } |
---|
| 1338 | } |
---|
| 1339 | } |
---|
| 1340 | |
---|
| 1341 | UInt getMantissaFocalLengthXLen ( Int i ) const ; |
---|
| 1342 | UInt getMantissaFocalLengthYLen ( Int i ) const ; |
---|
| 1343 | UInt getMantissaPrincipalPointXLen( Int i ) const ; |
---|
| 1344 | UInt getMantissaPrincipalPointYLen( Int i ) const ; |
---|
| 1345 | UInt getMantissaSkewFactorLen ( Int i ) const ; |
---|
| 1346 | UInt getMantissaRLen ( Int i, Int j, Int k ) const ; |
---|
| 1347 | UInt getMantissaTLen ( Int i, Int j ) const ; |
---|
| 1348 | |
---|
| 1349 | Bool m_intrinsicParamFlag; |
---|
| 1350 | Bool m_extrinsicParamFlag; |
---|
| 1351 | Bool m_intrinsicParamsEqualFlag; |
---|
| 1352 | Int m_precFocalLength; |
---|
| 1353 | Int m_precPrincipalPoint; |
---|
| 1354 | Int m_precSkewFactor; |
---|
| 1355 | BoolAry1d m_signFocalLengthX; |
---|
| 1356 | IntAry1d m_exponentFocalLengthX; |
---|
| 1357 | IntAry1d m_mantissaFocalLengthX; |
---|
| 1358 | BoolAry1d m_signFocalLengthY; |
---|
| 1359 | IntAry1d m_exponentFocalLengthY; |
---|
| 1360 | IntAry1d m_mantissaFocalLengthY; |
---|
| 1361 | BoolAry1d m_signPrincipalPointX; |
---|
| 1362 | IntAry1d m_exponentPrincipalPointX; |
---|
| 1363 | IntAry1d m_mantissaPrincipalPointX; |
---|
| 1364 | BoolAry1d m_signPrincipalPointY; |
---|
| 1365 | IntAry1d m_exponentPrincipalPointY; |
---|
| 1366 | IntAry1d m_mantissaPrincipalPointY; |
---|
| 1367 | BoolAry1d m_signSkewFactor; |
---|
| 1368 | IntAry1d m_exponentSkewFactor; |
---|
| 1369 | IntAry1d m_mantissaSkewFactor; |
---|
| 1370 | Int m_precRotationParam; |
---|
| 1371 | Int m_precTranslationParam; |
---|
| 1372 | BoolAry3d m_signR; |
---|
| 1373 | IntAry3d m_exponentR; |
---|
| 1374 | IntAry3d m_mantissaR; |
---|
| 1375 | BoolAry2d m_signT; |
---|
| 1376 | IntAry2d m_exponentT; |
---|
| 1377 | IntAry2d m_mantissaT; |
---|
| 1378 | private: |
---|
| 1379 | UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; |
---|
| 1380 | }; |
---|
| 1381 | |
---|
| 1382 | |
---|
| 1383 | |
---|
| 1384 | class SEIMultiviewViewPosition : public SEI |
---|
| 1385 | { |
---|
| 1386 | public: |
---|
| 1387 | PayloadType payloadType( ) const { return MULTIVIEW_VIEW_POSITION; } |
---|
| 1388 | SEIMultiviewViewPosition ( ) { }; |
---|
| 1389 | ~SEIMultiviewViewPosition( ) { }; |
---|
| 1390 | SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; |
---|
| 1391 | |
---|
[1386] | 1392 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1393 | Void setupFromSlice ( const TComSlice* slice ); |
---|
| 1394 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1395 | |
---|
| 1396 | Int m_numViewsMinus1; |
---|
| 1397 | IntAry1d m_viewPosition; |
---|
| 1398 | }; |
---|
| 1399 | |
---|
| 1400 | #if NH_3D |
---|
| 1401 | class SEIAlternativeDepthInfo : public SEI |
---|
| 1402 | { |
---|
| 1403 | public: |
---|
| 1404 | PayloadType payloadType( ) const { return ALTERNATIVE_DEPTH_INFO; } |
---|
| 1405 | SEIAlternativeDepthInfo ( ) { }; |
---|
| 1406 | ~SEIAlternativeDepthInfo( ) { }; |
---|
| 1407 | SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; |
---|
| 1408 | |
---|
[1386] | 1409 | Void setupFromCfgFile( const TChar* cfgFile ); |
---|
[1356] | 1410 | Bool checkCfg ( const TComSlice* slice ); |
---|
| 1411 | |
---|
| 1412 | UInt getManGvdFocalLengthXLen ( Int i, Int j ) const; |
---|
| 1413 | UInt getManGvdFocalLengthYLen ( Int i, Int j ) const; |
---|
| 1414 | UInt getManGvdPrincipalPointXLen ( Int i, Int j ) const; |
---|
| 1415 | UInt getManGvdPrincipalPointYLen ( Int i, Int j ) const; |
---|
| 1416 | //UInt getManGvdRLen ( Int i, int j ) const; |
---|
| 1417 | UInt getManGvdTXLen ( Int i, Int j ) const; |
---|
| 1418 | UInt xGetSyntaxElementLen ( Int expo, Int prec, Int val ) const; |
---|
| 1419 | |
---|
| 1420 | Void resizeArrays( ) |
---|
| 1421 | { |
---|
| 1422 | const Int numViews = 3; // getNumConstituentViewsGvdMinus1() + 1; |
---|
| 1423 | |
---|
| 1424 | m_signGvdZNearFlag.resize(3); |
---|
| 1425 | m_expGvdZNear.resize(3); |
---|
| 1426 | m_manLenGvdZNearMinus1.resize(3); |
---|
| 1427 | m_manGvdZNear.resize(3); |
---|
| 1428 | m_signGvdZFarFlag.resize(3); |
---|
| 1429 | m_expGvdZFar.resize(3); |
---|
| 1430 | m_manLenGvdZFarMinus1.resize(3); |
---|
| 1431 | m_manGvdZFar.resize(3); |
---|
| 1432 | |
---|
| 1433 | m_signGvdFocalLengthX.resize(3); |
---|
| 1434 | m_expGvdFocalLengthX.resize(3); |
---|
| 1435 | m_manGvdFocalLengthX.resize(3); |
---|
| 1436 | m_signGvdFocalLengthY.resize(3); |
---|
| 1437 | m_expGvdFocalLengthY.resize(3); |
---|
| 1438 | m_manGvdFocalLengthY.resize(3); |
---|
| 1439 | m_signGvdPrincipalPointX.resize(3); |
---|
| 1440 | m_expGvdPrincipalPointX.resize(3); |
---|
| 1441 | m_manGvdPrincipalPointX.resize(3); |
---|
| 1442 | m_signGvdPrincipalPointY.resize(3); |
---|
| 1443 | m_expGvdPrincipalPointY.resize(3); |
---|
| 1444 | m_manGvdPrincipalPointY.resize(3); |
---|
| 1445 | |
---|
| 1446 | m_signGvdR00.resize(3); |
---|
| 1447 | m_expGvdR00.resize(3); |
---|
| 1448 | m_manGvdR00.resize(3); |
---|
| 1449 | m_signGvdR01.resize(3); |
---|
| 1450 | m_expGvdR01.resize(3); |
---|
| 1451 | m_manGvdR01.resize(3); |
---|
| 1452 | m_signGvdR02.resize(3); |
---|
| 1453 | m_expGvdR02.resize(3); |
---|
| 1454 | m_manGvdR02.resize(3); |
---|
| 1455 | m_signGvdR10.resize(3); |
---|
| 1456 | m_expGvdR10.resize(3); |
---|
| 1457 | m_manGvdR10.resize(3); |
---|
| 1458 | m_signGvdR11.resize(3); |
---|
| 1459 | m_expGvdR11.resize(3); |
---|
| 1460 | m_manGvdR11.resize(3); |
---|
| 1461 | m_signGvdR12.resize(3); |
---|
| 1462 | m_expGvdR12.resize(3); |
---|
| 1463 | m_manGvdR12.resize(3); |
---|
| 1464 | m_signGvdR20.resize(3); |
---|
| 1465 | m_expGvdR20.resize(3); |
---|
| 1466 | m_manGvdR20.resize(3); |
---|
| 1467 | m_signGvdR21.resize(3); |
---|
| 1468 | m_expGvdR21.resize(3); |
---|
| 1469 | m_manGvdR21.resize(3); |
---|
| 1470 | m_signGvdR22.resize(3); |
---|
| 1471 | m_expGvdR22.resize(3); |
---|
| 1472 | m_manGvdR22.resize(3); |
---|
| 1473 | |
---|
| 1474 | m_signGvdTX.resize(3); |
---|
| 1475 | m_expGvdTX.resize(3); |
---|
| 1476 | m_manGvdTX.resize(3); |
---|
| 1477 | |
---|
| 1478 | for( Int i = 0; i < numViews; i++ ) |
---|
| 1479 | { |
---|
| 1480 | m_signGvdZNearFlag[i].resize(3); |
---|
| 1481 | m_expGvdZNear[i].resize(3); |
---|
| 1482 | m_manLenGvdZNearMinus1[i].resize(3); |
---|
| 1483 | m_manGvdZNear[i].resize(3); |
---|
| 1484 | m_signGvdZFarFlag[i].resize(3); |
---|
| 1485 | m_expGvdZFar[i].resize(3); |
---|
| 1486 | m_manLenGvdZFarMinus1[i].resize(3); |
---|
| 1487 | m_manGvdZFar[i].resize(3); |
---|
| 1488 | |
---|
| 1489 | m_signGvdFocalLengthX[i].resize(3); |
---|
| 1490 | m_expGvdFocalLengthX[i].resize(3); |
---|
| 1491 | m_manGvdFocalLengthX[i].resize(3); |
---|
| 1492 | m_signGvdFocalLengthY[i].resize(3); |
---|
| 1493 | m_expGvdFocalLengthY[i].resize(3); |
---|
| 1494 | m_manGvdFocalLengthY[i].resize(3); |
---|
| 1495 | m_signGvdPrincipalPointX[i].resize(3); |
---|
| 1496 | m_expGvdPrincipalPointX[i].resize(3); |
---|
| 1497 | m_manGvdPrincipalPointX[i].resize(3); |
---|
| 1498 | m_signGvdPrincipalPointY[i].resize(3); |
---|
| 1499 | m_expGvdPrincipalPointY[i].resize(3); |
---|
| 1500 | m_manGvdPrincipalPointY[i].resize(3); |
---|
| 1501 | |
---|
| 1502 | m_signGvdR00[i].resize(3); |
---|
| 1503 | m_expGvdR00[i].resize(3); |
---|
| 1504 | m_manGvdR00[i].resize(3); |
---|
| 1505 | m_signGvdR01[i].resize(3); |
---|
| 1506 | m_expGvdR01[i].resize(3); |
---|
| 1507 | m_manGvdR01[i].resize(3); |
---|
| 1508 | m_signGvdR02[i].resize(3); |
---|
| 1509 | m_expGvdR02[i].resize(3); |
---|
| 1510 | m_manGvdR02[i].resize(3); |
---|
| 1511 | m_signGvdR10[i].resize(3); |
---|
| 1512 | m_expGvdR10[i].resize(3); |
---|
| 1513 | m_manGvdR10[i].resize(3); |
---|
| 1514 | m_signGvdR11[i].resize(3); |
---|
| 1515 | m_expGvdR11[i].resize(3); |
---|
| 1516 | m_manGvdR11[i].resize(3); |
---|
| 1517 | m_signGvdR12[i].resize(3); |
---|
| 1518 | m_expGvdR12[i].resize(3); |
---|
| 1519 | m_manGvdR12[i].resize(3); |
---|
| 1520 | m_signGvdR20[i].resize(3); |
---|
| 1521 | m_expGvdR20[i].resize(3); |
---|
| 1522 | m_manGvdR20[i].resize(3); |
---|
| 1523 | m_signGvdR21[i].resize(3); |
---|
| 1524 | m_expGvdR21[i].resize(3); |
---|
| 1525 | m_manGvdR21[i].resize(3); |
---|
| 1526 | m_signGvdR22[i].resize(3); |
---|
| 1527 | m_expGvdR22[i].resize(3); |
---|
| 1528 | m_manGvdR22[i].resize(3); |
---|
| 1529 | |
---|
| 1530 | m_signGvdTX[i].resize(3); |
---|
| 1531 | m_expGvdTX[i].resize(3); |
---|
| 1532 | m_manGvdTX[i].resize(3); |
---|
| 1533 | } |
---|
| 1534 | |
---|
| 1535 | } |
---|
| 1536 | |
---|
| 1537 | Bool m_alternativeDepthInfoCancelFlag; |
---|
| 1538 | Int m_depthType; |
---|
| 1539 | Int m_numConstituentViewsGvdMinus1; |
---|
| 1540 | Bool m_depthPresentGvdFlag; |
---|
| 1541 | Bool m_zGvdFlag; |
---|
| 1542 | Bool m_intrinsicParamGvdFlag; |
---|
| 1543 | Bool m_rotationGvdFlag; |
---|
| 1544 | Bool m_translationGvdFlag; |
---|
| 1545 | BoolAry2d m_signGvdZNearFlag; |
---|
| 1546 | IntAry2d m_expGvdZNear; |
---|
| 1547 | IntAry2d m_manLenGvdZNearMinus1; |
---|
| 1548 | IntAry2d m_manGvdZNear; |
---|
| 1549 | BoolAry2d m_signGvdZFarFlag; |
---|
| 1550 | IntAry2d m_expGvdZFar; |
---|
| 1551 | IntAry2d m_manLenGvdZFarMinus1; |
---|
| 1552 | IntAry2d m_manGvdZFar; |
---|
| 1553 | Int m_precGvdFocalLength; |
---|
| 1554 | Int m_precGvdPrincipalPoint; |
---|
| 1555 | Int m_precGvdRotationParam; |
---|
| 1556 | Int m_precGvdTranslationParam; |
---|
| 1557 | BoolAry2d m_signGvdFocalLengthX; |
---|
| 1558 | IntAry2d m_expGvdFocalLengthX; |
---|
| 1559 | IntAry2d m_manGvdFocalLengthX; |
---|
| 1560 | BoolAry2d m_signGvdFocalLengthY; |
---|
| 1561 | IntAry2d m_expGvdFocalLengthY; |
---|
| 1562 | IntAry2d m_manGvdFocalLengthY; |
---|
| 1563 | BoolAry2d m_signGvdPrincipalPointX; |
---|
| 1564 | IntAry2d m_expGvdPrincipalPointX; |
---|
| 1565 | IntAry2d m_manGvdPrincipalPointX; |
---|
| 1566 | BoolAry2d m_signGvdPrincipalPointY; |
---|
| 1567 | IntAry2d m_expGvdPrincipalPointY; |
---|
| 1568 | IntAry2d m_manGvdPrincipalPointY; |
---|
| 1569 | |
---|
| 1570 | BoolAry2d m_signGvdR00; |
---|
| 1571 | IntAry2d m_expGvdR00; |
---|
| 1572 | IntAry2d m_manGvdR00; |
---|
| 1573 | BoolAry2d m_signGvdR01; |
---|
| 1574 | IntAry2d m_expGvdR01; |
---|
| 1575 | IntAry2d m_manGvdR01; |
---|
| 1576 | BoolAry2d m_signGvdR02; |
---|
| 1577 | IntAry2d m_expGvdR02; |
---|
| 1578 | IntAry2d m_manGvdR02; |
---|
| 1579 | BoolAry2d m_signGvdR10; |
---|
| 1580 | IntAry2d m_expGvdR10; |
---|
| 1581 | IntAry2d m_manGvdR10; |
---|
| 1582 | BoolAry2d m_signGvdR11; |
---|
| 1583 | IntAry2d m_expGvdR11; |
---|
| 1584 | IntAry2d m_manGvdR11; |
---|
| 1585 | BoolAry2d m_signGvdR12; |
---|
| 1586 | IntAry2d m_expGvdR12; |
---|
| 1587 | IntAry2d m_manGvdR12; |
---|
| 1588 | BoolAry2d m_signGvdR20; |
---|
| 1589 | IntAry2d m_expGvdR20; |
---|
| 1590 | IntAry2d m_manGvdR20; |
---|
| 1591 | BoolAry2d m_signGvdR21; |
---|
| 1592 | IntAry2d m_expGvdR21; |
---|
| 1593 | IntAry2d m_manGvdR21; |
---|
| 1594 | BoolAry2d m_signGvdR22; |
---|
| 1595 | IntAry2d m_expGvdR22; |
---|
| 1596 | IntAry2d m_manGvdR22; |
---|
| 1597 | |
---|
| 1598 | BoolAry2d m_signGvdTX; |
---|
| 1599 | IntAry2d m_expGvdTX; |
---|
| 1600 | IntAry2d m_manGvdTX; |
---|
| 1601 | |
---|
| 1602 | Int m_minOffsetXInt; |
---|
| 1603 | Int m_minOffsetXFrac; |
---|
| 1604 | Int m_maxOffsetXInt; |
---|
| 1605 | Int m_maxOffsetXFrac; |
---|
| 1606 | Bool m_offsetYPresentFlag; |
---|
| 1607 | Int m_minOffsetYInt; |
---|
| 1608 | Int m_minOffsetYFrac; |
---|
| 1609 | Int m_maxOffsetYInt; |
---|
| 1610 | Int m_maxOffsetYFrac; |
---|
| 1611 | Bool m_warpMapSizePresentFlag; |
---|
| 1612 | Int m_warpMapWidthMinus2; |
---|
| 1613 | Int m_warpMapHeightMinus2; |
---|
| 1614 | }; |
---|
| 1615 | |
---|
| 1616 | #endif |
---|
| 1617 | #endif |
---|
[1386] | 1618 | #endif |
---|
[1356] | 1619 | |
---|
[56] | 1620 | //! \} |
---|