Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffmpeg-vaapi][vp8 decode] almost all vp8 decode test cases failed when using ffmpeg-vaapi #190

Closed
FocusLuo opened this issue Jun 14, 2018 · 6 comments
Assignees
Labels
Decode video decode related In Progress PR: still under discussion

Comments

@FocusLuo
Copy link

These test cases can work on intel-vaapi-driver
One CMD line shown as below:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v verbose -y -i ./vp8_vpg/vp8_rev0_I_frame_H_Anim.webm -pix_fmt yuv420p -f md5 ffmpeg_vaapi.md5

The log info shown as below:
ffmpeg version N-91230-gb748772 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-vaapi --prefix=/opt/X11R7/ffmpeg_mainline
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 19.105 / 58. 19.105
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
Input #0, matroska,webm, from '/media//vp8_vpg/vp8_rev0_I_frame_H_Anim.webm':
Metadata:
encoder : vpxenc v0.9.6
Duration: 00:00:00.03, start: 0.000000, bitrate: 146 kb/s
Stream #0:0(eng): Video: vp8, 1 reference frame, yuv420p(progressive), 32x32, SAR 1:1 DAR 1:1, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
[AVHWDeviceContext @ 0x25fba80] Opened VA display via DRM device /dev/dri/renderD128.
[AVHWDeviceContext @ 0x25fba80] libva: VA-API version 1.1.0
[AVHWDeviceContext @ 0x25fba80] libva: va_getDriverName() returns 0
[AVHWDeviceContext @ 0x25fba80] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x25fba80] libva: Trying to open /opt/X11R7/vpg_driver/lib/dri//iHD_drv_video.so
[AVHWDeviceContext @ 0x25fba80] libva: Found init function __vaDriverInit_1_1
[AVHWDeviceContext @ 0x25fba80] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x25fba80] Initialised VAAPI connection: version 1.1
[AVHWDeviceContext @ 0x25fba80] Unknown driver "Intel iHD driver - 2.0.0", assuming standard behaviour.
Stream mapping:
Stream #0:0 -> #0:0 (vp8 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[AVHWFramesContext @ 0x7f41e0000a80] Failed to sync surface 0xb: 34 (HW busy now).
[vp8 @ 0x25fd0c0] Failed to transfer data to output frame: -5.
Error while processing the decoded data for stream #0:0
Conversion failed!

@mypopydev
Copy link
Contributor

I think same as the issue #57

@XinfengZhang
Copy link
Contributor

even after merging #86 still have some issue, ffmpeg create 2 context, register reference surface 0-15 to context 0, register reference surface 16-31 to context 1, after decode first frame to surface 15, it call vaDestoryContext to destroy context 0 and continue to decode another frame with context1. still use 15 as the reference. it is an invalid reference frame.

XinfengZhang added a commit to XinfengZhang/media-driver that referenced this issue Jul 18, 2018
when the count in VABoolCoderContextVPX is zero, actually it means there are 8 bit in bool coder

correct first partition_size,when there is 8 bits in bool coder

Signed-off-by: XinfengZhang <carl.zhang@intel.com>
lakulako added a commit to lakulako/media-driver that referenced this issue Aug 8, 2018
The fix is to align changes in driver and in libmfx, that
improve use of bitcount and 1st partition size computation.
No more special code for count==8. Proper partition size is assumed.
Instead of intel#239. To be merged the same moment with
Intel-Media-SDK/MediaSDK#493
    
Issue: intel#190
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this issue Aug 22, 2018
correct first partition_size,macroblock offset is 8 aligned

Signed-off-by: XinfengZhang <carl.zhang@intel.com>
Sherry-Lin pushed a commit that referenced this issue Sep 4, 2018
correct first partition_size,macroblock offset is 8 aligned

Signed-off-by: XinfengZhang <carl.zhang@intel.com>
@uartie
Copy link
Contributor

uartie commented Oct 17, 2018

Is this still an issue? I can't reproduce on today's mainline stack.

@zhuqingliang
Copy link

zhuqingliang commented Nov 12, 2018

I test with mainline branch at tag/n4.1 , not all avc vp8 decode fail now. These are 43 failed cases in 2054 cases.
vp8_rev05_InterFrame_CoefPartition_14_Crew0.webm
vp8_rev05_InterFrame_Segmentation_Focused_1_Anim.webm
vp8_rev05_InterFrame_Segmentation_Focused_10_CapitolRecordsNight0.webm

@uartie
Copy link
Contributor

uartie commented Nov 14, 2018

Yes, I'm seeing a lot of failures on my end now. Not sure what changed.

@uartie
Copy link
Contributor

uartie commented Nov 14, 2018

Setting -threads 1 before -i option works

@XinfengZhang XinfengZhang added the In Progress PR: still under discussion label Nov 19, 2018
@XinfengZhang XinfengZhang self-assigned this Aug 29, 2019
@XinfengZhang XinfengZhang added the Decode video decode related label Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Decode video decode related In Progress PR: still under discussion
Projects
None yet
Development

No branches or pull requests

6 participants
@uartie @FocusLuo @mypopydev @XinfengZhang @zhuqingliang and others