[vlc-commits] direct3d9: fix orientation

Salah-Eddin Shaban git at videolan.org
Mon Nov 20 19:24:06 CET 2017


vlc | branch: master | Salah-Eddin Shaban <salah at videolan.org> | Fri Nov 17 22:46:46 2017 +0200| [c8d4e05cf956e3a99ba66a944961f6cbfde75f6a] | committer: Jean-Baptiste Kempf

direct3d9: fix orientation

refs #11778, #18368

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8d4e05cf956e3a99ba66a944961f6cbfde75f6a
---

 modules/video_output/win32/direct3d9.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 011100f6b8..3fd47a1eee 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1306,48 +1306,48 @@ static void Direct3D9DestroyShaders(vout_display_t *vd)
 static void orientationVertexOrder(video_orientation_t orientation, int vertex_order[static 4])
 {
     switch (orientation) {
-        case ORIENT_ROTATED_90:
+        case ORIENT_ROTATED_90:      /* ORIENT_RIGHT_TOP */
             vertex_order[0] = 1;
             vertex_order[1] = 2;
             vertex_order[2] = 3;
             vertex_order[3] = 0;
             break;
-        case ORIENT_ROTATED_270:
+        case ORIENT_ROTATED_270:     /* ORIENT_LEFT_BOTTOM */
             vertex_order[0] = 3;
             vertex_order[1] = 0;
             vertex_order[2] = 1;
             vertex_order[3] = 2;
             break;
-        case ORIENT_ROTATED_180:
+        case ORIENT_ROTATED_180:     /* ORIENT_BOTTOM_RIGHT */
             vertex_order[0] = 2;
             vertex_order[1] = 3;
             vertex_order[2] = 0;
             vertex_order[3] = 1;
             break;
-        case ORIENT_TRANSPOSED:
+        case ORIENT_TRANSPOSED:      /* ORIENT_LEFT_TOP */
             vertex_order[0] = 0;
             vertex_order[1] = 3;
             vertex_order[2] = 2;
             vertex_order[3] = 1;
             break;
-        case ORIENT_HFLIPPED:
-            vertex_order[0] = 3;
-            vertex_order[1] = 2;
-            vertex_order[2] = 1;
-            vertex_order[3] = 0;
-            break;
-        case ORIENT_VFLIPPED:
+        case ORIENT_HFLIPPED:        /* ORIENT_TOP_RIGHT */
             vertex_order[0] = 1;
             vertex_order[1] = 0;
             vertex_order[2] = 3;
             vertex_order[3] = 2;
             break;
-        case ORIENT_ANTI_TRANSPOSED: /* transpose + vflip */
-            vertex_order[0] = 1;
+        case ORIENT_VFLIPPED:        /* ORIENT_BOTTOM_LEFT */
+            vertex_order[0] = 3;
             vertex_order[1] = 2;
-            vertex_order[2] = 3;
+            vertex_order[2] = 1;
             vertex_order[3] = 0;
             break;
+        case ORIENT_ANTI_TRANSPOSED: /* ORIENT_RIGHT_BOTTOM */
+            vertex_order[0] = 2;
+            vertex_order[1] = 1;
+            vertex_order[2] = 0;
+            vertex_order[3] = 3;
+            break;
        default:
             vertex_order[0] = 0;
             vertex_order[1] = 1;



More information about the vlc-commits mailing list