--disable-avfilter \
--disable-muxers \
--disable-network \
- --disable-vaapi \
+ --disable-hwaccels \
+ --disable-encoders \
--enable-dxva2 \
+ --enable-hwaccel=h264_dxva2 \
+ --enable-hwaccel=mpeg2_dxva2 \
+ --enable-hwaccel=vc1_dxva2 \
+ --enable-hwaccel=wmv3_dxva2 \
--enable-encoder=aac \
--enable-encoder=ac3 \
--enable-encoder=flac \
{
.id = HB_FILTER_CROP_SCALE_ACCL,
.enforce_order = 1,
- .name = "Hardware Acceleration Crop and Scale",
+ .name = "Custom Crop and Scale",
.settings = NULL,
.init = hb_crop_scale_init,
.work = hb_crop_scale_work,
{
hb_buffer_t *buf;
int ww, hh;
- if( (w > pv->job->width || h > pv->job->height) )
+ if( (w > pv->job->width || h > pv->job->height) && (hb_get_gui_info(&hb_gui, 2) == 1) )
{
buf = hb_video_buffer_init( pv->job->width, pv->job->height );
ww = pv->job->width;
NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: hb_binary_generated: Get context info failed\n" );\r
+ hb_log( "Notice: Get context info failed\n" );\r
return 0;\r
}\r
\r
devices = (cl_device_id*)malloc( sizeof(cl_device_id) * numDevices );\r
if( devices == NULL )\r
{\r
- hb_log( "hb_binary_generated: No device found\n" );\r
+ hb_log( "Notice: No device found\n" );\r
return 0;\r
}\r
\r
NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: Get program info failed\n" );\r
+ hb_log( "Notice: Get program info failed, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
devices = (cl_device_id*)malloc( sizeof(cl_device_id) * numDevices );\r
if( devices == NULL )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: No device found\n" );\r
+ hb_log( "Notice: No device found, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
/* grab the handles to all of the devices in the program. */\r
NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: Get program info failed\n" );\r
+ hb_log( "Notice: Get program info failed, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
/* figure out the sizes of each of the binaries. */\r
binarySizes, NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: Get program info failed\n" );\r
+ hb_log( "Notice: Get program info failed, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
/* copy over all of the generated binaries. */\r
binaries = (char**)malloc( sizeof(char *) * numDevices );\r
if( binaries == NULL )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: malloc for binaries failed\n" );\r
+ hb_log( "Notice: malloc for binaries failed, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
\r
binaries[i] = (char*)malloc( sizeof(char) * binarySizes[i] );\r
if( binaries[i] == NULL )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: malloc for binary[%d] failed\n", i );\r
+ hb_log( "Notice: malloc for binary[%d] failed, when generate binary file from kernel source\n", i );\r
return 0;\r
}\r
}\r
NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: Get program info failed\n" );\r
+ hb_log( "Notice: Get program info failed, when generate binary file from kernel source\n" );\r
return 0;\r
}\r
/* dump out each binary into its own separate file. */\r
\r
if( !hb_write_binary_to_file( fileName, binaries[i], binarySizes[i] ))\r
{\r
- hb_log( "ERROR: hb_generat_bin_from_kernel_source: write binary[%s] failed\n", fileName );\r
+ hb_log( "Notice: Unable to write opencl kernel, writing to tempory directory instead." );\r
//printf( "opencl-wrapper: write binary[%s] failds\n", fileName);\r
return 0;\r
} //else\r
status = clGetPlatformIDs( 0, NULL, &numPlatforms );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: OpenCL device platform not found.\n" );\r
+ hb_log( "Notice: OpenCL device platform not found.\n" );\r
return(1);\r
}\r
gpu_info->platform = NULL;\r
\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: Specific opencl platform not found.\n" );\r
+ hb_log( "Notice: Specific opencl platform not found.\n" );\r
return(1);\r
}\r
\r
\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: No more platform vendor info.\n" );\r
+ hb_log( "Notice: No more platform vendor info.\n" );\r
return(1);\r
}\r
gpu_info->platform = platforms[i];\r
\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: No available GPU device.\n" );\r
+ hb_log( "Notice: No available GPU device.\n" );\r
return(1);\r
}\r
\r
}\r
if((gpu_info->context == (cl_context)NULL) || (status != CL_SUCCESS))\r
{\r
- hb_log( "ERROR: Create opencl context error.\n" );\r
+ hb_log( "Notice: Unable to create opencl context.\n" );\r
return(1);\r
}\r
/* Detect OpenCL devices. */\r
0, NULL, &length );\r
if((status != CL_SUCCESS) || (length == 0))\r
{\r
- hb_log( "ERROR: Get the list of devices in context error.\n" );\r
+ hb_log( "Notice: Unable to get the list of devices in context.\n" );\r
return(1);\r
}\r
/* Now allocate memory for device list based on the size we got earlier */\r
gpu_info->devices, NULL );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: Get the device list data in context error.\n" );\r
+ hb_log( "Notice: Unable to get the device list data in context.\n" );\r
return(1);\r
}\r
\r
0, &status );\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: Create opencl command queue error.\n" );\r
+ hb_log( "Notice: Unable to create opencl command queue.\n" );\r
return(1);\r
}\r
}\r
&numDevices,\r
NULL );\r
if( status != CL_SUCCESS ){\r
- hb_log( "ERROR: Get the number of devices in context error.\n" );\r
+ hb_log( "Notice: Unable to get the number of devices in context.\n" );\r
return 0;\r
}\r
\r
}\r
\r
if((gpu_info->programs[idx] == (cl_program)NULL) || (status != CL_SUCCESS)){\r
- hb_log( "ERROR: Get list of devices in context error.\n" );\r
+ hb_log( "Notice: Unable to get list of devices in context.\n" );\r
return(0);\r
}\r
\r
\r
if( status != CL_SUCCESS )\r
{\r
- hb_log( "ERROR: Get GPU build information error.\n" );\r
+ hb_log( "Notice: Unable to get GPU build information.\n" );\r
return(0);\r
}\r
buildLog = (char*)malloc( length );\r
if ( fread(buf, 1, sizeof(buf), stream->file_handle) == sizeof(buf) )
{
+#ifdef USE_OPENCL
if ( hb_get_gui_info(&hb_gui, 1) || (hb_get_gui_info(&hb_gui, 3) == 0) )
return 0;
+#endif
int psize;
if ( ( psize = hb_stream_check_for_ts(buf) ) != 0 )
{
{
hb_log( "transport stream missing PCRs - using video DTS instead" );
}
- if ( hb_get_gui_info(&hb_gui, 3) == 0 )
- {
- hb_va_dxva2_t * dxva2 = NULL;
- dxva2 = hb_va_create_dxva2( dxva2, title->video_codec_param );
- if (dxva2)
- {
- title->uvd_support = 1;
- hb_va_close(dxva2);
- dxva2 = NULL;
- }
- else
- title->uvd_support = 0;
#ifdef USE_OPENCL
- title->opencl_support = TestGPU();
+ hb_va_dxva2_t * dxva2 = NULL;
+ dxva2 = hb_va_create_dxva2( dxva2, title->video_codec_param );
+ if (dxva2)
+ {
+ title->uvd_support = 1;
+ hb_va_close(dxva2);
+ dxva2 = NULL;
+ }
+ else
+ title->uvd_support = 0;
+ if (TestGPU() == 0)
+ title->opencl_support = 1;
+ else
+ title->opencl_support = 0;
#else
- title->opencl_support = 1;
+ title->uvd_support = 0;
+ title->opencl_support = 0;
#endif
- }
// Height, width, rate and aspect ratio information is filled in
// when the previews are built
return title;
hb_list_add( title->list_chapter, chapter );
}
- if ( hb_get_gui_info(&hb_gui, 3) == 0 )
- {
- hb_va_dxva2_t * dxva2 = NULL;
- dxva2 = hb_va_create_dxva2( dxva2, title->video_codec_param );
- if (dxva2)
- {
- title->uvd_support = 1;
- hb_va_close(dxva2);
- dxva2 = NULL;
- }
- else
- title->uvd_support = 0;
#ifdef USE_OPENCL
- title->opencl_support = TestGPU();
+ hb_va_dxva2_t * dxva2 = NULL;
+ dxva2 = hb_va_create_dxva2( dxva2, title->video_codec_param );
+ if (dxva2)
+ {
+ title->uvd_support = 1;
+ hb_va_close(dxva2);
+ dxva2 = NULL;
+ }
+ else
+ title->uvd_support = 0;
+ if (TestGPU() == 0)
+ title->opencl_support = 1;
+ else
+ title->opencl_support = 0;
#else
- title->opencl_support = 1;
+ title->uvd_support = 0;
+ title->opencl_support = 0;
#endif
- }
+
return title;
}
hb_log( "dxva2:cannot load function\n" );
return HB_WORK_ERROR;
}
- hb_log( "dxva2:OurDirect3DCreateDeviceManager9 Success!\n" );
+ //hb_log( "dxva2:OurDirect3DCreateDeviceManager9 Success!\n" );
UINT token;
IDirect3DDeviceManager9 *devmng;
}
dxva2->token = token;
dxva2->devmng = devmng;
- hb_log( "dxva2:obtained IDirect3DDeviceManager9\n" );
+ //hb_log( "dxva2:obtained IDirect3DDeviceManager9\n" );
long hr = IDirect3DDeviceManager9_ResetDevice( devmng, dxva2->d3ddev, token );
if( FAILED( hr ))
hb_log( "dxva2:cannot load function\n" );
return HB_WORK_ERROR;
}
- hb_log( "dxva2:DXVA2CreateVideoService Success!\n" );
+ //hb_log( "dxva2:DXVA2CreateVideoService Success!\n" );
HRESULT hr;
const hb_dx_mode_t *mode = hb_dx_find_mode( g );
if( mode )
{
- hb_log( "dxva2:'%s' is supported by hardware\n", mode->name );
+ //hb_log( "dxva2:'%s' is supported by hardware\n", mode->name );
}
else
{
if( !is_suported )
continue;
- hb_log( "dxva2: Trying to use '%s' as input\n", mode->name );
+ //hb_log( "dxva2: Trying to use '%s' as input\n", mode->name );
unsigned int output_count = 0;
D3DFORMAT *output_list = NULL;
if( FAILED( IDirectXVideoDecoderService_GetDecoderRenderTargets( dxva2->vs, mode->guid, &output_count, &output_list )))
const hb_d3d_format_t *format = hb_d3d_find_format( f );
if( format )
{
- hb_log( "dxva2:%s is supported for output\n", format->name );
+ //hb_log( "dxva2:%s is supported for output\n", format->name );
}
else
{
}
if( !is_suported )
continue;
- hb_log( "dxva2:Using '%s' to decode to '%s'\n", mode->name, format->name );
+ //hb_log( "dxva2:Using '%s' to decode to '%s'\n", mode->name, format->name );
*input = *mode->guid;
*output = format->format;
return HB_WORK_OK;
lock.Pitch,
};
#ifdef USE_OPENCL
- if( ( dxva2->width > job_w || dxva2->height > job_h ) && (TestGPU() == 0) )
+ if( ( dxva2->width > job_w || dxva2->height > job_h ) && (TestGPU() == 0) && (hb_get_gui_info(&hb_gui, 2) == 1))
{
/* int i;
uint8_t *tmp = (uint8_t*)malloc( dxva2->width*dxva2->height*3/2 );
goto error;
}
- hb_log( "dxva2:hb_d3d_create_device succeed" );
+ //hb_log( "dxva2:hb_d3d_create_device succeed" );
if( hb_d3d_create_device_manager( dxva )== HB_WORK_ERROR )
{
hb_log( "dxva2:D3dCreateDeviceManager failed" );
hb_log( "starting job" );
#ifdef USE_OPENCL
- if ( job->use_opencl )
+ if ( job->use_opencl || job->use_uvd)
{
/* init opencl environment */
hb_log( "Using GPU : Yes.\n" );
}
#endif
#ifdef USE_OPENCL
- if ( job->use_opencl && hb_use_dxva( title ) && (TestGPU() == 0) && job->use_uvd )
+ if ( /*job->use_opencl &&*/ hb_use_dxva( title ) && (TestGPU() == 0) && job->use_uvd )
{
vcodec = WORK_DECAVCODECVACCL;
}
(float) title->rate / title->rate_base );
fprintf( stderr, " + autocrop: %d/%d/%d/%d\n", title->crop[0],
title->crop[1], title->crop[2], title->crop[3] );
-
- fprintf( stderr, " + support opencl: %d \n", title->opencl_support);
- fprintf( stderr, " + support uvd: %d\n", title->uvd_support);
-
+ if (title->opencl_support)
+ fprintf( stderr, " + support opencl: yes\n");
+ else
+ fprintf( stderr, " + support opencl: no\n");
+ if (title->uvd_support)
+ fprintf( stderr, " + support uvd: yes\n");
+ else
+ fprintf( stderr, " + support uvd: no\n");
fprintf( stderr, " + chapters:\n" );
for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
{
{\r
var thisTitle = new Title();\r
string nextLine = output.ReadLine();\r
+ string temp;\r
\r
// Get the Title Number\r
Match m = Regex.Match(nextLine, @"^\+ title ([0-9]*):");\r
};\r
}\r
\r
- m = Regex.Match(output.ReadLine(), @"^ \+ support opencl: ([0-9]*)");\r
+ nextLine = output.ReadLine();\r
+ m = Regex.Match(nextLine, @"^ \+ support opencl:");\r
if (m.Success)\r
- thisTitle.OpenCLSupport = int.Parse(m.Groups[1].Value.Trim());\r
- m = Regex.Match(output.ReadLine(), @" \+ support uvd: ([0-9]*)");\r
+ {\r
+ temp = nextLine.Replace("+ support opencl:", string.Empty).Trim();\r
+ if (string.Compare(temp, "yes") == 0)\r
+ thisTitle.OpenCLSupport = 1;\r
+ else\r
+ thisTitle.OpenCLSupport = 0;\r
+ }\r
+\r
+ nextLine = output.ReadLine();\r
+ m = Regex.Match(nextLine, @"^ \+ support uvd:");\r
if (m.Success)\r
- thisTitle.UVDSupport = int.Parse(m.Groups[1].Value.Trim());\r
+ {\r
+ temp = nextLine.Replace("+ support uvd:", string.Empty).Trim();\r
+ if (string.Compare(temp, "yes") == 0)\r
+ thisTitle.UVDSupport = 1;\r
+ else\r
+ thisTitle.UVDSupport = 0;\r
+ }\r
thisTitle.Chapters.AddRange(Chapter.ParseList(output));\r
\r
thisTitle.AudioTracks.AddRange(AudioHelper.ParseList(output));\r
\r
if (task.OpenCLSupport)\r
query += " -P ";\r
- if (task.UVDSupport && task.OpenCLSupport)\r
+\r
+ if (task.UVDSupport)\r
query += " -U ";\r
- else if (task.UVDSupport && !task.OpenCLSupport)\r
- query += " -P -U";\r
+\r
return query;\r
}\r
\r
{\r
if (this.selectedTitle.OpenCLSupport == 0)\r
{\r
- this.SupportOpenCL = false;\r
+ this.SupportOpenCL = true;\r
}\r
else\r
{\r
- this.SupportOpenCL = true;\r
+ this.SupportOpenCL = false;\r
}\r
if (this.selectedTitle.UVDSupport == 0)\r
{\r