libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

enc_linalg.h (598B)


      1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style
      4 // license that can be found in the LICENSE file.
      5 
      6 #ifndef LIB_JXL_LINALG_H_
      7 #define LIB_JXL_LINALG_H_
      8 
      9 // Linear algebra.
     10 
     11 #include <array>
     12 
     13 namespace jxl {
     14 
     15 typedef std::array<double, 2> Vector2;
     16 // NB: matrix2x2[row][column]
     17 typedef std::array<Vector2, 2> Matrix2x2;
     18 
     19 // A is symmetric, U is orthogonal, and A = U * Diagonal(diag) * Transpose(U).
     20 void ConvertToDiagonal(const Matrix2x2& A, Vector2& diag, Matrix2x2& U);
     21 
     22 }  // namespace jxl
     23 
     24 #endif  // LIB_JXL_LINALG_H_