|
Blender V5.3
|
#include <cmath>#include <cstdio>#include <cstdlib>#include <iostream>#include <memory>#include <OpenImageIO/Imath.h>#include <OpenImageIO/color.h>#include <OpenImageIO/filesystem.h>#include <OpenImageIO/filter.h>#include <OpenImageIO/fmath.h>#include <OpenImageIO/imagebuf.h>#include <OpenImageIO/imagebufalgo.h>#include <OpenImageIO/imagebufalgo_util.h>#include <OpenImageIO/imageio.h>#include <OpenImageIO/string_view.h>#include <OpenImageIO/strutil.h>#include <OpenImageIO/sysutil.h>#include <OpenImageIO/thread.h>#include "util/color.h"#include "util/colorspace.h"#include "util/image.h"#include "util/image_maketx.h"#include "util/image_metadata.h"#include "util/log.h"#include "util/md5.h"#include "util/path.h"#include "util/tbb.h"#include "util/types_image.h"Go to the source code of this file.
Functions | |
| static CCL_NAMESPACE_BEGIN std::string | datestring (time_t t) |
| template<class SRCTYPE> | |
| static void | interppixel_NDC (const OIIO::ImageBuf &buf, float x, float y, OIIO::span< float > pixel, bool envlatlmode, OIIO::ImageBuf::ConstIterator< SRCTYPE > &it, OIIO::ImageBuf::WrapMode wrapmode) |
| template<class SRCTYPE> | |
| static bool | resize_block_ (OIIO::ImageBuf &dst, const OIIO::ImageBuf &src, OIIO::ROI roi, bool envlatlmode) |
| template<class SRCTYPE> | |
| static void | halve_scanline (const SRCTYPE *s, const int nchannels, size_t sw, float *dst) |
| template<class SRCTYPE> | |
| static bool | resize_block_2pass (OIIO::ImageBuf &dst, const OIIO::ImageBuf &src, OIIO::ROI roi) |
| template<typename SRCTYPE> | |
| static bool | resize_block (OIIO::ImageBuf &dst, const OIIO::ImageBuf &src, OIIO::ROI roi, bool envlatlmode) |
| static void | fix_latl_edges (OIIO::ImageBuf &buf) |
| static bool | texture_cache_file_outdated (const string &filepath, const string &tx_filepath) |
| static std::string | alpha_type_string (const ImageAlphaType alpha_type) |
| static std::string | format_type_string (const ImageFormatType format_type) |
| static std::string | unique_filename_tx (const string &filepath, const string &texture_cache_path, ustring colorspace, const ImageAlphaType alpha_type, const ImageFormatType format_type, const bool absolute_texture_cache) |
| bool | resolve_tx (const string &filepath, const string &texture_cache_path, ustring colorspace, const ImageAlphaType alpha_type, const ImageFormatType format_type, string &out_filepath, ImageMetaData &out_metadata) |
| static void | write_stats_tx (OIIO::ImageBuf &buf, const bool use_openexr) |
| template<typename Func> | |
| static void | parallel_for_pixels (const int64_t num, const Func &func) |
| static void | clamp_half_tx (OIIO::ImageBuf &buf, const TypeDesc out_format) |
| static void | convert_srgb_tx (OIIO::ImageBuf &buf, const bool from_srgb, const bool unassociate_alpha) |
| static bool | write_buf_tx (std::unique_ptr< ImageOutput > &out, const string &out_filepath, const TypeDesc out_format, const ImageFormatType format_type, const bool compress_as_srgb, const bool unassociate_alpha, const OIIO::ImageOutput::OpenMode mode, OIIO::ImageBuf &buf) |
| static bool | write_mipmap_tx (std::unique_ptr< ImageOutput > &out, const string &out_filepath, const TypeDesc out_format, const ImageFormatType format_type, const bool compress_as_srgb, const bool unassociate_alpha, OIIO::ImageBuf &large_buf) |
| ustring | make_tx_get_file_colorspace (const ImageMetaData &metadata) |
| static bool | make_tx (const string &filepath, const string &out_filepath, ImageMetaData &metadata, const ImageAlphaType alpha_type, const ImageFormatType format_type, const ImageSpec &in_spec) |
| bool | make_tx (const string &filepath, const string &out_filepath, ustring colorspace, const ImageAlphaType alpha_type, const ImageFormatType format_type) |
|
static |
Definition at line 323 of file image_maketx.cpp.
References alpha_type_string(), assert, IMAGE_ALPHA_ASSOCIATED, IMAGE_ALPHA_AUTO, IMAGE_ALPHA_CHANNEL_PACKED, IMAGE_ALPHA_IGNORE, IMAGE_ALPHA_NUM_TYPES, and IMAGE_ALPHA_UNASSOCIATED.
Referenced by alpha_type_string(), make_tx(), and unique_filename_tx().
|
static |
Definition at line 581 of file image_maketx.cpp.
References assert, clamp(), clamp_half_tx(), and parallel_for_pixels().
Referenced by clamp_half_tx(), and write_buf_tx().
|
static |
Definition at line 596 of file image_maketx.cpp.
References assert, color_linear_to_srgb(), color_linear_to_srgb_v4(), color_srgb_to_linear(), color_srgb_to_linear_v4(), convert_srgb_tx(), parallel_for_pixels(), float4::w, float4::x, float4::y, and float4::z.
Referenced by convert_srgb_tx(), write_buf_tx(), and write_mipmap_tx().
|
static |
Definition at line 42 of file image_maketx.cpp.
References datestring(), and string_printf().
Referenced by datestring(), and make_tx().
|
static |
Definition at line 247 of file image_maketx.cpp.
References fix_latl_edges(), x, and y.
Referenced by fix_latl_edges(), and write_buf_tx().
|
static |
Definition at line 349 of file image_maketx.cpp.
References assert, format_type_string(), IMAGE_FORMAT_EQUIANGULAR, and IMAGE_FORMAT_PLAIN.
Referenced by format_type_string(), and unique_filename_tx().
|
static |
Definition at line 159 of file image_maketx.cpp.
References float, and halve_scanline().
Referenced by halve_scanline(), and resize_block_2pass().
|
static |
Definition at line 56 of file image_maketx.cpp.
References floorfrac(), interppixel_NDC(), M_PI, sinf, x, and y.
Referenced by interppixel_NDC(), and resize_block_().
|
static |
Definition at line 771 of file image_maketx.cpp.
References alpha_type_string(), assert, ImageMetaData::colorspace, ColorSpaceManager::colorspace_interop_id(), ImageMetaData::conform_pixels(), datestring(), ColorSpaceManager::get_xyz_to_scene_linear_rgb_string(), ImageMetaData::height, IMAGE_FORMAT_EQUIANGULAR, IMAGE_FORMAT_PLAIN, ImageMetaData::is_channel_packed, ImageMetaData::is_compressible_as_srgb, ImageMetaData::is_float(), ImageMetaData::is_rgba(), LOG_INFO, LOG_WARNING, make_tx(), make_tx_get_file_colorspace(), ImageMetaData::oiio_load_pixels(), out, path_is_file(), path_remove(), string_printf(), TX_FILE_FORMAT_VERSION, ImageMetaData::typedesc(), ImageMetaData::width, write_mipmap_tx(), and write_stats_tx().
| bool make_tx | ( | const string & | filepath, |
| const string & | out_filepath, | ||
| ustring | colorspace, | ||
| const ImageAlphaType | alpha_type, | ||
| const ImageFormatType | format_type ) |
Definition at line 930 of file image_maketx.cpp.
References ImageMetaData::colorspace, ImageMetaData::finalize(), LOG_INFO, LOG_WARNING, make_tx(), ImageMetaData::oiio_load_metadata(), path_create_directories(), and path_dirname().
Referenced by blender::CCL_generate_texture_cache(), OIIOImageLoader::load_metadata(), make_tx(), make_tx(), maketx_func(), and resolve_tx().
| ustring make_tx_get_file_colorspace | ( | const ImageMetaData & | metadata | ) |
Definition at line 760 of file image_maketx.cpp.
References ImageMetaData::colorspace, ColorSpaceManager::colorspace_is_data(), ImageMetaData::is_compressible_as_srgb, make_tx_get_file_colorspace(), u_colorspace_data, u_colorspace_scene_linear, and u_colorspace_scene_linear_srgb.
Referenced by ImageMetaData::finalize(), make_tx(), make_tx_get_file_colorspace(), and resolve_tx().
|
static |
Definition at line 572 of file image_maketx.cpp.
References parallel_for_pixels().
Referenced by clamp_half_tx(), convert_srgb_tx(), and parallel_for_pixels().
|
static |
Definition at line 217 of file image_maketx.cpp.
References assert, resize_block(), resize_block_(), and resize_block_2pass().
Referenced by resize_block().
|
static |
Definition at line 121 of file image_maketx.cpp.
References assert, float, interppixel_NDC(), resize_block_(), x, and y.
Referenced by resize_block(), resize_block_(), and resize_block_2pass().
|
static |
Definition at line 171 of file image_maketx.cpp.
References assert, halve_scanline(), resize_block_(), resize_block_2pass(), x, and y.
Referenced by resize_block(), and resize_block_2pass().
| bool resolve_tx | ( | const string & | filepath, |
| const string & | texture_cache_path, | ||
| ustring | colorspace, | ||
| const ImageAlphaType | alpha_type, | ||
| const ImageFormatType | format_type, | ||
| string & | out_filepath, | ||
| ImageMetaData & | out_metadata ) |
Definition at line 401 of file image_maketx.cpp.
References ImageMetaData::is_tx_file, ImageMetaData::oiio_load_metadata(), path_dirname(), path_is_file(), path_is_relative(), path_join(), resolve_tx(), texture_cache_file_outdated(), and unique_filename_tx().
Referenced by OIIOImageLoader::load_metadata(), maketx_func(), resolve_tx(), and resolve_tx().
|
static |
Definition at line 305 of file image_maketx.cpp.
References LOG_INFO, path_is_file(), and texture_cache_file_outdated().
Referenced by resolve_tx(), and texture_cache_file_outdated().
|
static |
Definition at line 363 of file image_maketx.cpp.
References alpha_type_string(), MD5Hash::append(), ColorSpaceManager::colorspace_is_data(), format_type_string(), MD5Hash::get_hex(), ColorSpaceManager::get_xyz_to_scene_linear_rgb_string(), path_filename(), path_make_relative(), path_normalize(), string_printf(), TX_FILE_FORMAT_VERSION, u_colorspace_data, and unique_filename_tx().
Referenced by resolve_tx(), and unique_filename_tx().
|
static |
Definition at line 647 of file image_maketx.cpp.
References clamp_half_tx(), convert_srgb_tx(), fix_latl_edges(), IMAGE_FORMAT_EQUIANGULAR, LOG_WARNING, out, and write_buf_tx().
Referenced by write_buf_tx(), and write_mipmap_tx().
|
static |
Definition at line 681 of file image_maketx.cpp.
References convert_srgb_tx(), divide_up(), IMAGE_FORMAT_EQUIANGULAR, LOG_WARNING, out, write_buf_tx(), and write_mipmap_tx().
Referenced by make_tx(), and write_mipmap_tx().
|
static |
Definition at line 464 of file image_maketx.cpp.
References LOG_DEBUG, LOG_INFO, string_printf(), and write_stats_tx().
Referenced by make_tx(), and write_stats_tx().