diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-07-21 09:45:05 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-09-28 15:42:46 +0200 |
commit | 741b352b16dad74b87c4a39bade8902633a2b0e6 (patch) | |
tree | da9200590c6ccb10176394d2b5228df7242fd63d | |
parent | ae25413daf42a06f078ed81bb545ec23a8e0b482 (diff) | |
download | ffmpeg-741b352b16dad74b87c4a39bade8902633a2b0e6.tar.gz |
qsvdec: list supported pixel formats
This is useful for detecting QSV-enabled decoders.
-rw-r--r-- | libavcodec/qsvdec_h2645.c | 6 | ||||
-rw-r--r-- | libavcodec/qsvdec_mpeg2.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c index ec34a18fcc..52e22eec68 100644 --- a/libavcodec/qsvdec_h2645.c +++ b/libavcodec/qsvdec_h2645.c @@ -243,6 +243,9 @@ AVCodec ff_hevc_qsv_decoder = { .close = qsv_decode_close, .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .priv_class = &hevc_class, + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, + AV_PIX_FMT_QSV, + AV_PIX_FMT_NONE }, }; #endif @@ -278,5 +281,8 @@ AVCodec ff_h264_qsv_decoder = { .close = qsv_decode_close, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, .priv_class = &class, + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, + AV_PIX_FMT_QSV, + AV_PIX_FMT_NONE }, }; #endif diff --git a/libavcodec/qsvdec_mpeg2.c b/libavcodec/qsvdec_mpeg2.c index 98318bd87a..3378d02a23 100644 --- a/libavcodec/qsvdec_mpeg2.c +++ b/libavcodec/qsvdec_mpeg2.c @@ -175,4 +175,7 @@ AVCodec ff_mpeg2_qsv_decoder = { .close = qsv_decode_close, .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .priv_class = &class, + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, + AV_PIX_FMT_QSV, + AV_PIX_FMT_NONE }, }; |