[FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong offset of plane

Chen, Wenbin wenbin.chen at intel.com
Wed Sep 1 04:40:09 EEST 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Lynne
> Sent: Tuesday, August 31, 2021 7:42 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong
> offset of plane
> 
> 31 Aug 2021, 09:24 by wenbin.chen at intel.com:
> 
> > According to spec, if we use VkBindImagePlaneMemoryInfo to bind image
> > we mush create image with disjoint flag.
> > The offset in subresourcelayout is relative to the base address of
> > the plane, but the offset in drm is relative to the drm objectis so
> > I think this offset should be 0.
> > Also, when I import vaapi frame to vulkan I got broken frame, and
> > setting plane_data->offset to 0 makes command works.
> >
> > Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
> >
> 
> I don't quite get the point of this. Is there some situation where
> clients may want to change the modifier of the image they're allocating,
> like maybe use a different modifier when allocating images that would
> be used as framebuffers to be presented?

Maybe you reply to the wrong patch? I assume you want to reply to the 9th patch.
" specify the modifier to create VKImage". 
I tried on the latest intel driver. The log recommend to use linear or drmModifier to create image.
Also if I use optimal to create image, the export drm modifier is unknown.



More information about the ffmpeg-devel mailing list