diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-03-04 23:57:32 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-03-20 23:15:43 +0000 |
commit | 16a163b55a6558ed05702b91cc0777987295ef21 (patch) | |
tree | fd45b31534728365332561fce0ddfce9f169926c /libavcodec | |
parent | 62a1ef9f26c654a3e988aa465c4ac1d776c4c356 (diff) | |
download | ffmpeg-16a163b55a6558ed05702b91cc0777987295ef21.tar.gz |
lavc: Add hwaccel_flags field to AVCodecContext
This "reuses" the flags introduced for the av_vdpau_bind_context() API
function, and makes them available to all hwaccels. This does not affect
the current vdpau API, as av_vdpau_bind_context() should obviously
override the AVCodecContext.hwaccel_flags flags for the sake of
compatibility.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 9 | ||||
-rw-r--r-- | libavcodec/pthread_frame.c | 2 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 62a4fab8f9..1e2b13e0d7 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3186,6 +3186,15 @@ typedef struct AVCodecContext { * contexts used must be created on the same device. */ AVBufferRef *hw_device_ctx; + + /** + * Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated + * decoding (if active). + * - encoding: unused + * - decoding: Set by user (either before avcodec_open2(), or in the + * AVCodecContext.get_format callback) + */ + int hwaccel_flags; } AVCodecContext; /** diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index f3a74c0bd8..65a04d8e90 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -270,6 +270,8 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(ENOMEM); } } + + dst->hwaccel_flags = src->hwaccel_flags; } if (for_user) { diff --git a/libavcodec/version.h b/libavcodec/version.h index 443cc8204a..349b2e9f6a 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 36 +#define LIBAVCODEC_VERSION_MINOR 37 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |