/src/vvenc/source/Lib/EncoderLib/SEIwrite.h
Line | Count | Source |
1 | | /* ----------------------------------------------------------------------------- |
2 | | The copyright in this software is being made available under the Clear BSD |
3 | | License, included below. No patent rights, trademark rights and/or |
4 | | other Intellectual Property Rights other than the copyrights concerning |
5 | | the Software are granted under this license. |
6 | | |
7 | | The Clear BSD License |
8 | | |
9 | | Copyright (c) 2019-2026, Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. & The VVenC Authors. |
10 | | All rights reserved. |
11 | | |
12 | | Redistribution and use in source and binary forms, with or without modification, |
13 | | are permitted (subject to the limitations in the disclaimer below) provided that |
14 | | the following conditions are met: |
15 | | |
16 | | * Redistributions of source code must retain the above copyright notice, |
17 | | this list of conditions and the following disclaimer. |
18 | | |
19 | | * Redistributions in binary form must reproduce the above copyright |
20 | | notice, this list of conditions and the following disclaimer in the |
21 | | documentation and/or other materials provided with the distribution. |
22 | | |
23 | | * Neither the name of the copyright holder nor the names of its |
24 | | contributors may be used to endorse or promote products derived from this |
25 | | software without specific prior written permission. |
26 | | |
27 | | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY |
28 | | THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
29 | | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
30 | | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
31 | | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
32 | | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
33 | | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
34 | | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
35 | | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
36 | | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
37 | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
38 | | POSSIBILITY OF SUCH DAMAGE. |
39 | | |
40 | | |
41 | | ------------------------------------------------------------------------------------------- */ |
42 | | #pragma once |
43 | | |
44 | | #include "VLCWriter.h" |
45 | | #include "CommonLib/SEI.h" |
46 | | #include "CommonLib/HRD.h" |
47 | | |
48 | | //! \ingroup EncoderLib |
49 | | //! \{ |
50 | | |
51 | | namespace vvenc { |
52 | | |
53 | | class OutputBitstream; |
54 | | |
55 | | //! \ingroup EncoderLib |
56 | | //! \{ |
57 | | class SEIWriter : public VLCWriter |
58 | | { |
59 | | public: |
60 | 0 | SEIWriter() {}; |
61 | 0 | virtual ~SEIWriter() {}; |
62 | | |
63 | | void writeSEImessages(OutputBitstream& bs, const SEIMessages &seiList, HRD &hrd, bool isNested, const uint32_t temporalId); |
64 | | |
65 | | protected: |
66 | | void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei); |
67 | | void xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo& sei, const SEIBufferingPeriod& bp, const uint32_t temporalId); |
68 | | void xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei); |
69 | | void xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei); |
70 | | void xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBufferingPeriod& bp, const uint32_t temporalId); |
71 | | void xWriteSEIFrameFieldInfo(const SEIFrameFieldInfo& sei); |
72 | | void xWriteSEIDependentRAPIndication(const SEIDependentRAPIndication& sei); |
73 | | void xWriteSEIScalableNesting(OutputBitstream& bs, const SEIScalableNesting& sei); |
74 | | void xWriteSEIFramePacking(const SEIFramePacking& sei); |
75 | | void xWriteSEIParameterSetsInclusionIndication(const SEIParameterSetsInclusionIndication& sei); |
76 | | void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei); |
77 | | void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei); |
78 | | void xWriteSEIEquirectangularProjection (const SEIEquirectangularProjection &sei); |
79 | | void xWriteSEISphereRotation (const SEISphereRotation &sei); |
80 | | void xWriteSEIOmniViewport (const SEIOmniViewport& sei); |
81 | | void xWriteSEIRegionWisePacking (const SEIRegionWisePacking &sei); |
82 | | void xWriteSEIGeneralizedCubemapProjection (const SEIGeneralizedCubemapProjection &sei); |
83 | | void xWriteSEISubpictureLevelInfo (const SEISubpicureLevelInfo &sei); |
84 | | void xWriteSEISampleAspectRatioInfo (const SEISampleAspectRatioInfo &sei); |
85 | | |
86 | | void xWriteSEIUserDataRegistered(const SEIUserDataRegistered& sei); |
87 | | void xWriteSeiFgc(const SeiFgc& sei); |
88 | | void xWriteSEIContentLightLevelInfo(const SEIContentLightLevelInfo& sei); |
89 | | void xWriteSEIAmbientViewingEnvironment(const SEIAmbientViewingEnvironment& sei); |
90 | | void xWriteSEIContentColourVolume(const SEIContentColourVolume &sei); |
91 | | void xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &hrd, const uint32_t temporalId); |
92 | | void xWriteByteAlign(); |
93 | | protected: |
94 | | HRD m_nestingHrd; |
95 | | }; |
96 | | |
97 | | } // namespace vvenc |
98 | | |
99 | | //! \} |
100 | | |