Bug 99573

Summary: [NM70][H264] h264 encoding does not works, return empty frames
Product: libva Reporter: nalorokk
Component: intelAssignee: haihao <haihao.xiang>
Status: NEW --- QA Contact: Sean V Kelley <seanvk>
Severity: critical    
Priority: medium CC: nalorokk
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description nalorokk 2017-01-28 01:45:54 UTC
Hello, when i'm trying to encode something with ffmpeg it gets only empty frames.
Full log: http://pastebin.com/5WtF5b3A
[h264_vaapi @ 0x55fd7098cf80] Output buffer: 0 bytes (status 00000000). 



So, i tried to run h264encode from /test/encode of libva and it seem to have same problem:

Loading data into surface 15.....Complete surface loading
      \00000059(000000 bytes coded)

Full log: http://pastebin.com/e1uhn848
Also, drm.debug=0x06 does not shows anything special.
Dmesg and vainfo output: http://pastebin.com/vwn1ufUv

My hardware: 
Intel® Dual-core Celeron® 1037U
Gigabyte GA-C1037UN-EU
x86_64
libva latest from Arch Linux (1.7.3)
kernel 4.9.6-1-ARCH
It is headless server.

Is there any way to get vaapi h264 encoding working?
Comment 1 Víctor Jáquez 2017-01-30 10:36:51 UTC
Out of curiosity, have you tried with gstreamer-vaapi or libyami?
Comment 2 nalorokk 2017-01-31 15:21:50 UTC
(In reply to Víctor Jáquez from comment #1)
> Out of curiosity, have you tried with gstreamer-vaapi or libyami?

I will not say that i'm really did deep test of libyami stuff, but seems like equal problem for libyami.

yamiencode -i test.yuv -W 896 -H 504      :(
[IMGUTILS @ 0x7fff76ada190] Picture size 0x0 is invalid
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
encode done

It creates empty file too (1KB).

yumidecode -i test.mp4
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
DecodeTest init failed.


Sorry, i currently don't have machine with working va-api for testing if there is problem in way i test it.
Comment 3 nalorokk 2017-01-31 15:46:31 UTC
After more testing, yamidecode works correctly.

While yamiencode produces only 297 byte file without any errors.
Comment 4 haihao 2017-02-03 07:14:30 UTC
Intel® Dual-core Celeron® 1037U doesn't support encoding. Could you provide the model name? I will provide a patch to disable encoding on this CPU.
Comment 5 haihao 2017-02-03 07:18:19 UTC
BTW the project is moved to https://github.com/01org/intel-vaapi-driver, and we are using https://github.com/01org/intel-vaapi-driver/issues/3 to track this issue, could you provide the info at https://github.com/01org/intel-vaapi-driver/issues/3 ?
Comment 6 haihao 2017-02-03 07:22:38 UTC
(In reply to haihao from comment #4)
> Intel® Dual-core Celeron® 1037U doesn't support encoding. Could you provide
> the model name? I will provide a patch to disable encoding on this CPU.

You can get the model name from /proc/cpuinfo
Comment 7 nalorokk 2017-02-03 07:25:59 UTC
(In reply to haihao from comment #5)
> BTW the project is moved to https://github.com/01org/intel-vaapi-driver, and
> we are using https://github.com/01org/intel-vaapi-driver/issues/3 to track
> this issue, could you provide the info at
> https://github.com/01org/intel-vaapi-driver/issues/3 ?

ok

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.