From 66009cb19c3ba6b6a27fc4bcbf1373cb90307a80 Mon Sep 17 00:00:00 2001 From: maxd Date: Fri, 11 Oct 2013 15:29:29 +0000 Subject: HW: fix for compile and runtime behavior and support of the features/RB601 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5833 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/cropscale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libhb/cropscale.c') diff --git a/libhb/cropscale.c b/libhb/cropscale.c index c7d7d9948..66aec7f27 100644 --- a/libhb/cropscale.c +++ b/libhb/cropscale.c @@ -74,7 +74,7 @@ static int hb_crop_scale_init( hb_filter_object_t * filter, pv->use_decomb = init->job->use_decomb; pv->use_detelecine = init->job->use_detelecine; - if( pv->job->use_opencl ) + if( pv->job->use_opencl && pv->job->title->opencl_support) { pv->os = ( hb_oclscale_t * )malloc( sizeof( hb_oclscale_t ) ); memset( pv->os, 0, sizeof( hb_oclscale_t ) ); @@ -138,7 +138,7 @@ static void hb_crop_scale_close( hb_filter_object_t * filter ) } #ifdef USE_OPENCL - if( pv->job->use_opencl && pv->os ) + if( pv->job->use_opencl && pv->job->title->opencl_support && pv->os ) { CL_FREE( pv->os->bicubic_x_weights ); CL_FREE( pv->os->bicubic_y_weights ); @@ -191,7 +191,7 @@ static hb_buffer_t* crop_scale( hb_filter_private_t * pv, hb_buffer_t * in ) #ifdef USE_OPENCL // Use bicubic OpenCL scaling when selected and when downsampling < 4:1; - if ((pv->job->use_opencl) && (pv->width_out * 4 > pv->width_in) && (in->cl.buffer != NULL) && (out->cl.buffer != NULL)) + if ((pv->job->use_opencl && pv->job->title->opencl_support) && (pv->width_out * 4 > pv->width_in) && (in->cl.buffer != NULL) && (out->cl.buffer != NULL)) { hb_ocl_scale(in, out, pv->crop, pv->os); } -- cgit v1.2.3