qsvdec: list supported pixel formats
authorAnton Khirnov <anton@khirnov.net>
Tue, 21 Jul 2015 07:45:05 +0000 (09:45 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Sep 2015 13:42:46 +0000 (15:42 +0200)
This is useful for detecting QSV-enabled decoders.

libavcodec/qsvdec_h2645.c
libavcodec/qsvdec_mpeg2.c

index ec34a18..52e22ee 100644 (file)
@@ -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
index 98318bd..3378d02 100644 (file)
@@ -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 },
 };