nx_metadata_sdk 1.0 Metadata SDK

pixel_format.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <string>
6 #include <vector>
7
8 #include <nx/sdk/analytics/i_uncompressed_video_frame.h>
9
10 namespace nx {
11 namespace sdk {
12 namespace analytics {
13
15 bool pixelFormatFromStdString(
16 const std::string& s, IUncompressedVideoFrame::PixelFormat* outPixelFormat);
17
22 std::string pixelFormatToStdString(IUncompressedVideoFrame::PixelFormat pixelFormat);
23
24 std::string allPixelFormatsToStdString(const std::string& separator);
25
26 struct PixelFormatDescriptor
27 {
28 IUncompressedVideoFrame::PixelFormat pixelFormat;
29 std::string name;
30
31 int planeCount;
32 int lumaBitsPerPixel;
33 int chromaHeightFactor;
34 int chromaWidthFactor;
35 };
36
38 const PixelFormatDescriptor* getPixelFormatDescriptor(
39 IUncompressedVideoFrame::PixelFormat pixelFormat);
40
41 std::vector<IUncompressedVideoFrame::PixelFormat> getAllPixelFormats();
42
43 } // namespace analytics
44 } // namespace sdk
45 } // namespace nx
nx
Definition: apple_utils.h:6
nx::sdk::analytics::PixelFormatDescriptor::chromaWidthFactor
int chromaWidthFactor
Definition: pixel_format.h:34
nx::sdk::analytics::PixelFormatDescriptor
Definition: pixel_format.h:26
nx::sdk::analytics::PixelFormatDescriptor::chromaHeightFactor
int chromaHeightFactor
Definition: pixel_format.h:33