diff options
author | Rodeo <[email protected]> | 2015-06-23 17:09:34 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2015-06-23 17:09:34 +0000 |
commit | a14dcbd980fc7e75f4a66003808d306e11c609aa (patch) | |
tree | 3fc5065c86569b71602fc7dee39dcbc0c8bf4c6a /libhb/decavcodec.c | |
parent | 110c304ff2113e5852a35174a7d51ffe5297483b (diff) |
DXVA2: cleanup decode support checks.
This should fix https://forum.handbrake.fr/viewtopic.php?f=11&t=32520
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7310 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index bdca1e180..f81205ada 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1669,8 +1669,7 @@ static int decavcodecvInit( hb_work_object_t * w, hb_job_t * job ) pv->context->error_concealment = FF_EC_GUESS_MVS|FF_EC_DEBLOCK; #ifdef USE_HWD // QSV decoding is faster, so prefer it to DXVA2 - if (pv->job != NULL && !pv->qsv.decode && pv->job->use_hwd && - hb_use_dxva(pv->title)) + if (pv->job != NULL && !pv->qsv.decode && hb_hwd_enabled(pv->job->h)) { pv->dxva2 = hb_va_create_dxva2( pv->dxva2, w->codec_param ); if( pv->dxva2 && pv->dxva2->do_job == HB_WORK_OK ) @@ -1685,6 +1684,10 @@ static int decavcodecvInit( hb_work_object_t * w, hb_job_t * job ) memset( pv->opencl_scale, 0, sizeof( hb_oclscale_t ) ); pv->threads = 1; } + else + { + hb_log("decavcodecvInit: hb_va_create_dxva2 failed, using software decoder"); + } } #endif @@ -2123,6 +2126,17 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) default: break; } +#ifdef USE_HWD + hb_va_dxva2_t *dxva2 = hb_va_create_dxva2(NULL, pv->context->codec_id); + if (dxva2 != NULL) + { + if (hb_check_hwd_fmt(pv->context->pix_fmt)) + { + info->video_decode_support |= HB_DECODE_SUPPORT_DXVA2; + } + hb_va_close(dxva2); + } +#endif return 1; } |