![]() |
Miam-Player
0.8.0
A nice music player
|
The VideoFormat class Describes the layout of video data. More...
#include <VideoFormat.h>
Public Member Functions | |
| VideoFormat (PixelFormat format=Format_Invalid) | |
| VideoFormat (int formatFF) | |
| VideoFormat (QImage::Format fmt) | |
| VideoFormat (const QString &name) | |
| VideoFormat (const VideoFormat &other) | |
| ~VideoFormat () | |
| VideoFormat & | operator= (const VideoFormat &other) |
| VideoFormat & | operator= (VideoFormat::PixelFormat pixfmt) |
| VideoFormat & | operator= (QImage::Format qpixfmt) |
| VideoFormat & | operator= (int ffpixfmt) |
| bool | operator== (const VideoFormat &other) const |
| bool | operator== (VideoFormat::PixelFormat pixfmt) const |
| bool | operator== (QImage::Format qpixfmt) const |
| bool | operator== (int ffpixfmt) const |
| bool | operator!= (const VideoFormat &other) const |
| bool | operator!= (VideoFormat::PixelFormat pixfmt) const |
| bool | operator!= (QImage::Format qpixfmt) const |
| bool | operator!= (int ffpixfmt) const |
| bool | isValid () const |
| PixelFormat | pixelFormat () const |
| int | pixelFormatFFmpeg () const |
| QImage::Format | imageFormat () const |
| QString | name () const |
| void | setPixelFormat (PixelFormat format) |
| setPixelFormat set pixel format to format. More... | |
| void | setPixelFormatFFmpeg (int format) |
| int | channels () const |
| channels More... | |
| int | channels (int plane) const |
| channels More... | |
| int | planeCount () const |
| planeCount More... | |
| int | bitsPerPixel () const |
| https://wiki.videolan.org/YUV bytesPerPixel() YUV420P: 1pix = 4Y+U+V, (4*8+8+8)/4 = 12 bytesPerPixel(plane) is different, for example uyvy422 bytesPerPixel(0) = 8+8+8 = 24, while bytesPerPixel() = (2*8+8+8)/2 = 16 More... | |
| int | bitsPerPixel (int plane) const |
| nv12: 16 for uv plane More... | |
| int | bitsPerPixelPadded () const |
| bgr24 is 24 not 32 More... | |
| int | bytesPerPixel () const |
| int | bytesPerPixel (int plane) const |
| int | bitsPerComponent () const |
| bitsPerComponent More... | |
| int | bytesPerLine (int width, int plane) const |
| int | chromaWidth (int lumaWidth) const |
| chromaWidth More... | |
| int | chromaHeight (int lumaHeight) const |
| int | width (int lumaWidth, int plane) const |
| width plane width for given lumaWidth in current format More... | |
| int | height (int lumaHeight, int plane) const |
| qreal | normalizedWidth (int plane) const |
| normalizedWidth More... | |
| qreal | normalizedHeight (int plane) const |
| bool | isBigEndian () const |
| bool | hasPalette () const |
| bool | isPseudoPaletted () const |
| bool | isBitStream () const |
| bool | isHWAccelerated () const |
| bool | isPlanar () const |
| isPlanar More... | |
| bool | isRGB () const |
| bool | hasAlpha () const |
Static Public Member Functions | |
| static PixelFormat | pixelFormatFromImageFormat (QImage::Format format) |
| static QImage::Format | imageFormatFromPixelFormat (PixelFormat format) |
| imageFormatFromPixelFormat If returns a negative value, the QImage format is the positive one but R/G components are swapped because no direct support by QImage. More... | |
| static PixelFormat | pixelFormatFromFFmpeg (int ff) |
| static int | pixelFormatToFFmpeg (PixelFormat fmt) |
| static QVector< int > | pixelFormatsFFmpeg () |
| static bool | isPlanar (PixelFormat pixfmt) |
| static bool | isRGB (PixelFormat pixfmt) |
| static bool | hasAlpha (PixelFormat pixfmt) |
The VideoFormat class Describes the layout of video data.
Some properties like display aspect ratio, color space and color range, which describes how to display the video frame, should be in VideoFrame class.
The PixelFormat enum 32 bit rgba format enum name indicates it's channel layout.
For example, Format_ARGB32 byte layout is AARRGGBB, it's integer value is 0xAARRGGBB on big endian platforms and 0xBBGGRRAA on little endian platforms Format_RGB32 and QImage::Format_ARGB32 are the same. TODO: 0RGB, XRGB, not native endia use R8 or R16. ffmpeg does not have native endian format currently 0rgb xrgb use rgba formats and check hasAlpha() is required
| QtAV::VideoFormat::VideoFormat | ( | PixelFormat | format = Format_Invalid | ) |
| QtAV::VideoFormat::VideoFormat | ( | int | formatFF | ) |
| QtAV::VideoFormat::VideoFormat | ( | QImage::Format | fmt | ) |
| QtAV::VideoFormat::VideoFormat | ( | const QString & | name | ) |
| QtAV::VideoFormat::VideoFormat | ( | const VideoFormat & | other | ) |
| QtAV::VideoFormat::~VideoFormat | ( | ) |
| int QtAV::VideoFormat::bitsPerComponent | ( | ) | const |
bitsPerComponent
| int QtAV::VideoFormat::bitsPerPixel | ( | ) | const |
https://wiki.videolan.org/YUV bytesPerPixel() YUV420P: 1pix = 4Y+U+V, (4*8+8+8)/4 = 12 bytesPerPixel(plane) is different, for example uyvy422 bytesPerPixel(0) = 8+8+8 = 24, while bytesPerPixel() = (2*8+8+8)/2 = 16
| int QtAV::VideoFormat::bitsPerPixel | ( | int | plane | ) | const |
nv12: 16 for uv plane
| int QtAV::VideoFormat::bitsPerPixelPadded | ( | ) | const |
bgr24 is 24 not 32
| int QtAV::VideoFormat::bytesPerLine | ( | int | width, |
| int | plane | ||
| ) | const |
| int QtAV::VideoFormat::bytesPerPixel | ( | ) | const |
| int QtAV::VideoFormat::bytesPerPixel | ( | int | plane | ) | const |
| int QtAV::VideoFormat::channels | ( | ) | const |
channels
| int QtAV::VideoFormat::channels | ( | int | plane | ) | const |
channels
| plane |
| int QtAV::VideoFormat::chromaHeight | ( | int | lumaHeight | ) | const |
| int QtAV::VideoFormat::chromaWidth | ( | int | lumaWidth | ) | const |
chromaWidth
| lumaWidth |
| bool QtAV::VideoFormat::hasAlpha | ( | ) | const |
|
static |
| bool QtAV::VideoFormat::hasPalette | ( | ) | const |
| int QtAV::VideoFormat::height | ( | int | lumaHeight, |
| int | plane | ||
| ) | const |
| QImage::Format QtAV::VideoFormat::imageFormat | ( | ) | const |
|
static |
imageFormatFromPixelFormat If returns a negative value, the QImage format is the positive one but R/G components are swapped because no direct support by QImage.
QImage can swap R/G very fast.
| bool QtAV::VideoFormat::isBigEndian | ( | ) | const |
| bool QtAV::VideoFormat::isBitStream | ( | ) | const |
All values of a component are bit-wise packed end to end.
| bool QtAV::VideoFormat::isHWAccelerated | ( | ) | const |
Pixel format is an HW accelerated format.
| bool QtAV::VideoFormat::isPlanar | ( | ) | const |
isPlanar
Semi-planar: 2 planes instead of 3, one plane for luminance, and one plane for both chrominance components. They are also sometimes referred to as biplanar formats also Packed: 1 plane Planar: 1 plane for each component (channel)
|
static |
| bool QtAV::VideoFormat::isPseudoPaletted | ( | ) | const |
| bool QtAV::VideoFormat::isRGB | ( | ) | const |
|
static |
| bool QtAV::VideoFormat::isValid | ( | ) | const |
| QString QtAV::VideoFormat::name | ( | ) | const |
| qreal QtAV::VideoFormat::normalizedHeight | ( | int | plane | ) | const |
| qreal QtAV::VideoFormat::normalizedWidth | ( | int | plane | ) | const |
normalizedWidth
| bool QtAV::VideoFormat::operator!= | ( | const VideoFormat & | other | ) | const |
| bool QtAV::VideoFormat::operator!= | ( | VideoFormat::PixelFormat | pixfmt | ) | const |
| bool QtAV::VideoFormat::operator!= | ( | QImage::Format | qpixfmt | ) | const |
| bool QtAV::VideoFormat::operator!= | ( | int | ffpixfmt | ) | const |
| VideoFormat& QtAV::VideoFormat::operator= | ( | const VideoFormat & | other | ) |
| VideoFormat& QtAV::VideoFormat::operator= | ( | VideoFormat::PixelFormat | pixfmt | ) |
| VideoFormat& QtAV::VideoFormat::operator= | ( | QImage::Format | qpixfmt | ) |
| VideoFormat& QtAV::VideoFormat::operator= | ( | int | ffpixfmt | ) |
| bool QtAV::VideoFormat::operator== | ( | const VideoFormat & | other | ) | const |
| bool QtAV::VideoFormat::operator== | ( | VideoFormat::PixelFormat | pixfmt | ) | const |
| bool QtAV::VideoFormat::operator== | ( | QImage::Format | qpixfmt | ) | const |
| bool QtAV::VideoFormat::operator== | ( | int | ffpixfmt | ) | const |
| PixelFormat QtAV::VideoFormat::pixelFormat | ( | ) | const |
| int QtAV::VideoFormat::pixelFormatFFmpeg | ( | ) | const |
|
static |
|
static |
|
static |
|
static |
| int QtAV::VideoFormat::planeCount | ( | ) | const |
planeCount
| void QtAV::VideoFormat::setPixelFormat | ( | PixelFormat | format | ) |
setPixelFormat set pixel format to format.
other information like bpp will be updated
| format |
| void QtAV::VideoFormat::setPixelFormatFFmpeg | ( | int | format | ) |
| int QtAV::VideoFormat::width | ( | int | lumaWidth, |
| int | plane | ||
| ) | const |
width plane width for given lumaWidth in current format