ShiftMediaProject / x264

Unofficial X264 with added custom native Visual Studio project build tools. X264: A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format.

Home Page:http://www.videolan.org/developers/x264.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCL usage

VishnuTejaM opened this issue · comments

Hi,
I downloaded the latest project from git. It is working fine with the sample test case i have given.
But when I'm trying to enable opencl, it is throwing following errors:
x264 [error] OpenCL: unknown error
x264 [error] OpenCL: fatal error, aborting encode...
After throwing these errors, all the threads got exited.

IDE used : Visual Studio 15
System Configuration : Intel(R) Core i7-4770 CPU @3.4GHz CPU with Intel HD4600 GPU
Can you help me in solving this issue.

This error is because it cant create an OpenCL context and the opencl ICD is returning "unknown error".
If you dont have a discrete gpu and wish to use the integrated intel gpu then make sure you have the latest intel opencl runtime installed.
If that doesnt work then paste the complete x264 log file as that may provide additional information.

Yes, I'm trying to use integrated intel GPU for openCL based acceleration.
Here is the complete log file:
yuv [info]: 1920x1080p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZ
CNT BMI2
x264 [info]: OpenCL acceleration enabled with Intel(R) Corporation Intel(R) HD G
raphics 4600
x264 [info]: profile High, level 4.0
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: x264_encoder_encode failed
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode
x264 [error]: OpenCL: Unknown error
x264 [error]: OpenCL: fatal error, aborting encode

aborted at input frame 45, output frame 0

The log doesnt seem to suggest anything additional. The error seems to be generated within the OpenCL runtime itself and not in the x264 code so theres not alot that can be done on the x264 end (as i said previously make sure you have the latest intel opencl runtime installed).
I will also note that unless you are simply testing functionality there is not much point using opencl acceleration using just the intel iGPU as a normal CPU accelerated encode will perform faster.

Ok. Will check about both OpenCL runtime and any missing drivers.
Thank you.