| 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 | * |
|---|
| 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
|---|
| 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. |
|---|
| 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
|---|
| 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 | */ |
|---|
| 33 | |
|---|
| 34 | #ifndef __SEI__ |
|---|
| 35 | #define __SEI__ |
|---|
| 36 | |
|---|
| 37 | #pragma once |
|---|
| 38 | #include <list> |
|---|
| 39 | #include <vector> |
|---|
| 40 | #include <cstring> |
|---|
| 41 | |
|---|
| 42 | #include "CommonDef.h" |
|---|
| 43 | #include "libmd5/MD5.h" |
|---|
| 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 | |
|---|
| 52 | //! \ingroup TLibCommon |
|---|
| 53 | //! \{ |
|---|
| 54 | class TComSPS; |
|---|
| 55 | #if NH_MV_SEI |
|---|
| 56 | class TComSlice; |
|---|
| 57 | class SEIScalableNesting; |
|---|
| 58 | #endif |
|---|
| 59 | |
|---|
| 60 | /** |
|---|
| 61 | * Abstract class representing an SEI message with lightweight RTTI. |
|---|
| 62 | */ |
|---|
| 63 | class SEI |
|---|
| 64 | { |
|---|
| 65 | public: |
|---|
| 66 | enum PayloadType |
|---|
| 67 | { |
|---|
| 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, |
|---|
| 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 |
|---|
| 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 |
|---|
| 116 | , ALTERNATIVE_DEPTH_INFO = 181 |
|---|
| 117 | #endif |
|---|
| 118 | #endif |
|---|
| 119 | |
|---|
| 120 | }; |
|---|
| 121 | |
|---|
| 122 | SEI(); |
|---|
| 123 | |
|---|
| 124 | virtual ~SEI() {} |
|---|
| 125 | virtual SEI* getCopy( ) const; |
|---|
| 126 | static const Char *getSEIMessageString(SEI::PayloadType payloadType ); |
|---|
| 127 | virtual PayloadType payloadType() const = 0; |
|---|
| 128 | |
|---|
| 129 | #if NH_MV_SEI |
|---|
| 130 | static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); |
|---|
| 131 | Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; |
|---|
| 132 | |
|---|
| 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 |
|---|
| 157 | }; |
|---|
| 158 | |
|---|
| 159 | static const UInt ISO_IEC_11578_LEN=16; |
|---|
| 160 | |
|---|
| 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 | |
|---|
| 175 | UChar uuid_iso_iec_11578[ISO_IEC_11578_LEN]; |
|---|
| 176 | UInt userDataLength; |
|---|
| 177 | UChar *userData; |
|---|
| 178 | }; |
|---|
| 179 | |
|---|
| 180 | class SEIDecodedPictureHash : public SEI |
|---|
| 181 | { |
|---|
| 182 | public: |
|---|
| 183 | PayloadType payloadType() const { return DECODED_PICTURE_HASH; } |
|---|
| 184 | |
|---|
| 185 | SEIDecodedPictureHash() {} |
|---|
| 186 | virtual ~SEIDecodedPictureHash() {} |
|---|
| 187 | |
|---|
| 188 | enum Method |
|---|
| 189 | { |
|---|
| 190 | MD5, |
|---|
| 191 | CRC, |
|---|
| 192 | CHECKSUM, |
|---|
| 193 | RESERVED, |
|---|
| 194 | } method; |
|---|
| 195 | |
|---|
| 196 | TComPictureHash m_pictureHash; |
|---|
| 197 | }; |
|---|
| 198 | |
|---|
| 199 | class SEIActiveParameterSets : public SEI |
|---|
| 200 | { |
|---|
| 201 | public: |
|---|
| 202 | PayloadType payloadType() const { return ACTIVE_PARAMETER_SETS; } |
|---|
| 203 | |
|---|
| 204 | SEIActiveParameterSets() |
|---|
| 205 | : activeVPSId (0) |
|---|
| 206 | , m_selfContainedCvsFlag (false) |
|---|
| 207 | , m_noParameterSetUpdateFlag (false) |
|---|
| 208 | , numSpsIdsMinus1 (0) |
|---|
| 209 | {} |
|---|
| 210 | virtual ~SEIActiveParameterSets() {} |
|---|
| 211 | |
|---|
| 212 | Int activeVPSId; |
|---|
| 213 | Bool m_selfContainedCvsFlag; |
|---|
| 214 | Bool m_noParameterSetUpdateFlag; |
|---|
| 215 | Int numSpsIdsMinus1; |
|---|
| 216 | std::vector<Int> activeSeqParameterSetId; |
|---|
| 217 | }; |
|---|
| 218 | |
|---|
| 219 | class SEIBufferingPeriod : public SEI |
|---|
| 220 | { |
|---|
| 221 | public: |
|---|
| 222 | PayloadType payloadType() const { return BUFFERING_PERIOD; } |
|---|
| 223 | void copyTo (SEIBufferingPeriod& target); |
|---|
| 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; |
|---|
| 240 | UInt m_cpbDelayOffset; |
|---|
| 241 | UInt m_dpbDelayOffset; |
|---|
| 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; } |
|---|
| 253 | void copyTo (SEIPictureTiming& target); |
|---|
| 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; |
|---|
| 275 | std::vector<UInt> m_numNalusInDuMinus1; |
|---|
| 276 | std::vector<UInt> m_duCpbRemovalDelayMinus1; |
|---|
| 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 | }; |
|---|
| 309 | |
|---|
| 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 | |
|---|
| 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 | |
|---|
| 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) |
|---|
| 360 | {} |
|---|
| 361 | virtual ~SEIDisplayOrientation() {} |
|---|
| 362 | |
|---|
| 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 | |
|---|
| 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 | |
|---|
| 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; |
|---|
| 453 | Int m_exposureIndexIdc; |
|---|
| 454 | Int m_exposureIndexValue; |
|---|
| 455 | Bool m_exposureCompensationValueSignFlag; |
|---|
| 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 | |
|---|
| 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 |
|---|
| 534 | #if !NH_MV_SEI |
|---|
| 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 |
|---|
| 552 | #endif |
|---|
| 553 | |
|---|
| 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 | |
|---|
| 559 | /// remove a selection of SEI messages by payload type from the original list and return them in a new list. |
|---|
| 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() {} |
|---|
| 571 | |
|---|
| 572 | virtual ~SEIScalableNesting() |
|---|
| 573 | { |
|---|
| 574 | deleteSEIs(m_nestedSEIs); |
|---|
| 575 | } |
|---|
| 576 | |
|---|
| 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 |
|---|
| 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 |
|---|
| 588 | |
|---|
| 589 | SEIMessages m_nestedSEIs; |
|---|
| 590 | }; |
|---|
| 591 | |
|---|
| 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 | |
|---|
| 661 | #if NH_MV_SEI |
|---|
| 662 | #if NH_MV_LAYERS_NOT_PRESENT_SEI |
|---|
| 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; |
|---|
| 675 | UInt m_lnpSeiMaxLayers; |
|---|
| 676 | BoolAry1d m_layerNotPresentFlag; |
|---|
| 677 | |
|---|
| 678 | Void resizeDimI( Int sizeDimI ) |
|---|
| 679 | { |
|---|
| 680 | m_layerNotPresentFlag.resize( sizeDimI ); |
|---|
| 681 | } |
|---|
| 682 | }; |
|---|
| 683 | #endif |
|---|
| 684 | |
|---|
| 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 | #if NH_MV_SEI_TBD |
|---|
| 806 | class SEIOverlayInfo : public SEI |
|---|
| 807 | { |
|---|
| 808 | public: |
|---|
| 809 | PayloadType payloadType( ) const { return OVERLAY_INFO; } |
|---|
| 810 | SEIOverlayInfo ( ) { }; |
|---|
| 811 | ~SEIOverlayInfo( ) { }; |
|---|
| 812 | SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; |
|---|
| 813 | |
|---|
| 814 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 815 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 816 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 817 | |
|---|
| 818 | Bool m_overlayInfoCancelFlag; |
|---|
| 819 | Int m_overlayContentAuxIdMinus128; |
|---|
| 820 | Int m_overlayLabelAuxIdMinus128; |
|---|
| 821 | Int m_overlayAlphaAuxIdMinus128; |
|---|
| 822 | Int m_overlayElementLabelValueLengthMinus8; |
|---|
| 823 | Int m_numOverlaysMinus1; |
|---|
| 824 | IntAry1d m_overlayIdx; |
|---|
| 825 | BoolAry1d m_languageOverlayPresentFlag; |
|---|
| 826 | IntAry1d m_overlayContentLayerId; |
|---|
| 827 | BoolAry1d m_overlayLabelPresentFlag; |
|---|
| 828 | IntAry1d m_overlayLabelLayerId; |
|---|
| 829 | BoolAry1d m_overlayAlphaPresentFlag; |
|---|
| 830 | IntAry1d m_overlayAlphaLayerId; |
|---|
| 831 | IntAry1d m_numOverlayElementsMinus1; |
|---|
| 832 | IntAry2d m_overlayElementLabelMin; |
|---|
| 833 | IntAry2d m_overlayElementLabelMax; |
|---|
| 834 | Int m_overlayZeroBit; |
|---|
| 835 | IntAry1d m_overlayLanguage; |
|---|
| 836 | IntAry1d m_overlayName; |
|---|
| 837 | IntAry2d m_overlayElementName; |
|---|
| 838 | Bool m_overlayInfoPersistenceFlag; |
|---|
| 839 | }; |
|---|
| 840 | |
|---|
| 841 | #endif |
|---|
| 842 | |
|---|
| 843 | class SEITemporalMvPredictionConstraints : public SEI |
|---|
| 844 | { |
|---|
| 845 | public: |
|---|
| 846 | PayloadType payloadType( ) const { return TEMPORAL_MV_PREDICTION_CONSTRAINTS; } |
|---|
| 847 | SEITemporalMvPredictionConstraints ( ) { }; |
|---|
| 848 | ~SEITemporalMvPredictionConstraints( ) { }; |
|---|
| 849 | SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; |
|---|
| 850 | |
|---|
| 851 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 852 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 853 | |
|---|
| 854 | Bool m_prevPicsNotUsedFlag; |
|---|
| 855 | Bool m_noIntraLayerColPicFlag; |
|---|
| 856 | }; |
|---|
| 857 | |
|---|
| 858 | #if NH_MV_SEI_TBD |
|---|
| 859 | class SEIFrameFieldInfo : public SEI |
|---|
| 860 | { |
|---|
| 861 | public: |
|---|
| 862 | PayloadType payloadType( ) const { return FRAME_FIELD_INFO; } |
|---|
| 863 | SEIFrameFieldInfo ( ) { }; |
|---|
| 864 | ~SEIFrameFieldInfo( ) { }; |
|---|
| 865 | SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; |
|---|
| 866 | |
|---|
| 867 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 868 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 869 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 870 | |
|---|
| 871 | Int m_ffinfoPicStruct; |
|---|
| 872 | Int m_ffinfoSourceScanType; |
|---|
| 873 | Bool m_ffinfoDuplicateFlag; |
|---|
| 874 | }; |
|---|
| 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 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 886 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 887 | |
|---|
| 888 | Int m_precRefDisplayWidth; |
|---|
| 889 | Bool m_refViewingDistanceFlag; |
|---|
| 890 | Int m_precRefViewingDist; |
|---|
| 891 | Int m_numRefDisplaysMinus1; |
|---|
| 892 | IntAry1d m_leftViewId; |
|---|
| 893 | IntAry1d m_rightViewId; |
|---|
| 894 | IntAry1d m_exponentRefDisplayWidth; |
|---|
| 895 | IntAry1d m_mantissaRefDisplayWidth; |
|---|
| 896 | IntAry1d m_exponentRefViewingDistance; |
|---|
| 897 | IntAry1d m_mantissaRefViewingDistance; |
|---|
| 898 | BoolAry1d m_additionalShiftPresentFlag; |
|---|
| 899 | IntAry1d m_numSampleShiftPlus512; |
|---|
| 900 | Bool m_threeDimensionalReferenceDisplaysExtensionFlag; |
|---|
| 901 | }; |
|---|
| 902 | |
|---|
| 903 | class SEIDepthRepresentationInfo : public SEI |
|---|
| 904 | { |
|---|
| 905 | public: |
|---|
| 906 | PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; } |
|---|
| 907 | SEIDepthRepresentationInfo ( ) { }; |
|---|
| 908 | ~SEIDepthRepresentationInfo( ) { }; |
|---|
| 909 | SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; |
|---|
| 910 | |
|---|
| 911 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 912 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 913 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 914 | |
|---|
| 915 | Bool m_zNearFlag; |
|---|
| 916 | Bool m_zFarFlag; |
|---|
| 917 | Bool m_dMinFlag; |
|---|
| 918 | Bool m_dMaxFlag; |
|---|
| 919 | Int m_depthRepresentationType; |
|---|
| 920 | Int m_disparityRefViewId; |
|---|
| 921 | Int m_depthNonlinearRepresentationNumMinus1; |
|---|
| 922 | }; |
|---|
| 923 | |
|---|
| 924 | class SEIDepthRepInfoElement : public SEI |
|---|
| 925 | { |
|---|
| 926 | public: |
|---|
| 927 | PayloadType payloadType( ) const { return DEPTH_REP_INFO_ELEMENT; } |
|---|
| 928 | SEIDepthRepInfoElement ( ) { }; |
|---|
| 929 | ~SEIDepthRepInfoElement( ) { }; |
|---|
| 930 | SEI* getCopy( ) const { return new SEIDepthRepInfoElement(*this); }; |
|---|
| 931 | |
|---|
| 932 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 933 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 934 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 935 | |
|---|
| 936 | Bool m_daSignFlag; |
|---|
| 937 | Int m_daExponent; |
|---|
| 938 | Int m_daMantissaLenMinus1; |
|---|
| 939 | Int m_daMantissa; |
|---|
| 940 | }; |
|---|
| 941 | #endif |
|---|
| 942 | |
|---|
| 943 | class SEIMultiviewSceneInfo : public SEI |
|---|
| 944 | { |
|---|
| 945 | public: |
|---|
| 946 | PayloadType payloadType( ) const { return MULTIVIEW_SCENE_INFO; } |
|---|
| 947 | SEIMultiviewSceneInfo ( ) { }; |
|---|
| 948 | ~SEIMultiviewSceneInfo( ) { }; |
|---|
| 949 | SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; |
|---|
| 950 | |
|---|
| 951 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 952 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 953 | |
|---|
| 954 | Int m_minDisparity; |
|---|
| 955 | Int m_maxDisparityRange; |
|---|
| 956 | }; |
|---|
| 957 | |
|---|
| 958 | |
|---|
| 959 | class SEIMultiviewAcquisitionInfo : public SEI |
|---|
| 960 | { |
|---|
| 961 | public: |
|---|
| 962 | PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; } |
|---|
| 963 | SEIMultiviewAcquisitionInfo ( ) { }; |
|---|
| 964 | ~SEIMultiviewAcquisitionInfo( ) { }; |
|---|
| 965 | SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; |
|---|
| 966 | |
|---|
| 967 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 968 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 969 | |
|---|
| 970 | Int getNumViewsMinus1( ) const |
|---|
| 971 | { |
|---|
| 972 | Int numViewsMinus1; |
|---|
| 973 | if( m_scalNestSeiContThisSei != NULL ) |
|---|
| 974 | { |
|---|
| 975 | numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1; |
|---|
| 976 | } |
|---|
| 977 | else |
|---|
| 978 | { |
|---|
| 979 | numViewsMinus1 = 0; |
|---|
| 980 | } |
|---|
| 981 | return numViewsMinus1; |
|---|
| 982 | } |
|---|
| 983 | |
|---|
| 984 | Void resizeArrays( ) |
|---|
| 985 | { |
|---|
| 986 | Int numViews = getNumViewsMinus1() + 1; |
|---|
| 987 | m_signFocalLengthX .resize( numViews ); |
|---|
| 988 | m_exponentFocalLengthX .resize( numViews ); |
|---|
| 989 | m_mantissaFocalLengthX .resize( numViews ); |
|---|
| 990 | m_signFocalLengthY .resize( numViews ); |
|---|
| 991 | m_exponentFocalLengthY .resize( numViews ); |
|---|
| 992 | m_mantissaFocalLengthY .resize( numViews ); |
|---|
| 993 | m_signPrincipalPointX .resize( numViews ); |
|---|
| 994 | m_exponentPrincipalPointX.resize( numViews ); |
|---|
| 995 | m_mantissaPrincipalPointX.resize( numViews ); |
|---|
| 996 | m_signPrincipalPointY .resize( numViews ); |
|---|
| 997 | m_exponentPrincipalPointY.resize( numViews ); |
|---|
| 998 | m_mantissaPrincipalPointY.resize( numViews ); |
|---|
| 999 | m_signSkewFactor .resize( numViews ); |
|---|
| 1000 | m_exponentSkewFactor .resize( numViews ); |
|---|
| 1001 | m_mantissaSkewFactor .resize( numViews ); |
|---|
| 1002 | |
|---|
| 1003 | m_signR .resize( numViews ); |
|---|
| 1004 | m_exponentR .resize( numViews ); |
|---|
| 1005 | m_mantissaR .resize( numViews ); |
|---|
| 1006 | m_signT .resize( numViews ); |
|---|
| 1007 | m_exponentT .resize( numViews ); |
|---|
| 1008 | m_mantissaT .resize( numViews ); |
|---|
| 1009 | |
|---|
| 1010 | for( Int i = 0; i < numViews ; i++ ) |
|---|
| 1011 | { |
|---|
| 1012 | m_signR [i].resize( 3 ); |
|---|
| 1013 | m_exponentR[i].resize( 3 ); |
|---|
| 1014 | m_mantissaR[i].resize( 3 ); |
|---|
| 1015 | m_signT [i].resize( 3 ); |
|---|
| 1016 | m_exponentT[i].resize( 3 ); |
|---|
| 1017 | m_mantissaT[i].resize( 3 ); |
|---|
| 1018 | |
|---|
| 1019 | for (Int j = 0; j < 3; j++) |
|---|
| 1020 | { |
|---|
| 1021 | m_signR [i][j].resize( 3 ); |
|---|
| 1022 | m_exponentR[i][j].resize( 3 ); |
|---|
| 1023 | m_mantissaR[i][j].resize( 3 ); |
|---|
| 1024 | } |
|---|
| 1025 | } |
|---|
| 1026 | } |
|---|
| 1027 | |
|---|
| 1028 | UInt getMantissaFocalLengthXLen ( Int i ) const ; |
|---|
| 1029 | UInt getMantissaFocalLengthYLen ( Int i ) const ; |
|---|
| 1030 | UInt getMantissaPrincipalPointXLen( Int i ) const ; |
|---|
| 1031 | UInt getMantissaPrincipalPointYLen( Int i ) const ; |
|---|
| 1032 | UInt getMantissaSkewFactorLen ( Int i ) const ; |
|---|
| 1033 | UInt getMantissaRLen ( Int i, Int j, Int k ) const ; |
|---|
| 1034 | UInt getMantissaTLen ( Int i, Int j ) const ; |
|---|
| 1035 | |
|---|
| 1036 | Bool m_intrinsicParamFlag; |
|---|
| 1037 | Bool m_extrinsicParamFlag; |
|---|
| 1038 | Bool m_intrinsicParamsEqualFlag; |
|---|
| 1039 | Int m_precFocalLength; |
|---|
| 1040 | Int m_precPrincipalPoint; |
|---|
| 1041 | Int m_precSkewFactor; |
|---|
| 1042 | BoolAry1d m_signFocalLengthX; |
|---|
| 1043 | IntAry1d m_exponentFocalLengthX; |
|---|
| 1044 | IntAry1d m_mantissaFocalLengthX; |
|---|
| 1045 | BoolAry1d m_signFocalLengthY; |
|---|
| 1046 | IntAry1d m_exponentFocalLengthY; |
|---|
| 1047 | IntAry1d m_mantissaFocalLengthY; |
|---|
| 1048 | BoolAry1d m_signPrincipalPointX; |
|---|
| 1049 | IntAry1d m_exponentPrincipalPointX; |
|---|
| 1050 | IntAry1d m_mantissaPrincipalPointX; |
|---|
| 1051 | BoolAry1d m_signPrincipalPointY; |
|---|
| 1052 | IntAry1d m_exponentPrincipalPointY; |
|---|
| 1053 | IntAry1d m_mantissaPrincipalPointY; |
|---|
| 1054 | BoolAry1d m_signSkewFactor; |
|---|
| 1055 | IntAry1d m_exponentSkewFactor; |
|---|
| 1056 | IntAry1d m_mantissaSkewFactor; |
|---|
| 1057 | Int m_precRotationParam; |
|---|
| 1058 | Int m_precTranslationParam; |
|---|
| 1059 | BoolAry3d m_signR; |
|---|
| 1060 | IntAry3d m_exponentR; |
|---|
| 1061 | IntAry3d m_mantissaR; |
|---|
| 1062 | BoolAry2d m_signT; |
|---|
| 1063 | IntAry2d m_exponentT; |
|---|
| 1064 | IntAry2d m_mantissaT; |
|---|
| 1065 | private: |
|---|
| 1066 | UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; |
|---|
| 1067 | }; |
|---|
| 1068 | |
|---|
| 1069 | |
|---|
| 1070 | |
|---|
| 1071 | class SEIMultiviewViewPosition : public SEI |
|---|
| 1072 | { |
|---|
| 1073 | public: |
|---|
| 1074 | PayloadType payloadType( ) const { return MULTIVIEW_VIEW_POSITION; } |
|---|
| 1075 | SEIMultiviewViewPosition ( ) { }; |
|---|
| 1076 | ~SEIMultiviewViewPosition( ) { }; |
|---|
| 1077 | SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; |
|---|
| 1078 | |
|---|
| 1079 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 1080 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 1081 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 1082 | |
|---|
| 1083 | Int m_numViewsMinus1; |
|---|
| 1084 | IntAry1d m_viewPosition; |
|---|
| 1085 | }; |
|---|
| 1086 | |
|---|
| 1087 | #if NH_MV_SEI_TBD |
|---|
| 1088 | class SEIAlternativeDepthInfo : public SEI |
|---|
| 1089 | { |
|---|
| 1090 | public: |
|---|
| 1091 | PayloadType payloadType( ) const { return ALTERNATIVE_DEPTH_INFO; } |
|---|
| 1092 | SEIAlternativeDepthInfo ( ) { }; |
|---|
| 1093 | ~SEIAlternativeDepthInfo( ) { }; |
|---|
| 1094 | SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; |
|---|
| 1095 | |
|---|
| 1096 | Void setupFromCfgFile( const Char* cfgFile ); |
|---|
| 1097 | Void setupFromSlice ( const TComSlice* slice ); |
|---|
| 1098 | Bool checkCfg ( const TComSlice* slice ); |
|---|
| 1099 | |
|---|
| 1100 | Bool m_alternativeDepthInfoCancelFlag; |
|---|
| 1101 | Int m_depthType; |
|---|
| 1102 | Int m_numConstituentViewsGvdMinus1; |
|---|
| 1103 | Bool m_depthPresentGvdFlag; |
|---|
| 1104 | Bool m_zGvdFlag; |
|---|
| 1105 | Bool m_intrinsicParamGvdFlag; |
|---|
| 1106 | Bool m_rotationGvdFlag; |
|---|
| 1107 | Bool m_translationGvdFlag; |
|---|
| 1108 | BoolAry1d m_signGvdZNearFlag; |
|---|
| 1109 | IntAry1d m_expGvdZNear; |
|---|
| 1110 | IntAry1d m_manLenGvdZNearMinus1; |
|---|
| 1111 | IntAry1d m_manGvdZNear; |
|---|
| 1112 | BoolAry1d m_signGvdZFarFlag; |
|---|
| 1113 | IntAry1d m_expGvdZFar; |
|---|
| 1114 | IntAry1d m_manLenGvdZFarMinus1; |
|---|
| 1115 | IntAry1d m_manGvdZFar; |
|---|
| 1116 | Int m_precGvdFocalLength; |
|---|
| 1117 | Int m_precGvdPrincipalPoint; |
|---|
| 1118 | Int m_precGvdRotationParam; |
|---|
| 1119 | Int m_precGvdTranslationParam; |
|---|
| 1120 | BoolAry1d m_signGvdFocalLengthX; |
|---|
| 1121 | IntAry1d m_expGvdFocalLengthX; |
|---|
| 1122 | IntAry1d m_manGvdFocalLengthX; |
|---|
| 1123 | BoolAry1d m_signGvdFocalLengthY; |
|---|
| 1124 | IntAry1d m_expGvdFocalLengthY; |
|---|
| 1125 | IntAry1d m_manGvdFocalLengthY; |
|---|
| 1126 | BoolAry1d m_signGvdPrincipalPointX; |
|---|
| 1127 | IntAry1d m_expGvdPrincipalPointX; |
|---|
| 1128 | IntAry1d m_manGvdPrincipalPointX; |
|---|
| 1129 | BoolAry1d m_signGvdPrincipalPointY; |
|---|
| 1130 | IntAry1d m_expGvdPrincipalPointY; |
|---|
| 1131 | IntAry1d m_manGvdPrincipalPointY; |
|---|
| 1132 | BoolAry3d m_signGvdR; |
|---|
| 1133 | IntAry3d m_expGvdR; |
|---|
| 1134 | IntAry3d m_manGvdR; |
|---|
| 1135 | BoolAry1d m_signGvdTX; |
|---|
| 1136 | IntAry1d m_expGvdTX; |
|---|
| 1137 | IntAry1d m_manGvdTX; |
|---|
| 1138 | Int m_minOffsetXInt; |
|---|
| 1139 | Int m_minOffsetXFrac; |
|---|
| 1140 | Int m_maxOffsetXInt; |
|---|
| 1141 | Int m_maxOffsetXFrac; |
|---|
| 1142 | Bool m_offsetYPresentFlag; |
|---|
| 1143 | Int m_minOffsetYInt; |
|---|
| 1144 | Int m_minOffsetYFrac; |
|---|
| 1145 | Int m_maxOffsetYInt; |
|---|
| 1146 | Int m_maxOffsetYFrac; |
|---|
| 1147 | Bool m_warpMapSizePresentFlag; |
|---|
| 1148 | Int m_warpMapWidthMinus2; |
|---|
| 1149 | Int m_warpMapHeightMinus2; |
|---|
| 1150 | }; |
|---|
| 1151 | #endif |
|---|
| 1152 | |
|---|
| 1153 | #endif |
|---|
| 1154 | |
|---|
| 1155 | #endif |
|---|
| 1156 | //! \} |
|---|