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 743958 - Implement workaround rounding control for VC1 simple and main profile
Implement workaround rounding control for VC1 simple and main profile
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
0.5.8
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 743569
 
 
Reported: 2015-02-04 06:01 UTC by Lim Siew Hoon
Modified: 2015-02-10 11:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround rounding control for VC1 simple and main profile. (3.04 KB, patch)
2015-02-04 06:01 UTC, Lim Siew Hoon
needs-work Details | Review
V2: Implement workaround rounding control handling for VC1 Main Profile and Simple Profile (3.02 KB, patch)
2015-02-09 07:52 UTC, Lim Siew Hoon
none Details | Review

Description Lim Siew Hoon 2015-02-04 06:01:40 UTC
Created attachment 296065 [details] [review]
Workaround rounding control for VC1 simple and main profile.

Some macroblock and minor VC1 incorrect red color happen in some of VC1 main profile and simple level video clip.

Issue not found if using mplayer-vaapi.

One of video clip is:
http://cue.la.coocan.jp/hdv_movie/byoubu.wmv

If need to test using customer video clip, you need add in another patch in Intel-VA driver for 0001-No-overlap-smoothing-if-the-overlap-flag-is-0.patch from Haihao.
This patch only fixed in BYT or HSW platform.

For other VC1 video clips are internal video clip not able attach at here.

Attached the fixed for implementation workaround rounding control for VC1 simple and main profile. 

Intel VA Driver 1.2.2 version
Libva 1.2.1 version
Gstreamer and others gstreamer-plugin 1.2.2 version
Gstreamer-vaapi 0.5.8 version

Or 
Intel VA Driver 1.5.0
Libva 1.5.0
Gstreamer and others gstreamer-plugin 1.4.5 version
Gstreamer-vaapi 0.5.9

verifed in using BYT platform in Fedora 18.
Comment 1 Lim Siew Hoon 2015-02-04 06:05:11 UTC
The attachments workaround rounding control for VC1 simple and main profile is for gstreamer-vaapi side to fix some macroblock issue and minor incorrect red color for VC1 main profile and simple profile.
Comment 2 Lim Siew Hoon 2015-02-04 06:48:59 UTC
Sorry. Correct some mistake.
0001-No-overlap-smoothing-if-the-overlap-flag-is-0.patch - only for BYT or IVY. Because it is implement in gen7_mfd_vc1_pic_state function. 
It could be another newer version patch. I'm not sure when the fixed will upstream in Intel VA driver side.


0001-Implemented-workaround-rounding-control-handling-for.patch
Haihao provide another patch for workaround rounding control VC1 in Intel-VA driver side, he recommends workaround should be implement in gst-vaapi side. So I'm implementing it in gstreamer-vaapi side.
Comment 3 sreerenj 2015-02-06 11:23:18 UTC
Review of attachment 296065 [details] [review]:

Please use a single assignment statement "pic_param->rounding_control = priv->rndctrl;" after if-else . Which is not just an optimization but can handle the case of B frames too.
Comment 4 Lim Siew Hoon 2015-02-09 07:52:18 UTC
Created attachment 296411 [details] [review]
V2: Implement workaround rounding control handling for VC1 Main Profile and Simple Profile
Comment 5 sreerenj 2015-02-10 09:52:45 UTC
Pushed , Thanks for the patch..

commit 6edb173486aa17226ad0e0ee5775ab57ea2daae4
Author: Lim Siew Hoon <siew.hoon.lim@intel.com>
Date:   Tue Feb 10 11:40:16 2015 +0200

    decoder: vc1: Rounding control handling for VC1 simple and Main profile
    
    Added rounding control handling for VC1 simple and Main profile
    based on VC1 standard spec: section 8.3.7
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743958
    
    Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
    Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Comment 6 Víctor Manuel Jáquez Leal 2015-02-10 11:18:05 UTC
Let me chime in. Perhaps I'll say something off-topic but I'll take the risk.

I tested this patch with the commented test file. With the patch or without it I saw no difference with my HSW laptop.

Nonetheless I see horrible green blocks from time to time. I tried with libav (pure software codec) and the green blocks are not shown at all. So I took this opportunity to try mplayer-vaapi, and yes, the same green blocks are shown too. So, I guess is a problem in the VAAPI decoding, perhaps in the lower layers.
Comment 7 Lim Siew Hoon 2015-02-10 11:26:01 UTC
You also need a patch from Intel VA driver side. 
https://bugs.freedesktop.org/show_bug.cgi?id=87482
Comment 8 Víctor Manuel Jáquez Leal 2015-02-10 11:51:24 UTC
(In reply to Lim Siew Hoon from comment #7)
> You also need a patch from Intel VA driver side. 
> https://bugs.freedesktop.org/show_bug.cgi?id=87482

Cool! Now it looks good. Thanks!