blender/intern/cycles/util
Brecht Van Lommel 9c285aa0da Fix #155861: Crash rendering CMYK JPEG textures in Cycles
The OpenImageIO version we use has broken CMYK to RGB conversion in
JPEG, this is a temporary workaround until we upgrade to a newer
version. Directly read the CMYK image with libjpeg.

Note that when we upgrade, we can remove the CMYK conversion code
entirely as OpenImageIO supports this natively nowadays.

---

NOTE: This is the backport for 5.1.1.
Pull Request: https://projects.blender.org/blender/blender/pulls/157146
2026-04-10 09:07:36 +02:00
..
algorithm.h Cycles: Adaptive subdivision triangular patches 2025-05-19 12:04:11 +02:00
aligned_malloc.cpp Refactor: Unify memory API to MEM_new and MEM_delete variations 2026-01-26 19:20:33 +01:00
aligned_malloc.h Fix: Wrong Cycles NanoVDB memory alignment on Windows 2025-07-09 20:59:27 +02:00
args.h Refactor: Cycles: Stop using entire OIIO namespace 2025-01-03 10:22:52 +01:00
array.h Refactor: Cycles: Add concurrent vector, concurrent set from TBB 2025-03-24 09:42:25 +01:00
atomic.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
boundbox.h Cleanup: Cycles: Restructure camera viewplane calculation 2025-05-26 22:24:20 +02:00
CMakeLists.txt Fix #155861: Crash rendering CMYK JPEG textures in Cycles 2026-04-10 09:07:36 +02:00
color.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
colorspace.cpp Fix: Cycles colorspace_interop_id wrong check for unknown colorspace 2026-02-10 17:27:25 +01:00
colorspace.h Refactor: Cycles: Colorspace changes to prepare for texture cache 2026-01-14 17:57:45 +01:00
concurrent_set.h Refactor: Cycles: Add concurrent vector, concurrent set from TBB 2025-03-24 09:42:25 +01:00
concurrent_vector.h Refactor: Cycles: Add concurrent vector, concurrent set from TBB 2025-03-24 09:42:25 +01:00
debug.cpp Fix: Cycles log levels conflict with macros on some platforms 2025-07-10 19:44:14 +02:00
debug.h Fix #135659: Some types of motion are incorrect at low step counts with MetalRT 2025-07-02 10:41:42 +02:00
defines.h Cleanup: Cycles integer overflow not properly ignored by Clang 2025-12-10 14:35:59 +01:00
deque.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
disjoint_set.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
guarded_allocator.cpp Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
guarded_allocator.h Refactor: Unify memory API to MEM_new and MEM_delete variations 2026-01-26 19:20:33 +01:00
guiding.h Revert "Cycles: Guiding cleaning up and refactoring the guiding code" 2025-06-11 15:47:06 +02:00
half.h Fix: Cycles half float build error using WITH_CYCLES_NATIVE_ONLY 2026-02-09 23:46:54 +01:00
hash.h Fix: Cycles: Ubsan warnings with new voronoi texture hashing 2025-09-25 17:48:22 +02:00
ies.cpp Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
ies.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
image.h Refactor: Cycles: Changes to image loading to prepare for texture cache 2026-01-14 17:57:46 +01:00
image_impl.h Refactor: Cycles: Remove now unused 3D image texture support 2025-07-09 21:04:38 +02:00
image_metadata.cpp Fix #155861: Crash rendering CMYK JPEG textures in Cycles 2026-04-10 09:07:36 +02:00
image_metadata.h Fix #155861: Crash rendering CMYK JPEG textures in Cycles 2026-04-10 09:07:36 +02:00
list.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
log.cpp Refactor: Cycles: Align log levels with CLOG 2025-08-18 20:22:44 +02:00
log.h Refactor: Cycles: Align log levels with CLOG 2025-08-18 20:22:44 +02:00
map.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
math.h Cycles: introduce dual types 2025-07-28 17:34:24 +02:00
math_base.h Cycles: Use RGBE for denoised guiding buffers to reduce memory usage 2025-08-13 10:28:50 +02:00
math_cdf.cpp Refactor: Cycles: Add const keyword where possible, using clang-tidy 2025-01-03 10:23:20 +01:00
math_cdf.h Refactor: Cycles: Add const keyword where possible, using clang-tidy 2025-01-03 10:23:20 +01:00
math_dual.h Cycles: introduce dual types 2025-07-28 17:34:24 +02:00
math_fast.h Cycles: Use RGBE for denoised guiding buffers to reduce memory usage 2025-08-13 10:28:50 +02:00
math_float2.h Cycles: Optimize 3d and 4d noise 2025-04-09 13:40:10 +02:00
math_float3.h Fix: Build error on Linux arm64 with NEON intrinsics 2025-11-19 12:05:14 +01:00
math_float4.h Refactor: Cycles: Compress vertex normals with octahedral mapping 2026-02-06 19:22:48 +01:00
math_float8.h Refactor: Cycles: Rename rcp to reciprocal 2025-02-04 18:59:24 +01:00
math_int2.h Nodes: Speedup Voronoi by changing the hash function 2025-06-12 20:07:52 +02:00
math_int3.h Cycles: Render volume by ray marching through octrees 2025-08-13 10:28:50 +02:00
math_int4.h Cycles: Half float denormals and optimizations 2026-02-09 13:01:08 +01:00
math_int8.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
math_intersect.h Cycles: Perform direct light shader eval in own kernel 2026-01-20 20:34:16 +01:00
md5.cpp Cleanup: quiet compiler warnings 2025-08-20 11:18:29 +10:00
md5.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
murmurhash.cpp Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
murmurhash.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
nanovdb.cpp Logging: Cycles: Change various warnings to errors 2025-09-20 16:28:43 +02:00
nanovdb.h Cleanup: use conventional license formatting 2025-07-10 00:38:11 +00:00
openimagedenoise.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
openvdb.cpp Refactor: Cycles: Add some OpenVDB and NanoVDB functions to util 2025-07-09 20:59:27 +02:00
openvdb.h Refactor: Cycles: Remove now unused 3D image texture support 2025-07-09 21:04:38 +02:00
optimization.h Fix: Cycles half float build error using WITH_CYCLES_NATIVE_ONLY 2026-02-09 23:46:54 +01:00
param.h Cycles: Perform attribute subdivision on the host side 2025-03-11 20:58:07 +01:00
path.cpp Cycles: Fix occasional failure in path_create_directories 2025-05-22 16:06:51 +02:00
path.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
profiling.cpp Fix: Build error with latest MSVC 2022 2025-02-12 17:18:55 +01:00
profiling.h Cleanup: Fix warnings about comparing int and size_t 2025-03-27 22:07:50 +01:00
progress.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
projection.h Cleanup: spelling in comments, correct comment block formatting 2025-05-01 11:44:33 +10:00
projection_inverse.h Refactor: Cycles: Add const keyword where possible, using clang-tidy 2025-01-03 10:23:20 +01:00
queue.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
random_access_iterator_mixin.h Refactor: Cycles: use more complete random access iterator for unique_ptr_vector 2026-01-16 18:15:11 +01:00
rect.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
semaphore.h Refactor: Cycles: Add const keyword where possible, using clang-tidy 2025-01-03 10:23:20 +01:00
set.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
simd.h Cleanup: Cycles, sign conversion 2025-12-29 12:13:11 +01:00
stack_allocator.h Refactor: Unify memory API to MEM_new and MEM_delete variations 2026-01-26 19:20:33 +01:00
static_assert.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
stats.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
string.cpp Cycles: Show CPU only name under Cycles devices for CPU 2025-12-05 20:14:19 +01:00
string.h Cycles: Show CPU only name under Cycles devices for CPU 2025-12-05 20:14:19 +01:00
system.cpp Cycles: Half float denormals and optimizations 2026-02-09 13:01:08 +01:00
system.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
task.cpp Fix: Cycles log levels conflict with macros on some platforms 2025-07-10 19:44:14 +02:00
task.h Refactor: Cycles: Replace new/delete by unique_ptr, in simple cases 2025-01-03 10:23:30 +01:00
tbb.h Fix #153318: Cycles deadlock with image metadata loading 2026-01-30 17:09:21 +01:00
thread.cpp Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
thread.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
time.cpp Windows ARM64: Fix compilation with MSVC 2025-11-26 16:34:02 +01:00
time.h Cycles: Add Render Time pass 2025-09-22 21:54:08 +02:00
transform.cpp Cleanup: use braces (follow own style guide) 2025-06-11 09:05:26 +00:00
transform.h Fix #151621: Avoid overlap of volume objects with shared geometry 2026-01-30 14:21:37 +01:00
transform_avx2.cpp
types.h Refactor: Cycles: Compress vertex normals with octahedral mapping 2026-02-06 19:22:48 +01:00
types_base.h Cycles: support printf in Metal 15.0 2025-10-01 14:25:44 +02:00
types_dual.h Fix #148752: Cycles GPU rendering artifacts with OSL camera 2025-11-11 23:23:20 +01:00
types_float2.h Fix: Cycles: Support expressions when printing floats with Metal 2026-01-30 14:22:05 +01:00
types_float3.h Fix: Cycles: Support expressions when printing floats with Metal 2026-01-30 14:22:05 +01:00
types_float4.h Fix: Cycles: Support expressions when printing floats with Metal 2026-01-30 14:22:05 +01:00
types_float8.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_image.h Refactor: Cycles: More consistent naming of image functions and structs 2026-01-14 17:57:46 +01:00
types_int2.h Nodes: Speedup Voronoi by changing the hash function 2025-06-12 20:07:52 +02:00
types_int3.h Cleanup: Formatting 2025-10-02 12:55:42 -04:00
types_int4.h Cleanup: Formatting 2025-10-02 12:55:42 -04:00
types_int8.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_normal.h Cleanup: Cycles: Fix various compiler warnings 2026-02-16 12:57:53 +01:00
types_rgbe.h Cycles: Use RGBE for denoised guiding buffers to reduce memory usage 2025-08-13 10:28:50 +02:00
types_spectrum.h Refactor: Cycles: Make math and type headers work by themselves 2025-01-03 10:22:47 +01:00
types_uchar2.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_uchar3.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_uchar4.h Cycles: Perform attribute subdivision on the host side 2025-03-11 20:58:07 +01:00
types_uint2.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_uint3.h Cleanup: Formatting 2025-10-02 12:55:42 -04:00
types_uint4.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
types_ushort4.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
unique_ptr.h Refactor: Cycles: Use #pragma once 2025-01-03 10:22:45 +01:00
unique_ptr_vector.h Refactor: Cycles: use more complete random access iterator for unique_ptr_vector 2026-01-16 18:15:11 +01:00
vector.h Refactor: Cycles: Automated clang-tidy fixups in Cycles 2025-01-03 10:22:55 +01:00
version.h Refactor: Cycles: Sync various build fixes from the standalone repository 2025-03-27 22:07:50 +01:00
windows.cpp Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
windows.h Refactor: Cycles: Add const keyword to more function parameters 2025-01-03 10:23:24 +01:00
xml.h Fix: Cycles lite build failure without Pugixml 2024-12-31 00:50:44 +01:00