intel / intel-vaapi-driver

VA-API user mode driver for Intel GEN Graphics family
https://01.org/linuxmedia
Other
308 stars 125 forks source link

fix exporting buffers with 3 planes and VA_EXPORT_SURFACE_SEPARATE_LAYERS #514

Open michaelolbrich opened 4 years ago

michaelolbrich commented 4 years ago

To get the plane offset, y_cb_offset or y_cr_offset must be multiplied with the pitch for the 'Y' plane. See for example i965_DeriveImage().

Without this, exporting formats with 3 planes where cb_cr_pitch == width/2 is broken, because the offset of the third plane is calculated incorrectly.

rmader commented 8 months ago

Just wanted to drop that I've been hitting this as well. I've worked around it with a dirty Gstreamer patch which usually gives the right results, but not always. Would be nice to still see this land!

rmader commented 8 months ago

P.S.: I verified that this MR fixes playback with Gstreamer 1.24 vampeg2dec on my Thinkpad T400 (GM45/P8400) with the following samples: