tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

epf.h (1021B)


      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_EPF_H_
      7 #define LIB_JXL_EPF_H_
      8 
      9 // Fast SIMD "in-loop" edge preserving filter (adaptive, nonlinear).
     10 
     11 #include "lib/jxl/base/rect.h"
     12 #include "lib/jxl/base/status.h"
     13 #include "lib/jxl/dec_cache.h"
     14 #include "lib/jxl/loop_filter.h"
     15 
     16 namespace jxl {
     17 
     18 // 4 * (sqrt(0.5)-1), so that Weight(sigma) = 0.5.
     19 static constexpr float kInvSigmaNum = -1.1715728752538099024f;
     20 
     21 // kInvSigmaNum / 0.3
     22 constexpr float kMinSigma = -3.90524291751269967465540850526868f;
     23 
     24 // Fills the `state->filter_weights.sigma` image with the precomputed sigma
     25 // values in the area inside `block_rect`. Accesses the AC strategy, quant field
     26 // and epf_sharpness fields in the corresponding positions.
     27 Status ComputeSigma(const LoopFilter& lf, const Rect& block_rect,
     28                    PassesDecoderState* state);
     29 
     30 }  // namespace jxl
     31 
     32 #endif  // LIB_JXL_EPF_H_