1 #ifndef _AV_TRANSCODER_FRAME_PIXEL_PROPERTIES_HPP_
2 #define _AV_TRANSCODER_FRAME_PIXEL_PROPERTIES_HPP_
8 #include <libavutil/pixfmt.h>
9 #include <libavutil/pixdesc.h>
15 struct AVPixFmtDescriptor;
55 std::string getPixelName()
const;
58 size_t getBitsPerPixel()
const;
59 size_t getMaxNbBitsInChannels()
const;
60 size_t getNbComponents()
const;
61 size_t getChromaWidth()
const;
62 size_t getChromaHeight()
const;
67 bool isBigEndian()
const;
68 bool hasAlpha()
const;
69 bool isPlanar()
const;
70 bool isIndexedColors()
const;
71 bool isBitWisePacked()
const;
72 bool isHardwareAccelerated()
const;
73 bool isRgbPixelData()
const;
74 bool isPseudoPaletted()
const;
76 std::vector<Channel> getChannels()
const;
97 catch(
const std::exception& e)
std::vector< std::pair< std::string, std::string > > PropertyVector
PropertyVector is a vector of pair, because the order of properties matters to us.
void add(PropertyVector &propertyVector, const std::string &key, const size_t &value)
YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240.
YUV color space with transparency.
YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255.
std::string getPixelFormatName(const AVPixelFormat pixelFormat)
const AVPixFmtDescriptor * _pixelDesc
Has link (no ownership)
void addProperty(PropertyVector &data, const std::string &key, T(PixelProperties::*getter)(void) const) const
AVPixelFormat _pixelFormat
const AVPixFmtDescriptor * getAVPixFmtDescriptor() const
AVPixelFormat getAVPixelFormat() const
const std::string propertyValueIfError