Bug 95349 - with decode + VPP (ProcAmp or STDE) for causing video output with a few horizontal line
Summary: with decode + VPP (ProcAmp or STDE) for causing video output with a few horiz...
Status: RESOLVED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: PengChen
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-11 08:14 UTC by Lim Siew Hoon
Modified: 2016-06-22 01:37 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Lim Siew Hoon 2016-05-11 08:14:30 UTC
The issue report out in gstreamer bugzilla 
gstreamer-vaapi 
libva : git master
intel-driver: git master

Same issue report out in gstreamer-vaapi: 
https://bugzilla.gnome.org/show_bug.cgi?id=766012
https://bugzilla.gnome.org/show_bug.cgi?id=765572

I need help to debug on this issue.

If just purely run raw stream using vpp by changing the default value (hue or  brightness or saturation or contrast) not issue at all.

If run just decode also not issue at all.

Once the combined with decode + vpp the horizontal line issue will be appear.

Found out one H264 video clip playing with any issue but the video clip itself didn't contains any B slice. 


Currently this issue is blocking out test. I'm not sure this issue below to gstreamer-vaapi or Intel-driver/libva.
Comment 1 Lim Siew Hoon 2016-05-11 08:17:11 UTC
> 
> Found out one H264 video clip playing with any issue but the video clip
> itself didn't contains any B slice. 
> 

Correct the typo: the only one video clip from H264 video clip play without any issue. This issue also happen in others video format like VC1, VP8.

I'm runninng the test on using BXT.
Comment 2 PengChen 2016-05-19 08:50:56 UTC
for color balance setting, need gstreamer to update some code as below. not use multiple filter buffers, but one filter buffer with multiple elements for different items.
{

        VAProcFilterParameterBufferColorBalance color_balance_param[4];
        VABufferID color_balance_param_buf_id;
        float value;
        uint32_t i, count;
        int8_t status;

        VAProcFilterCapColorBalance color_balance_caps[VAProcColorBalanceCount];
        unsigned int num_color_balance_caps = VAProcColorBalanceCount;
        va_status = vaQueryVideoProcFilterCaps(m_vaDisplay, context_id,
                                               VAProcFilterColorBalance,
                                               &color_balance_caps, &num_color_balance_caps);

        count = 0;
        printf("Color balance params: ");
        for (i = 0; i < num_color_balance_caps; i++) {
            if (color_balance_caps[i].type == VAProcColorBalanceHue) {
                color_balance_param[count].attrib  = VAProcColorBalanceHue;
                value = 150;// read_value_float(g_config_file_fd, "COLOR_BALANCE_HUE", &value);
                printf("Hue: ");
            } else if (color_balance_caps[i].type == VAProcColorBalanceSaturation) {
                color_balance_param[count].attrib  = VAProcColorBalanceSaturation;
                value = 1;// read_value_float(g_config_file_fd, "COLOR_BALANCE_SATURATION", &value);
                printf("Saturation: ");
            } else if (color_balance_caps[i].type == VAProcColorBalanceBrightness) {
                color_balance_param[count].attrib  = VAProcColorBalanceBrightness;
                value = 1;// read_value_float(g_config_file_fd, "COLOR_BALANCE_BRIGHTNESS", &value);
                printf("Brightness: ");
            } else if (color_balance_caps[i].type == VAProcColorBalanceContrast) {
                color_balance_param[count].attrib  = VAProcColorBalanceContrast;
                value = 1;// read_value_float(g_config_file_fd, "COLOR_BALANCE_CONTRAST", &value);
                printf("Contrast: ");
            } else {
                continue;
            }

            color_balance_param[count].value = value;
            color_balance_param[count].type  = VAProcFilterColorBalance;
            count++;

            printf("%4f,  ", value);
        }

        va_status = vaCreateBuffer(m_vaDisplay, context_id,
                                   VAProcFilterParameterBufferType, sizeof(color_balance_param), 4,
                                   color_balance_param, &color_balance_param_buf_id);

        filter_param_buf_id = color_balance_param_buf_id;
    }
Comment 3 PengChen 2016-05-19 13:18:47 UTC
it has two driver issues for this problem. I am working on them.
1, VEBOX sync issue. if add vaSyncSurface before output the frame, it works rightly
2, vaPutImage() with input P010 surface don't work and sometimes make GPU hang up. but I am wondering why gstreamer do this during its startup.
Comment 4 fei.w.wang 2016-05-27 08:53:26 UTC
Use gst-launch-1.0 filesrc location=/root/video_422/Puppies_640x320_i420.yuv ! videoparse format=i420 width=640 height=320 ! vaapipostroc hue=100 ! vaapisink
to test on all platforms, and same green green stripes appears on KBL&APL&SKL, and appears occasionally.
Comment 5 Austin 2016-06-08 08:24:50 UTC
Any update for this issue?
Comment 6 PengChen 2016-06-08 08:35:00 UTC
The issue disappear when disable libdrm cache, root cause is still unknown
Comment 8 Lim Siew Hoon 2016-06-16 07:39:21 UTC
(In reply to haihao from comment #7)
> Please try https://lists.freedesktop.org/archives/libva/2016-June/004030.html

Tested in APL-I and HSW platform, the issue can't reproduce anymore.
Thank you for the fixed. :)
Comment 9 Lim Siew Hoon 2016-06-16 07:41:38 UTC
(In reply to Lim Siew Hoon from comment #8)
> (In reply to haihao from comment #7)
> > Please try https://lists.freedesktop.org/archives/libva/2016-June/004030.html
> 
> Tested in APL-I and HSW platform, the issue can't reproduce anymore.
> Thank you for the fixed. :)

Ops...It only fixed in HSW platform. The APL-I (BXT) still can reproduce the issue.
Comment 10 Lim Siew Hoon 2016-06-16 07:48:40 UTC
(In reply to Lim Siew Hoon from comment #9)
> (In reply to Lim Siew Hoon from comment #8)
> > (In reply to haihao from comment #7)
> > > Please try https://lists.freedesktop.org/archives/libva/2016-June/004030.html
> > 
> > Tested in APL-I and HSW platform, the issue can't reproduce anymore.
> > Thank you for the fixed. :)
> 
> Ops...It only fixed in HSW platform. The APL-I (BXT) still can reproduce the
> issue.

Sorry. My mistake forgot to patch code in my BXT system. It is truly fixed it. Run twice and confirmed fixed in BXT. Thank you.
Comment 11 sreerenj 2016-06-21 09:43:14 UTC
(In reply to PengChen from comment #2)
> for color balance setting, need gstreamer to update some code as below. not
> use multiple filter buffers, but one filter buffer with multiple elements
> for different items.

It is optional , Or do you think it is mandatory ??? 

> {
>
Comment 12 haihao 2016-06-22 01:35:19 UTC
(In reply to sreerenj from comment #11)
> (In reply to PengChen from comment #2)
> > for color balance setting, need gstreamer to update some code as below. not
> > use multiple filter buffers, but one filter buffer with multiple elements
> > for different items.
> 
> It is optional , Or do you think it is mandatory ??? 
> 
> > {
> >

According to the comments in va_vpp.h, I think it is mandatory.

 * This buffer defines color balance attributes. A VA buffer can hold                                                                             
 * several color balance attributes by creating a VA buffer of desired                                                                          
 * number of elements
Comment 13 haihao 2016-06-22 01:37:02 UTC
Fixed by the commit below

commit 09afaebfb94aad7a01ed5a3f71a77fbb70e7b550
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date:   Thu Jun 16 13:32:00 2016 +0800

    Make sure a right VEBOX_IECP_STATE is used on BDW+


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.