StormByte-Multimedia 3.3.2
C++26 multimedia processing module of the StormByte suite
Loading...
Searching...
No Matches
feature.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Multimedia.
5 *
6 * StormByte-Multimedia original source is dual-licensed:
7 *
8 * 1. GNU Lesser General Public License v3.0 (or later)
9 * You may redistribute and/or modify this file under the terms of the
10 * GNU Lesser General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option)
12 * any later version.
13 *
14 * 2. Commercial license
15 * Alternatively, this file may be used under the terms of a commercial
16 * license agreement with the copyright holder
17 * (David C. Manuelda <StormByte@gmail.com>).
18 *
19 * Both licenses apply only to original StormByte-Multimedia source in this
20 * file. Third-party components — including FFmpeg and embedded trained data —
21 * remain under their own licenses and are not covered by the commercial grant.
22 *
23 * A written StormByte commercial agreement may license this original source
24 * on terms other than the LGPL, including specific use, distribution or
25 * linking arrangements such as static linking, as stated in that agreement.
26 * It does not grant rights to dependencies or waive their license conditions.
27 * Enabling WITH_GPL or WITH_NONFREE may include components with separate
28 * obligations for modification, linking (static or dynamic), redistribution
29 * or works that incorporate them. The person modifying, linking, packaging or
30 * distributing the resulting work is responsible for determining and meeting
31 * all applicable requirements, including any needed patent permissions.
32 * A StormByte commercial agreement does not provide those rights for GPL or
33 * nonfree components.
34 *
35 * Neither license grants any patent rights. Any patent licenses required
36 * to use this software or third-party components must be obtained separately
37 * from the patent holders.
38 *
39 * StormByte-Multimedia is distributed in the hope that it will be useful,
40 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 * GNU Lesser General Public License for more details.
43 *
44 * You should have received a copy of the GNU Lesser General Public License
45 * version 3 along with StormByte-Multimedia. If not, see
46 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
47 *
48 * SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-StormByte-Commercial
49 */
50
51#pragma once
52
53#include <cstdint>
54
59namespace StormByte {
64 namespace Multimedia {
82 enum class Feature: std::uint32_t {
83 None = 0,
84 MultiThreaded = 1u << 0,
85 RealTime = 1u << 1,
86 LowDelay = 1u << 2,
87 ZeroCopy = 1u << 3,
89 HighQuality = 1u << 5,
90 PsychoVisual = 1u << 6,
92 Lookahead = 1u << 8,
93 TwoPass = 1u << 9,
94 Lossless = 1u << 10,
95 ProfileBased = 1u << 11,
96 ContentTuning = 1u << 12,
97 TenBit = 1u << 13,
98 TwelveBit = 1u << 14,
99 HDR10 = 1u << 15,
100 HDR10Plus = 1u << 16,
101 WideGamut = 1u << 17,
102 SurroundSound = 1u << 18,
103 SideData = 1u << 19,
104 BFrames = 1u << 20,
105 IntraOnly = 1u << 21,
106 Interlaced = 1u << 22,
107 Slices = 1u << 23,
108 Streamable = 1u << 24,
109 Encodeable = 1u << 25,
110 DOVI = 1u << 26
111 };
112
118 constexpr const char* ToString(Feature feature) noexcept {
119 switch (feature) {
120 case Feature::None: return "None";
121 case Feature::MultiThreaded: return "MultiThreaded";
122 case Feature::RealTime: return "RealTime";
123 case Feature::LowDelay: return "LowDelay";
124 case Feature::ZeroCopy: return "ZeroCopy";
125 case Feature::HardwareAcceleration: return "HardwareAcceleration";
126 case Feature::HighQuality: return "HighQuality";
127 case Feature::PsychoVisual: return "PsychoVisual";
128 case Feature::AdaptiveQuantization: return "AdaptiveQuantization";
129 case Feature::Lookahead: return "Lookahead";
130 case Feature::TwoPass: return "TwoPass";
131 case Feature::Lossless: return "Lossless";
132 case Feature::ProfileBased: return "ProfileBased";
133 case Feature::ContentTuning: return "ContentTuning";
134 case Feature::TenBit: return "TenBit";
135 case Feature::TwelveBit: return "TwelveBit";
136 case Feature::HDR10: return "HDR10";
137 case Feature::HDR10Plus: return "HDR10Plus";
138 case Feature::DOVI: return "DOVI";
139 case Feature::WideGamut: return "WideGamut";
140 case Feature::SurroundSound: return "SurroundSound";
141 case Feature::SideData: return "SideData";
142 case Feature::BFrames: return "BFrames";
143 case Feature::IntraOnly: return "IntraOnly";
144 case Feature::Interlaced: return "Interlaced";
145 case Feature::Slices: return "Slices";
146 case Feature::Streamable: return "Streamable";
147 case Feature::Encodeable: return "Encodeable";
148 }
149 return "UnknownFeature";
150 }
151 }
152}
Multimedia module of the StormByte suite.
constexpr const char * ToString(Feature feature) noexcept
Converts a Feature to a stable token.
Definition feature.hxx:118
Feature
Handcrafted capability of one decoder or encoder implementation.
Definition feature.hxx:82
@ Encodeable
Can encode (legacy; Write is Codec::HasAccess).
Definition feature.hxx:109
@ HighQuality
High quality presets.
Definition feature.hxx:89
@ ContentTuning
Content-type tuning.
Definition feature.hxx:96
@ Interlaced
Interlaced.
Definition feature.hxx:106
@ TenBit
10-bit.
Definition feature.hxx:97
@ HDR10Plus
Dynamic HDR10+ side data on the frame.
Definition feature.hxx:100
@ LowDelay
Low latency.
Definition feature.hxx:86
@ TwelveBit
12-bit.
Definition feature.hxx:98
@ BFrames
B-frames.
Definition feature.hxx:104
@ IntraOnly
Intra-only.
Definition feature.hxx:105
@ None
No flags.
Definition feature.hxx:83
@ WideGamut
Wide color gamut.
Definition feature.hxx:101
@ AdaptiveQuantization
Adaptive quantization.
Definition feature.hxx:91
@ Streamable
Streamable output.
Definition feature.hxx:108
@ PsychoVisual
Psycho-visual tuning.
Definition feature.hxx:90
@ HardwareAcceleration
Hardware decode or encode.
Definition feature.hxx:88
@ Lookahead
Lookahead analysis.
Definition feature.hxx:92
@ Lossless
Lossless mode.
Definition feature.hxx:94
@ TwoPass
Two-pass encoding.
Definition feature.hxx:93
@ MultiThreaded
Frame or slice threading.
Definition feature.hxx:84
@ ProfileBased
Profile selection.
Definition feature.hxx:95
@ ZeroCopy
Zero-copy paths.
Definition feature.hxx:87
@ SideData
Propagates packet or frame side data.
Definition feature.hxx:103
@ RealTime
Suitable for real-time use.
Definition feature.hxx:85
@ HDR10
Static HDR10 metadata on the frame.
Definition feature.hxx:99
@ Slices
Slice coding.
Definition feature.hxx:107
@ SurroundSound
Surround layouts.
Definition feature.hxx:102
@ DOVI
Parsed Dolby Vision metadata decoding or native RPU encoding.
Definition feature.hxx:110
Root namespace of the StormByte C++ suite.