Bug 92634

Summary: gallium's vl_mpeg12_decoder does not work with st/va
Product: Mesa Reporter: Julien Isorce <julien.isorce>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: reuben_p
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: build: enable st/va with ilo aka i965 driver
st/va: pass picture desc to begin and decode
vl_mpeg12_decoder: support st/va where intra_matrix can be set after begin_frame

Description Julien Isorce 2015-10-23 10:36:06 UTC
By curiosity I tried gallium vaapi with "ilo" aka i965 driver and it crashed.

Not sure if it is a regression or if the root problem is that vl_mpeg12_decoder does not support chunk decoding (i.e. be able to call decode_bitstream many times between begin_frame / end_frame) which is required for st/va to work.

Following patches fixes the crashes but then I can only see blocky green video :)
Comment 1 Julien Isorce 2015-10-23 10:36:39 UTC
Created attachment 119138 [details] [review]
build: enable st/va with ilo aka i965 driver
Comment 2 Julien Isorce 2015-10-23 10:36:59 UTC
Created attachment 119139 [details] [review]
st/va: pass picture desc to begin and decode
Comment 3 Julien Isorce 2015-10-23 10:37:22 UTC
Created attachment 119140 [details] [review]
vl_mpeg12_decoder: support st/va where intra_matrix can be set after begin_frame
Comment 4 Christian König 2015-10-23 11:13:32 UTC
Please submit "st/va: pass picture desc to begin and decode" to the mesa mailing list. That looks like a bug to me which should be fixed asap.

Regarding "vl_mpeg12_decoder: support st/va where intra_matrix can be set after begin_frame" I would rather like to see st/va delay calling begin_frame until all the necessary data is available.
Comment 5 Julien Isorce 2015-10-23 12:28:46 UTC
(In reply to Christian König from comment #4)
> Please submit "st/va: pass picture desc to begin and decode" to the mesa
> mailing list. That looks like a bug to me which should be fixed asap.
Thx. Done sent.

> 
> Regarding "vl_mpeg12_decoder: support st/va where intra_matrix can be set
> after begin_frame" I would rather like to see st/va delay calling
> begin_frame until all the necessary data is available.

Just to be sure I understand correctly, do you mean the fix should actually be done in st/va directly, right ?
Comment 6 Christian König 2015-10-23 14:32:48 UTC
(In reply to Julien Isorce from comment #5)
> Just to be sure I understand correctly, do you mean the fix should actually
> be done in st/va directly, right ?

Yes, calling begin_picture() should be delayed until we have all the parameters gathered.

I just hacked it together initially like this because we had time pressure (as usually) and UVD didn't need those informations in begin_picture().
Comment 7 Nayan Deshmukh 2017-01-17 15:31:39 UTC
The commit https://cgit.freedesktop.org/mesa/mesa/commit/?id=4b0e9babc673bc4dd834127086982e290b2a3a42 fixes the issue.

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.