libjxl

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

enc_transforms.cc (1300B)


      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 #include "lib/jxl/enc_transforms.h"
      7 
      8 #undef HWY_TARGET_INCLUDE
      9 #define HWY_TARGET_INCLUDE "lib/jxl/enc_transforms.cc"
     10 #include <hwy/foreach_target.h>
     11 #include <hwy/highway.h>
     12 
     13 #include "lib/jxl/dct_scales.h"
     14 #include "lib/jxl/enc_transforms-inl.h"
     15 
     16 namespace jxl {
     17 
     18 #if HWY_ONCE
     19 HWY_EXPORT(TransformFromPixels);
     20 void TransformFromPixels(const AcStrategy::Type strategy,
     21                          const float* JXL_RESTRICT pixels, size_t pixels_stride,
     22                          float* JXL_RESTRICT coefficients,
     23                          float* scratch_space) {
     24   HWY_DYNAMIC_DISPATCH(TransformFromPixels)
     25   (strategy, pixels, pixels_stride, coefficients, scratch_space);
     26 }
     27 
     28 HWY_EXPORT(DCFromLowestFrequencies);
     29 void DCFromLowestFrequencies(AcStrategy::Type strategy, const float* block,
     30                              float* dc, size_t dc_stride) {
     31   HWY_DYNAMIC_DISPATCH(DCFromLowestFrequencies)(strategy, block, dc, dc_stride);
     32 }
     33 
     34 HWY_EXPORT(AFVDCT4x4);
     35 void AFVDCT4x4(const float* JXL_RESTRICT pixels, float* JXL_RESTRICT coeffs) {
     36   HWY_DYNAMIC_DISPATCH(AFVDCT4x4)(pixels, coeffs);
     37 }
     38 #endif  // HWY_ONCE
     39 
     40 }  // namespace jxl