Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gstreamer-vaapi][ICL] vaQuerySurfaceAttributes doesn't support YUY2/UYVY VASurfaceAttribPixelFormat. #322

Closed
feiwan1 opened this issue Sep 19, 2018 · 13 comments
Assignees
Labels
In Progress PR: still under discussion

Comments

@feiwan1
Copy link
Contributor

feiwan1 commented Sep 19, 2018

Now, vaQuerySurfaceAttributes only return NV12 format with attrib type of VASurfaceAttribPixelFormat.
Need your help to also support YUY2/UYVY to meet Iotg requirement.

@XinfengZhang
Copy link
Contributor

which context? VP, ENCODE,DECODE?

@feiwan1
Copy link
Contributor Author

feiwan1 commented Sep 25, 2018

Hi @XinfengZhang , Encode.

@wangyan42164
Copy link
Contributor

@feiwan1 @XinfengZhang I submitted one PR for this previously. Could you please review it? Thanks.

@feiwan1
Copy link
Contributor Author

feiwan1 commented Oct 10, 2018

Hi @wangyan42164 , Did you mean PR #323? It should be the fix of issue #318, not the fix of this issue.

@wangyan42164
Copy link
Contributor

@feiwan1 Sure. I can check it.

@wangyan42164
Copy link
Contributor

@feiwan1 How should I reproduce this issue? What profile do you use? VAProfileHEVCMain?

@XinfengZhang XinfengZhang added the In Progress PR: still under discussion label Oct 11, 2018
@feiwan1
Copy link
Contributor Author

feiwan1 commented Oct 12, 2018

Hi @wangyan42164 , I used gst-vaapi cmdline to reproduce this issue:

gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw,format=YUY2 ! vaapih265enc ! fakesink

The default profile is VAProfileHEVCMain, does this profile support YUY2 in driver side? Or I need to use
other profile like 422-main-10?

@wangyan42164
Copy link
Contributor

@feiwan1 I did some initial checking on my KBL(Gen9) platform because I have not ICL (Gen11). But I think they are similar in this issue.
It should have 2 points for this issue:

  1. Surface attribute of VAProfileHEVCMain in media driver doesn't include YUY2 and UYVY. I added some code to fix it.
  2. gstreamer-vaapi cannot support it. I use master branch of gstreamer-vaapi build like the following:
    gst-launch-1.0 version 1.15.0
    GStreamer 1.15.0 (GIT)
    git commit: 00f5fe9ccfc7183eb0f3f02f6efcca06343e70b2

It seems cannot support YUY2 based on the following log:
0:00:00.021939639 16404 0x191d990 ERROR vaapi gstvaapiencoder.c:812:is_chroma_type_supported: We only support YUV 4:2:0 and YUV 4:2:2 for encoding. Please try to use vaapipostproc to convert the input format.

If necessary, I can submit PR for adding YUY2 and UYVY surface support in media driver.
Thanks.

@feiwan1
Copy link
Contributor Author

feiwan1 commented Oct 12, 2018

@wangyan42164 , please add YUY2/UYVY surface support in meida-driver. I will take a look at gst-vaapi side.
Thanks

wangyan42164 added a commit to wangyan42164/media-driver that referenced this issue Oct 12, 2018
Fixes intel#322.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
@wangyan42164
Copy link
Contributor

@feiwan1 Added. Thanks.

@FurongZhang
Copy link
Contributor

I read the whole thread, it is related to codec context. @XinfengZhang to check it.

@feiwan1
Copy link
Contributor Author

feiwan1 commented Oct 18, 2018

According @Maggieie comment on #359 , VAProfileHEVCMain will not support YUY2/UYVY format, If so, do we need to support VAProfileHEVCMain422_10 encode? Now vainfo shows only VAProfileHEVCMain422_10 decode is supported on ICL.

@wangyan-intel
Copy link

Based on @Maggieie's comments, we don't support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Progress PR: still under discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants