tor-browser

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

enc_debug_image.h (1279B)


      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_ENC_DEBUG_IMAGE_H_
      7 #define LIB_JXL_ENC_DEBUG_IMAGE_H_
      8 
      9 // Optional output images for debugging.
     10 
     11 #include <cstdint>
     12 
     13 #include "lib/jxl/base/status.h"
     14 #include "lib/jxl/enc_params.h"
     15 #include "lib/jxl/image.h"
     16 
     17 namespace jxl {
     18 
     19 Status DumpImage(const CompressParams& cparams, const char* label,
     20                 const Image3<float>& image);
     21 Status DumpImage(const CompressParams& cparams, const char* label,
     22                 const Image3<uint8_t>& image);
     23 Status DumpXybImage(const CompressParams& cparams, const char* label,
     24                    const Image3<float>& image);
     25 Status DumpPlaneNormalized(const CompressParams& cparams, const char* label,
     26                           const Plane<float>& image);
     27 Status DumpPlaneNormalized(const CompressParams& cparams, const char* label,
     28                           const Plane<uint8_t>& image);
     29 
     30 // Used to skip image creation if they won't be written to debug directory.
     31 static inline bool WantDebugOutput(const CompressParams& cparams) {
     32  return cparams.debug_image != nullptr;
     33 }
     34 
     35 }  // namespace jxl
     36 
     37 #endif  // LIB_JXL_ENC_DEBUG_IMAGE_H_