summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2015-06-23 17:09:34 +0000
committerRodeo <[email protected]>2015-06-23 17:09:34 +0000
commita14dcbd980fc7e75f4a66003808d306e11c609aa (patch)
tree3fc5065c86569b71602fc7dee39dcbc0c8bf4c6a /libhb/work.c
parent110c304ff2113e5852a35174a7d51ffe5297483b (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/work.c')
-rw-r--r--libhb/work.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 2ac218d27..3d158862b 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -301,6 +301,13 @@ void hb_display_job_info(hb_job_t *job)
}
else
#endif
+#ifdef USE_HWD
+ if (hb_hwd_enabled(job->h))
+ {
+ hb_log(" + decoder: %s (dxva2)", title->video_codec_name);
+ }
+ else
+#endif
{
hb_log(" + decoder: %s", title->video_codec_name);
}
@@ -909,6 +916,23 @@ static void do_job(hb_job_t *job)
}
#endif
+#ifdef USE_HWD
+ /*
+ * Check support for and enable DXVA2-accelerated when applicable; we need:
+ * - a compatible input bitstream (HB_DECODE_SUPPORT_DXVA2)
+ * - DXVA2-accelerated decoding enabled (job->use_hwd)
+ * - an AVFormatContext (title->opaque_priv) for now
+ */
+ if (title->video_decode_support & HB_DECODE_SUPPORT_DXVA2)
+ {
+ hb_hwd_set_enable(job->h, job->use_hwd && title->opaque_priv != NULL);
+ }
+ else
+#endif
+ {
+ hb_hwd_set_enable(job->h, 0);
+ }
+
// Filters have an effect on settings.
// So initialize the filters and update the job.
if( job->list_filter && hb_list_count( job->list_filter ) )
@@ -920,9 +944,6 @@ static void do_job(hb_job_t *job)
init.geometry.width = title->geometry.width;
init.geometry.height = title->geometry.height;
- /* DXVA2 */
- init.use_dxva = hb_use_dxva(title);
-
init.geometry.par = job->par;
memcpy(init.crop, title->crop, sizeof(int[4]));
init.vrate = title->vrate;