[MPlayer-dev-eng] VAAPI/X11 video output driver

Andy Furniss adf.lists at gmail.com
Sun Nov 29 00:14:57 CET 2015


Mark Thompson wrote:
> On 28/11/15 21:31, Andy Furniss wrote:

>> Looks like it's a gallium thing - I run git mesa and there have been a
>> few changes around va/vaapi recently.

<snip>

> Ok: in the absence of any evidence that the problem is on the mplayer
> side, I will ignore this?

I am not really qualified to say whether it's mplayer or not - as per my 
other post mpv doesn't seem to have any issues.

>>> I also tried anamorphic video.  There is something a bit strange going
>>> on because I got the behaviour you described with extra black bars when
>>> playing in a window, but it did the right thing once it went fullscreen.
>>>   Maybe it's just that the window is made initially with the wrong
>>> aspect ratio?
>>
>> Yes, I tried with a different 16/9 sample 544x576 and that is the size
>> of the initial window.
>>
>
> Yep, it wasn't handling the reconfigure properly to get a correct output
> window (vo config gets called with display size = decode size, then
> again a bit later with the correct display size).  Fixed, new patch
> attached.

I crash/assert instantly with the new patch in the case of anamorphic.

I get different traces depending on the source vid.

Playing /home/andy/Letters.mpg.
libavformat version 57.19.100 (internal)
MPEG-PS file format detected.
MPEG: No audio stream found -> no sound.
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)
Load subtitles in /home/andy/
Could not find a UTF-8 locale,
character keys beyond Latin-1 will not be handled.
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.16.100 (internal)
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vaapi] 720x576 => 720x576 MPEG-2 VA-API Acceleration
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 720x576 => 1024x576 MPEG-2 VA-API Acceleration
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
V:   0.5   2/  2 ??% ??% ??,?% 0 0
Program received signal SIGSEGV, Segmentation fault.
0x00007fffea543ad8 in vlVaBeginPicture (ctx=<optimized out>, 
context_id=<optimized out>, render_target=1) at picture.c:73
73         context->decoder->begin_frame(context->decoder, 
context->target, &context->desc.base);
(gdb) bt
#0  0x00007fffea543ad8 in vlVaBeginPicture (ctx=<optimized out>, 
context_id=<optimized out>, render_target=1) at picture.c:73
#1  0x0000555555ec9153 in ff_vaapi_render_picture 
(vactx=0x415247420000000a, vactx at entry=0x555557046a50, 
surface=1458033776) at libavcodec/vaapi.c:92
#2  0x0000555555ec93b8 in ff_vaapi_mpeg_end_frame (avctx=0x555557039c10) 
at libavcodec/vaapi.c:240
#3  0x0000555555b41d5c in slice_end (pict=0x555557039a20, 
avctx=0x555557039c10) at libavcodec/mpeg12dec.c:2102
#4  decode_chunks (avctx=avctx at entry=0x555557039c10, 
picture=picture at entry=0x555557039a20, 
got_output=got_output at entry=0x7fffffffd120, buf=0x555556e9c500 "", 
buf_size=17865) at libavcodec/mpeg12dec.c:2478
#5  0x0000555555b432de in mpeg_decode_frame (avctx=0x555557039c10, 
data=0x555557039a20, got_output=0x7fffffffd120, avpkt=<optimized out>) 
at libavcodec/mpeg12dec.c:2832
#6  0x0000555555c4bcae in avcodec_decode_video2 (avctx=0x555557039c10, 
picture=0x555557039a20, got_picture_ptr=0x7fffffffd120, 
avpkt=0x7fffffffd150) at libavcodec/utils.c:2103
#7  0x00005555557ff4de in decode (sh=0x555556e6ffe0, 
data=0x7fffffffd150, len=1459905888, flags=425148369) at 
libmpcodecs/vd_ffmpeg.c:984
#8  0x0000555555747105 in decode_video (sh_video=0x555556e6ffe0, 
start=0x555556e9c500 "", in_size=17865, drop_frame=0, 
pts=0.54000002145767212, full_frame=0x7fffffffd280) at 
libmpcodecs/dec_video.c:398
#9  0x00005555556cbe9a in update_video (blit_frame=0x7fffffffd338) at 
mplayer.c:2484
#10 0x00005555556befd4 in main (argc=4, argv=0x7fffffffe458) at 
mplayer.c:3811


Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vaapi] 1440x1080 => 1440x1080 H.264 VA-API Acceleration
[h264 @ 0x5555566a4280]mmco: unref short failure
[h264 @ 0x5555566a4280]mmco: unref short failure
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1440x1080 => 1920x1080 H.264 VA-API Acceleration
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
mplayer: libvo/vo_vaapi.c:2431: get_surface: Assertion 
`!va_free_surfaces[va_free_surfaces_tail_index]' failed.

Program received signal SIGABRT, Aborted.
0x00007fffefae2985 in __GI_raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007fffefae2985 in __GI_raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffefae5aab in __GI_abort () at abort.c:91
#2  0x00007fffefadb9de in __assert_fail_base (fmt=<optimized out>, 
assertion=0x555555fd2d68 
"!va_free_surfaces[va_free_surfaces_tail_index]", file=0x555555fd23f5 
"libvo/vo_vaapi.c", line=<optimized out>, function=<optimized out>)
     at assert.c:94
#3  0x00007fffefadba82 in __GI___assert_fail (assertion=0x555555fd2d68 
"!va_free_surfaces[va_free_surfaces_tail_index]", file=0x555555fd23f5 
"libvo/vo_vaapi.c", line=2431, function=0x555555fd3379 
<__PRETTY_FUNCTION__.29779> "get_surface")
     at assert.c:103
#4  0x00005555556fa9de in get_surface (mpi=<optimized out>) at 
libvo/vo_vaapi.c:2431
#5  get_image (mpi=<optimized out>) at libvo/vo_vaapi.c:2454
#6  control (request=29450, data=0x730a) at libvo/vo_vaapi.c:2604
#7  0x000055555574cfe3 in vf_get_image (vf=0x55555709f540, 
outfmt=499712007, mp_imgtype=mp_imgtype at entry=5, 
mp_imgflag=mp_imgflag at entry=12, w=1440, h=1090) at libmpcodecs/vf.c:385
#8  0x000055555574aeaf in mpcodecs_get_image 
(sh=sh at entry=0x555556ea25b0, mp_imgtype=mp_imgtype at entry=5, 
mp_imgflag=mp_imgflag at entry=12, w=<optimized out>, h=<optimized out>) at 
libmpcodecs/vd.c:399
#9  0x00005555557ffead in get_buffer (isreference=<optimized out>, 
pic=0x55555708f020, avctx=0x555557081c40) at libmpcodecs/vd_ffmpeg.c:782
#10 get_buffer2 (avctx=0x555557081c40, frame=0x55555708f020, 
flags=<optimized out>) at libmpcodecs/vd_ffmpeg.c:1214
#11 0x0000555555c4a713 in get_buffer_internal (flags=0, 
frame=0x55555708f020, avctx=0x555557081c40) at libavcodec/utils.c:877
#12 ff_get_buffer (avctx=avctx at entry=0x555557081c40, 
frame=0x55555708f020, flags=flags at entry=0) at libavcodec/utils.c:890
#13 0x0000555555bb8697 in thread_get_buffer_internal (flags=0, 
f=0x5555570a3398, f at entry=0xf5555a37513d98, avctx=0x555557081c40) at 
libavcodec/pthread_frame.c:776
#14 ff_thread_get_buffer (avctx=0x555557081c40, 
f=f at entry=0x5555570a3398, flags=0) at libavcodec/pthread_frame.c:852
#15 0x0000555555a28c38 in alloc_picture (pic=0x5555570a3390, 
h=0x5555570a2b20) at libavcodec/h264_slice.c:230
#16 h264_frame_start (h=0x5555570a2b20) at libavcodec/h264_slice.c:613
#17 0x0000555555a2e011 in ff_h264_decode_slice_header (h=0x5555570a2b20, 
sl=0x555557082290) at libavcodec/h264_slice.c:1654
#18 0x00005555559fda33 in decode_nal_units (h=0x5555570a2b20, buf=0x730a 
<error: Cannot access memory at address 0x730a>, buf_size=6, 
parse_extradata=0) at libavcodec/h264.c:1531
#19 0x00005555559ff2f9 in h264_decode_frame (avctx=0x555557081c40, 
data=0x555557081a50, got_frame=0x6, avpkt=0x7fffffffd060) at 
libavcodec/h264.c:1839
#20 0x0000555555c4bcae in avcodec_decode_video2 (avctx=0x555557081c40, 
picture=0x555557081a50, got_picture_ptr=0x7fffffffd120, 
avpkt=0x7fffffffd150) at libavcodec/utils.c:2103
#21 0x00005555557ff4de in decode (sh=0x555556ea25b0, 
data=0x7fffffffd150, len=6, flags=8) at libmpcodecs/vd_ffmpeg.c:984
#22 0x0000555555747105 in decode_video (sh_video=0x555556ea25b0, 
start=0x555556ef3d70 "", in_size=37470, drop_frame=0, 
pts=52766.889444444445, full_frame=0x7fffffffd280) at 
libmpcodecs/dec_video.c:398
#23 0x00005555556cbe9a in update_video (blit_frame=0x7fffffffd338) at 
mplayer.c:2484
#24 0x00005555556befd4 in main (argc=4, argv=0x7fffffffe458) at 
mplayer.c:3811



More information about the MPlayer-dev-eng mailing list