[FFmpeg-devel] [PATCH 1/3] hevc: support Main10 decoding through dxva2
Hendrik Leppkes
h.leppkes at gmail.com
Thu Jan 28 12:58:25 CET 2016
---
libavcodec/hevc.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index c245d3b..5677f0f 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -346,7 +346,9 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
export_stream_params(s->avctx, &s->ps, sps);
- if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) {
+ switch (sps->pix_fmt) {
+ case AV_PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUVJ420P:
#if CONFIG_HEVC_DXVA2_HWACCEL
*fmt++ = AV_PIX_FMT_DXVA2_VLD;
#endif
@@ -359,6 +361,15 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
#if CONFIG_HEVC_VDPAU_HWACCEL
*fmt++ = AV_PIX_FMT_VDPAU;
#endif
+ break;
+ case AV_PIX_FMT_YUV420P10:
+#if CONFIG_HEVC_DXVA2_HWACCEL
+ *fmt++ = AV_PIX_FMT_DXVA2_VLD;
+#endif
+#if CONFIG_HEVC_D3D11VA_HWACCEL
+ *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
+#endif
+ break;
}
if (pix_fmt == AV_PIX_FMT_NONE) {
--
2.6.2.windows.1
More information about the ffmpeg-devel
mailing list