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 771507 - [gst-vaapi-master][vp9][encoder] reference Mode 1 produces blocky pixels content
[gst-vaapi-master][vp9][encoder] reference Mode 1 produces blocky pixels content
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.9.2
Other Linux
: Normal normal
: 1.9.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-16 00:13 UTC by Daniel Charles
Modified: 2016-09-30 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
encoder: vp9: Fix refresh frame flag setting (1.19 KB, patch)
2016-09-16 11:38 UTC, sreerenj
committed Details | Review

Description Daniel Charles 2016-09-16 00:13:48 UTC
This pipeline produces blocky pixels content. Analyzing the output it is losing the proper reference frame at the 8th frame. 

gst-launch-1.0 -e filesrc location=./someyuv_1920x1080.I420 blocksize=3110400 ! video/x-raw, format=I420, width=1920, height=1080, framerate=30/1, pixel-aspect-ratio=1/1 ! y4menc ! y4mdec ! vaapivp9enc rate-control=cqp keyframe-period=300 ref-pic-mode=1  ! webmmux ! filesink location=./gstvp9enc_2Mbps_mode1ref.webm
Comment 1 sreerenj 2016-09-16 09:11:53 UTC
Thanks for reporting it.. Can't see visible artifacts in stream generated from videotestsrc. Will have to test with some real streams :)
Might be messed-up something with the circular insertion algoritham used for ref-pic mode 1 ...We will investigate it...unfortunately not sure about the inclusion of fix in 1.10 release..
Comment 2 sreerenj 2016-09-16 11:38:39 UTC
Created attachment 335695 [details] [review]
encoder: vp9: Fix refresh frame flag setting

While doing the mode-1 referece picture selection,
the circular buffer logic was not correctly setting the
refresh frame flags as per VP9 spec.
Make sure refresh_flag[0] get updated correclty after
each cycle of GST_VP9_REF_FRAMES.


Daniel,
Could you please have a try with the attached patch?
Comment 3 Daniel Charles 2016-09-16 16:00:44 UTC
Patch does fix the error.

Tested-by:"Daniel Charles <daniel.charles@intel.com>"
Comment 4 Daniel Charles 2016-09-16 16:18:33 UTC
FWIW, videotestsrc shows also the problem when analyzing the resultant file.  It does not show a visual problem as only 4 frames are wrong and videotestsrc patterns don't help in this situation

My pipeline

gst-launch-1.0 -e videotestsrc num-buffers=1700 pattern=11 ! video/x-raw, format=I420, width=1920, height=1080, framerate=30/1, pixel-aspect-ratio=1/1 ! vaapivp9enc rate-control=cqp keyframe-period=300 ref-pic-mode=1  ! webmmux ! filesink location=./gstvp9enc_mode1ref.webm
Comment 5 sreerenj 2016-09-20 09:14:42 UTC
I think it is good to have this fix in 1.10, late alredy? :)
Comment 6 Víctor Manuel Jáquez Leal 2016-09-20 11:38:50 UTC
(In reply to sreerenj from comment #5)
> I think it is good to have this fix in 1.10, late alredy? :)

Nope. Go ahead!
Comment 7 sreerenj 2016-09-21 07:08:29 UTC
Review of attachment 335695 [details] [review]:

pushed, closing
Comment 8 sreerenj 2016-09-21 07:09:14 UTC
commit 44a90c196ddce97519d99311983ac04631e43d58
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Wed Sep 21 09:52:21 2016 +0300

    encoder: vp9: Fix refresh frame flag setting
    
    While doing the mode-1 referece picture selection,
    the circular buffer logic was not correctly setting the
    refresh frame flags as per VP9 spec.
    Make sure refresh_flag[0] get updated correclty after
    each cycle of GST_VP9_REF_FRAMES.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771507