From 43f0bc9d538c86ea75a5cd627a81452e9d76b825 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Fri, 8 Nov 2013 21:21:02 +0000 Subject: 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 --- libhb/decavcodec.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'libhb/decavcodec.c') 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) -- cgit v1.2.3