gstreamer-vaapi issueshttps://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues2021-09-24T12:23:28Zhttps://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/297vaapih265dec on i965 aborts when a delta frame is missing2021-09-24T12:23:28ZNirbheek Chauhannirbheek.chauhan@gmail.comvaapih265dec on i965 aborts when a delta frame is missing<details>
<summary>Backtrace</summary>
```
#0 0x00007ffff7b359d5 in raise () at /lib64/libc.so.6
#1 0x00007ffff7b1e8a4 in abort () at /lib64/libc.so.6
#2 0x00007ffff7b1e789 in _nl_load_domain.cold () at /lib64/libc.so.6
#3 0x00007ff...<details>
<summary>Backtrace</summary>
```
#0 0x00007ffff7b359d5 in raise () at /lib64/libc.so.6
#1 0x00007ffff7b1e8a4 in abort () at /lib64/libc.so.6
#2 0x00007ffff7b1e789 in _nl_load_domain.cold () at /lib64/libc.so.6
#3 0x00007ffff7b2e026 in annobin_assert.c_end () at /lib64/libc.so.6
#4 0x00007ffff5863f2c in gen9_hcpd_get_reference_picture_frame_id (ref_pic=<optimized out>, frame_store=frame_store@entry=0x7fffe01e5f00) at gen9_mfd.c:649
#5 0x00007ffff58666e1 in gen9_hcpd_ref_idx_state_1 (batch=batch@entry=0x7fffe00b7630, list=list@entry=0, pic_param=pic_param@entry=0x7fffe0034c00, slice_param=slice_param@entry=0x7fffe00c2d40, frame_store=frame_store@entry=0x7fffe01e5f00) at gen9_mfd.c:676
#6 0x00007ffff586b176 in gen9_hcpd_ref_idx_state (ctx=0x7635b0, gen9_hcpd_context=0x7fffe01e5ed0, slice_param=0x7fffe00c2d40, pic_param=0x7fffe0034c00) at gen9_mfd.c:703
#7 gen9_hcpd_hevc_decode_picture (gen9_hcpd_context=0x7fffe01e5ed0, decode_state=0x7679f8, ctx=0x7635b0) at gen9_mfd.c:1028
#8 gen9_hcpd_decode_picture (ctx=0x7635b0, profile=<optimized out>, codec_state=0x7679f8, hw_context=0x7fffe01e5ed0) at gen9_mfd.c:1901
#9 0x00007ffff6433da8 in vaEndPicture (dpy=dpy@entry=0x764220, context=33554433) at va.c:1616
#10 0x00007ffff65bcdee in gst_vaapi_picture_decode (picture=picture@entry=0x7fffd00138d0) at ../subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_objects.c:308
#11 0x00007ffff65b1f90 in decode_current_picture (decoder=0x7fffe00a8e90) at ../subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c:1381
#12 0x00007ffff65a6ece in do_decode_1 (decoder=decoder@entry=0x7fffe00a8e90, frame=frame@entry=0x7fffb4050b90) at ../subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder.c:259
#13 0x00007ffff65a882b in do_decode (base_frame=0x6c3c00, decoder=0x7fffe00a8e90) at ../subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder.c:287
#14 gst_vaapi_decoder_decode (decoder=0x7fffe00a8e90, frame=frame@entry=0x6c3c00) at ../subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder.c:1026
#15 0x00007ffff658872e in gst_vaapidecode_handle_frame (vdec=0x7fffe00bd1c0, frame=0x6c3c00) at ../subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c:764
#16 0x00007ffff6910c77 in gst_video_decoder_decode_frame (decoder=decoder@entry=0x7fffe00bd1c0, frame=0x6c3c00) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3697
#17 0x00007ffff6913ef8 in gst_video_decoder_have_frame (decoder=decoder@entry=0x7fffe00bd1c0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3606
#18 0x00007ffff6586a33 in gst_vaapidecode_parse_frame (at_eos=0, adapter=0x7fffb4085240, frame=0x6c3c00, vdec=0x7fffe00bd1c0) at ../subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c:1181
#19 gst_vaapidecode_parse (vdec=0x7fffe00bd1c0, frame=0x6c3c00, adapter=0x7fffb4085240, at_eos=0) at ../subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c:1218
#20 0x00007ffff690c4e9 in gst_video_decoder_parse_available (dec=dec@entry=0x7fffe00bd1c0, at_eos=at_eos@entry=0, new_buffer=0, new_buffer@entry=1) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:1055
#21 0x00007ffff691102c in gst_video_decoder_chain_forward (decoder=decoder@entry=0x7fffe00bd1c0, buf=buf@entry=0x7fffe00cc6c0, at_eos=at_eos@entry=0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2348
#22 0x00007ffff69125c9 in gst_video_decoder_chain (pad=<optimized out>, parent=<optimized out>, buf=0x7fffe00cc6c0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2647
#23 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffb00078f0, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#24 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x7fffb000aab0, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#25 0x00007ffff7f0b3c2 in gst_pad_push (pad=pad@entry=0x7fffb000aab0, buffer=buffer@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#26 0x00007ffff7eef34b in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstghostpad.c:127
#27 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x6edd90, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#28 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x7fffb00076a0, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#29 0x00007ffff7f0b3c2 in gst_pad_push (pad=0x7fffb00076a0, buffer=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#30 0x00007ffff6a8cf69 in gst_base_transform_chain (pad=<optimized out>, parent=0x734f00, buffer=0x7fffeeffbce8) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2377
#31 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffb0007450, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#32 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x7fffb0007200, type=type@entry=4112, data=data@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#33 0x00007ffff7f0b3c2 in gst_pad_push (pad=0x7fffb0007200, buffer=buffer@entry=0x7fffe00cc6c0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#34 0x00007ffff6a6d6ff in gst_base_parse_push_frame (parse=parse@entry=0x7fffe00804c0, frame=frame@entry=0x7fffe0160050) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2590
#35 0x00007ffff6a7026f in gst_base_parse_handle_and_push_frame (frame=0x7fffe0160050, parse=0x7fffe00804c0) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2441
#36 0x00007ffff411a39b in gst_h265_parse_handle_frame_packetized (frame=0x7fffe0160050, parse=0x7fffe00804c0) at ../subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c:1106
#37 gst_h265_parse_handle_frame (parse=0x7fffe00804c0, frame=0x7fffe0160050, skipsize=0x7fffeeffc13c) at ../subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c:1150
#38 0x00007ffff6a68500 in gst_base_parse_handle_buffer (parse=parse@entry=0x7fffe00804c0, buffer=<optimized out>, skip=skip@entry=0x7fffeeffc13c, flushed=flushed@entry=0x7fffeeffc140) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2249
#39 0x00007ffff6a6e287 in gst_base_parse_chain (pad=<optimized out>, parent=<optimized out>, buffer=<optimized out>) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:3296
#40 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffb0006fb0, type=type@entry=4112, data=data@entry=0x7fffe00b2d80) at ../subprojects/gstreamer/gst/gstpad.c:4399
#41 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x7fffb0006d60, type=type@entry=4112, data=data@entry=0x7fffe00b2d80) at ../subprojects/gstreamer/gst/gstpad.c:4655
#42 0x00007ffff7f0b3c2 in gst_pad_push (pad=0x7fffb0006d60, buffer=0x7fffe00b2d80) at ../subprojects/gstreamer/gst/gstpad.c:4774
#43 0x00007ffff6d1cd99 in gst_rtp_base_depayload_push (filter=0x7fffe00700c0, out_buf=<optimized out>) at ../subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasedepayload.c:1271
#44 0x00007ffff578cd9b in gst_rtp_h265_depay_push (rtph265depay=rtph265depay@entry=0x7fffe00700c0, outbuf=<optimized out>, outbuf@entry=0x7fffe00b2d80, keyframe=<optimized out>, timestamp=<optimized out>, marker=marker@entry=1) at ../subprojects/gst-plugins-good/gst/rtp/gstrtph265depay.c:1107
#45 0x00007ffff578e962 in gst_rtp_h265_depay_handle_nal (rtph265depay=rtph265depay@entry=0x7fffe00700c0, nal=nal@entry=0x7fffb40857e0, in_timestamp=7337354563, marker=1) at ../subprojects/gst-plugins-good/gst/rtp/gstrtph265depay.c:1204
#46 0x00007ffff578ecc2 in gst_rtp_h265_finish_fragmentation_unit (rtph265depay=rtph265depay@entry=0x7fffe00700c0) at ../subprojects/gst-plugins-good/gst/rtp/gstrtph265depay.c:1244
#47 0x00007ffff578f56b in gst_rtp_h265_depay_process (depayload=depayload@entry=0x7fffe00700c0, rtp=rtp@entry=0x7fffeeffc690) at ../subprojects/gst-plugins-good/gst/rtp/gstrtph265depay.c:1541
#48 0x00007ffff6d1d458 in gst_rtp_base_depayload_handle_buffer (filter=0x7fffe00700c0, bclass=<optimized out>, in=0x7fffe00c55a0) at ../subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasedepayload.c:719
#49 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffb0006b10, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#50 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x6de7d0, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#51 0x00007ffff7f0b3c2 in gst_pad_push (pad=0x6de7d0, buffer=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#52 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x6de580, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#53 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x6ee090, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#54 0x00007ffff7f0b3c2 in gst_pad_push (pad=pad@entry=0x6ee090, buffer=buffer@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#55 0x00007ffff7eef34b in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstghostpad.c:127
#56 0x00007ffff7f01f5d in gst_pad_chain_data_unchecked (pad=pad@entry=0x6ec050, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#57 0x00007ffff7f04141 in gst_pad_push_data (pad=pad@entry=0x6de330, type=type@entry=4112, data=data@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#58 0x00007ffff7f0b3c2 in gst_pad_push (pad=0x6de330, buffer=buffer@entry=0x7fffe00c55a0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#59 0x00007ffff67219eb in gst_queue_push_one (queue=0x6dc070) at ../subprojects/gstreamer/plugins/elements/gstqueue.c:1388
#60 gst_queue_loop (pad=<optimized out>) at ../subprojects/gstreamer/plugins/elements/gstqueue.c:1541
#61 0x00007ffff7f3991f in gst_task_func (task=0x6e9950) at ../subprojects/gstreamer/gst/gsttask.c:328
#62 0x00007ffff7d46e54 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:354
#63 0x00007ffff7d442b2 in g_thread_proxy (data=0x6e8920) at ../glib/gthread.c:820
#64 0x00007ffff78d43f9 in start_thread () at /lib64/libpthread.so.0
#65 0x00007ffff7bf9903 in clone () at /lib64/libc.so.6
```
</details>
Easiest way to reproduce this is:
> `videotestsrc ! vaapih265enc ! queue ! identity drop-probability=0.01 silent=false ! queue ! vaapih265dec ! queue ! vaapisink sync=false`
This abort doesn't happen when decoding h264, and can happen very easily on packet loss over the network.
It seems [a similar issue](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/98) has been reported in the past and was [fixed partially](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/199). However, that issue was about delta frames arriving before an i-frame, while in this case the abort seems to happen in the middle of playback: after an i-frame has arrived, and seemingly after any delta-frame is dropped.
<details>
<summary>identity output on abort</summary>
```
chain ******* (identity0:sink) (3827 bytes, dts: 0:00:05.000000000, pts: 0:00:05.000000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00000200 marker , meta: none) 0x7ff898009000
chain ******* (identity0:sink) (3243 bytes, dts: 0:00:05.033333333, pts: 0:00:05.033333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017ea0
chain ******* (identity0:sink) (3166 bytes, dts: 0:00:05.066666666, pts: 0:00:05.066666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002a6c0
chain ******* (identity0:sink) (3149 bytes, dts: 0:00:05.100000000, pts: 0:00:05.100000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017b40
chain ******* (identity0:sink) (3175 bytes, dts: 0:00:05.133333333, pts: 0:00:05.133333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a80177e0
chain ******* (identity0:sink) (3116 bytes, dts: 0:00:05.166666666, pts: 0:00:05.166666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009120
chain ******* (identity0:sink) (3125 bytes, dts: 0:00:05.200000000, pts: 0:00:05.200000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009240
chain ******* (identity0:sink) (3154 bytes, dts: 0:00:05.233333333, pts: 0:00:05.233333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002aa20
chain ******* (identity0:sink) (3097 bytes, dts: 0:00:05.266666666, pts: 0:00:05.266666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017c60
chain ******* (identity0:sink) (3141 bytes, dts: 0:00:05.300000000, pts: 0:00:05.300000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017d80
chain ******* (identity0:sink) (3137 bytes, dts: 0:00:05.333333333, pts: 0:00:05.333333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002a7e0
chain ******* (identity0:sink) (3114 bytes, dts: 0:00:05.366666666, pts: 0:00:05.366666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002a900
chain ******* (identity0:sink) (3141 bytes, dts: 0:00:05.400000000, pts: 0:00:05.400000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002ab40
chain ******* (identity0:sink) (3108 bytes, dts: 0:00:05.433333333, pts: 0:00:05.433333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a80176c0
chain ******* (identity0:sink) (3078 bytes, dts: 0:00:05.466666666, pts: 0:00:05.466666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a80175a0
chain ******* (identity0:sink) (3092 bytes, dts: 0:00:05.500000000, pts: 0:00:05.500000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009120
chain ******* (identity0:sink) (3095 bytes, dts: 0:00:05.533333333, pts: 0:00:05.533333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009000
chain ******* (identity0:sink) (3101 bytes, dts: 0:00:05.566666666, pts: 0:00:05.566666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017ea0
chain ******* (identity0:sink) (3153 bytes, dts: 0:00:05.600000000, pts: 0:00:05.600000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002a6c0
chain ******* (identity0:sink) (3132 bytes, dts: 0:00:05.633333333, pts: 0:00:05.633333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009360
chain ******* (identity0:sink) (3113 bytes, dts: 0:00:05.666666666, pts: 0:00:05.666666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff898009240
chain ******* (identity0:sink) (3122 bytes, dts: 0:00:05.700000000, pts: 0:00:05.700000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a002aa20
dropping ******* (identity0:sink) (3139 bytes, dts: 0:00:05.733333333, pts: 0:00:05.733333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017c60
chain ******* (identity0:sink) (3096 bytes, dts: 0:00:05.766666666, pts: 0:00:05.766666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002200 marker delta-unit , meta: none) 0x7ff8a8017b40
gst-launch-1.0: gen9_mfd.c:649: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.
Aborted (core dumped)
```
</details>
The same abort also happens with `vah265dec`.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/296radeon: can't decode into any YUV format only RGBA would work2021-09-24T12:23:28ZRandy Liradeon: can't decode into any YUV format only RGBA would workI have talked with ceyusa about this issue, va from -bad would work well with NV12.
#263 is not the case here, as this AMD platform doesn't support tiled format.
As I mentioned in #49 `vaExportSurfaceHandle()` won't solve this problem, u...I have talked with ceyusa about this issue, va from -bad would work well with NV12.
#263 is not the case here, as this AMD platform doesn't support tiled format.
As I mentioned in #49 `vaExportSurfaceHandle()` won't solve this problem, until 1.18 the msdk plugin still use `VaDeriveImage()` and it works well.
I traced the problem of AMD here, it is `if (surf->buffer->interlaced)` in `vlVaDeriveImage()` src/gallium/frontends/va/image.c making the fault. I would continue to debugging here. I don't think Intel would have the same problem here. No wonder `vaExportSurfaceHandle()` won't meet such issue, as it doesn't call this API at all.
But I should send this AMD computer out in this week, I would see what I can do here.
I have patched the mesa 20.2.4 to make hevc work.
```
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev da)
libva info: VA-API version 1.9.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_9
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.9 (libva 2.9.0)
vainfo: Driver version: Mesa Gallium driver 20.2.4 for AMD RENOIR (DRM 3.39.0, 5.9.13-200.fc33.x86_64, LLVM 11.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
```https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/292Stuttery playback if wayland compositor doesn't send frame events to vaapisin...2021-09-24T12:23:28ZOllie ReynoldsStuttery playback if wayland compositor doesn't send frame events to vaapisink surface -- intentional?Does vaapisink rely on wayland compositor constantly sending frame_events https://github.com/wayland-project/wayland/blob/master/protocol/wayland.xml#L1500, even if compositor decides to hide the surface by not sending frame events? I wo...Does vaapisink rely on wayland compositor constantly sending frame_events https://github.com/wayland-project/wayland/blob/master/protocol/wayland.xml#L1500, even if compositor decides to hide the surface by not sending frame events? I would like my compositor to temporarily obscure/hide the vaapisink surface, but I want vaapisink to continue video playback in the background.
If I try to do this (not send frame events to vaapisink wayland surface from my compositor) and then start sending them again, the sink screams about dropped frames due to QOS and playback becomes very stuttery.
I can't paste my compositor code here, but I think https://github.com/swaywm/wlroots/tree/master/tinywl might be able to reproduce the issue, if a toggle is set to stop sending frame events to the vaapisink surface.
Pipeline is:
`filesrc location=%s ! qtdemux ! queue ! parsebin ! vaapidecodebin ! vaapisink display=wayland -e`
where %s is any H264 video.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/291h265dec: gallium driver doesn't allow surfaceless contexts2021-09-24T12:23:28ZYahong Zhuh265dec: gallium driver doesn't allow surfaceless contextsWhen i try playback a h265 video with command line below. it says "no valid frames found" and don't play.
`gst-launch-1.0 -v filesrc location=./h265inmp4.mp4 ! qtdemux ! vaapidecodebin ! glimagesink`
this is the video i used [h265inmp...When i try playback a h265 video with command line below. it says "no valid frames found" and don't play.
`gst-launch-1.0 -v filesrc location=./h265inmp4.mp4 ! qtdemux ! vaapidecodebin ! glimagesink`
this is the video i used [h265inmp4](/uploads/c052d3caea43648f0232716a1f678fac/h265inmp4.mp4)
My environment :
AMD 3550H CPU
Ubuntu 20.04
AMDGPU-PRO-Driver 20.20
Gstreamer 1.18.1
VAINFO is [vainfo.log](/uploads/8ebbf516617215a7fff06c3cb0d17aea/vainfo.log)
Full log with GST_DEBUG="vaapi*:6,*:5" [bug.log](/uploads/c580e4595faa860b20e5fe3f062b221f/bug.log)
what weird is i try to use vlc and mpv play the video with vaapi hardware accerlation. they all work.
And i try to use gstreamer-vappi play a h264, there is no problem.
those are the logs.
VLC log is
`VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[0000563a9e6b25c0] main libvlc: 正在以默认界面运行 vlc。使用“cvlc”可以无界面模式使用 vlc。
[00007f7f28003480] egl_x11 gl error: cannot select OpenGL API
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[00007f7f3cc107c0] avcodec decoder: Using Mesa Gallium driver 20.0.5 for AMD RAVEN (DRM 3.37.0, 5.4.0-54-generic, LLVM 10.0.0) for hardware decoding
[00007f7f28321990] vaapi_filters filter error: vaDeriveImage: operation failed
^CQObject::~QObject: Timers cannot be stopped from another thread
`
MPV log is [mpv.log](/uploads/ff369b5b3685d75e95356b0146ff1641/mpv.log)
What is causing this problem ? Thanks for reply.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/290encoder: h265: don't deprecate low-delay-b property2021-09-24T12:23:27ZU. Artie Eoffencoder: h265: don't deprecate low-delay-b propertyIn !284, the low-delay-b property was deprecated. Some platforms can support both P-frames or low-delay-b, but the user has no way to enable low-delay-b on those platforms. It would be useful if the user can force low-delay-b to be used...In !284, the low-delay-b property was deprecated. Some platforms can support both P-frames or low-delay-b, but the user has no way to enable low-delay-b on those platforms. It would be useful if the user can force low-delay-b to be used even when the platform supports P-frame. In many cases, low-delay-b can produce better quality.
Perhaps low-delay-b can be a tri-state property (auto, on, off), where `auto` is the default. On platforms that only support low-delay-b, then `auto` would turn it `on`. On platforms that support P-frames, `auto` would turn it `off`.
The other option is to keep it a `true|false` property where the default is `true` since all platforms should be able to support low-delay-b and generally produces better result.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/289decoder: h264: if malformed reference list, fail processing2021-09-24T12:23:27ZVíctor Manuel Jáquez Lealdecoder: h264: if malformed reference list, fail processingSee https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1466See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1466https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/286When using gstreamer vaapih264dec, I got wrong raw frame with YUV channels mi...2021-10-17T08:32:23Zb04505009When using gstreamer vaapih264dec, I got wrong raw frame with YUV channels mismatchI use gstreamer and vaapih264dec decoding h264 frames to raw frames. However, when I use opencv cvtColor to convert image from NV12 back to RGB, I got wrong image which has some green lines on the top. I tried mfxh264dec and avdec_h264 t...I use gstreamer and vaapih264dec decoding h264 frames to raw frames. However, when I use opencv cvtColor to convert image from NV12 back to RGB, I got wrong image which has some green lines on the top. I tried mfxh264dec and avdec_h264 too and they worked fine, ,so I supposed it's vaapih264's problem.
Here is my test code:
https://hackmd.io/@b04505009/HyRj9qFID
street.h264 is an h264 encoded video with one frame
[street.h264](/uploads/29bd020756cf6a05ad9cae9a5e208942/street.h264)
vainfo on Dell HD Graphics 630 with ubuntu 18.04:
```
libva info: VA-API version 1.6.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.6 (libva 2.1.0)
vainfo: Driver version: Intel iHD driver - 19.3.1
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
```https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/284there are many cases that suffer psnr decline with gst-vaapi encode vp8/vp92021-09-24T12:23:26Zyefeng xuthere are many cases that suffer psnr decline with gst-vaapi encode vp8/vp9It have been verified that the issue of VP8e is caused by gst-plugin-base(660b5e4a9864).
for example,
**case1**
cmd-line:
> gst-launch-1.0 -vf filesrc location=input num-buffers=10 ! rawvideoparse format=i420 width=352 height=288 ! v...It have been verified that the issue of VP8e is caused by gst-plugin-base(660b5e4a9864).
for example,
**case1**
cmd-line:
> gst-launch-1.0 -vf filesrc location=input num-buffers=10 ! rawvideoparse format=i420 width=352 height=288 ! videoconvert dither=0 ! video/x-raw,format=NV12 ! vaapivp8enc rate-control=cqp keyframe-period=30 yac-qi=14 quality-level=4 tune=none sharpness-level=0 loop-filter-level=0 ! video/x-vp8 ! matroskamux ! filesink location=output
result:
> DETAIL:drv.iHD.psnr:expect=[39.0419,41.4528,41.0753,39.1498,41.8009,41.4039]
>
> DETAIL:drv.iHD.psnr:expect=[39.0419,39.6182,38.3811,39.1498,39.7459,38.533]
**case2**
cmd-line:
> gst-launch-1.0 -vf filesrc location=input num-buffers=75 ! rawvideoparse format=i420 width=3840 height=2160 framerate=30 ! videoconvert dither=0 ! video/x-raw,format=NV12 ! vaapivp9enc rate-control=cbr keyframe-period=30 bitrate=20000 ref-pic-mode=0 tune=low-power sharpness-level=4 loop-filter-level=16 ! video/x-vp9 ! matroskamux ! filesink location=output
result:
> DETAIL:drv.iHD.psnr:expect=[38.2037,47.3138,48.0854,43.8056,51.0044,51.76]
>
> DETAIL:drv.iHD.psnr:expect=[38.2037,47.2478,47.8169,43.8056,50.7294,51.2088]https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/282Follow-up from "codecs: h265: Fix dependent slice header"2021-09-24T12:23:26ZNicolas DufresneFollow-up from "codecs: h265: Fix dependent slice header"The following discussion from gst-plugins-bad!1750 should be addressed:
- [ ] @He_Junyan started a [discussion](https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1750#note_680250):
> Seems that:
>
...The following discussion from gst-plugins-bad!1750 should be addressed:
- [ ] @He_Junyan started a [discussion](https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1750#note_680250):
> Seems that:
>
> https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/blob/master/gst-libs/gst/vaapi/gstvaapidecoder_h265.c#L1708
> also needs this.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/281Decoding errors with hevc on AMD Renoir, possibly linked to `unsupported leve...2021-09-24T12:23:26ZYann DirsonDecoding errors with hevc on AMD Renoir, possibly linked to `unsupported level_idc value (0)`With eg. [this sample video](https://www.elecard.com/storage/video/Elecard_about_Tomsk_part2_HEVC_720p.mp4) I get decoder errors, whereas the same video causes no problem to `avdec_h265` and to `mpv --hwdec=vaapi`
```
$ LC_ALL=C GST_DEB...With eg. [this sample video](https://www.elecard.com/storage/video/Elecard_about_Tomsk_part2_HEVC_720p.mp4) I get decoder errors, whereas the same video causes no problem to `avdec_h265` and to `mpv --hwdec=vaapi`
```
$ LC_ALL=C GST_DEBUG=WARN,vaapi:FIXME gst-launch-1.0 filesrc location=~/Videos/Elecard_about_Tomsk_part2_HEVC_720p.mp4 ! qtdemux ! h265parse ! vaapih265dec ! glimagesink |& head -n15
0:00:00.081304078 263065 0x561c0260e800 WARN vaapiblend gstvaapiblend.c:184:gst_vaapi_blend_initialize:<vaapiblend0> VPP does not support global alpha blending
Setting pipeline to PAUSED ...
0:00:00.156012537 263065 0x561c0260e800 WARN basesrc gstbasesrc.c:3688:gst_base_src_start_complete:<filesrc0> pad not activated yet
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'vaapidecode_h265-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0";
0:00:00.156629237 263065 0x7f1afc002180 WARN qtdemux qtdemux.c:3066:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.163312509 263065 0x7f1afc002180 FIXME vaapi gstvaapidecoder_h265.c:660:get_max_dec_frame_buffering: unsupported level_idc value (0)
0:00:00.165612948 263065 0x7f1afc002180 WARN vaapidecode gstvaapidecode.c:780:gst_vaapidecode_handle_frame:<vaapidecode_h265-0> decode error -1
0:00:00.165657437 263065 0x7f1afc002180 WARN videodecoder gstvideodecoder.c:4327:_gst_video_decoder_error:<vaapidecode_h265-0> error: Decoding error
0:00:00.165667913 263065 0x7f1afc002180 WARN videodecoder gstvideodecoder.c:4329:_gst_video_decoder_error:<vaapidecode_h265-0> error: Decode error -1
0:00:00.165853971 263065 0x7f1afc002180 FIXME vaapi gstvaapidecoder_h265.c:660:get_max_dec_frame_buffering: unsupported level_idc value (0)
0:00:00.165888821 263065 0x7f1afc002180 WARN vaapidecode gstvaapidecode.c:780:gst_vaapidecode_handle_frame:<vaapidecode_h265-0> decode error -1
0:00:00.165902091 263065 0x7f1afc002180 WARN videodecoder gstvideodecoder.c:4327:_gst_video_decoder_error:<vaapidecode_h265-0> error: Decoding error
0:00:00.165909844 263065 0x7f1afc002180 WARN videodecoder gstvideodecoder.c:4329:_gst_video_decoder_error:<vaapidecode_h265-0> error: Decode error -1
```
```
$ vainfo
libva info: VA-API version 1.9.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_9
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.9 (libva 2.8.0)
vainfo: Driver version: Mesa Gallium driver 20.1.9 for AMD RENOIR (DRM 3.38.0, 5.8.0-2-amd64, LLVM 10.0.1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
```https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/274Failed to output the picture in glimage EGL mode.2021-09-24T12:23:25ZHe JunyanFailed to output the picture in glimage EGL mode.the DMA seems not work:
gst-launch-1.0 -v videotestsrc num-buffers=200 ! capsfilter caps=video/x-raw,format=NV12,width=320,height=320 ! vaapih265enc ! vaapih265dec ! vaapipostproc ! glimagesink
use iHD driverthe DMA seems not work:
gst-launch-1.0 -v videotestsrc num-buffers=200 ! capsfilter caps=video/x-raw,format=NV12,width=320,height=320 ! vaapih265enc ! vaapih265dec ! vaapipostproc ! glimagesink
use iHD driverhttps://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/267Failed to use DMA buffer between decoder and encoder.2021-09-24T12:23:25ZHe JunyanFailed to use DMA buffer between decoder and encoder.The pipeline of:
gst-launch-1.0 -v filesrc location=in264.bits ! h264parse ! vaapih264dec ! vaapipostproc ! video/x-raw\(memory:DMABuf\) ! vaapih264enc ! filesink location=out.h264
and
gst-launch-1.0 -v filesrc location=huge264.bits ! h...The pipeline of:
gst-launch-1.0 -v filesrc location=in264.bits ! h264parse ! vaapih264dec ! vaapipostproc ! video/x-raw\(memory:DMABuf\) ! vaapih264enc ! filesink location=out.h264
and
gst-launch-1.0 -v filesrc location=huge264.bits ! h264parse ! vaapih264dec ! video/x-raw\(memory:DMABuf\) ! vaapih264enc ! filesink location=out.h264
fails with reason not-negotiated (-4)https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/264decode: Should return GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE when there is...2021-09-24T12:23:25ZHe Junyandecode: Should return GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE when there is no GPU resource.Then decode just report GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED when it fails to allocate a GPU surface.
GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE should be more precise.Then decode just report GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED when it fails to allocate a GPU surface.
GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE should be more precise.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/263vaapi: support drm modifier for DMABuf2021-09-24T12:23:24ZHaihao Xiangvaapi: support drm modifier for DMABufSince TGL, a new modifier (I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS) is introduced, which should be passed to the 3rd party library when sharing a buffer with 3rd party library by using DMABuf.Since TGL, a new modifier (I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS) is introduced, which should be passed to the 3rd party library when sharing a buffer with 3rd party library by using DMABuf.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/255vaapipostproc leak FDs when using dma buffer2021-09-24T12:23:24ZHe Junyanvaapipostproc leak FDs when using dma bufferThe dma usage leak FD all the times, for iHD and i965, both.
The case attached can duplicate it.
[hello_gst.c](/uploads/56de98709569ae50dd3616eb08e8ae18/hello_gst.c)The dma usage leak FD all the times, for iHD and i965, both.
The case attached can duplicate it.
[hello_gst.c](/uploads/56de98709569ae50dd3616eb08e8ae18/hello_gst.c)https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/253vaapipostproc + (brightness|saturation|contrast) + huge memory leak2021-09-24T12:23:24ZMichaelvaapipostproc + (brightness|saturation|contrast) + huge memory leakHi gstreamers,
i already wrote to the mailing list and received some useful hints for further diagnosis of a potential memory leakage. Now we're quite sure, that there is something wrong in vaapipostproc or vaapih264dec in combination w...Hi gstreamers,
i already wrote to the mailing list and received some useful hints for further diagnosis of a potential memory leakage. Now we're quite sure, that there is something wrong in vaapipostproc or vaapih264dec in combination with glupload and DMABuf when using color balancing of vaapipostproc in version 1.16.2.
Our pipeline looks like this:
```
auto pipeline = gst_pipeline_new( "pipeline" );
auto src = gst_element_factory_make( "udpsrc", "source" );
auto depay = gst_element_factory_make( "rtph264depay", "depay" );
auto dec = gst_element_factory_make( "vaapih264dec", "dec" );
auto postproc = gst_element_factory_make( "vaapipostproc", "postproc" );
auto upload = gst_element_factory_make( "glupload", "upload" );
auto sink = gst_element_factory_make( "appsink", "sink" );
gst_bin_add_many( GST_BIN(pipeline), src, depay, dec, postproc, upload, sink, NULL );
if( !gst_element_link_many( src, depay, dec, postproc, NULL ) ) { return -1; }
GstCaps* caps = gst_caps_from_string( "video/x-raw(memory:DMABuf), format=RGBA" );
if( !gst_element_link_filtered( postproc, upload, caps ) ) { return -1; }
if( !gst_element_link( upload, sink ) ) { return -1; }
// Setup Caps, Ports of src
// Inject GlContext
// Register Callbacks etc.
```
In case of a frequently change of vaapipostprocs properties, e.g. the brightness, contrast or saturation, we get a very high memory consumption, which leads to a kill by our watchdog. We reach dimensions about 2 GB, which are demanded by the gstreamer within a short period of 30s.
The color calibration is done by using the following property setter:
` g_object_set( G_OBJECT( vaapipostproc ), "brightness", tmp, NULL ); `
To reproduce this issue it is merely nescessary to change one of the mentioned properties in a high frequent, periodic way.
```
for (int i = 0; i < 5000; i++)
{
g_object_set( G_OBJECT( vaapipostproc ), "brightness", tmp, NULL );
// Sleep is also possible
}
```
Even if a sleep is integrated in the loop, the memory isn't freed again. So a overload or a invalid use of calibration can be excluded.
Furthermore we tried several things to reproduce this issue in an isolated environment, which can produce reproducable result. We generated a small qt-project (with qmlsink), which is attached in this issue. [demo_qmlsink_leakage.tar.xz](/uploads/7e9ba6ae4ed4bc3943d54ea275118fab/demo_qmlsink_leakage.tar.xz)
We also tried to use trace logging for a leakage diagnosis but without any success. The log doesn't reveal anything helpful.
But in [https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/106](url) a quite interesting test was provided, which demonstrated how DMABuf descriptors can be counted while the application is running. And yes, indeed - our FDs are increasing steadily when calibrating the color components.
We also tried integrate the following merge-requests:
[merge_requests/251](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/251)
[merge_requests/276](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/276)
[merge_requests/303](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/303)
Without any success, the error still occurs.
Help is very appreciated.
Best regards,
Michael
[demo_qmlsink_leakage.tar.xz](/uploads/8fd1e826eb2ead4d8b005300cc561802/demo_qmlsink_leakage.tar.xz)https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/249Remove Quirk for YUV/RGB CSC color primaries (iHD)2021-09-24T12:23:23ZU. Artie EoffRemove Quirk for YUV/RGB CSC color primaries (iHD)The `GST_VAAPI_DRIVER_QUIRK_NO_RGBYUV_VPP_COLOR_PRIMARY` introduced in !287 is no longer needed for iHD. The driver fixed it in https://github.com/intel/media-driver/issues/860#issuecomment-618546499.
Thus, remove the quirk when distro...The `GST_VAAPI_DRIVER_QUIRK_NO_RGBYUV_VPP_COLOR_PRIMARY` introduced in !287 is no longer needed for iHD. The driver fixed it in https://github.com/intel/media-driver/issues/860#issuecomment-618546499.
Thus, remove the quirk when distros catch up to this iHD fix.https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/246vaapioverlay with mjpeg decompression from Logitech Brio4K2021-09-24T12:23:23ZJerome Bolducvaapioverlay with mjpeg decompression from Logitech Brio4KHi,
I am using the following pipeline for mixing multiple USB camera feeds and I have a problem when using it with a Logitech Brio4K camera.
`gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg,width=3840,height=2160! vaapijpegdec !...Hi,
I am using the following pipeline for mixing multiple USB camera feeds and I have a problem when using it with a Logitech Brio4K camera.
`gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg,width=3840,height=2160! vaapijpegdec ! vaapioverlay ! fpsdisplaysink video-sink="vaapisink fullscreen=true" sync=false text-overlay=false -v `
The result is quite not in sync and seems to stop after a while. I am also getting low frame rate capture. If I remove the vaapioverlay plugin from pipeline, no problem at all.
I am using iHD driver with Ubuntu 19.10 and also using gstreamer 1.1.7.
```
up@up:~$ vainfo
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_5
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.5.0)
vainfo: Driver version: Intel iHD driver - 1.0.0
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
```
Thanks for your time.
Regards,
Jeromehttps://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/245Set cabac as default entropy coder for h264.2021-09-24T12:23:23ZXu GuangxinSet cabac as default entropy coder for h264.Currently, we use CAVLC as the [default ](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/blob/master/gst-libs/gst/vaapi/gstvaapiencoder_h264.c#L3905) entropy coder.
The CAVLC has 17% bdrate loss compare to CABAC in some typi...Currently, we use CAVLC as the [default ](https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/blob/master/gst-libs/gst/vaapi/gstvaapiencoder_h264.c#L3905) entropy coder.
The CAVLC has 17% bdrate loss compare to CABAC in some typical streams. ffmpeg vaapi already uses CABAC as the [default ](https://github.com/FFmpeg/FFmpeg/blob/20fed2f0ab197d60801280dfc844f6b29a397ff2/libavcodec/vaapi_encode_h264.c#L1263)coder.
Could we change the default to CABAC? or we can add an auto mode, let vaapi encoder choose the best coder type based on encoder profile.
thankshttps://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/225add encoders checks2021-09-24T12:23:22ZVíctor Manuel Jáquez Lealadd encoders checksNow that we have a couple unit tests with libgstcheck, it would be great to add some simple encoder tests, particularly testing the caps negotiation for h264 and h265Now that we have a couple unit tests with libgstcheck, it would be great to add some simple encoder tests, particularly testing the caps negotiation for h264 and h265