After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772259 - decoder: h265 : Failing to play a stream occasionally
decoder: h265 : Failing to play a stream occasionally
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: 1.10.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-30 14:51 UTC by sreerenj
Modified: 2017-03-17 08:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample h265 stream (3.52 MB, application/octet-stream)
2016-09-30 15:02 UTC, sreerenj
  Details
encoder: h264,h265: fix regression in offset count (1.75 KB, patch)
2016-10-08 12:37 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description sreerenj 2016-09-30 14:51:50 UTC
The attached stream (saved from a network source) is causing driver asseertion sometimes.

gen9_mfd.c:587: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.
Aborted (core dumped)

Could be better to do some investigation from gstreamer side first.
Comment 1 sreerenj 2016-09-30 15:02:58 UTC
Created attachment 336683 [details]
sample h265 stream
Comment 2 Lim Siew Hoon 2016-10-07 07:22:28 UTC
I'm having consistent assertion on the encode stream from h265 with matroskamux. I'm using the gstreamer-vaapi 1.8.3 version. 

command:
1. h265 encode command:
gst-launch-1.0 filesrc location=/home/root/iceage_720x480_491.yuv ! videoparse width=720 format=i420 framerate=30 height=480 ! vaapih265enc rate-control=cqp ! video/x-h265,profile=main ! h265parse ! matroskamux ! fpsdisplaysink video-sink="filesink location=/home/root/test.mkv" text-overlay=false

2. h265 decode command:
gst-launch-1.0 filesrc location=/home/root/test.mkv ! matroskademux ! h265parse ! vaapidecode ! vaapisink

The raw stream encoded by using vaapih265enc + matroskamux, the replay back the h265 video stream, it will hitting error assertion causing in gen9_mfd.c:587: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.
Aborted (core dumped)

Found out the after revert this commit 	id: dc35dafa1d2d320da0ef8750233e1bf5dec747cc, it is working fine. 

I'm trying just changed from "encoder->cts_offset = GST_CLOCK_TIME_NONE" back to "encoder->cts_offset = 0", it is working fine. 
GST_CLOCK_TIME_NONE is -1 value.
Comment 3 Víctor Manuel Jáquez Leal 2016-10-08 12:19:53 UTC
Is Lim issue a different one than the reported by Sree a different issue???

Sree, is this assert a consequence of a bad encoding using gstreamer-vaapi?

What Lim says make sense and it is my fault. I will change it asap.
Comment 4 Víctor Manuel Jáquez Leal 2016-10-08 12:37:28 UTC
Created attachment 337222 [details] [review]
encoder: h264,h265: fix regression in offset count

In commit dc35dafa a bug was introduced because I assumed that
GST_CLOCK_TIME_NONE is zero when is -1. This patch fixes that mistake.
Comment 5 Víctor Manuel Jáquez Leal 2016-10-08 12:52:19 UTC
As I don't have a skylake at hand right now, I'm trying to replicate it with H264 in haswell, but I don't see the assert.
Comment 6 Lim Siew Hoon 2016-10-10 04:33:38 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #5)
> As I don't have a skylake at hand right now, I'm trying to replicate it with
> H264 in haswell, but I don't see the assert.

Hi Victor,
I did run the same test on h264 last week, but I can't reproduce in H264. It only able to consistent reproduce in H265.

Once the fixed changed ready, can you please help check in into v1.8 branch? Thank you.
Comment 7 Víctor Manuel Jáquez Leal 2016-10-19 16:18:29 UTC
Comment on attachment 337222 [details] [review]
encoder: h264,h265: fix regression in offset count

Attachment 337222 [details] pushed as ef3ee8b - encoder: h264,h265: fix regression in offset count
Comment 8 Víctor Manuel Jáquez Leal 2016-10-19 16:22:30 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #7)
> Comment on attachment 337222 [details] [review] [review]
> encoder: h264,h265: fix regression in offset count
> 
> Attachment 337222 [details] pushed as ef3ee8b - encoder: h264,h265: fix
> regression in offset count

Also pushed for branch 1.8
Comment 9 Lim Siew Hoon 2017-03-17 03:02:36 UTC
This issue already fixed. Can't reproduce anymore with the code fixes. I think we can close this bugzilla now. 

Sorry, I forgot to update at here.
Comment 10 Víctor Manuel Jáquez Leal 2017-03-17 08:48:02 UTC
Fixed since release 1.10. Closing now.