diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2022-12-05 22:32:46 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2022-12-10 00:52:33 +0100 |
commit | 7a8d78f7e358e5544395ba6084b83dfe18b4a84e (patch) | |
tree | f7a2dc66552f704b0ffdc647446f2f4f37e7b821 /libavcodec/avcodec.h | |
parent | 9651f873f8ce15c5d4380f49488900bbf6e6c731 (diff) |
lavc: add new unsafe_output hwaccel_flag
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3edd8e2636..0ac581d660 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2254,6 +2254,22 @@ typedef struct AVHWAccel { #define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2) /** + * 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. + */ +#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT (1 << 3) + +/** * @} */ |