[vlc-devel] [PATCH v2 0/8] refactor viewpoint transformation into rotation matrix

Alexandre Janniaux ajanni at videolabs.io
Wed Mar 6 16:31:30 CET 2019


Hi,

This is v2 of the patchset on viewpoint which can be found here:
https://mailman.videolan.org/pipermail/vlc-devel/2019-February/122774.html

It refactors the generation of the rotation matrix in both opengl and d3d11
video output and avoid doing the matrix multiplication for each vertex in the
shaders.

My final goal behind is also to provide quaternion inside vlc_viewpoint_t
instead of Euler/Tait-Bryan angles, as it won't provide satisfying results with
HMD devices or maybe devices with gyroscope.
Thus, another patchset will come right after this one to refactor the usage of
viewpoint in a more general way.

Changes since last version:
+ add documentation
+ move vlc_viewpoint_to_4x4 to a dedicated source file
+ use single precision computation in vlc_viewpoint_to_4x4
+ remove almost unused local RAD macro
+ refactor d3d11 output too

Alexandre Janniaux (8):
  viewpoint: add reverse viewpoint function
  viewpoint: add euler to 4x4 matrix conversion
  vlccore: export vlc_viewpoint_to_4x4
  opengl: use vlc_viewpoint_to_4x4 to compute view matrix
  opengl: use ViewMatrix instead of individual rotation
  d3d11: rename View matrix into Zoom
  d3d11: use vlc_viewpoint_to_4x4 to generate view matrix
  d3d11: use View matrix instead of individual rotation

 include/vlc_viewpoint.h                    |  29 ++++++
 modules/video_output/opengl/vout_helper.c  | 112 ++++-----------------
 modules/video_output/win32/d3d11_shaders.c |   8 +-
 modules/video_output/win32/d3d11_shaders.h |   4 +-
 modules/video_output/win32/direct3d11.c    |  71 ++-----------
 src/Makefile.am                            |   3 +-
 src/libvlccore.sym                         |   1 +
 src/misc/viewpoint.c                       |  73 ++++++++++++++
 8 files changed, 135 insertions(+), 166 deletions(-)
 create mode 100644 src/misc/viewpoint.c

-- 
2.21.0



More information about the vlc-devel mailing list