diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-02-24 10:17:34 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-03-02 10:32:21 +0100 |
commit | ade7c1a2326e2bb9be5e60a48b9968eb1d16bfaf (patch) | |
tree | d901ba9065495d2aa62c379731737d8cdf172c66 /libavcodec/videotoolbox.h | |
parent | 227f6e1e8d4bd23734db9769bb52cc9896e253b5 (diff) | |
download | ffmpeg-ade7c1a2326e2bb9be5e60a48b9968eb1d16bfaf.tar.gz |
avcodec/videotoolbox: allow not setting the kCVPixelBufferPixelFormatTypeKey
If AVVideotoolboxContext.cv_pix_fmt_type is set to 0, don't set the
kCVPixelBufferPixelFormatTypeKey value on the VT decoder.
This makes VT output its native format, which can be much faster on
some hardware iterations (if the native format does not match with
the requested format, it will be converted, which is slow).
The default is still forcing nv12.
Diffstat (limited to 'libavcodec/videotoolbox.h')
-rw-r--r-- | libavcodec/videotoolbox.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/videotoolbox.h b/libavcodec/videotoolbox.h index a48638e2b2..af2db0d580 100644 --- a/libavcodec/videotoolbox.h +++ b/libavcodec/videotoolbox.h @@ -58,7 +58,8 @@ typedef struct AVVideotoolboxContext { /** * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames. - * set by the caller. + * set by the caller. If this is set to 0, then no specific format is + * requested from the decoder, and its native format is output. */ OSType cv_pix_fmt_type; |