summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-11-08 21:21:02 +0000
committerRodeo <[email protected]>2013-11-08 21:21:02 +0000
commit43f0bc9d538c86ea75a5cd627a81452e9d76b825 (patch)
treea6bde5c2174543e4ea282ab26b6a2c76829105eb /libhb/decavcodec.c
parentd0a2953efbce340e34a971b9481024a51ae52383 (diff)
OpenCL: use the new library loading architecture for all OpenCL code.
An OpenCL SDK is no longer needed to build OpenCL support. Note: as a result, the --enable-opencl configure option is removed. Also, libOpenCL is no longer needed to run the application (it is still necessary to use OpenCL features, of course). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5886 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 0ade0da27..c961bd719 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -43,6 +43,7 @@
#include "audio_resample.h"
#ifdef USE_HWD
+#include "opencl.h"
#include "vadxva2.h"
#endif
@@ -393,19 +394,19 @@ static void closePrivData( hb_work_private_t ** ppv )
hb_audio_resample_free(pv->resample);
#ifdef USE_HWD
- if ( pv->opencl_scale )
+ if (pv->opencl_scale != NULL)
{
- free( pv->opencl_scale );
+ free(pv->opencl_scale);
}
-
- if ( pv->dxva2 )
+ if (pv->dxva2 != NULL)
{
-#ifdef USE_OPENCL
- CL_FREE( pv->dxva2->cl_mem_nv12 );
-#endif
- hb_va_close( pv->dxva2 );
+ if (hb_ocl != NULL)
+ {
+ HB_OCL_BUF_FREE(hb_ocl, pv->dxva2->cl_mem_nv12);
+ }
+ hb_va_close(pv->dxva2);
}
-#endif
+#endif
#ifdef USE_QSV_PTS_WORKAROUND
if (pv->qsv.decode && pv->qsv.pts_list != NULL)