Page 1 of 1

OpenGL 360 video rendering with hardware acceleration

Posted: 09 Mar 2018 18:34
by FL53
Hi,

I am trying to do 360 video OpenGL rendering using libVLC, applying a shader to lookup into the texture and get only the texture area needed regarding the user's gaze & FOV.
The only way I found to do that with libVLC was to use "libvlc_video_set_callbacks" to get the pixels data and store them next into an OpenGL texture (outside from the lock/unlock/display clalbacks) but when using this callback process the hardware decoding (--ffmpeg-hw) seems not be used and the texture copy in lock/unlock callbacks is two slow.

Does someone can advise me so I can use libVLC to do that easily (best solution would be to get the video decoded thanks to the hardware and to copy pixels data directly to texture memory area without uploading the pixels data into RAM) ?
Thanks in advance,
Best regards,

Marc

Re: OpenGL 360 video rendering with hardware acceleration

Posted: 10 Mar 2018 01:18
by FL53
The conversion/scale from video resolution to texture resolution (not the same in my initial code) was the point which made the pixels copy slow. Using the video resolution as texture resolution seems to fix the "pixels copy slowdown" behaviour.