FFmpeg
Data Structures | Macros

Data Structures

struct  AVHWAccel
 

Macros

#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL   0x0200
 HWAccel is experimental and is thus avoided in favor of non experimental codecs. More...
 
#define AV_HWACCEL_FLAG_IGNORE_LEVEL   (1 << 0)
 Hardware acceleration should be used for decoding even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver. More...
 
#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH   (1 << 1)
 Hardware acceleration can output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component. More...
 
#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH   (1 << 2)
 Hardware acceleration should still be attempted for decoding when the codec profile does not match the reported capabilities of the hardware. More...
 
#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT   (1 << 3)
 Some hardware decoders (namely nvdec) can either output direct decoder surfaces, or make an on-device copy and return said copy. More...
 

Detailed Description

Note
Nothing in this structure should be accessed by the user. At some point in future it will not be externally visible at all.

Macro Definition Documentation

◆ AV_HWACCEL_CODEC_CAP_EXPERIMENTAL

#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL   0x0200

HWAccel is experimental and is thus avoided in favor of non experimental codecs.

Definition at line 2230 of file avcodec.h.

◆ AV_HWACCEL_FLAG_IGNORE_LEVEL

#define AV_HWACCEL_FLAG_IGNORE_LEVEL   (1 << 0)

Hardware acceleration should be used for decoding even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver.

It's generally a good idea to pass this flag unless you have a specific reason not to, as hardware tends to under-report supported levels.

Definition at line 2240 of file avcodec.h.

◆ AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH

#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH   (1 << 1)

Hardware acceleration can output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component.

Definition at line 2246 of file avcodec.h.

◆ AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH

#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH   (1 << 2)

Hardware acceleration should still be attempted for decoding when the codec profile does not match the reported capabilities of the hardware.

For example, this can be used to try to decode baseline profile H.264 streams in hardware - it will often succeed, because many streams marked as baseline profile actually conform to constrained baseline profile.

Warning
If the stream is actually not supported then the behaviour is undefined, and may include returning entirely incorrect output while indicating success.

Definition at line 2260 of file avcodec.h.

◆ AV_HWACCEL_FLAG_UNSAFE_OUTPUT

#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT   (1 << 3)

Some hardware decoders (namely nvdec) can either output direct decoder surfaces, or make an on-device copy and return said copy.

There is a hard limit on how many decoder surfaces there can be, and it cannot be accurately guessed ahead of time. For some processing chains, this can be okay, but others will run into the limit and in turn produce very confusing errors that require fine tuning of more or less obscure options by the user, or in extreme cases cannot be resolved at all without inserting an avfilter that forces a copy.

Thus, the hwaccel will by default make a copy for safety and resilience. If a users really wants to minimize the amount of copies, they can set this flag and ensure their processing chain does not exhaust the surface pool.

Definition at line 2276 of file avcodec.h.