[vlc-commits] [Git][videolan/vlc][master] opengl: fix orientation matrix initialization
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Oct 28 08:41:12 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
5ed8c5c7 by Romain Vimont at 2021-10-28T08:16:31+00:00
opengl: fix orientation matrix initialization
The orientation matrix was not initialized if orientation was
ORIENT_NORMAL.
The regression has been introduced by commit
01db27e13f2bab84d9921694b81ca3743851ee49: since the matrix has been
reduced to 2x3, all the matrix components were set by the macro
MATRIX_SET(), so the prealable initialization to "identity" has been
removed.
However, the switch did not cover the case ORIENT_NORMAL, which had
nothing to do if the matrix was already initialized to "identity".
In practice, this caused a problem only on Android with hardware
acceleration enabled, because interop_android.c is the only interop
which does not apply a vflip to the input format (see commit
1fee4df0606a38d804ddfa0175b5584b7ddc6591).
- - - - -
1 changed file:
- modules/video_output/opengl/importer.c
Changes:
=====================================
modules/video_output/opengl/importer.c
=====================================
@@ -83,6 +83,10 @@ InitOrientationMatrix(float matrix[static 2*3], video_orientation_t orientation)
*/
switch (orientation) {
+ case ORIENT_NORMAL:
+ /* No transformation */
+ memcpy(matrix, MATRIX2x3_IDENTITY, sizeof(MATRIX2x3_IDENTITY));
+ break;
case ORIENT_ROTATED_90:
/**
* 1---2 2---3
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5ed8c5c794dc07325d169a32f8c146e878459480
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5ed8c5c794dc07325d169a32f8c146e878459480
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list