Skip to content

interop_sw: do not rely on i_visible_pitch

Romain Vimont requested to merge rom1v/vlc:interop_no_visible_pitch into master

The meaning of i_visible_pitch in plane_t is broken: exposing the visible area size without knowing the offset is meaningless (it may only be used correctly when there is no offset).

See !2879 (closed).

Rework the software OpenGL interop to avoid using its value.

Fixes #27264 (closed)


Here are screenshots with the sample from #27264 (closed).

Before:

pitch_before

After:

pitch_after

Notice that an incorrect green band is remaining on the right. The reason is that when an offset is present in a picture, plane_CopyPixels() copies the wrong area (even before OpenGL receives the picture_t):

       source plane                           destination plane
   +-------------------+                    +-------------------+
   |                   |                    |          '''''''''|
   |     ...........   | plane_CopyPixels() |     .....'''''''''|
   |     : visible :   |  --------------->  |     :    '''''''''|
   |     :  area   :   |                    |'''''''''''''''''''|
   |     ...........   |                    |'''''''''''''''''''|
   +-------------------+                    +-------------------+

This will be targeted in a separate MR.

Edited by Romain Vimont

Merge request reports

Loading