Skip to content

OpenGL video output module broken for single-plane devices

= Bug Descrition Since version 3.0.2 using my stk1160 video grabber working in UYVY 4:2:2 single-plane mode only the upper part of the input is displayed with distortion.

= Expected Result Video display showing the whole frames without any distortion.

= Steps to Reproduce Plug your stk1160 device or any other video grabber working in single-plane plane and switch video output mode to OpenGL.

= Further details Working with the official developmentrepository I was able to track down the problem to commit 2599e2f7 .

The file affected is modules/video_output/opengl/converter_sw.c .

Here the PIXEL_UNPACK_ROWLENGTH of textures transfered to the GPU got changed replacing the calculation "i_pitch / i_pixel_pitch" with "i_pitch * tex_width / i_visible_pitch".

I strongly doubt the new version ever worked correctly except for corner-cases in which i_pitch and i_visible_pitch are the same essentially cancelling out each other in the calculation leaving just tex_width still working in multi-plane mode.

However for hardware running single-plane mode such as my stk1160 using UYVY 4:2:2 encoding the calculated rowlength will be off by a factor of i_pixel_pitch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information