diff options
author | Tim Walker <[email protected]> | 2016-09-11 02:45:52 +0200 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-12-17 07:28:51 -0800 |
commit | cf54e93d660a4f59b8a0bc3882b7726b8aebb84b (patch) | |
tree | 1bf0a0bd486f8dfecf74e9bf0e481af854a2017c /libhb/qsv_common.c | |
parent | 4eff4e28b333d71495365741fe55b8db45b446a9 (diff) |
decavcodec: enable QSV-accelerated H.264 decoding with libavcodec.
Videos get decoded to NV12 in system memory and converted to our
internal colorspace via libswscale. It should be noted that QSV-
accelerated decoding now works with all our videos encoders :-)
Diffstat (limited to 'libhb/qsv_common.c')
-rw-r--r-- | libhb/qsv_common.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index 2c2d827c6..3c4a8441c 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -905,6 +905,12 @@ const char* hb_qsv_decode_get_codec_name(enum AVCodecID codec_id) case AV_CODEC_ID_H264: return "h264_qsv"; + case AV_CODEC_ID_HEVC: + return "hevc_qsv"; + + case AV_CODEC_ID_MPEG2VIDEO: + return "mpeg2_qsv"; + default: return NULL; } @@ -912,17 +918,8 @@ const char* hb_qsv_decode_get_codec_name(enum AVCodecID codec_id) int hb_qsv_decode_is_enabled(hb_job_t *job) { - /* - * XXX: we haven't yet adjusted our QSV decoder wrapper to use libav's new - * QSV-accelerated decoder, and our old custom QSV-accelerated decoder - * for libav hasn't been updated to work with newer libav releases, so - * we can't use QSV-accelerated decoding at all for the time being. - * - * return ((job != NULL && job->qsv.decode) && - * (job->vcodec & HB_VCODEC_QSV_MASK) && - * (job->title->video_decode_support & HB_DECODE_SUPPORT_QSV)); - */ - return 0; + return ((job != NULL && job->qsv.decode) && + (job->title->video_decode_support & HB_DECODE_SUPPORT_QSV)); } int hb_qsv_copyframe_is_slow(int encoder) |