Bug 63951

Summary: [Gst-vappi-0.4]Vaapipostproc failed to convert format NV12 to RGB
Product: libva Reporter: Yang Lianyue <lianyuex.yang>
Component: intelAssignee: Zhong Cong <congx.zhong>
Status: VERIFIED FIXED QA Contact: Sean V Kelley <seanvk>
Severity: normal    
Priority: medium CC: lianyuex.yang, ouping.zhang, tienan.liu
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: postproc-fix-bug-vaapipostproc-format-support

Description Yang Lianyue 2013-04-26 09:02:02 UTC
System Environment:
--------------------------
Platform:HSW/IVB
Libva:            (staging) 6a0942a0eeb557af466522ec7e1a59d47009d75d
inter-driver:     (staging) 5bd630d4ea732818728b0a464f45739c86e08be3
gst-plugins-vaapi:(0.4)     8f5ec72acc6b508ba4c79836a943fbd73c1bef37

Test Steps: 
--------------------------
instruction code:
YV12<-->I420:
gst-launch-0.10 filesrc location=/home/gst_AVC_conformance/Mux_Stream/H264_640x368_frame300.MP4 ! qtdemux ! vaapidecode ! vaapipostproc ! video/x-surface,type=vaapi,format=\(fourcc\)I420 ! vaapisink

NV12<-->RGB
gst-launch-0.10 filesrc location=/home/gst_AVC_conformance/Mux_Stream/H264_640x368_frame300.MP4 ! qtdemux ! vaapidecode ! vaapipostproc ! video/x-surface,type=vaapi,format=\(fourcc\)RGB ! vaapisink

test log:
0:00:00.075701449 32734      0x1deba60 ERROR           GST_PIPELINE ./grammar.y:614:gst_parse_perform_link: could not link vaapipostproc0 to vaapisink0
WARNING: erroneous pipeline: could not link vaapipostproc0 to vaapisink0

Comments:
--------------------------
CSC formats supported on HSW:
1.NV12 <--> RGB
2.NV12 <--> YV12 <--> I420
3.NV12 <--> YUY2
4.YUY2 <--> YV12
But vaapipostproc formats didn’t support:
YV12 <--> I420
NV12 <--> RGB
Comment 1 Ouping Zhang 2013-06-07 02:49:23 UTC
System Environment:
--------------------------
Platform:HSW
Libva:            (staging) 85e0080188ead61f8581fb82532004bfcee54b25
inter-driver:     (staging) 3159d525c24212419b136fcf772c20387631b7c8
gst-plugins-vaapi:(0.4)     73cc7dd0bdfda405cfeeb16a2d7b4cbf945b6d86

gst-launch-0.10 filesrc location=/home/MP4_h264_nHD_30FPS_580Kbps_AAC_44.1KHz_64Kbps_10sec0.7Mb_BBB-300.MP4 ! qtdemux ! vaapidecode ! vaapipostproc ! video/x-surface,format=\(fourcc\)RGB ! vaapisink

ERROR GST_PIPELINE ./grammar.y:614:gst_parse_perform_link: could not link vaapipostproc0 to vaapisink0
WARNING: erroneous pipeline: could not link vaapipostproc0 to vaapisink0
Comment 2 Ouping Zhang 2013-06-07 02:55:34 UTC
GObject
 +----GstObject
       +----GstElement
             +----GstVaapiPostproc

Implemented Interfaces:
  GstImplementsInterface
  GstVideoContext

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-surface
                   type: vaapi
                 opengl: { true, false }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
             interlaced: { true, false }
                 format: { NV12, UYVY, YUY2, YV12 }

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-surface
                   type: vaapi
                 opengl: { true, false }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
             interlaced: { true, false }

so vaapipostproc didn't support RGB
Comment 3 ykzhao 2013-06-14 07:46:25 UTC
It seems that this issue should be related with the gstreamer-vaapi.

The driver can support the VPP function of conversion between NV12 and RGBX. 
For example: putsurface --fmt1 NV12 --fmt2 RGBX.

Thanks.
Comment 4 Zhong Cong 2013-06-18 03:25:32 UTC
Created attachment 80979 [details] [review]
postproc-fix-bug-vaapipostproc-format-support

modified src cap template format to 'Any', so we can set fourcc to driver manually.
Comment 5 Ouping Zhang 2013-06-24 04:40:18 UTC
/home/cc/gst-plugins-vaapi# gst-launch-0.10 filesrc location=/home/720p.mp4 ! qtdemux ! vaapidecode ! vaapipostproc ! video/x-surface,type=vaapi,format=\(fourcc\)RGBX ! vaapisink
 
this cmd works.

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.