|
HVD
HVD Hardware Video Decoder library
|
Decoder configuration. More...
#include <hvd.h>
Data Fields | |
| const char * | hardware |
| hardware type for decoding, e.g. "vaapi" | |
| const char * | codec |
| codec name, e.g. "h264", "vp8" | |
| const char * | device |
| NULL / "" or device, e.g. "/dev/dri/renderD128". | |
| const char * | pixel_format |
| NULL / "" for default or format, e.g. "rgb0", "bgr0", "nv12", "yuv420p". | |
| int | width |
| 0 to not specify, needed by some codecs | |
| int | height |
| 0 to not specify, needed by some codecs | |
| int | profile |
| 0 to leave as FF_PROFILE_UNKNOWN or profile e.g. FF_PROFILE_HEVC_MAIN, ... | |
Decoder configuration.
The hardware can be one of:
The device can be:
The codec (should be supported by your hardware):
The pixel_format is format you want to receive data in. Only hardware conversions are supported. If you select something unsupported by hardware, the library will dump for you list of supported pixel formats to standard error. From my experience even those reported are not supported in all scenarios.
Typical examples:
For pixel format explanation see: FFmpeg pixel formats
You typically don't have to specify width, height and profile (leave as 0) but some codecs need this information.
For width and height the decoder may overwrite your values while parsing the data. It is not safe to assume that width/height of decoded frame matches what you supplied.
For possible profiles see: FFmpeg profiles
For H.264 profile can typically be:
For HEVC profile can typically be: