MediaSDK icon indicating copy to clipboard operation
MediaSDK copied to clipboard

ffmpeg decoded qsv avframe transfered to opengl texture

Open linxierr opened this issue 2 years ago • 3 comments

Hi there, I am currently using ffmpeg qsv_h264 and opengl redering on windows , is there any api that can transfer the decode frame to opengl texture to make the 0-copy rendering, thank you.

linxierr avatar Jul 21 '22 07:07 linxierr

@xhaihao Could you please give some comments?

wangyan-intel avatar Jul 21 '22 10:07 wangyan-intel

av_hwframe_map() may map a qsv frame to a d3d11 frame, then you may use the d3d11 frame in your app. See https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/hwcontext.h#L543-L583

xhaihao avatar Jul 22 '22 01:07 xhaihao

av_hwframe_map() may map a qsv frame to a d3d11 frame, then you may use the d3d11 frame in your app. See https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/hwcontext.h#L543-L583

very appreciate it, thank you, and I'll try to research how to share the memory for d3d11 and opengl.

By the way, Do mediaSDK has the similar function like the link refers for cuda https://www.qtav.org/blog/cuda_0_copy.html.

linxierr avatar Jul 22 '22 03:07 linxierr