diff options
author | Linjie Fu <linjie.fu@intel.com> | 2019-10-08 21:41:02 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2019-10-09 11:27:34 +0800 |
commit | 5345965b3f088ad5acd5151bec421c97470675a4 (patch) | |
tree | 55e28c563f3f87cf4627ded67ec89f34a50f5e97 /libavcodec/qsv_internal.h | |
parent | 949a1b3e2f75338e17e446e97105e06ad6b4012a (diff) | |
download | ffmpeg-5345965b3f088ad5acd5151bec421c97470675a4.tar.gz |
lavc/qsvdec: Add GPU-accelerated memory copy support
GPU copy enables or disables GPU accelerated copying between video
and system memory. This may lead to a notable performance improvement.
Memory must be sequent and aligned with 128x64.
CMD:
ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv
-gpu_copy on -i input.h264 -f null -
or:
ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null -
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec/qsv_internal.h')
-rw-r--r-- | libavcodec/qsv_internal.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 8b44a9b6f4..37559270e5 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -127,16 +127,17 @@ enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct); int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs, - const char *load_plugins); + const char *load_plugins, int gpu_copy); int ff_qsv_close_internal_session(QSVSession *qs); int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, - AVBufferRef *device_ref, const char *load_plugins); + AVBufferRef *device_ref, const char *load_plugins, + int gpu_copy); int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *session, QSVFramesContext *qsv_frames_ctx, - const char *load_plugins, int opaque); + const char *load_plugins, int opaque, int gpu_copy); int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame); |