diff --git a/CMakeLists.txt b/CMakeLists.txt
index c473e2c0..14eb2d57 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,8 +83,12 @@ set(headers
src/ImGui/imgui_internal.h
src/ImGui/imstb_rectpack.h
src/ImGui/imstb_textedit.h
- src/ImGui/imstb_truetype.h
- )
+ src/ImGui/imstb_truetype.h
+ src/tiny_obj_loader.h
+
+ src/gltf/json.hpp
+ src/gltf/tiny_gltf.h
+)
set(sources
src/main.cpp
@@ -103,7 +107,7 @@ set(sources
src/ImGui/imgui_impl_opengl3.cpp
src/ImGui/imgui_tables.cpp
src/ImGui/imgui_widgets.cpp
- )
+)
list(SORT headers)
list(SORT sources)
diff --git a/README.md b/README.md
index 110697ce..caca8c1d 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,282 @@
CUDA Path Tracer
================
-**University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 3**
+* Linda Zhu
+ * [LinkedIn](https://www.linkedin.com/in/lindadaism/)
+* Tested on: Windows 11, i7-12800H @ 2.40GHz 16GB, NVIDIA GeForce RTX 3070 Ti (Personal Laptop)
-* (TODO) YOUR NAME HERE
-* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
+
+
+## Overview
+
+Welcome to the GPU Path Tracer project, a CUDA-based implementation focusing on efficient ray tracing and rendering.
+
+Built upon fundamental concepts from Physically-based Rendering (PBR), this path tracer integrates with glTF/glb/OBJ files for mesh loading and materials. The essence of this project lies in simulating light physics, enabling effects such as soft shadows, caustics, motion blur, and depth-of-field.
+
+Leveraging the CUDA API from NVIDIA, we efficiently parallelize CPU-bound tasks, significantly reducing rendering time and enhancing the realism of rendered scenes.This endeavor extends our understanding of CUDA kernel functions, memory coalescence, and acceleration spatial data structures. To achieve a high-quality, low-noise final output, we perform 5000 path traces with a maximum of 8 bounces for each call, optimizing the convergence of results.
+
+## Table of Contents
+* [Highlights](#scenes)
+ * [Cyberpunk Animal Kingdom](#zoo)
+ * [English Tearoom](#tearoom)
+* [Path Tracer Basics](#path-tracer-basics)
+
+* [Visual Features](#visual-features)
+ * [Material Shading](#material-shading)
+ * [Stochastic Sampled Anti-Aliasing](#anti-aliasing)
+ * [Motion Blur](#motion-blur)
+ * [Runtime Object Movement](#motion)
+ * [Physically-Based Depth-of-Field](#dof)
+ * [Arbitrary Mesh Loading (glTF, GLB, OBJ)](#mesh-loading)
+
+* [Performance Improvements](#performance)
+ * [Path Termination with Stream Compaction](#stream-compaction)
+ * [Material Based Sorting](#material-sorting)
+ * [First Bounce Ray Caching](#first-bounce-caching)
+ * [Bounding Box Culling for Mesh Loaders](#mesh-bb-culling)
+ * [Acceleration Structure: Bounding Volume Hierarchy](#bvh)
+
+* [Other Scenes & Bloopers!](#bloopers)
+* [Building Instructions](#installation)
+* [References](#references)
+
+## Path Tracer Basics
+Path tracing is a rendering algorithm that emulates the behavior of light as it interacts and propagates through a scene, mirroring real-world light dynamics. In a path-traced image, the scene encompasses comprehensive topological data of all objects within the image. Each pixel in the image is rendered by calculating the incident light on that pixel's corresponding object, considering the object's material color and properties. Consequently, the resulting image adheres to the physical principles governing light in reality, yielding a highly realistic visual representation.
+
+The first diagram below shows the three fundamental ways light translate in the scene. Light may bounce uniformly in a hemisphere around the point of intersection (Diffuse) or it may only bounce in a perfectly reflective direction (Pure Specular). As the light bounces around in the scene, it picks up color from the material.
+
+There is a fundamental difference between the path tracing and real-world light bounce: the light in path tracing starts from the eye, usually placed with the camera, and tries to reach the light source (middle figure below), while in real-world the light comes from the light source to the eye (right figure below). Therefore, path tracing is also called "backward tracing".
+
+
+
+
+
+
+
+*Left: [Bidirectional Scattering Distribution Functions (BSDF)](https://en.wikipedia.org/wiki/Bidirectional_scattering_distribution_function), Middle: How Light Bounces in a Path Tracer, Right: How Light Bounces in Real-world*
+
+Implementation-wise, all the observed light behavior above translates into the ultimate **Light Transport Equation**:
+
+
+
+Given a point `x` on a surface, the output radiance `Lo`, to direction `ωo` is the self emittance `Le` plus an integral of the product of:
+- The incident radiance `Li`, the BSDF `f`, and the cosine term `cosθ`
+
+The integration takes all possible incident directions `ωi` into account, over an entire domain of sphere space `S`.
+
+## Visual Features
+### Shading Kernel with BSDF Evaluations
+We evaluate Bidirectional Scattering Distribution Function (BSDF) for various materials, including diffuse, perfectly reflective, refractive, glass, plastic and lambertian transmissive. BSDF describes the probability that light incoming along a ray `wi` will leave along a direction `wo`. The output `wi` is the new direction for the ray to bounce.
+
+The table below shows a variation of sphere's materials in comparison with the white diffuse material of the box.
+
+Reflective | Refractive
+--- | ---
+ | 
+
+ Glass | Plastic
+--- | ---
+ | 
+
+ | Transmissive (Experiment)
+ | ---
+
+
+
+- Diffuse BRDF: For ideal diffuse surfaces, light is dispersed equally in all directions within the hemisphere centered about the normal. We use random sampling (cosine-weighted scatter function) to choose the ray direction in `calculateRandomDirectionInHemisphere`.
+- Specular BRDF: For perfectly specular reflective surfaces, there's ONLY one possible direction for the outgoing ray. This `wi` is determined using `glm::reflect`, which reflects `wo` about the surface normal. This yields a mirror-like reflectance model.
+- Specular BTDF: For refractive surfaces, there's also ONLY one possible direction for the outgoing ray, but in the opposite hemisphere of the normal.According to Snell's Law, we first assess the refraction eligibility by validating the condition `ior * sin_theta < 1.f`, where `ior` is the specified index of refraction and `theta` the angle of incident light. we then use `glm::refract` to compute the scattered ray. At some points of interesection, this may yield total internal reflection, at which point the ray should be reflected outwards similar to the Specular BRDF.
+- Glass BxDF: Glass material combines both Specular BRDF and Specular BTDF. The proportion of reflection versus refraction is controlled by the Fresnel Dielectrics term. This term governs a higher reflection component when the surface normal is nearly perpendicular to the viewing direction, and conversely, a greater refraction component when the surface normal aligns more closely with the viewing direction.
+- Plastic BxDF: Similar to glass, plastic material combines two BSDFs, Specular BRDF and Diffuse BRDF. Based on Fresnel evaluation, it generates a partially rough and partially mirror-like surface.
+- Diffuse BTDF (need fix): Some experiment of lambertian transmission model. Results didn't turn out great. In theory, this is virtually identical to a diffuse BRDF model, but the hemisphere in which rays are sampled is on the other side of the surface normal compared to the hemisphere of diffuse reflection.
+
+### Stochastic Sampled Anti-Aliasing
+Ray tracing is a point sampling process; the rays used to assess light intensities are infinitely thin. However, each pixel of a rendered image has a finite width. Ray tracing in its basic form overcomes this incompatibility by tracing a single primary ray through the centre of each pixel and using the color of that ray as the color of the entire pixel. Since the resultant color of each pixel is based upon one infinitely small sample taken within the centre of each pixel, and because pixels occur at regular intervals, frequency based aliasing problems often arise.
+
+Stochastic sampling anti-aliases scenes through the use of a special sample distribution which replaces most aliased image artifacts with noise of the correct average intensity. In practice, we provide a small, random jitter in the x and y directions of a pixel grid cell, modifying the ray direction (see figure below). Due to this jitter, the rays hit different nearby location in each of the cells and the color values get averaged out for the target pixel.
+
+
+
+Results:
+
+No Anti-Aliasing | Anti-Aliasing
+--- | ---
+ | 
+ | 
+
+### Motion Blur
+Although there are many approaches to achieve motion blur in a path tracer, the general idea is to average samples at different times in the animation. In my implementation, I choose to jitter the ray origin every frame by some random degree stepping towards the destination based on an input velocity vector before I perform `computeIntersections`.
+
+`ray.origin += randomNum * geometry.velocity;`
+
+Here randomness is determined by a noise function of range [-1, 1]. Since each jitter step is not continuously increasing or decreasing, i.e. the sampled ray can be anywhere in between two destinations: one unit down along the velocity vector from the origin and one unit down along the opposite direciton of the velocity from the origin, we are basically oscillating around the object's original position. Throughout time this yields an illusion of object travelling in space, but really the object is moving back and force instead of in one direction. I think this is a work-around to hack motion blur given that we don't need to directly handle timeframe. In the next section I will introduce another method that actually simulates real object motion (the 3rd image in the table below)to create the blurry effect.
+
+In this example, the sphere has a velocity of [1, 1, 0] and box [-4, 0, 1].
+
+| Static Scene
+| ---
+
+
+Motion Blur | Runtime Movement
+--- | ---
+ | 
+
+### Runtime Object Movement
+For the runtime object movement, we update the transformation of the object at every iteration by some time step:
+
+`timeStep = 1 / (scene->state.iterations * 0.1f)`
+
+This time step means how long we want our geometry to arrive at the next intermediate position before we run out of iterations. At the updated position the pixel is shaded again based on the object's material while mixing with its previous color, yielding an effect of motion blur. As we can see from the third image above, the objects are moving continuously in one correct direction until they reach the final destination.
+
+One drawback of this method is that it causes a significant performance drop if there is a large number of dynamic objects in the scene. This is because in the main `pathtrace` kernel, we are constantly performing naive matrix/vector multiplications, calling `glm::inverse` and `glm::inverseTranspose`, and using `cudaMemcpy` to transfer updated geometry transformation to the GPU. These are all cost-heavy operations so I do not recommend enable this feature for busy simulations. (TODO performance analysis)
+
+Nevertheless, the motion blur effect is a fun feature to work on, and gives you a lot of surprises as you will later see in the bloopers.
+
+### Physically-Based Depth-of-Field
+To achieve the thin lens effect and depth of field (DOF), two key parameters are essential: `FOCAL_DISTANCE` and `APERTURE`. `FOCAL_DISTANCE` determines the focus point's distance where objects appear sharp. `APERTURE` serves as a measure of the desired blur for out-of-focus elements. In terms of implementation, first we identify the target we want to focus on, aka the focal point, in the scene based on `FOCAL_DISTANCE`. Next, we introduce blur to the remaining scene by adjusting the ray's origin and recalculating its direction, originating from the new point of origin and aligning with the focal point. This technique simulates the desired depth of field and a realistic thin lens effect.
+
+Aperture = 0.8 for varying focal length below:
+Focal Dist = 10.0 | Focal Dist = 8.0 | Focal Dist = 6.0
+--- | --- | ---
+ |  | 
+
+
+### Arbitrary Mesh Loading
+In order to render more complex as well as visually interesting scenes, we need to support loading artibrary mesh robustly. I used both the [TinyglTF](https://github.com/syoyo/tinygltf/) and the [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader) libraries to parse raw data and load custom mesh in glTF, GLB and OBJ formats. Since neither `tinygltf` and `tinyobj` built-in classes are GPU-compatible, I defined additional `struct`s to store the geometry's triangulation information, including vertex positions and normals. Furthermore, to simplify the process of transmitting nested struct arrays to the GPU, we opted to condense the vertex data of each mesh into a single extensive buffer housing all the necessary data for every mesh. The Mesh struct itself solely retains the index offset for each set of data. This approach mirrors GLTF/OpenGL's definition of Vertex Buffer Objects (VBOs), presenting an avenue to streamline the GLTF/OBJ files to GPU translation process.
+
+Classic sample models in the realm of Computer Graphics:
+
+Utah Teapot | Stanford Bunny
+--- | ---
+ | 
+
+Standford Dragon | (CG@Penn) Mario
+--- | ---
+ | 
+
+The naive mesh loading method for both file formats, however, has a huge constraint on processing high-poly models (i.e. with a large number of triangles) as the `meshIntersectionTest` has to iterate over every single triangle. As such, naive mesh loading is not practical enough to meet our purpose of introducing complex models to the scene. We further speed up the mesh loading process by employing two optimization approaches: bounding box culling and bounding volume hierarchy, which will be discussed in the performance analysis section below.
+
+## Performance Analysis
+We use a test scene of the mario model in the default cornell box without anti-aliasing, stream compaction, first ray caching and material sorting, as the benchmark to compare with the optimizations below. The mario glTF model contains 36,482 triangles.
+
+### Stream Compaction
+In a path tracer, rays are traced through the scene to simulate light interactions. However, once a ray's path is terminated (e.g., it hits a light source or reaches a maximum number of bounces), there's no need to continue processing that ray. Stream compaction involves removing these terminated rays from further computations, thus avoiding unnecessary operations and associated memory accesses. In practice, we use the `thrust::partition` kernel to partition paths based on completion. This technique is crucial for efficiency and performance optimization in GPU programming and leverages key GPU architecture concepts. Below are some of the advantages:
+
+1. Better Resource Utilization:
+Stream compaction helps optimize memory and computation resources on the GPU. By eliminating inactive rays (terminated or absorbed), we free up valuable memory and processing cycles for active rays, improving overall utilization.
+
+2. Warp Efficiency and Divergence Reduction:
+In GPU architecture, threads are organized into warps, which execute instructions in parallel. When some threads terminate early, they no longer contribute to the computation, reducing the likelihood of warp divergence. Stream compaction helps maintain a cohesive and synchronized execution path, allowing all threads remain engaged in meaningful work.
+
+3. Faster Computation and Convergence:
+By removing inactive rays, we reduce unnecessary calculations, enabling faster traversal through the rendering process. Stream compaction accelerates convergence by focusing computational resources on active rays, converging to a noise-free, accurate rendering output more efficiently.
+
+These benefits are reflected in the noticeable performance gain in the graphs below.
+
+
+
+*Figure 1. Stream Compaction Performance, Unterminated Rays After Each Bounce for One Iteration*
+
+
+
+*Figure 2. Stream Compaction Performance, Average Execution Time with/without Stream Compaction*
+
+In an "open" scene, like the Cornell Box, rays have the potential to escape the scene by passing through openings or reflective surfaces. Stream compaction proves highly effective in such scenarios. Terminated rays can be compacted, eliminating unnecessary computation for those rays that no longer contribute to the image, resulting in significant performance gains. As rays terminate (e.g., exit the scene), they are removed from the active ray set, reducing the overall computational load and improving efficiency.
+
+Conversely, in a "closed" scene where light is entirely contained within the environment (e.g., a closed room), rays typically do not escape, leading to fewer rays terminating. Stream compaction may not offer substantial performance improvements in this context since the majority of rays are expected to complete their path within the closed environment. The termination rate is lower, minimizing the impact of compacting the ray stream. However, it's important to note that even though stream compaction may not yield significant performance gains in a closed scene, it can still optimize the traversal of terminated rays and streamline the ray processing pipeline.
+
+
+### Material Sorting
+ Consider the problem with coloring every path segment in a buffer and performing BSDF evaluation using one big shading kernel: different materials/BSDF evaluations within the kernel will take different amounts of time to complete. Making path segments contiguous in memory by material type should help achieve some performance gain. I use `thrust::sort_by_key` to sort the rays/path segments so that rays/paths interacting with the same material are contiguous in memory before shading. However, contrary to the my expection, the overall performance downgrades significantly after implementing material sorting, as seen in the graph below. Even with an attempt to increase the number of materials used in the scene, the application runtime/FPS was still worse than the unsorted case. My understanding is that with the current scene construction and assets, our test cases perhaps are still simple. There may be little warp divergence in the shading kernel. With presumably much overhead of the sorting kernel call, the impact of material sorting can really be felt in a complex scene with numerous different materials.
+
+
+
+*Figure 3. Material Sorting Performance Based on the Number of Materials in the Scene*
+
+### First Bounce Ray Caching
+Given the deterministic nature of the first intersection test, we employ caching for the initial bounce by storing the results in a buffer. This approach allows us to read these results for subsequent iterations, eliminating the need for an additional `computeIntersections` call per run. However, this optimization isn't compatible with anti-aliasing or depth-of-field techniques, as camera ray jittering in these scenarios may lead to varying first bounce intersection outcomes.
+
+
+
+*Figure 4. First Bounce Ray Caching Performance Impact for Varying Trace Depth*
+
+The above chart shows that caching the first bounce intersections had a very subtle boost in performance. This is likely benefited from the other features I have implemented, specifically the BVH acceleration structure, which is discussed in the next section. The BVH intersection test is much faster, which decreases the total amount of impact that caching one of these tests can have overall. As the ray depth increases, the performance impact from caching also decreased, as now the cached bounce is a smaller weight of the overall computation.
+
+
+### Bounding Box Culling for Mesh Loaders
+A basic optimization I implemented was bounding box culling for mesh loading. This can be toggled with `BB_CULLING` in `utilities.h`. When extracting vertex position data from the model file parser, I calculate the axis-aligned bounding box (AABB) for each triangle, and keep an AABB of the entire mesh updated until all the triangles are loaded. Only if the ray hits this AABB during mesh intersection test, it shall proceed to check the triangles residing within. Otherwise the ray will skip the entire mesh. This is a simple change of the original naive mesh loading method but boosts performance by 28% ~ 35% depending on the triangle count, as seen in Figure 5 below. Bounding box culling works best if the mesh takes up a smaller portion of the scene. If the mesh is very large, the probability of hitting the bounding box and check all the triangles is higher, nearly identical to naive mesh loading, thus losing its advantage.
+
+### Bounding Volume Hierarchy for Mesh Loaders
+One method for avoiding checking a ray against every primitive in the scene or every triangle in a mesh is to bin the primitives in a hierarchical spatial data structure such as a bounding volume hierarchy (BVH). Ray-primitive intersection then involves recursively testing the ray against bounding volumes at different levels in the tree until a leaf containing a subset of primitives/triangles is reached, at which point the ray is checked against all the primitives/triangles in the leaf. This traversal is incredibly efficient, as it allows the algorithm to quickly identify the potential intersection candidates by checking the ray against the bounding volumes at each level. Rays that do not intersect any bounding volume can be pruned early in the traversal, saving computational resources. The illustration from [PBR 4.3](https://pbr-book.org/3ed-2018/Primitives_and_Intersection_Acceleration/Bounding_Volume_Hierarchies) helps visualize a BVH for a simple scene.
+
+
+
+
+
+In practice, we build the data structure on the CPU and encapsulate the tree buffers into their own struct, with its own dedicated GPU memory management functions. For tree construction, I implemented both the midpoint split and surface area heuristic (SAH) partitioning algorithms.
+- **Midpoint Split**: This method involves recursively splitting a set of bounding boxes along their longest axis at the midpoint, creating two child nodes. This process continues until less than 3 primitives (or <= 2) is left in the AABB, resulting in a leaf node. The goal is to partition the bounding volumes efficiently, optimizing for fast ray-object intersection tests by minimizing the traversal depth in the hierarchy. However, if the primitives all have large overlapping bounding boxes, this splitting method may fail to separate the primitives into two groups. This limitation made us shift to the second partitioning approach, SAH.
+
+
+
+
+
+- **Surface Area Heuristic (SAH)**: The SAH model estimates the computational expense of performing ray intersection tests, including the time spent traversing nodes of the tree and the time spent on ray–primitive intersection tests for a particular partitioning of primitives. The chance that a random ray hits a random primitive is proportional to the surface area of that primitive. A partition of the primitives along the chosen axis that gives a minimal SAH cost estimate is found by considering a number of candidate partitions. Below is the formulation of SAH evaluation:
+
+*CSAH = Nleft Aleft + Nright Aright*
+
+In words: the cost of a split is proportional to the summed cost of intersecting the two resulting boxes, including the triangles they store. The cost of a box with triangles is proportional to the number or triangles, times the surface area of the box.
+
+After we build the BVH based on either partitioning method, we perform ray-mesh intersection test by traversing the BVH tree in a recursive process. Starting at the root node:
+
+1. Terminate if the ray misses the AABB of this node.
+2. If the node is a leaf: intersect the ray with the triangles in the leaf.
+3. Otherwise: recurse into the left and right child.
+
+Figure 5 shows the performance impact BVH has on loading high-poly meshes:
+
+
+
+*Figure 5. Performance Comparison of Different Acceleration Methods for Mesh Loaders. **Note** that since the construction for SAH-BVH took forever for the dragon model we could never measure the actual frame time so here in the graph we put a question mark. The reason for this is explained below.*
+
+With BVH of any sort employed, the frame time drops significantly compared to naive mesh loading and even bounding box culling. Looking at naive versus midpoint BVH, the frame time is nearly 6x faster for Teapot, 49x faster for Mario, 122x faster for Stanford Bunny and 647x faster for Stanford Dragon. BVH based on SAH in general has a slight speedup compared to midpoint split. I waited ~4 hours for `buildBVH` to execute but still couldn't reach its completion. This is because although with SAH the trees are more balanced, it increases immensely the computational complexity during BVH construction due to the cost checks. Basically we perform `3 * numTriangles` cost evaluations to determin a split. The cost function is dependent on the number of triangles that would be placed in each child of the current node as well as the surface area of those boxes. Given that my SAH implementation does not outperform midpoint split that much, it is highly doubtful if SAH should be preferred considering the total execution length of rendering complex scenes.
+
+
+
+*Figure 6. BVH Build Time for Midpoint Split and SAH Partitioning*
+
+## Other Scenes & Bloopers!
+Time step set too big so the sphere quickly flew out of the box.
+
+
+
+Barbieland
+
+
+
+Applying the imperfect diffuse transmissive material to the walls.
+
+
+
+## Building Instructions
+All the `macro`s are defined in `utilities.h` where you can toggle the corresponding features. The variable names should be quite self-explanatory given the descriptive comments. Any additional heads-up in terms of running the project is listed below:
+
+1. To render basic sphere & cube geometry, disable both BB culling and BVH.
+
+
+## References
+* Assets
+ * [Mario](https://sketchfab.com/3d-models/mario-obj-c549d24b60f74d8f85c7a5cbd2f55d0f)
+ * [Common 3D Test Models](https://github.com/alecjacobson/common-3d-test-models/tree/master)
+ * [glTF Sample Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0)
+ * [CesiumGS SampleData](https://github.com/CesiumGS/cesium/tree/master/Apps/SampleData/models)
+* Implementations
+ * Material Shading: [BSDFs](https://pbr-book.org/3ed-2018/Materials/BSDFs#BSDF), [Reflective Models](https://pbr-book.org/3ed-2018/Reflection_Models), [GPU Gems 3, Chapter 20](https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling)
+ * Anti-Aliasing: [Paul Bourke's Raytracing Notes](https://paulbourke.net/miscellaneous/raytracing/#:~:text=Stochastic%20Sampling&text=The%20method%20antialiases%20scenes%20through,a%20preset%20number%20of%20cells.)
+ * Object Motion: [Time Interval Ray Tracing for Motion Blur](http://www.cemyuksel.com/research/papers/time_interval_ray_tracing_for_motion_blur-high.pdf)
+ * Camera Lens Effect: [The Thin Lens Model and Depth of Field](https://www.pbr-book.org/3ed-2018/Camera_Models/Projective_Camera_Models#TheThinLensModelandDepthofField)
+ * Mesh Loading: [tinygltf](https://github.com/syoyo/tinygltf/), [glTF-Tutorials](https://github.com/KhronosGroup/glTF-Tutorials/), [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader), ChatGPT :)
+ * Steam Compaction: [GPU Gems 3, Chapter 39](https://developer.nvidia.com/gpugems/gpugems3/part-vi-gpu-computing/chapter-39-parallel-prefix-sum-scan-cuda)
+ * Bounding Volume Hierarchy: [How to Build a BVH - Part 1](https://jacco.ompf2.com/2022/04/13/how-to-build-a-bvh-part-1-basics/), [How to Build a BVH - Part 2](https://jacco.ompf2.com/2022/04/18/how-to-build-a-bvh-part-2-faster-rays/), [The Surface Area Heuristic](https://medium.com/@bromanz/how-to-create-awesome-accelerators-the-surface-area-heuristic-e14b5dec6160), [Efficient Ways to Compute Barycentric Coordinates](https://gamedev.stackexchange.com/questions/23743/whats-the-most-efficient-way-to-find-barycentric-coordinates/23745#23745)
-### (TODO: Your README)
-*DO NOT* leave the README to the last minute! It is a crucial part of the
-project, and we will not be able to grade you without a good README.
diff --git a/external/include/stb_image.h b/external/include/stb_image.h
index b9b265fa..b3edb72f 100644
--- a/external/include/stb_image.h
+++ b/external/include/stb_image.h
@@ -1,5 +1,5 @@
-/* stb_image - v2.06 - public domain image loader - http://nothings.org/stb_image.h
- no warranty implied; use at your own risk
+/* stb_image - v2.28 - public domain image loader - http://nothings.org/stb
+ no warranty implied; use at your own risk
Do this:
#define STB_IMAGE_IMPLEMENTATION
@@ -21,17 +21,20 @@
avoid problematic images and only need the trivial interface
JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib)
- PNG 1/2/4/8-bit-per-channel (16 bpc not supported)
+ PNG 1/2/4/8/16-bit-per-channel
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
- PSD (composited view only, no extra channels)
+ PSD (composited view only, no extra channels, 8/16 bit-per-channel)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
PNM (PPM and PGM binary only)
+ Animated GIF still needs a proper API, but here's one way to do it:
+ http://gist.github.com/urraka/685d9a6340b26b830d49
+
- decode from memory or through FILE (define STBI_NO_STDIO to remove code)
- decode from arbitrary I/O callbacks
- SIMD acceleration on x86/x64 (SSE2) and ARM (NEON)
@@ -39,177 +42,86 @@
Full documentation under "DOCUMENTATION" below.
- Revision 2.00 release notes:
-
- - Progressive JPEG is now supported.
-
- - PPM and PGM binary formats are now supported, thanks to Ken Miller.
-
- - x86 platforms now make use of SSE2 SIMD instructions for
- JPEG decoding, and ARM platforms can use NEON SIMD if requested.
- This work was done by Fabian "ryg" Giesen. SSE2 is used by
- default, but NEON must be enabled explicitly; see docs.
-
- With other JPEG optimizations included in this version, we see
- 2x speedup on a JPEG on an x86 machine, and a 1.5x speedup
- on a JPEG on an ARM machine, relative to previous versions of this
- library. The same results will not obtain for all JPGs and for all
- x86/ARM machines. (Note that progressive JPEGs are significantly
- slower to decode than regular JPEGs.) This doesn't mean that this
- is the fastest JPEG decoder in the land; rather, it brings it
- closer to parity with standard libraries. If you want the fastest
- decode, look elsewhere. (See "Philosophy" section of docs below.)
-
- See final bullet items below for more info on SIMD.
-
- - Added STBI_MALLOC, STBI_REALLOC, and STBI_FREE macros for replacing
- the memory allocator. Unlike other STBI libraries, these macros don't
- support a context parameter, so if you need to pass a context in to
- the allocator, you'll have to store it in a global or a thread-local
- variable.
-
- - Split existing STBI_NO_HDR flag into two flags, STBI_NO_HDR and
- STBI_NO_LINEAR.
- STBI_NO_HDR: suppress implementation of .hdr reader format
- STBI_NO_LINEAR: suppress high-dynamic-range light-linear float API
-
- - You can suppress implementation of any of the decoders to reduce
- your code footprint by #defining one or more of the following
- symbols before creating the implementation.
-
- STBI_NO_JPEG
- STBI_NO_PNG
- STBI_NO_BMP
- STBI_NO_PSD
- STBI_NO_TGA
- STBI_NO_GIF
- STBI_NO_HDR
- STBI_NO_PIC
- STBI_NO_PNM (.ppm and .pgm)
-
- - You can request *only* certain decoders and suppress all other ones
- (this will be more forward-compatible, as addition of new decoders
- doesn't require you to disable them explicitly):
-
- STBI_ONLY_JPEG
- STBI_ONLY_PNG
- STBI_ONLY_BMP
- STBI_ONLY_PSD
- STBI_ONLY_TGA
- STBI_ONLY_GIF
- STBI_ONLY_HDR
- STBI_ONLY_PIC
- STBI_ONLY_PNM (.ppm and .pgm)
-
- Note that you can define multiples of these, and you will get all
- of them ("only x" and "only y" is interpreted to mean "only x&y").
-
- - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still
- want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB
-
- - Compilation of all SIMD code can be suppressed with
- #define STBI_NO_SIMD
- It should not be necessary to disable SIMD unless you have issues
- compiling (e.g. using an x86 compiler which doesn't support SSE
- intrinsics or that doesn't support the method used to detect
- SSE2 support at run-time), and even those can be reported as
- bugs so I can refine the built-in compile-time checking to be
- smarter.
-
- - The old STBI_SIMD system which allowed installing a user-defined
- IDCT etc. has been removed. If you need this, don't upgrade. My
- assumption is that almost nobody was doing this, and those who
- were will find the built-in SIMD more satisfactory anyway.
-
- - RGB values computed for JPEG images are slightly different from
- previous versions of stb_image. (This is due to using less
- integer precision in SIMD.) The C code has been adjusted so
- that the same RGB values will be computed regardless of whether
- SIMD support is available, so your app should always produce
- consistent results. But these results are slightly different from
- previous versions. (Specifically, about 3% of available YCbCr values
- will compute different RGB results from pre-1.49 versions by +-1;
- most of the deviating values are one smaller in the G channel.)
-
- - If you must produce consistent results with previous versions of
- stb_image, #define STBI_JPEG_OLD and you will get the same results
- you used to; however, you will not get the SIMD speedups for
- the YCbCr-to-RGB conversion step (although you should still see
- significant JPEG speedup from the other changes).
-
- Please note that STBI_JPEG_OLD is a temporary feature; it will be
- removed in future versions of the library. It is only intended for
- near-term back-compatibility use.
-
-
- Latest revision history:
- 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
- 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
- 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
- 2.03 (2015-04-12) additional corruption checking
- stbi_set_flip_vertically_on_load
- fix NEON support; fix mingw support
- 2.02 (2015-01-19) fix incorrect assert, fix warning
- 2.01 (2015-01-17) fix various warnings
- 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG
- 2.00 (2014-12-25) optimize JPEG, including x86 SSE2 & ARM NEON SIMD
- progressive JPEG
- PGM/PPM support
- STBI_MALLOC,STBI_REALLOC,STBI_FREE
- STBI_NO_*, STBI_ONLY_*
- GIF bugfix
- 1.48 (2014-12-14) fix incorrectly-named assert()
- 1.47 (2014-12-14) 1/2/4-bit PNG support (both grayscale and paletted)
- optimize PNG
- fix bug in interlaced PNG with user-specified channel count
+LICENSE
+
+ See end of file for license information.
+
+RECENT REVISION HISTORY:
+
+ 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff
+ 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes
+ 2.26 (2020-07-13) many minor fixes
+ 2.25 (2020-02-02) fix warnings
+ 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically
+ 2.23 (2019-08-11) fix clang static analysis warning
+ 2.22 (2019-03-04) gif fixes, fix warnings
+ 2.21 (2019-02-25) fix typo in comment
+ 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs
+ 2.19 (2018-02-11) fix warning
+ 2.18 (2018-01-30) fix warnings
+ 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings
+ 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes
+ 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC
+ 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs
+ 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes
+ 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes
+ 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64
+ RGB-format JPEG; remove white matting in PSD;
+ allocate large structures on the stack;
+ correct channel count for PNG & BMP
+ 2.10 (2016-01-22) avoid warning introduced in 2.09
+ 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED
See end of file for full revision history.
============================ Contributors =========================
- Image formats Bug fixes & warning fixes
- Sean Barrett (jpeg, png, bmp) Marc LeBlanc
- Nicolas Schulz (hdr, psd) Christpher Lloyd
- Jonathan Dummer (tga) Dave Moore
- Jean-Marc Lienher (gif) Won Chun
- Tom Seddon (pic) the Horde3D community
- Thatcher Ulrich (psd) Janez Zemva
- Ken Miller (pgm, ppm) Jonathan Blow
- Laurent Gomila
- Aruelien Pocheville
- Extensions, features Ryamond Barbiero
- Jetro Lauha (stbi_info) David Woo
- Martin "SpartanJ" Golini (stbi_info) Martin Golini
- James "moose2000" Brown (iPhone PNG) Roy Eltham
- Ben "Disch" Wenger (io callbacks) Luke Graham
- Omar Cornut (1/2/4-bit PNG) Thomas Ruf
- Nicolas Guillemot (vertical flip) John Bartholomew
- Ken Hamada
- Optimizations & bugfixes Cort Stratton
- Fabian "ryg" Giesen Blazej Dariusz Roszkowski
- Arseny Kapoulkine Thibault Reuille
- Paul Du Bois
- Guillaume George
- If your name should be here but Jerry Jansson
- isn't, let Sean know. Hayaki Saito
- Johan Duparc
- Ronny Chevalier
- Michal Cichon
- Tero Hanninen
- Sergio Gonzalez
- Cass Everitt
- Engin Manap
- Martins Mozeiko
- Joseph Thomson
- Phil Jordan
-
-LICENSE
-
-This software is in the public domain. Where that dedication is not
-recognized, you are granted a perpetual, irrevocable license to copy,
-distribute, and modify this file as you see fit.
-
+ Image formats Extensions, features
+ Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info)
+ Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info)
+ Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG)
+ Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks)
+ Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG)
+ Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip)
+ Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD)
+ github:urraka (animated gif) Junggon Kim (PNM comments)
+ Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA)
+ socks-the-fox (16-bit PNG)
+ Jeremy Sawicki (handle all ImageNet JPGs)
+ Optimizations & bugfixes Mikhail Morozov (1-bit BMP)
+ Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query)
+ Arseny Kapoulkine Simon Breuss (16-bit PNM)
+ John-Mark Allen
+ Carmelo J Fdez-Aguera
+
+ Bug & warning fixes
+ Marc LeBlanc David Woo Guillaume George Martins Mozeiko
+ Christpher Lloyd Jerry Jansson Joseph Thomson Blazej Dariusz Roszkowski
+ Phil Jordan Dave Moore Roy Eltham
+ Hayaki Saito Nathan Reed Won Chun
+ Luke Graham Johan Duparc Nick Verigakis the Horde3D community
+ Thomas Ruf Ronny Chevalier github:rlyeh
+ Janez Zemva John Bartholomew Michal Cichon github:romigrou
+ Jonathan Blow Ken Hamada Tero Hanninen github:svdijk
+ Eugene Golushkov Laurent Gomila Cort Stratton github:snagar
+ Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex
+ Cass Everitt Ryamond Barbiero github:grim210
+ Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw
+ Philipp Wiesemann Dale Weiler Oriol Ferrer Mesia github:phprus
+ Josh Tobin Neil Bickford Matthew Gregan github:poppolopoppo
+ Julian Raschke Gregory Mullen Christian Floisand github:darealshinji
+ Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007
+ Brad Weinberger Matvey Cherevko github:mosra
+ Luca Sas Alexander Veselov Zack Middleton [reserved]
+ Ryan C. Gordon [reserved] [reserved]
+ DO NOT ADD YOUR NAME HERE
+
+ Jacko Dirks
+
+ To add your name to the credits, pick a random blank space in the middle and fill it.
+ 80% of merge conflicts on stb PRs are due to people adding their name at the end
+ of the credits.
*/
#ifndef STBI_INCLUDE_STB_IMAGE_H
@@ -218,10 +130,8 @@ distribute, and modify this file as you see fit.
// DOCUMENTATION
//
// Limitations:
-// - no 16-bit-per-channel PNG
// - no 12-bit-per-channel JPEG
// - no JPEGs with arithmetic coding
-// - no 1-bit BMP
// - GIF always returns *comp=4
//
// Basic usage (see HDR discussion below for HDR usage):
@@ -231,13 +141,13 @@ distribute, and modify this file as you see fit.
// // ... x = width, y = height, n = # 8-bit components per pixel ...
// // ... replace '0' with '1'..'4' to force that many components per pixel
// // ... but 'n' will always be the number that it would have been if you said 0
-// stbi_image_free(data)
+// stbi_image_free(data);
//
// Standard parameters:
-// int *x -- outputs image width in pixels
-// int *y -- outputs image height in pixels
-// int *comp -- outputs # of image components in image file
-// int req_comp -- if non-zero, # of image components requested in result
+// int *x -- outputs image width in pixels
+// int *y -- outputs image height in pixels
+// int *channels_in_file -- outputs # of image components in image file
+// int desired_channels -- if non-zero, # of image components requested in result
//
// The return value from an image loader is an 'unsigned char *' which points
// to the pixel data, or NULL on an allocation failure or if the image is
@@ -245,11 +155,12 @@ distribute, and modify this file as you see fit.
// with each pixel consisting of N interleaved 8-bit components; the first
// pixel pointed to is top-left-most in the image. There is no padding between
// image scanlines or between pixels, regardless of format. The number of
-// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
-// If req_comp is non-zero, *comp has the number of components that _would_
-// have been output otherwise. E.g. if you set req_comp to 4, you will always
-// get RGBA output, but you can check *comp to see if it's trivially opaque
-// because e.g. there were only 3 channels in the source image.
+// components N is 'desired_channels' if desired_channels is non-zero, or
+// *channels_in_file otherwise. If desired_channels is non-zero,
+// *channels_in_file has the number of components that _would_ have been
+// output otherwise. E.g. if you set desired_channels to 4, you will always
+// get RGBA output, but you can check *channels_in_file to see if it's trivially
+// opaque because e.g. there were only 3 channels in the source image.
//
// An output image with N components has the following components interleaved
// in this order in each pixel:
@@ -261,14 +172,50 @@ distribute, and modify this file as you see fit.
// 4 red, green, blue, alpha
//
// If image loading fails for any reason, the return value will be NULL,
-// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
-// can be queried for an extremely brief, end-user unfriendly explanation
-// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
-// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
+// and *x, *y, *channels_in_file will be unchanged. The function
+// stbi_failure_reason() can be queried for an extremely brief, end-user
+// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS
+// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
// more user-friendly ones.
//
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
//
+// To query the width, height and component count of an image without having to
+// decode the full file, you can use the stbi_info family of functions:
+//
+// int x,y,n,ok;
+// ok = stbi_info(filename, &x, &y, &n);
+// // returns ok=1 and sets x, y, n if image is a supported format,
+// // 0 otherwise.
+//
+// Note that stb_image pervasively uses ints in its public API for sizes,
+// including sizes of memory buffers. This is now part of the API and thus
+// hard to change without causing breakage. As a result, the various image
+// loaders all have certain limits on image size; these differ somewhat
+// by format but generally boil down to either just under 2GB or just under
+// 1GB. When the decoded image would be larger than this, stb_image decoding
+// will fail.
+//
+// Additionally, stb_image will reject image files that have any of their
+// dimensions set to a larger value than the configurable STBI_MAX_DIMENSIONS,
+// which defaults to 2**24 = 16777216 pixels. Due to the above memory limit,
+// the only way to have an image with such dimensions load correctly
+// is for it to have a rather extreme aspect ratio. Either way, the
+// assumption here is that such larger images are likely to be malformed
+// or malicious. If you do need to load an image with individual dimensions
+// larger than that, and it still fits in the overall size limit, you can
+// #define STBI_MAX_DIMENSIONS on your own to be something larger.
+//
+// ===========================================================================
+//
+// UNICODE:
+//
+// If compiling for Windows and you wish to use Unicode filenames, compile
+// with
+// #define STBI_WINDOWS_UTF8
+// and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert
+// Windows wchar_t filenames to utf8.
+//
// ===========================================================================
//
// Philosophy
@@ -281,15 +228,15 @@ distribute, and modify this file as you see fit.
//
// Sometimes I let "good performance" creep up in priority over "easy to maintain",
// and for best performance I may provide less-easy-to-use APIs that give higher
-// performance, in addition to the easy to use ones. Nevertheless, it's important
+// performance, in addition to the easy-to-use ones. Nevertheless, it's important
// to keep in mind that from the standpoint of you, a client of this library,
-// all you care about is #1 and #3, and stb libraries do not emphasize #3 above all.
+// all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all.
//
// Some secondary priorities arise directly from the first two, some of which
-// make more explicit reasons why performance can't be emphasized.
+// provide more explicit reasons why performance can't be emphasized.
//
// - Portable ("ease of use")
-// - Small footprint ("easy to maintain")
+// - Small source code footprint ("easy to maintain")
// - No dependencies ("ease of use")
//
// ===========================================================================
@@ -321,13 +268,6 @@ distribute, and modify this file as you see fit.
// (at least this is true for iOS and Android). Therefore, the NEON support is
// toggled by a build flag: define STBI_NEON to get NEON loops.
//
-// The output of the JPEG decoder is slightly different from versions where
-// SIMD support was introduced (that is, for versions before 1.49). The
-// difference is only +-1 in the 8-bit RGB channels, and only on a small
-// fraction of pixels. You can force the pre-1.49 behavior by defining
-// STBI_JPEG_OLD, but this will disable some of the SIMD decoding path
-// and hence cost some performance.
-//
// If for some reason you do not want to use any of SIMD code, or if
// you have issues compiling it, you can disable it entirely by
// defining STBI_NO_SIMD.
@@ -336,11 +276,10 @@ distribute, and modify this file as you see fit.
//
// HDR image support (disable by defining STBI_NO_HDR)
//
-// stb_image now supports loading HDR images in general, and currently
-// the Radiance .HDR file format, although the support is provided
-// generically. You can still load any file through the existing interface;
-// if you attempt to load an HDR file, it will be automatically remapped to
-// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
+// stb_image supports loading HDR images in general, and currently the Radiance
+// .HDR file format specifically. You can still load any file through the existing
+// interface; if you attempt to load an HDR file, it will be automatically remapped
+// to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
// both of these constants can be reconfigured through this interface:
//
// stbi_hdr_to_ldr_gamma(2.2f);
@@ -372,18 +311,59 @@ distribute, and modify this file as you see fit.
//
// iPhone PNG support:
//
-// By default we convert iphone-formatted PNGs back to RGB, even though
-// they are internally encoded differently. You can disable this conversion
-// by by calling stbi_convert_iphone_png_to_rgb(0), in which case
-// you will always just get the native iphone "format" through (which
-// is BGR stored in RGB).
+// We optionally support converting iPhone-formatted PNGs (which store
+// premultiplied BGRA) back to RGB, even though they're internally encoded
+// differently. To enable this conversion, call
+// stbi_convert_iphone_png_to_rgb(1).
//
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
// pixel to remove any premultiplied alpha *only* if the image file explicitly
// says there's premultiplied data (currently only happens in iPhone images,
// and only if iPhone convert-to-rgb processing is on).
//
-
+// ===========================================================================
+//
+// ADDITIONAL CONFIGURATION
+//
+// - You can suppress implementation of any of the decoders to reduce
+// your code footprint by #defining one or more of the following
+// symbols before creating the implementation.
+//
+// STBI_NO_JPEG
+// STBI_NO_PNG
+// STBI_NO_BMP
+// STBI_NO_PSD
+// STBI_NO_TGA
+// STBI_NO_GIF
+// STBI_NO_HDR
+// STBI_NO_PIC
+// STBI_NO_PNM (.ppm and .pgm)
+//
+// - You can request *only* certain decoders and suppress all other ones
+// (this will be more forward-compatible, as addition of new decoders
+// doesn't require you to disable them explicitly):
+//
+// STBI_ONLY_JPEG
+// STBI_ONLY_PNG
+// STBI_ONLY_BMP
+// STBI_ONLY_PSD
+// STBI_ONLY_TGA
+// STBI_ONLY_GIF
+// STBI_ONLY_HDR
+// STBI_ONLY_PIC
+// STBI_ONLY_PNM (.ppm and .pgm)
+//
+// - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still
+// want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB
+//
+// - If you define STBI_MAX_DIMENSIONS, stb_image will reject images greater
+// than that size (in either width or height) without further processing.
+// This is to let programs in the wild set an upper bound to prevent
+// denial-of-service attacks on untrusted data, as one could generate a
+// valid image of gigantic dimensions and force stb_image to allocate a
+// huge block of memory and spend disproportionate time decoding it. By
+// default this is set to (1 << 24), which is 16777216, but that's still
+// very big.
#ifndef STBI_NO_STDIO
#include
@@ -393,120 +373,164 @@ distribute, and modify this file as you see fit.
enum
{
- STBI_default = 0, // only used for req_comp
+ STBI_default = 0, // only used for desired_channels
- STBI_grey = 1,
- STBI_grey_alpha = 2,
- STBI_rgb = 3,
- STBI_rgb_alpha = 4
+ STBI_grey = 1,
+ STBI_grey_alpha = 2,
+ STBI_rgb = 3,
+ STBI_rgb_alpha = 4
};
+#include
typedef unsigned char stbi_uc;
+typedef unsigned short stbi_us;
#ifdef __cplusplus
extern "C" {
#endif
+#ifndef STBIDEF
#ifdef STB_IMAGE_STATIC
#define STBIDEF static
#else
#define STBIDEF extern
+#endif
#endif
-//////////////////////////////////////////////////////////////////////////////
-//
-// PRIMARY API - works on images of any type
-//
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // PRIMARY API - works on images of any type
+ //
-//
-// load image by filename, open file, or memory buffer
-//
+ //
+ // load image by filename, open file, or memory buffer
+ //
-typedef struct
-{
- int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read
- void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
- int (*eof) (void *user); // returns nonzero if we are at end of file/data
-} stbi_io_callbacks;
+ typedef struct
+ {
+ int (*read) (void* user, char* data, int size); // fill 'data' with 'size' bytes. return number of bytes actually read
+ void (*skip) (void* user, int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
+ int (*eof) (void* user); // returns nonzero if we are at end of file/data
+ } stbi_io_callbacks;
+
+ ////////////////////////////////////
+ //
+ // 8-bits-per-channel interface
+ //
-STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp);
-STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *comp, int req_comp);
-STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *comp, int req_comp);
+ STBIDEF stbi_uc* stbi_load_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF stbi_uc* stbi_load_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels);
#ifndef STBI_NO_STDIO
-STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
-// for stbi_load_from_file, file pointer is left pointing immediately after image
+ STBIDEF stbi_uc* stbi_load(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
+ // for stbi_load_from_file, file pointer is left pointing immediately after image
#endif
-#ifndef STBI_NO_LINEAR
- STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp);
- STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
- STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
+#ifndef STBI_NO_GIF
+ STBIDEF stbi_uc* stbi_load_gif_from_memory(stbi_uc const* buffer, int len, int** delays, int* x, int* y, int* z, int* comp, int req_comp);
+#endif
- #ifndef STBI_NO_STDIO
- STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
- #endif
+#ifdef STBI_WINDOWS_UTF8
+ STBIDEF int stbi_convert_wchar_to_utf8(char* buffer, size_t bufferlen, const wchar_t* input);
#endif
-#ifndef STBI_NO_HDR
- STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
- STBIDEF void stbi_hdr_to_ldr_scale(float scale);
+ ////////////////////////////////////
+ //
+ // 16-bits-per-channel interface
+ //
+
+ STBIDEF stbi_us* stbi_load_16_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF stbi_us* stbi_load_16_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels);
+
+#ifndef STBI_NO_STDIO
+ STBIDEF stbi_us* stbi_load_16(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF stbi_us* stbi_load_from_file_16(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
#endif
+ ////////////////////////////////////
+ //
+ // float-per-channel interface
+ //
#ifndef STBI_NO_LINEAR
- STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
- STBIDEF void stbi_ldr_to_hdr_scale(float scale);
+ STBIDEF float* stbi_loadf_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF float* stbi_loadf_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels);
+
+#ifndef STBI_NO_STDIO
+ STBIDEF float* stbi_loadf(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
+ STBIDEF float* stbi_loadf_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
+#endif
+#endif
+
+#ifndef STBI_NO_HDR
+ STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
+ STBIDEF void stbi_hdr_to_ldr_scale(float scale);
#endif // STBI_NO_HDR
-// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
-STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
-STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);
+#ifndef STBI_NO_LINEAR
+ STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
+ STBIDEF void stbi_ldr_to_hdr_scale(float scale);
+#endif // STBI_NO_LINEAR
+
+ // stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
+ STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const* clbk, void* user);
+ STBIDEF int stbi_is_hdr_from_memory(stbi_uc const* buffer, int len);
#ifndef STBI_NO_STDIO
-STBIDEF int stbi_is_hdr (char const *filename);
-STBIDEF int stbi_is_hdr_from_file(FILE *f);
+ STBIDEF int stbi_is_hdr(char const* filename);
+ STBIDEF int stbi_is_hdr_from_file(FILE* f);
#endif // STBI_NO_STDIO
-// get a VERY brief reason for failure
-// NOT THREADSAFE
-STBIDEF const char *stbi_failure_reason (void);
+ // get a VERY brief reason for failure
+ // on most compilers (and ALL modern mainstream compilers) this is threadsafe
+ STBIDEF const char* stbi_failure_reason(void);
-// free the loaded image -- this is just free()
-STBIDEF void stbi_image_free (void *retval_from_stbi_load);
+ // free the loaded image -- this is just free()
+ STBIDEF void stbi_image_free(void* retval_from_stbi_load);
-// get image dimensions & components without fully decoding
-STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
-STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
+ // get image dimensions & components without fully decoding
+ STBIDEF int stbi_info_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* comp);
+ STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* comp);
+ STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const* buffer, int len);
+ STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const* clbk, void* user);
#ifndef STBI_NO_STDIO
-STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp);
-STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
-
+ STBIDEF int stbi_info(char const* filename, int* x, int* y, int* comp);
+ STBIDEF int stbi_info_from_file(FILE* f, int* x, int* y, int* comp);
+ STBIDEF int stbi_is_16_bit(char const* filename);
+ STBIDEF int stbi_is_16_bit_from_file(FILE* f);
#endif
-// for image formats that explicitly notate that they have premultiplied alpha,
-// we just return the colors as stored in the file. set this flag to force
-// unpremultiplication. results are undefined if the unpremultiply overflow.
-STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
+ // for image formats that explicitly notate that they have premultiplied alpha,
+ // we just return the colors as stored in the file. set this flag to force
+ // unpremultiplication. results are undefined if the unpremultiply overflow.
+ STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
-// indicate whether we should process iphone images back to canonical format,
-// or just pass them through "as-is"
-STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);
+ // indicate whether we should process iphone images back to canonical format,
+ // or just pass them through "as-is"
+ STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);
-// flip the image vertically, so the first pixel in the output array is the bottom left
-STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip);
+ // flip the image vertically, so the first pixel in the output array is the bottom left
+ STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip);
-// ZLIB client - used by PNG, available for other purposes
+ // as above, but only applies to images loaded on the thread that calls the function
+ // this function is only available if your compiler supports thread-local variables;
+ // calling it will fail to link if your compiler doesn't
+ STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply);
+ STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert);
+ STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip);
-STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
-STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
-STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
-STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
+ // ZLIB client - used by PNG, available for other purposes
-STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
-STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
+ STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen);
+ STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header);
+ STBIDEF char* stbi_zlib_decode_malloc(const char* buffer, int len, int* outlen);
+ STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, const char* ibuffer, int ilen);
+
+ STBIDEF char* stbi_zlib_decode_noheader_malloc(const char* buffer, int len, int* outlen);
+ STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen);
#ifdef __cplusplus
@@ -524,33 +548,33 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch
|| defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \
|| defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \
|| defined(STBI_ONLY_ZLIB)
- #ifndef STBI_ONLY_JPEG
- #define STBI_NO_JPEG
- #endif
- #ifndef STBI_ONLY_PNG
- #define STBI_NO_PNG
- #endif
- #ifndef STBI_ONLY_BMP
- #define STBI_NO_BMP
- #endif
- #ifndef STBI_ONLY_PSD
- #define STBI_NO_PSD
- #endif
- #ifndef STBI_ONLY_TGA
- #define STBI_NO_TGA
- #endif
- #ifndef STBI_ONLY_GIF
- #define STBI_NO_GIF
- #endif
- #ifndef STBI_ONLY_HDR
- #define STBI_NO_HDR
- #endif
- #ifndef STBI_ONLY_PIC
- #define STBI_NO_PIC
- #endif
- #ifndef STBI_ONLY_PNM
- #define STBI_NO_PNM
- #endif
+#ifndef STBI_ONLY_JPEG
+#define STBI_NO_JPEG
+#endif
+#ifndef STBI_ONLY_PNG
+#define STBI_NO_PNG
+#endif
+#ifndef STBI_ONLY_BMP
+#define STBI_NO_BMP
+#endif
+#ifndef STBI_ONLY_PSD
+#define STBI_NO_PSD
+#endif
+#ifndef STBI_ONLY_TGA
+#define STBI_NO_TGA
+#endif
+#ifndef STBI_ONLY_GIF
+#define STBI_NO_GIF
+#endif
+#ifndef STBI_ONLY_HDR
+#define STBI_NO_HDR
+#endif
+#ifndef STBI_ONLY_PIC
+#define STBI_NO_PIC
+#endif
+#ifndef STBI_ONLY_PNM
+#define STBI_NO_PNM
+#endif
#endif
#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB)
@@ -562,9 +586,10 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch
#include // ptrdiff_t on osx
#include
#include
+#include
#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR)
-#include // ldexp
+#include // ldexp, pow
#endif
#ifndef STBI_NO_STDIO
@@ -576,19 +601,42 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch
#define STBI_ASSERT(x) assert(x)
#endif
+#ifdef __cplusplus
+#define STBI_EXTERN extern "C"
+#else
+#define STBI_EXTERN extern
+#endif
+
#ifndef _MSC_VER
- #ifdef __cplusplus
- #define stbi_inline inline
- #else
- #define stbi_inline
- #endif
+#ifdef __cplusplus
+#define stbi_inline inline
+#else
+#define stbi_inline
+#endif
#else
- #define stbi_inline __forceinline
+#define stbi_inline __forceinline
#endif
+#ifndef STBI_NO_THREAD_LOCALS
+#if defined(__cplusplus) && __cplusplus >= 201103L
+#define STBI_THREAD_LOCAL thread_local
+#elif defined(__GNUC__) && __GNUC__ < 5
+#define STBI_THREAD_LOCAL __thread
+#elif defined(_MSC_VER)
+#define STBI_THREAD_LOCAL __declspec(thread)
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)
+#define STBI_THREAD_LOCAL _Thread_local
+#endif
-#ifdef _MSC_VER
+#ifndef STBI_THREAD_LOCAL
+#if defined(__GNUC__)
+#define STBI_THREAD_LOCAL __thread
+#endif
+#endif
+#endif
+
+#if defined(_MSC_VER) || defined(__SYMBIAN32__)
typedef unsigned short stbi__uint16;
typedef signed short stbi__int16;
typedef unsigned int stbi__uint32;
@@ -602,7 +650,7 @@ typedef int32_t stbi__int32;
#endif
// should produce compiler error if size is wrong
-typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
+typedef unsigned char validate_uint32[sizeof(stbi__uint32) == 4 ? 1 : -1];
#ifdef _MSC_VER
#define STBI_NOTUSED(v) (void)(v)
@@ -615,23 +663,27 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#endif
#ifdef STBI_HAS_LROTL
- #define stbi_lrot(x,y) _lrotl(x,y)
+#define stbi_lrot(x,y) _lrotl(x,y)
#else
- #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
+#define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (-(y) & 31)))
#endif
-#if defined(STBI_MALLOC) && defined(STBI_FREE) && defined(STBI_REALLOC)
+#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED))
// ok
-#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC)
+#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED)
// ok
#else
-#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC."
+#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)."
#endif
#ifndef STBI_MALLOC
-#define STBI_MALLOC(sz) malloc(sz)
-#define STBI_REALLOC(p,sz) realloc(p,sz)
-#define STBI_FREE(p) free(p)
+#define STBI_MALLOC(sz) malloc(sz)
+#define STBI_REALLOC(p,newsz) realloc(p,newsz)
+#define STBI_FREE(p) free(p)
+#endif
+
+#ifndef STBI_REALLOC_SIZED
+#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz)
#endif
// x86/x64 detection
@@ -641,12 +693,14 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#define STBI__X86_TARGET
#endif
-#if defined(__GNUC__) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) && !defined(__SSE2__) && !defined(STBI_NO_SIMD)
-// NOTE: not clear do we actually need this for the 64-bit path?
+#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD)
// gcc doesn't support sse2 intrinsics unless you compile with -msse2,
-// (but compiling with -msse2 allows the compiler to use SSE2 everywhere;
-// this is just broken and gcc are jerks for not fixing it properly
-// http://www.virtualdub.org/blog/pivot/entry.php?id=363 )
+// which in turn means it gets to use SSE2 everywhere. This is unfortunate,
+// but previous attempts to provide the SSE2 functions with runtime
+// detection caused numerous issues. The way architecture extensions are
+// exposed in GCC/Clang is, sadly, not really suited for one-file libs.
+// New behavior: if compiled with -msse2, we use SSE2 without any
+// detection; if not, we don't use it at all.
#define STBI_NO_SIMD
#endif
@@ -665,7 +719,7 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#define STBI_NO_SIMD
#endif
-#if !defined(STBI_NO_SIMD) && defined(STBI__X86_TARGET)
+#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET))
#define STBI_SSE2
#include
@@ -675,44 +729,46 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#include // __cpuid
static int stbi__cpuid3(void)
{
- int info[4];
- __cpuid(info,1);
- return info[3];
+ int info[4];
+ __cpuid(info, 1);
+ return info[3];
}
#else
static int stbi__cpuid3(void)
{
- int res;
- __asm {
- mov eax,1
- cpuid
- mov res,edx
- }
- return res;
+ int res;
+ __asm {
+ mov eax, 1
+ cpuid
+ mov res, edx
+ }
+ return res;
}
#endif
#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name
-static int stbi__sse2_available()
+#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2)
+static int stbi__sse2_available(void)
{
- int info3 = stbi__cpuid3();
- return ((info3 >> 26) & 1) != 0;
+ int info3 = stbi__cpuid3();
+ return ((info3 >> 26) & 1) != 0;
}
+#endif
+
#else // assume GCC-style if not VC++
#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))
-static int stbi__sse2_available()
+#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2)
+static int stbi__sse2_available(void)
{
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later
- // GCC 4.8+ has a nice way to do this
- return __builtin_cpu_supports("sse2");
-#else
- // portable way to do this, preferably without using GCC inline ASM?
- // just bail for now.
- return 0;
-#endif
+ // If we're even attempting to compile this on GCC/Clang, that means
+ // -msse2 is on, which means the compiler is allowed to use SSE2
+ // instructions at will, and so are we.
+ return 1;
}
+#endif
+
#endif
#endif
@@ -723,14 +779,21 @@ static int stbi__sse2_available()
#ifdef STBI_NEON
#include
-// assume GCC or Clang on ARM targets
+#ifdef _MSC_VER
+#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name
+#else
#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))
#endif
+#endif
#ifndef STBI_SIMD_ALIGN
#define STBI_SIMD_ALIGN(type, name) type name
#endif
+#ifndef STBI_MAX_DIMENSIONS
+#define STBI_MAX_DIMENSIONS (1 << 24)
+#endif
+
///////////////////////////////////////////////
//
// stbi__context struct and start_xxx functions
@@ -739,58 +802,67 @@ static int stbi__sse2_available()
// contains all the IO context, plus some basic image information
typedef struct
{
- stbi__uint32 img_x, img_y;
- int img_n, img_out_n;
+ stbi__uint32 img_x, img_y;
+ int img_n, img_out_n;
- stbi_io_callbacks io;
- void *io_user_data;
+ stbi_io_callbacks io;
+ void* io_user_data;
- int read_from_callbacks;
- int buflen;
- stbi_uc buffer_start[128];
+ int read_from_callbacks;
+ int buflen;
+ stbi_uc buffer_start[128];
+ int callback_already_read;
- stbi_uc *img_buffer, *img_buffer_end;
- stbi_uc *img_buffer_original;
+ stbi_uc* img_buffer, * img_buffer_end;
+ stbi_uc* img_buffer_original, * img_buffer_original_end;
} stbi__context;
-static void stbi__refill_buffer(stbi__context *s);
+static void stbi__refill_buffer(stbi__context* s);
// initialize a memory-decode context
-static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
+static void stbi__start_mem(stbi__context* s, stbi_uc const* buffer, int len)
{
- s->io.read = NULL;
- s->read_from_callbacks = 0;
- s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
- s->img_buffer_end = (stbi_uc *) buffer+len;
+ s->io.read = NULL;
+ s->read_from_callbacks = 0;
+ s->callback_already_read = 0;
+ s->img_buffer = s->img_buffer_original = (stbi_uc*)buffer;
+ s->img_buffer_end = s->img_buffer_original_end = (stbi_uc*)buffer + len;
}
// initialize a callback-based context
-static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
+static void stbi__start_callbacks(stbi__context* s, stbi_io_callbacks* c, void* user)
{
- s->io = *c;
- s->io_user_data = user;
- s->buflen = sizeof(s->buffer_start);
- s->read_from_callbacks = 1;
- s->img_buffer_original = s->buffer_start;
- stbi__refill_buffer(s);
+ s->io = *c;
+ s->io_user_data = user;
+ s->buflen = sizeof(s->buffer_start);
+ s->read_from_callbacks = 1;
+ s->callback_already_read = 0;
+ s->img_buffer = s->img_buffer_original = s->buffer_start;
+ stbi__refill_buffer(s);
+ s->img_buffer_original_end = s->img_buffer_end;
}
#ifndef STBI_NO_STDIO
-static int stbi__stdio_read(void *user, char *data, int size)
+static int stbi__stdio_read(void* user, char* data, int size)
{
- return (int) fread(data,1,size,(FILE*) user);
+ return (int)fread(data, 1, size, (FILE*)user);
}
-static void stbi__stdio_skip(void *user, int n)
+static void stbi__stdio_skip(void* user, int n)
{
- fseek((FILE*) user, n, SEEK_CUR);
+ int ch;
+ fseek((FILE*)user, n, SEEK_CUR);
+ ch = fgetc((FILE*)user); /* have to read a byte to reset feof()'s flag */
+ if (ch != EOF) {
+ ungetc(ch, (FILE*)user); /* push byte back onto stream if valid. */
+ }
}
-static int stbi__stdio_eof(void *user)
+static int stbi__stdio_eof(void* user)
{
- return feof((FILE*) user);
+ return feof((FILE*)user) || ferror((FILE*)user);
}
static stbi_io_callbacks stbi__stdio_callbacks =
@@ -800,507 +872,866 @@ static stbi_io_callbacks stbi__stdio_callbacks =
stbi__stdio_eof,
};
-static void stbi__start_file(stbi__context *s, FILE *f)
+static void stbi__start_file(stbi__context* s, FILE* f)
{
- stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f);
+ stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f);
}
//static void stop_file(stbi__context *s) { }
#endif // !STBI_NO_STDIO
-static void stbi__rewind(stbi__context *s)
+static void stbi__rewind(stbi__context* s)
{
- // conceptually rewind SHOULD rewind to the beginning of the stream,
- // but we just rewind to the beginning of the initial buffer, because
- // we only use it after doing 'test', which only ever looks at at most 92 bytes
- s->img_buffer = s->img_buffer_original;
+ // conceptually rewind SHOULD rewind to the beginning of the stream,
+ // but we just rewind to the beginning of the initial buffer, because
+ // we only use it after doing 'test', which only ever looks at at most 92 bytes
+ s->img_buffer = s->img_buffer_original;
+ s->img_buffer_end = s->img_buffer_original_end;
}
+enum
+{
+ STBI_ORDER_RGB,
+ STBI_ORDER_BGR
+};
+
+typedef struct
+{
+ int bits_per_channel;
+ int num_channels;
+ int channel_order;
+} stbi__result_info;
+
#ifndef STBI_NO_JPEG
-static int stbi__jpeg_test(stbi__context *s);
-static stbi_uc *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__jpeg_test(stbi__context* s);
+static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_PNG
-static int stbi__png_test(stbi__context *s);
-static stbi_uc *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__png_test(stbi__context* s);
+static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp);
+static int stbi__png_is16(stbi__context* s);
#endif
#ifndef STBI_NO_BMP
-static int stbi__bmp_test(stbi__context *s);
-static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__bmp_test(stbi__context* s);
+static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__bmp_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_TGA
-static int stbi__tga_test(stbi__context *s);
-static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__tga_test(stbi__context* s);
+static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_PSD
-static int stbi__psd_test(stbi__context *s);
-static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__psd_test(stbi__context* s);
+static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc);
+static int stbi__psd_info(stbi__context* s, int* x, int* y, int* comp);
+static int stbi__psd_is16(stbi__context* s);
#endif
#ifndef STBI_NO_HDR
-static int stbi__hdr_test(stbi__context *s);
-static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__hdr_test(stbi__context* s);
+static float* stbi__hdr_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__hdr_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_PIC
-static int stbi__pic_test(stbi__context *s);
-static stbi_uc *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__pic_test(stbi__context* s);
+static void* stbi__pic_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__pic_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_GIF
-static int stbi__gif_test(stbi__context *s);
-static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__gif_test(stbi__context* s);
+static void* stbi__gif_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static void* stbi__load_gif_main(stbi__context* s, int** delays, int* x, int* y, int* z, int* comp, int req_comp);
+static int stbi__gif_info(stbi__context* s, int* x, int* y, int* comp);
#endif
#ifndef STBI_NO_PNM
-static int stbi__pnm_test(stbi__context *s);
-static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp);
-static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__pnm_test(stbi__context* s);
+static void* stbi__pnm_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri);
+static int stbi__pnm_info(stbi__context* s, int* x, int* y, int* comp);
+static int stbi__pnm_is16(stbi__context* s);
#endif
-// this is not threadsafe
-static const char *stbi__g_failure_reason;
+static
+#ifdef STBI_THREAD_LOCAL
+STBI_THREAD_LOCAL
+#endif
+const char* stbi__g_failure_reason;
-STBIDEF const char *stbi_failure_reason(void)
+STBIDEF const char* stbi_failure_reason(void)
{
- return stbi__g_failure_reason;
+ return stbi__g_failure_reason;
}
-static int stbi__err(const char *str)
+#ifndef STBI_NO_FAILURE_STRINGS
+static int stbi__err(const char* str)
{
- stbi__g_failure_reason = str;
- return 0;
+ stbi__g_failure_reason = str;
+ return 0;
}
+#endif
-static void *stbi__malloc(size_t size)
+static void* stbi__malloc(size_t size)
{
return STBI_MALLOC(size);
}
-// stbi__err - error
-// stbi__errpf - error returning pointer to float
-// stbi__errpuc - error returning pointer to unsigned char
-
-#ifdef STBI_NO_FAILURE_STRINGS
- #define stbi__err(x,y) 0
-#elif defined(STBI_FAILURE_USERMSG)
- #define stbi__err(x,y) stbi__err(y)
-#else
- #define stbi__err(x,y) stbi__err(x)
-#endif
-
-#define stbi__errpf(x,y) ((float *) (stbi__err(x,y)?NULL:NULL))
-#define stbi__errpuc(x,y) ((unsigned char *) (stbi__err(x,y)?NULL:NULL))
+// stb_image uses ints pervasively, including for offset calculations.
+// therefore the largest decoded image size we can support with the
+// current code, even on 64-bit targets, is INT_MAX. this is not a
+// significant limitation for the intended use case.
+//
+// we do, however, need to make sure our size calculations don't
+// overflow. hence a few helper functions for size calculations that
+// multiply integers together, making sure that they're non-negative
+// and no overflow occurs.
-STBIDEF void stbi_image_free(void *retval_from_stbi_load)
+// return 1 if the sum is valid, 0 on overflow.
+// negative terms are considered invalid.
+static int stbi__addsizes_valid(int a, int b)
{
- STBI_FREE(retval_from_stbi_load);
+ if (b < 0) return 0;
+ // now 0 <= b <= INT_MAX, hence also
+ // 0 <= INT_MAX - b <= INTMAX.
+ // And "a + b <= INT_MAX" (which might overflow) is the
+ // same as a <= INT_MAX - b (no overflow)
+ return a <= INT_MAX - b;
}
-#ifndef STBI_NO_LINEAR
-static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp);
-#endif
-
-#ifndef STBI_NO_HDR
-static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp);
-#endif
-
-static int stbi__vertically_flip_on_load = 0;
-
-STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)
+// returns 1 if the product is valid, 0 on overflow.
+// negative factors are considered invalid.
+static int stbi__mul2sizes_valid(int a, int b)
{
- stbi__vertically_flip_on_load = flag_true_if_should_flip;
-}
-
-static unsigned char *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- #ifndef STBI_NO_JPEG
- if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_PNG
- if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_BMP
- if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_GIF
- if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_PSD
- if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_PIC
- if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp);
- #endif
- #ifndef STBI_NO_PNM
- if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp);
- #endif
-
- #ifndef STBI_NO_HDR
- if (stbi__hdr_test(s)) {
- float *hdr = stbi__hdr_load(s, x,y,comp,req_comp);
- return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
- }
- #endif
-
- #ifndef STBI_NO_TGA
- // test tga last because it's a crappy test!
- if (stbi__tga_test(s))
- return stbi__tga_load(s,x,y,comp,req_comp);
- #endif
-
- return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt");
+ if (a < 0 || b < 0) return 0;
+ if (b == 0) return 1; // mul-by-0 is always safe
+ // portable way to check for no overflows in a*b
+ return a <= INT_MAX / b;
}
-static unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR)
+// returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow
+static int stbi__mad2sizes_valid(int a, int b, int add)
{
- unsigned char *result = stbi__load_main(s, x, y, comp, req_comp);
-
- if (stbi__vertically_flip_on_load && result != NULL) {
- int w = *x, h = *y;
- int depth = req_comp ? req_comp : *comp;
- int row,col,z;
- stbi_uc temp;
-
- // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once
- for (row = 0; row < (h>>1); row++) {
- for (col = 0; col < w; col++) {
- for (z = 0; z < depth; z++) {
- temp = result[(row * w + col) * depth + z];
- result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z];
- result[((h - row - 1) * w + col) * depth + z] = temp;
- }
- }
- }
- }
-
- return result;
+ return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add);
}
+#endif
-static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
+// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow
+static int stbi__mad3sizes_valid(int a, int b, int c, int add)
{
- if (stbi__vertically_flip_on_load && result != NULL) {
- int w = *x, h = *y;
- int depth = req_comp ? req_comp : *comp;
- int row,col,z;
- float temp;
-
- // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once
- for (row = 0; row < (h>>1); row++) {
- for (col = 0; col < w; col++) {
- for (z = 0; z < depth; z++) {
- temp = result[(row * w + col) * depth + z];
- result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z];
- result[((h - row - 1) * w + col) * depth + z] = temp;
- }
- }
- }
- }
+ return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) &&
+ stbi__addsizes_valid(a * b * c, add);
}
-
-#ifndef STBI_NO_STDIO
-
-static FILE *stbi__fopen(char const *filename, char const *mode)
+// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow
+#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM)
+static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add)
{
- FILE *f;
-#if defined(_MSC_VER) && _MSC_VER >= 1400
- if (0 != fopen_s(&f, filename, mode))
- f=0;
-#else
- f = fopen(filename, mode);
-#endif
- return f;
+ return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) &&
+ stbi__mul2sizes_valid(a * b * c, d) && stbi__addsizes_valid(a * b * c * d, add);
}
+#endif
-
-STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
+#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR)
+// mallocs with size overflow checking
+static void* stbi__malloc_mad2(int a, int b, int add)
{
- FILE *f = stbi__fopen(filename, "rb");
- unsigned char *result;
- if (!f) return stbi__errpuc("can't fopen", "Unable to open file");
- result = stbi_load_from_file(f,x,y,comp,req_comp);
- fclose(f);
- return result;
+ if (!stbi__mad2sizes_valid(a, b, add)) return NULL;
+ return stbi__malloc(a * b + add);
}
+#endif
-STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
+static void* stbi__malloc_mad3(int a, int b, int c, int add)
{
- unsigned char *result;
- stbi__context s;
- stbi__start_file(&s,f);
- result = stbi__load_flip(&s,x,y,comp,req_comp);
- if (result) {
- // need to 'unget' all the characters in the IO buffer
- fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
- }
- return result;
+ if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL;
+ return stbi__malloc(a * b * c + add);
}
-#endif //!STBI_NO_STDIO
-STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
+#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM)
+static void* stbi__malloc_mad4(int a, int b, int c, int d, int add)
{
- stbi__context s;
- stbi__start_mem(&s,buffer,len);
- return stbi__load_flip(&s,x,y,comp,req_comp);
+ if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL;
+ return stbi__malloc(a * b * c * d + add);
}
+#endif
-STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
+// returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow.
+static int stbi__addints_valid(int a, int b)
{
- stbi__context s;
- stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
- return stbi__load_flip(&s,x,y,comp,req_comp);
-}
-
-#ifndef STBI_NO_LINEAR
-static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- unsigned char *data;
- #ifndef STBI_NO_HDR
- if (stbi__hdr_test(s)) {
- float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp);
- if (hdr_data)
- stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
- return hdr_data;
- }
- #endif
- data = stbi__load_flip(s, x, y, comp, req_comp);
- if (data)
- return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
- return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
+ if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow
+ if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0.
+ return a <= INT_MAX - b;
}
-STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
+// returns 1 if the product of two signed shorts is valid, 0 on overflow.
+static int stbi__mul2shorts_valid(short a, short b)
{
- stbi__context s;
- stbi__start_mem(&s,buffer,len);
- return stbi__loadf_main(&s,x,y,comp,req_comp);
+ if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow
+ if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid
+ if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN
+ return a >= SHRT_MIN / b;
}
-STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
-{
- stbi__context s;
- stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
- return stbi__loadf_main(&s,x,y,comp,req_comp);
-}
+// stbi__err - error
+// stbi__errpf - error returning pointer to float
+// stbi__errpuc - error returning pointer to unsigned char
-#ifndef STBI_NO_STDIO
-STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp)
-{
- float *result;
- FILE *f = stbi__fopen(filename, "rb");
- if (!f) return stbi__errpf("can't fopen", "Unable to open file");
- result = stbi_loadf_from_file(f,x,y,comp,req_comp);
- fclose(f);
- return result;
-}
+#ifdef STBI_NO_FAILURE_STRINGS
+#define stbi__err(x,y) 0
+#elif defined(STBI_FAILURE_USERMSG)
+#define stbi__err(x,y) stbi__err(y)
+#else
+#define stbi__err(x,y) stbi__err(x)
+#endif
+
+#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL))
+#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
-STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
+STBIDEF void stbi_image_free(void* retval_from_stbi_load)
{
- stbi__context s;
- stbi__start_file(&s,f);
- return stbi__loadf_main(&s,x,y,comp,req_comp);
+ STBI_FREE(retval_from_stbi_load);
}
-#endif // !STBI_NO_STDIO
-#endif // !STBI_NO_LINEAR
+#ifndef STBI_NO_LINEAR
+static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp);
+#endif
-// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is
-// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always
-// reports false!
+#ifndef STBI_NO_HDR
+static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp);
+#endif
-STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
-{
- #ifndef STBI_NO_HDR
- stbi__context s;
- stbi__start_mem(&s,buffer,len);
- return stbi__hdr_test(&s);
- #else
- STBI_NOTUSED(buffer);
- STBI_NOTUSED(len);
- return 0;
- #endif
-}
+static int stbi__vertically_flip_on_load_global = 0;
-#ifndef STBI_NO_STDIO
-STBIDEF int stbi_is_hdr (char const *filename)
+STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)
{
- FILE *f = stbi__fopen(filename, "rb");
- int result=0;
- if (f) {
- result = stbi_is_hdr_from_file(f);
- fclose(f);
- }
- return result;
+ stbi__vertically_flip_on_load_global = flag_true_if_should_flip;
}
-STBIDEF int stbi_is_hdr_from_file(FILE *f)
+#ifndef STBI_THREAD_LOCAL
+#define stbi__vertically_flip_on_load stbi__vertically_flip_on_load_global
+#else
+static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set;
+
+STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip)
{
- #ifndef STBI_NO_HDR
- stbi__context s;
- stbi__start_file(&s,f);
- return stbi__hdr_test(&s);
- #else
- return 0;
- #endif
+ stbi__vertically_flip_on_load_local = flag_true_if_should_flip;
+ stbi__vertically_flip_on_load_set = 1;
}
-#endif // !STBI_NO_STDIO
-STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)
+#define stbi__vertically_flip_on_load (stbi__vertically_flip_on_load_set \
+ ? stbi__vertically_flip_on_load_local \
+ : stbi__vertically_flip_on_load_global)
+#endif // STBI_THREAD_LOCAL
+
+static void* stbi__load_main(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc)
{
- #ifndef STBI_NO_HDR
- stbi__context s;
- stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
- return stbi__hdr_test(&s);
- #else
- return 0;
- #endif
-}
+ memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields
+ ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed
+ ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order
+ ri->num_channels = 0;
-static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;
-static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f;
+ // test the formats with a very explicit header first (at least a FOURCC
+ // or distinctive magic number first)
+#ifndef STBI_NO_PNG
+ if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri);
+#endif
+#ifndef STBI_NO_BMP
+ if (stbi__bmp_test(s)) return stbi__bmp_load(s, x, y, comp, req_comp, ri);
+#endif
+#ifndef STBI_NO_GIF
+ if (stbi__gif_test(s)) return stbi__gif_load(s, x, y, comp, req_comp, ri);
+#endif
+#ifndef STBI_NO_PSD
+ if (stbi__psd_test(s)) return stbi__psd_load(s, x, y, comp, req_comp, ri, bpc);
+#else
+ STBI_NOTUSED(bpc);
+#endif
+#ifndef STBI_NO_PIC
+ if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri);
+#endif
-#ifndef STBI_NO_LINEAR
-STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; }
-STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
+ // then the formats that can end up attempting to load with just 1 or 2
+ // bytes matching expectations; these are prone to false positives, so
+ // try them later
+#ifndef STBI_NO_JPEG
+ if (stbi__jpeg_test(s)) return stbi__jpeg_load(s, x, y, comp, req_comp, ri);
+#endif
+#ifndef STBI_NO_PNM
+ if (stbi__pnm_test(s)) return stbi__pnm_load(s, x, y, comp, req_comp, ri);
#endif
-STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; }
-STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }
+#ifndef STBI_NO_HDR
+ if (stbi__hdr_test(s)) {
+ float* hdr = stbi__hdr_load(s, x, y, comp, req_comp, ri);
+ return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
+ }
+#endif
+#ifndef STBI_NO_TGA
+ // test tga last because it's a crappy test!
+ if (stbi__tga_test(s))
+ return stbi__tga_load(s, x, y, comp, req_comp, ri);
+#endif
-//////////////////////////////////////////////////////////////////////////////
-//
-// Common code used by all image loaders
-//
+ return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt");
+}
-enum
+static stbi_uc* stbi__convert_16_to_8(stbi__uint16* orig, int w, int h, int channels)
{
- STBI__SCAN_load=0,
- STBI__SCAN_type,
- STBI__SCAN_header
-};
+ int i;
+ int img_len = w * h * channels;
+ stbi_uc* reduced;
-static void stbi__refill_buffer(stbi__context *s)
-{
- int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
- if (n == 0) {
- // at end of file, treat same as if from memory, but need to handle case
- // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file
- s->read_from_callbacks = 0;
- s->img_buffer = s->buffer_start;
- s->img_buffer_end = s->buffer_start+1;
- *s->img_buffer = 0;
- } else {
- s->img_buffer = s->buffer_start;
- s->img_buffer_end = s->buffer_start + n;
- }
+ reduced = (stbi_uc*)stbi__malloc(img_len);
+ if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory");
+
+ for (i = 0; i < img_len; ++i)
+ reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling
+
+ STBI_FREE(orig);
+ return reduced;
}
-stbi_inline static stbi_uc stbi__get8(stbi__context *s)
+static stbi__uint16* stbi__convert_8_to_16(stbi_uc* orig, int w, int h, int channels)
{
- if (s->img_buffer < s->img_buffer_end)
- return *s->img_buffer++;
- if (s->read_from_callbacks) {
- stbi__refill_buffer(s);
- return *s->img_buffer++;
- }
- return 0;
+ int i;
+ int img_len = w * h * channels;
+ stbi__uint16* enlarged;
+
+ enlarged = (stbi__uint16*)stbi__malloc(img_len * 2);
+ if (enlarged == NULL) return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory");
+
+ for (i = 0; i < img_len; ++i)
+ enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff
+
+ STBI_FREE(orig);
+ return enlarged;
}
-stbi_inline static int stbi__at_eof(stbi__context *s)
+static void stbi__vertical_flip(void* image, int w, int h, int bytes_per_pixel)
{
- if (s->io.read) {
- if (!(s->io.eof)(s->io_user_data)) return 0;
- // if feof() is true, check if buffer = end
- // special case: we've only got the special 0 character at the end
- if (s->read_from_callbacks == 0) return 1;
- }
+ int row;
+ size_t bytes_per_row = (size_t)w * bytes_per_pixel;
+ stbi_uc temp[2048];
+ stbi_uc* bytes = (stbi_uc*)image;
- return s->img_buffer >= s->img_buffer_end;
+ for (row = 0; row < (h >> 1); row++) {
+ stbi_uc* row0 = bytes + row * bytes_per_row;
+ stbi_uc* row1 = bytes + (h - row - 1) * bytes_per_row;
+ // swap row0 with row1
+ size_t bytes_left = bytes_per_row;
+ while (bytes_left) {
+ size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp);
+ memcpy(temp, row0, bytes_copy);
+ memcpy(row0, row1, bytes_copy);
+ memcpy(row1, temp, bytes_copy);
+ row0 += bytes_copy;
+ row1 += bytes_copy;
+ bytes_left -= bytes_copy;
+ }
+ }
}
-static void stbi__skip(stbi__context *s, int n)
+#ifndef STBI_NO_GIF
+static void stbi__vertical_flip_slices(void* image, int w, int h, int z, int bytes_per_pixel)
{
- if (n < 0) {
- s->img_buffer = s->img_buffer_end;
- return;
- }
- if (s->io.read) {
- int blen = (int) (s->img_buffer_end - s->img_buffer);
- if (blen < n) {
- s->img_buffer = s->img_buffer_end;
- (s->io.skip)(s->io_user_data, n - blen);
- return;
- }
- }
- s->img_buffer += n;
+ int slice;
+ int slice_size = w * h * bytes_per_pixel;
+
+ stbi_uc* bytes = (stbi_uc*)image;
+ for (slice = 0; slice < z; ++slice) {
+ stbi__vertical_flip(bytes, w, h, bytes_per_pixel);
+ bytes += slice_size;
+ }
}
+#endif
-static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
+static unsigned char* stbi__load_and_postprocess_8bit(stbi__context* s, int* x, int* y, int* comp, int req_comp)
{
- if (s->io.read) {
- int blen = (int) (s->img_buffer_end - s->img_buffer);
- if (blen < n) {
- int res, count;
+ stbi__result_info ri;
+ void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8);
- memcpy(buffer, s->img_buffer, blen);
+ if (result == NULL)
+ return NULL;
- count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
- res = (count == (n-blen));
- s->img_buffer = s->img_buffer_end;
- return res;
- }
- }
+ // it is the responsibility of the loaders to make sure we get either 8 or 16 bit.
+ STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16);
- if (s->img_buffer+n <= s->img_buffer_end) {
- memcpy(buffer, s->img_buffer, n);
- s->img_buffer += n;
- return 1;
- } else
- return 0;
-}
+ if (ri.bits_per_channel != 8) {
+ result = stbi__convert_16_to_8((stbi__uint16*)result, *x, *y, req_comp == 0 ? *comp : req_comp);
+ ri.bits_per_channel = 8;
+ }
-static int stbi__get16be(stbi__context *s)
-{
- int z = stbi__get8(s);
- return (z << 8) + stbi__get8(s);
-}
+ // @TODO: move stbi__convert_format to here
-static stbi__uint32 stbi__get32be(stbi__context *s)
-{
- stbi__uint32 z = stbi__get16be(s);
- return (z << 16) + stbi__get16be(s);
+ if (stbi__vertically_flip_on_load) {
+ int channels = req_comp ? req_comp : *comp;
+ stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc));
+ }
+
+ return (unsigned char*)result;
}
-static int stbi__get16le(stbi__context *s)
+static stbi__uint16* stbi__load_and_postprocess_16bit(stbi__context* s, int* x, int* y, int* comp, int req_comp)
{
- int z = stbi__get8(s);
- return z + (stbi__get8(s) << 8);
+ stbi__result_info ri;
+ void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16);
+
+ if (result == NULL)
+ return NULL;
+
+ // it is the responsibility of the loaders to make sure we get either 8 or 16 bit.
+ STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16);
+
+ if (ri.bits_per_channel != 16) {
+ result = stbi__convert_8_to_16((stbi_uc*)result, *x, *y, req_comp == 0 ? *comp : req_comp);
+ ri.bits_per_channel = 16;
+ }
+
+ // @TODO: move stbi__convert_format16 to here
+ // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision
+
+ if (stbi__vertically_flip_on_load) {
+ int channels = req_comp ? req_comp : *comp;
+ stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16));
+ }
+
+ return (stbi__uint16*)result;
}
-static stbi__uint32 stbi__get32le(stbi__context *s)
+#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR)
+static void stbi__float_postprocess(float* result, int* x, int* y, int* comp, int req_comp)
{
- stbi__uint32 z = stbi__get16le(s);
- return z + (stbi__get16le(s) << 16);
+ if (stbi__vertically_flip_on_load && result != NULL) {
+ int channels = req_comp ? req_comp : *comp;
+ stbi__vertical_flip(result, *x, *y, channels * sizeof(float));
+ }
}
+#endif
-#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings
+#ifndef STBI_NO_STDIO
+#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
+STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char* str, int cbmb, wchar_t* widestr, int cchwide);
+STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t* widestr, int cchwide, char* str, int cbmb, const char* defchar, int* used_default);
+#endif
+#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
+STBIDEF int stbi_convert_wchar_to_utf8(char* buffer, size_t bufferlen, const wchar_t* input)
+{
+ return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int)bufferlen, NULL, NULL);
+}
+#endif
+
+static FILE* stbi__fopen(char const* filename, char const* mode)
+{
+ FILE* f;
+#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
+ wchar_t wMode[64];
+ wchar_t wFilename[1024];
+ if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename) / sizeof(*wFilename)))
+ return 0;
+
+ if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode) / sizeof(*wMode)))
+ return 0;
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+ if (0 != _wfopen_s(&f, wFilename, wMode))
+ f = 0;
+#else
+ f = _wfopen(wFilename, wMode);
+#endif
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+ if (0 != fopen_s(&f, filename, mode))
+ f = 0;
+#else
+ f = fopen(filename, mode);
+#endif
+ return f;
+}
+
+
+STBIDEF stbi_uc* stbi_load(char const* filename, int* x, int* y, int* comp, int req_comp)
+{
+ FILE* f = stbi__fopen(filename, "rb");
+ unsigned char* result;
+ if (!f) return stbi__errpuc("can't fopen", "Unable to open file");
+ result = stbi_load_from_file(f, x, y, comp, req_comp);
+ fclose(f);
+ return result;
+}
+
+STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* comp, int req_comp)
+{
+ unsigned char* result;
+ stbi__context s;
+ stbi__start_file(&s, f);
+ result = stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp);
+ if (result) {
+ // need to 'unget' all the characters in the IO buffer
+ fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR);
+ }
+ return result;
+}
+
+STBIDEF stbi__uint16* stbi_load_from_file_16(FILE* f, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__uint16* result;
+ stbi__context s;
+ stbi__start_file(&s, f);
+ result = stbi__load_and_postprocess_16bit(&s, x, y, comp, req_comp);
+ if (result) {
+ // need to 'unget' all the characters in the IO buffer
+ fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR);
+ }
+ return result;
+}
+
+STBIDEF stbi_us* stbi_load_16(char const* filename, int* x, int* y, int* comp, int req_comp)
+{
+ FILE* f = stbi__fopen(filename, "rb");
+ stbi__uint16* result;
+ if (!f) return (stbi_us*)stbi__errpuc("can't fopen", "Unable to open file");
+ result = stbi_load_from_file_16(f, x, y, comp, req_comp);
+ fclose(f);
+ return result;
+}
+
+
+#endif //!STBI_NO_STDIO
+
+STBIDEF stbi_us* stbi_load_16_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels)
+{
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels);
+}
+
+STBIDEF stbi_us* stbi_load_16_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels)
+{
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user);
+ return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels);
+}
+
+STBIDEF stbi_uc* stbi_load_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp);
+}
+
+STBIDEF stbi_uc* stbi_load_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user);
+ return stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp);
+}
+
+#ifndef STBI_NO_GIF
+STBIDEF stbi_uc* stbi_load_gif_from_memory(stbi_uc const* buffer, int len, int** delays, int* x, int* y, int* z, int* comp, int req_comp)
+{
+ unsigned char* result;
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+
+ result = (unsigned char*)stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp);
+ if (stbi__vertically_flip_on_load) {
+ stbi__vertical_flip_slices(result, *x, *y, *z, *comp);
+ }
+
+ return result;
+}
+#endif
+
+#ifndef STBI_NO_LINEAR
+static float* stbi__loadf_main(stbi__context* s, int* x, int* y, int* comp, int req_comp)
+{
+ unsigned char* data;
+#ifndef STBI_NO_HDR
+ if (stbi__hdr_test(s)) {
+ stbi__result_info ri;
+ float* hdr_data = stbi__hdr_load(s, x, y, comp, req_comp, &ri);
+ if (hdr_data)
+ stbi__float_postprocess(hdr_data, x, y, comp, req_comp);
+ return hdr_data;
+ }
+#endif
+ data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
+ if (data)
+ return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
+ return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
+}
+
+STBIDEF float* stbi_loadf_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__loadf_main(&s, x, y, comp, req_comp);
+}
+
+STBIDEF float* stbi_loadf_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user);
+ return stbi__loadf_main(&s, x, y, comp, req_comp);
+}
+
+#ifndef STBI_NO_STDIO
+STBIDEF float* stbi_loadf(char const* filename, int* x, int* y, int* comp, int req_comp)
+{
+ float* result;
+ FILE* f = stbi__fopen(filename, "rb");
+ if (!f) return stbi__errpf("can't fopen", "Unable to open file");
+ result = stbi_loadf_from_file(f, x, y, comp, req_comp);
+ fclose(f);
+ return result;
+}
+
+STBIDEF float* stbi_loadf_from_file(FILE* f, int* x, int* y, int* comp, int req_comp)
+{
+ stbi__context s;
+ stbi__start_file(&s, f);
+ return stbi__loadf_main(&s, x, y, comp, req_comp);
+}
+#endif // !STBI_NO_STDIO
+
+#endif // !STBI_NO_LINEAR
+
+// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is
+// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always
+// reports false!
+
+STBIDEF int stbi_is_hdr_from_memory(stbi_uc const* buffer, int len)
+{
+#ifndef STBI_NO_HDR
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__hdr_test(&s);
+#else
+ STBI_NOTUSED(buffer);
+ STBI_NOTUSED(len);
+ return 0;
+#endif
+}
+
+#ifndef STBI_NO_STDIO
+STBIDEF int stbi_is_hdr(char const* filename)
+{
+ FILE* f = stbi__fopen(filename, "rb");
+ int result = 0;
+ if (f) {
+ result = stbi_is_hdr_from_file(f);
+ fclose(f);
+ }
+ return result;
+}
+
+STBIDEF int stbi_is_hdr_from_file(FILE* f)
+{
+#ifndef STBI_NO_HDR
+ long pos = ftell(f);
+ int res;
+ stbi__context s;
+ stbi__start_file(&s, f);
+ res = stbi__hdr_test(&s);
+ fseek(f, pos, SEEK_SET);
+ return res;
+#else
+ STBI_NOTUSED(f);
+ return 0;
+#endif
+}
+#endif // !STBI_NO_STDIO
+
+STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const* clbk, void* user)
+{
+#ifndef STBI_NO_HDR
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user);
+ return stbi__hdr_test(&s);
+#else
+ STBI_NOTUSED(clbk);
+ STBI_NOTUSED(user);
+ return 0;
+#endif
+}
+
+#ifndef STBI_NO_LINEAR
+static float stbi__l2h_gamma = 2.2f, stbi__l2h_scale = 1.0f;
+
+STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; }
+STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
+#endif
+
+static float stbi__h2l_gamma_i = 1.0f / 2.2f, stbi__h2l_scale_i = 1.0f;
+
+STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1 / gamma; }
+STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1 / scale; }
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Common code used by all image loaders
+//
+
+enum
+{
+ STBI__SCAN_load = 0,
+ STBI__SCAN_type,
+ STBI__SCAN_header
+};
+
+static void stbi__refill_buffer(stbi__context* s)
+{
+ int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen);
+ s->callback_already_read += (int)(s->img_buffer - s->img_buffer_original);
+ if (n == 0) {
+ // at end of file, treat same as if from memory, but need to handle case
+ // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file
+ s->read_from_callbacks = 0;
+ s->img_buffer = s->buffer_start;
+ s->img_buffer_end = s->buffer_start + 1;
+ *s->img_buffer = 0;
+ }
+ else {
+ s->img_buffer = s->buffer_start;
+ s->img_buffer_end = s->buffer_start + n;
+ }
+}
+
+stbi_inline static stbi_uc stbi__get8(stbi__context* s)
+{
+ if (s->img_buffer < s->img_buffer_end)
+ return *s->img_buffer++;
+ if (s->read_from_callbacks) {
+ stbi__refill_buffer(s);
+ return *s->img_buffer++;
+ }
+ return 0;
+}
+
+#if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM)
+// nothing
+#else
+stbi_inline static int stbi__at_eof(stbi__context* s)
+{
+ if (s->io.read) {
+ if (!(s->io.eof)(s->io_user_data)) return 0;
+ // if feof() is true, check if buffer = end
+ // special case: we've only got the special 0 character at the end
+ if (s->read_from_callbacks == 0) return 1;
+ }
+
+ return s->img_buffer >= s->img_buffer_end;
+}
+#endif
+
+#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC)
+// nothing
+#else
+static void stbi__skip(stbi__context* s, int n)
+{
+ if (n == 0) return; // already there!
+ if (n < 0) {
+ s->img_buffer = s->img_buffer_end;
+ return;
+ }
+ if (s->io.read) {
+ int blen = (int)(s->img_buffer_end - s->img_buffer);
+ if (blen < n) {
+ s->img_buffer = s->img_buffer_end;
+ (s->io.skip)(s->io_user_data, n - blen);
+ return;
+ }
+ }
+ s->img_buffer += n;
+}
+#endif
+
+#if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM)
+// nothing
+#else
+static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n)
+{
+ if (s->io.read) {
+ int blen = (int)(s->img_buffer_end - s->img_buffer);
+ if (blen < n) {
+ int res, count;
+
+ memcpy(buffer, s->img_buffer, blen);
+
+ count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen);
+ res = (count == (n - blen));
+ s->img_buffer = s->img_buffer_end;
+ return res;
+ }
+ }
+
+ if (s->img_buffer + n <= s->img_buffer_end) {
+ memcpy(buffer, s->img_buffer, n);
+ s->img_buffer += n;
+ return 1;
+ }
+ else
+ return 0;
+}
+#endif
+
+#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC)
+// nothing
+#else
+static int stbi__get16be(stbi__context* s)
+{
+ int z = stbi__get8(s);
+ return (z << 8) + stbi__get8(s);
+}
+#endif
+
+#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC)
+// nothing
+#else
+static stbi__uint32 stbi__get32be(stbi__context* s)
+{
+ stbi__uint32 z = stbi__get16be(s);
+ return (z << 16) + stbi__get16be(s);
+}
+#endif
+
+#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF)
+// nothing
+#else
+static int stbi__get16le(stbi__context* s)
+{
+ int z = stbi__get8(s);
+ return z + (stbi__get8(s) << 8);
+}
+#endif
+
+#ifndef STBI_NO_BMP
+static stbi__uint32 stbi__get32le(stbi__context* s)
+{
+ stbi__uint32 z = stbi__get16le(s);
+ z += (stbi__uint32)stbi__get16le(s) << 16;
+ return z;
+}
+#endif
+
+#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings
+
+#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM)
+// nothing
+#else
//////////////////////////////////////////////////////////////////////////////
//
// generic converter from built-in img_n to req_comp
@@ -1314,97 +1745,167 @@ static stbi__uint32 stbi__get32le(stbi__context *s)
static stbi_uc stbi__compute_y(int r, int g, int b)
{
- return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8);
+ return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8);
}
+#endif
-static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)
+#if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM)
+// nothing
+#else
+static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y)
{
- int i,j;
- unsigned char *good;
+ int i, j;
+ unsigned char* good;
- if (req_comp == img_n) return data;
- STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
+ if (req_comp == img_n) return data;
+ STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
- good = (unsigned char *) stbi__malloc(req_comp * x * y);
- if (good == NULL) {
- STBI_FREE(data);
- return stbi__errpuc("outofmem", "Out of memory");
- }
+ good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0);
+ if (good == NULL) {
+ STBI_FREE(data);
+ return stbi__errpuc("outofmem", "Out of memory");
+ }
- for (j=0; j < (int) y; ++j) {
- unsigned char *src = data + j * x * img_n ;
- unsigned char *dest = good + j * x * req_comp;
-
- #define COMBO(a,b) ((a)*8+(b))
- #define CASE(a,b) case COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
- // convert source image with img_n components to one with req_comp components;
- // avoid switch per pixel, so use switch per scanline and massive macros
- switch (COMBO(img_n, req_comp)) {
- CASE(1,2) dest[0]=src[0], dest[1]=255; break;
- CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;
- CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break;
- CASE(2,1) dest[0]=src[0]; break;
- CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;
- CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break;
- CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break;
- CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
- CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break;
- CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
- CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break;
- CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break;
- default: STBI_ASSERT(0);
- }
- #undef CASE
- }
+ for (j = 0; j < (int)y; ++j) {
+ unsigned char* src = data + j * x * img_n;
+ unsigned char* dest = good + j * x * req_comp;
+
+#define STBI__COMBO(a,b) ((a)*8+(b))
+#define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
+ // convert source image with img_n components to one with req_comp components;
+ // avoid switch per pixel, so use switch per scanline and massive macros
+ switch (STBI__COMBO(img_n, req_comp)) {
+ STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break;
+ STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break;
+ STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break;
+ STBI__CASE(2, 1) { dest[0] = src[0]; } break;
+ STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break;
+ STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break;
+ STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break;
+ STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break;
+ STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break;
+ STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break;
+ STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break;
+ STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break;
+ default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
+ }
+#undef STBI__CASE
+ }
+
+ STBI_FREE(data);
+ return good;
+}
+#endif
- STBI_FREE(data);
- return good;
+#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD)
+// nothing
+#else
+static stbi__uint16 stbi__compute_y_16(int r, int g, int b)
+{
+ return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8);
}
+#endif
+
+#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD)
+// nothing
+#else
+static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y)
+{
+ int i, j;
+ stbi__uint16* good;
+
+ if (req_comp == img_n) return data;
+ STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
+
+ good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2);
+ if (good == NULL) {
+ STBI_FREE(data);
+ return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory");
+ }
+
+ for (j = 0; j < (int)y; ++j) {
+ stbi__uint16* src = data + j * x * img_n;
+ stbi__uint16* dest = good + j * x * req_comp;
+
+#define STBI__COMBO(a,b) ((a)*8+(b))
+#define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
+ // convert source image with img_n components to one with req_comp components;
+ // avoid switch per pixel, so use switch per scanline and massive macros
+ switch (STBI__COMBO(img_n, req_comp)) {
+ STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break;
+ STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break;
+ STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break;
+ STBI__CASE(2, 1) { dest[0] = src[0]; } break;
+ STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break;
+ STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break;
+ STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break;
+ STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break;
+ STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break;
+ STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break;
+ STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break;
+ STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break;
+ default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion");
+ }
+#undef STBI__CASE
+ }
+
+ STBI_FREE(data);
+ return good;
+}
+#endif
#ifndef STBI_NO_LINEAR
-static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp)
-{
- int i,k,n;
- float *output = (float *) stbi__malloc(x * y * comp * sizeof(float));
- if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); }
- // compute number of non-alpha components
- if (comp & 1) n = comp; else n = comp-1;
- for (i=0; i < x*y; ++i) {
- for (k=0; k < n; ++k) {
- output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale);
- }
- if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f;
- }
- STBI_FREE(data);
- return output;
+static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp)
+{
+ int i, k, n;
+ float* output;
+ if (!data) return NULL;
+ output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0);
+ if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); }
+ // compute number of non-alpha components
+ if (comp & 1) n = comp; else n = comp - 1;
+ for (i = 0; i < x * y; ++i) {
+ for (k = 0; k < n; ++k) {
+ output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale);
+ }
+ }
+ if (n < comp) {
+ for (i = 0; i < x * y; ++i) {
+ output[i * comp + n] = data[i * comp + n] / 255.0f;
+ }
+ }
+ STBI_FREE(data);
+ return output;
}
#endif
#ifndef STBI_NO_HDR
#define stbi__float2int(x) ((int) (x))
-static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp)
-{
- int i,k,n;
- stbi_uc *output = (stbi_uc *) stbi__malloc(x * y * comp);
- if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); }
- // compute number of non-alpha components
- if (comp & 1) n = comp; else n = comp-1;
- for (i=0; i < x*y; ++i) {
- for (k=0; k < n; ++k) {
- float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f;
- if (z < 0) z = 0;
- if (z > 255) z = 255;
- output[i*comp + k] = (stbi_uc) stbi__float2int(z);
- }
- if (k < comp) {
- float z = data[i*comp+k] * 255 + 0.5f;
- if (z < 0) z = 0;
- if (z > 255) z = 255;
- output[i*comp + k] = (stbi_uc) stbi__float2int(z);
- }
- }
- STBI_FREE(data);
- return output;
+static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp)
+{
+ int i, k, n;
+ stbi_uc* output;
+ if (!data) return NULL;
+ output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0);
+ if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); }
+ // compute number of non-alpha components
+ if (comp & 1) n = comp; else n = comp - 1;
+ for (i = 0; i < x * y; ++i) {
+ for (k = 0; k < n; ++k) {
+ float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f;
+ if (z < 0) z = 0;
+ if (z > 255) z = 255;
+ output[i * comp + k] = (stbi_uc)stbi__float2int(z);
+ }
+ if (k < comp) {
+ float z = data[i * comp + k] * 255 + 0.5f;
+ if (z < 0) z = 0;
+ if (z > 255) z = 255;
+ output[i * comp + k] = (stbi_uc)stbi__float2int(z);
+ }
+ }
+ STBI_FREE(data);
+ return output;
}
#endif
@@ -1436,249 +1937,261 @@ static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp)
typedef struct
{
- stbi_uc fast[1 << FAST_BITS];
- // weirdly, repacking this into AoS is a 10% speed loss, instead of a win
- stbi__uint16 code[256];
- stbi_uc values[256];
- stbi_uc size[257];
- unsigned int maxcode[18];
- int delta[17]; // old 'firstsymbol' - old 'firstcode'
+ stbi_uc fast[1 << FAST_BITS];
+ // weirdly, repacking this into AoS is a 10% speed loss, instead of a win
+ stbi__uint16 code[256];
+ stbi_uc values[256];
+ stbi_uc size[257];
+ unsigned int maxcode[18];
+ int delta[17]; // old 'firstsymbol' - old 'firstcode'
} stbi__huffman;
typedef struct
{
- stbi__context *s;
- stbi__huffman huff_dc[4];
- stbi__huffman huff_ac[4];
- stbi_uc dequant[4][64];
- stbi__int16 fast_ac[4][1 << FAST_BITS];
-
-// sizes for components, interleaved MCUs
- int img_h_max, img_v_max;
- int img_mcu_x, img_mcu_y;
- int img_mcu_w, img_mcu_h;
-
-// definition of jpeg image component
- struct
- {
- int id;
- int h,v;
- int tq;
- int hd,ha;
- int dc_pred;
-
- int x,y,w2,h2;
- stbi_uc *data;
- void *raw_data, *raw_coeff;
- stbi_uc *linebuf;
- short *coeff; // progressive only
- int coeff_w, coeff_h; // number of 8x8 coefficient blocks
- } img_comp[4];
-
- stbi__uint32 code_buffer; // jpeg entropy-coded buffer
- int code_bits; // number of valid bits
- unsigned char marker; // marker seen while filling entropy buffer
- int nomore; // flag if we saw a marker so must stop
-
- int progressive;
- int spec_start;
- int spec_end;
- int succ_high;
- int succ_low;
- int eob_run;
-
- int scan_n, order[4];
- int restart_interval, todo;
-
-// kernels
- void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]);
- void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step);
- stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs);
+ stbi__context* s;
+ stbi__huffman huff_dc[4];
+ stbi__huffman huff_ac[4];
+ stbi__uint16 dequant[4][64];
+ stbi__int16 fast_ac[4][1 << FAST_BITS];
+
+ // sizes for components, interleaved MCUs
+ int img_h_max, img_v_max;
+ int img_mcu_x, img_mcu_y;
+ int img_mcu_w, img_mcu_h;
+
+ // definition of jpeg image component
+ struct
+ {
+ int id;
+ int h, v;
+ int tq;
+ int hd, ha;
+ int dc_pred;
+
+ int x, y, w2, h2;
+ stbi_uc* data;
+ void* raw_data, * raw_coeff;
+ stbi_uc* linebuf;
+ short* coeff; // progressive only
+ int coeff_w, coeff_h; // number of 8x8 coefficient blocks
+ } img_comp[4];
+
+ stbi__uint32 code_buffer; // jpeg entropy-coded buffer
+ int code_bits; // number of valid bits
+ unsigned char marker; // marker seen while filling entropy buffer
+ int nomore; // flag if we saw a marker so must stop
+
+ int progressive;
+ int spec_start;
+ int spec_end;
+ int succ_high;
+ int succ_low;
+ int eob_run;
+ int jfif;
+ int app14_color_transform; // Adobe APP14 tag
+ int rgb;
+
+ int scan_n, order[4];
+ int restart_interval, todo;
+
+ // kernels
+ void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]);
+ void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step);
+ stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs);
} stbi__jpeg;
-static int stbi__build_huffman(stbi__huffman *h, int *count)
-{
- int i,j,k=0,code;
- // build size list for each symbol (from JPEG spec)
- for (i=0; i < 16; ++i)
- for (j=0; j < count[i]; ++j)
- h->size[k++] = (stbi_uc) (i+1);
- h->size[k] = 0;
-
- // compute actual symbols (from jpeg spec)
- code = 0;
- k = 0;
- for(j=1; j <= 16; ++j) {
- // compute delta to add to code to compute symbol id
- h->delta[j] = k - code;
- if (h->size[k] == j) {
- while (h->size[k] == j)
- h->code[k++] = (stbi__uint16) (code++);
- if (code-1 >= (1 << j)) return stbi__err("bad code lengths","Corrupt JPEG");
- }
- // compute largest code + 1 for this size, preshifted as needed later
- h->maxcode[j] = code << (16-j);
- code <<= 1;
- }
- h->maxcode[j] = 0xffffffff;
-
- // build non-spec acceleration table; 255 is flag for not-accelerated
- memset(h->fast, 255, 1 << FAST_BITS);
- for (i=0; i < k; ++i) {
- int s = h->size[i];
- if (s <= FAST_BITS) {
- int c = h->code[i] << (FAST_BITS-s);
- int m = 1 << (FAST_BITS-s);
- for (j=0; j < m; ++j) {
- h->fast[c+j] = (stbi_uc) i;
- }
- }
- }
- return 1;
+static int stbi__build_huffman(stbi__huffman* h, int* count)
+{
+ int i, j, k = 0;
+ unsigned int code;
+ // build size list for each symbol (from JPEG spec)
+ for (i = 0; i < 16; ++i) {
+ for (j = 0; j < count[i]; ++j) {
+ h->size[k++] = (stbi_uc)(i + 1);
+ if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG");
+ }
+ }
+ h->size[k] = 0;
+
+ // compute actual symbols (from jpeg spec)
+ code = 0;
+ k = 0;
+ for (j = 1; j <= 16; ++j) {
+ // compute delta to add to code to compute symbol id
+ h->delta[j] = k - code;
+ if (h->size[k] == j) {
+ while (h->size[k] == j)
+ h->code[k++] = (stbi__uint16)(code++);
+ if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG");
+ }
+ // compute largest code + 1 for this size, preshifted as needed later
+ h->maxcode[j] = code << (16 - j);
+ code <<= 1;
+ }
+ h->maxcode[j] = 0xffffffff;
+
+ // build non-spec acceleration table; 255 is flag for not-accelerated
+ memset(h->fast, 255, 1 << FAST_BITS);
+ for (i = 0; i < k; ++i) {
+ int s = h->size[i];
+ if (s <= FAST_BITS) {
+ int c = h->code[i] << (FAST_BITS - s);
+ int m = 1 << (FAST_BITS - s);
+ for (j = 0; j < m; ++j) {
+ h->fast[c + j] = (stbi_uc)i;
+ }
+ }
+ }
+ return 1;
}
// build a table that decodes both magnitude and value of small ACs in
// one go.
-static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)
-{
- int i;
- for (i=0; i < (1 << FAST_BITS); ++i) {
- stbi_uc fast = h->fast[i];
- fast_ac[i] = 0;
- if (fast < 255) {
- int rs = h->values[fast];
- int run = (rs >> 4) & 15;
- int magbits = rs & 15;
- int len = h->size[fast];
-
- if (magbits && len + magbits <= FAST_BITS) {
- // magnitude code followed by receive_extend code
- int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
- int m = 1 << (magbits - 1);
- if (k < m) k += (-1 << magbits) + 1;
- // if the result is small enough, we can fit it in fast_ac table
- if (k >= -128 && k <= 127)
- fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits));
- }
- }
- }
+static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h)
+{
+ int i;
+ for (i = 0; i < (1 << FAST_BITS); ++i) {
+ stbi_uc fast = h->fast[i];
+ fast_ac[i] = 0;
+ if (fast < 255) {
+ int rs = h->values[fast];
+ int run = (rs >> 4) & 15;
+ int magbits = rs & 15;
+ int len = h->size[fast];
+
+ if (magbits && len + magbits <= FAST_BITS) {
+ // magnitude code followed by receive_extend code
+ int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
+ int m = 1 << (magbits - 1);
+ if (k < m) k += (~0U << magbits) + 1;
+ // if the result is small enough, we can fit it in fast_ac table
+ if (k >= -128 && k <= 127)
+ fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits));
+ }
+ }
+ }
}
-static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
+static void stbi__grow_buffer_unsafe(stbi__jpeg* j)
{
- do {
- int b = j->nomore ? 0 : stbi__get8(j->s);
- if (b == 0xff) {
- int c = stbi__get8(j->s);
- if (c != 0) {
- j->marker = (unsigned char) c;
- j->nomore = 1;
- return;
- }
- }
- j->code_buffer |= b << (24 - j->code_bits);
- j->code_bits += 8;
- } while (j->code_bits <= 24);
+ do {
+ unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
+ if (b == 0xff) {
+ int c = stbi__get8(j->s);
+ while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
+ if (c != 0) {
+ j->marker = (unsigned char)c;
+ j->nomore = 1;
+ return;
+ }
+ }
+ j->code_buffer |= b << (24 - j->code_bits);
+ j->code_bits += 8;
+ } while (j->code_bits <= 24);
}
// (1 << n) - 1
-static stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535};
+static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 };
// decode a jpeg huffman value from the bitstream
-stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h)
-{
- unsigned int temp;
- int c,k;
-
- if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
-
- // look at the top FAST_BITS and determine what symbol ID it is,
- // if the code is <= FAST_BITS
- c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
- k = h->fast[c];
- if (k < 255) {
- int s = h->size[k];
- if (s > j->code_bits)
- return -1;
- j->code_buffer <<= s;
- j->code_bits -= s;
- return h->values[k];
- }
+stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h)
+{
+ unsigned int temp;
+ int c, k;
+
+ if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
+
+ // look at the top FAST_BITS and determine what symbol ID it is,
+ // if the code is <= FAST_BITS
+ c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1);
+ k = h->fast[c];
+ if (k < 255) {
+ int s = h->size[k];
+ if (s > j->code_bits)
+ return -1;
+ j->code_buffer <<= s;
+ j->code_bits -= s;
+ return h->values[k];
+ }
- // naive test is to shift the code_buffer down so k bits are
- // valid, then test against maxcode. To speed this up, we've
- // preshifted maxcode left so that it has (16-k) 0s at the
- // end; in other words, regardless of the number of bits, it
- // wants to be compared against something shifted to have 16;
- // that way we don't need to shift inside the loop.
- temp = j->code_buffer >> 16;
- for (k=FAST_BITS+1 ; ; ++k)
- if (temp < h->maxcode[k])
- break;
- if (k == 17) {
- // error! code not found
- j->code_bits -= 16;
- return -1;
- }
+ // naive test is to shift the code_buffer down so k bits are
+ // valid, then test against maxcode. To speed this up, we've
+ // preshifted maxcode left so that it has (16-k) 0s at the
+ // end; in other words, regardless of the number of bits, it
+ // wants to be compared against something shifted to have 16;
+ // that way we don't need to shift inside the loop.
+ temp = j->code_buffer >> 16;
+ for (k = FAST_BITS + 1; ; ++k)
+ if (temp < h->maxcode[k])
+ break;
+ if (k == 17) {
+ // error! code not found
+ j->code_bits -= 16;
+ return -1;
+ }
- if (k > j->code_bits)
- return -1;
+ if (k > j->code_bits)
+ return -1;
- // convert the huffman code to the symbol id
- c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k];
- STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]);
+ // convert the huffman code to the symbol id
+ c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k];
+ if (c < 0 || c >= 256) // symbol id out of bounds!
+ return -1;
+ STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]);
- // convert the id to a symbol
- j->code_bits -= k;
- j->code_buffer <<= k;
- return h->values[c];
+ // convert the id to a symbol
+ j->code_bits -= k;
+ j->code_buffer <<= k;
+ return h->values[c];
}
// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j);
+ unsigned int k;
+ int sgn;
+ if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
+ if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
- sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB
- k = stbi_lrot(j->code_buffer, n);
- STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask)));
- j->code_buffer = k & ~stbi__bmask[n];
- k &= stbi__bmask[n];
- j->code_bits -= n;
- return k + (stbi__jbias[n] & ~sgn);
+ sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative)
+ k = stbi_lrot(j->code_buffer, n);
+ j->code_buffer = k & ~stbi__bmask[n];
+ k &= stbi__bmask[n];
+ j->code_bits -= n;
+ return k + (stbi__jbias[n] & (sgn - 1));
}
// get some unsigned bits
-stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
+stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n)
{
- unsigned int k;
- if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
- k = stbi_lrot(j->code_buffer, n);
- j->code_buffer = k & ~stbi__bmask[n];
- k &= stbi__bmask[n];
- j->code_bits -= n;
- return k;
+ unsigned int k;
+ if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
+ if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
+ k = stbi_lrot(j->code_buffer, n);
+ j->code_buffer = k & ~stbi__bmask[n];
+ k &= stbi__bmask[n];
+ j->code_bits -= n;
+ return k;
}
-stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
+stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j)
{
- unsigned int k;
- if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
- k = j->code_buffer;
- j->code_buffer <<= 1;
- --j->code_bits;
- return k & 0x80000000;
+ unsigned int k;
+ if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
+ if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing
+ k = j->code_buffer;
+ j->code_buffer <<= 1;
+ --j->code_bits;
+ return k & 0x80000000;
}
// given a value that's at position X in the zigzag stream,
// where does it appear in the 8x8 matrix coded as row-major?
-static stbi_uc stbi__jpeg_dezigzag[64+15] =
+static const stbi_uc stbi__jpeg_dezigzag[64 + 15] =
{
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
@@ -1694,217 +2207,234 @@ static stbi_uc stbi__jpeg_dezigzag[64+15] =
};
// decode one 64-entry block--
-static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi_uc *dequant)
-{
- int diff,dc,k;
- int t;
-
- if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
- t = stbi__jpeg_huff_decode(j, hdc);
- if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG");
-
- // 0 all the ac values now so we can do it 32-bits at a time
- memset(data,0,64*sizeof(data[0]));
-
- diff = t ? stbi__extend_receive(j, t) : 0;
- dc = j->img_comp[b].dc_pred + diff;
- j->img_comp[b].dc_pred = dc;
- data[0] = (short) (dc * dequant[0]);
-
- // decode AC components, see JPEG spec
- k = 1;
- do {
- unsigned int zig;
- int c,r,s;
- if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
- c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
- r = fac[c];
- if (r) { // fast-AC path
- k += (r >> 4) & 15; // run
- s = r & 15; // combined length
- j->code_buffer <<= s;
- j->code_bits -= s;
- // decode into unzigzag'd location
- zig = stbi__jpeg_dezigzag[k++];
- data[zig] = (short) ((r >> 8) * dequant[zig]);
- } else {
- int rs = stbi__jpeg_huff_decode(j, hac);
- if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG");
- s = rs & 15;
- r = rs >> 4;
- if (s == 0) {
- if (rs != 0xf0) break; // end block
- k += 16;
- } else {
- k += r;
+static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant)
+{
+ int diff, dc, k;
+ int t;
+
+ if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
+ t = stbi__jpeg_huff_decode(j, hdc);
+ if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG");
+
+ // 0 all the ac values now so we can do it 32-bits at a time
+ memset(data, 0, 64 * sizeof(data[0]));
+
+ diff = t ? stbi__extend_receive(j, t) : 0;
+ if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG");
+ dc = j->img_comp[b].dc_pred + diff;
+ j->img_comp[b].dc_pred = dc;
+ if ((dc > SHRT_MAX) || (dequant[0] > SHRT_MAX) || !stbi__mul2shorts_valid((short)dc, (short)dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
+ data[0] = (short)(dc * dequant[0]);
+
+ // decode AC components, see JPEG spec
+ k = 1;
+ do {
+ unsigned int zig;
+ int c, r, s;
+ if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
+ c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1);
+ r = fac[c];
+ if (r) { // fast-AC path
+ k += (r >> 4) & 15; // run
+ s = r & 15; // combined length
+ if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available");
+ j->code_buffer <<= s;
+ j->code_bits -= s;
// decode into unzigzag'd location
zig = stbi__jpeg_dezigzag[k++];
- data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]);
- }
- }
- } while (k < 64);
- return 1;
+ data[zig] = (short)((r >> 8) * dequant[zig]);
+ }
+ else {
+ int rs = stbi__jpeg_huff_decode(j, hac);
+ if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG");
+ s = rs & 15;
+ r = rs >> 4;
+ if (s == 0) {
+ if (rs != 0xf0) break; // end block
+ k += 16;
+ }
+ else {
+ k += r;
+ // decode into unzigzag'd location
+ zig = stbi__jpeg_dezigzag[k++];
+ data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]);
+ }
+ }
+ } while (k < 64);
+ return 1;
}
-static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b)
+static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b)
{
- int diff,dc;
- int t;
- if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
+ int diff, dc;
+ int t;
+ if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
- if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
+ if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
- if (j->succ_high == 0) {
- // first scan for DC coefficient, must be first
- memset(data,0,64*sizeof(data[0])); // 0 all the ac values now
- t = stbi__jpeg_huff_decode(j, hdc);
- diff = t ? stbi__extend_receive(j, t) : 0;
+ if (j->succ_high == 0) {
+ // first scan for DC coefficient, must be first
+ memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now
+ t = stbi__jpeg_huff_decode(j, hdc);
+ if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
+ diff = t ? stbi__extend_receive(j, t) : 0;
- dc = j->img_comp[b].dc_pred + diff;
- j->img_comp[b].dc_pred = dc;
- data[0] = (short) (dc << j->succ_low);
- } else {
- // refinement scan for DC coefficient
- if (stbi__jpeg_get_bit(j))
- data[0] += (short) (1 << j->succ_low);
- }
- return 1;
+ if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG");
+ dc = j->img_comp[b].dc_pred + diff;
+ j->img_comp[b].dc_pred = dc;
+ if ((dc > SHRT_MAX) || !stbi__mul2shorts_valid((short)dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
+ data[0] = (short)(dc * (1 << j->succ_low));
+ }
+ else {
+ // refinement scan for DC coefficient
+ if (stbi__jpeg_get_bit(j))
+ data[0] += (short)(1 << j->succ_low);
+ }
+ return 1;
}
// @OPTIMIZE: store non-zigzagged during the decode passes,
// and only de-zigzag when dequantizing
-static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac)
+static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac)
{
- int k;
- if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
+ int k;
+ if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
- if (j->succ_high == 0) {
- int shift = j->succ_low;
-
- if (j->eob_run) {
- --j->eob_run;
- return 1;
- }
+ if (j->succ_high == 0) {
+ int shift = j->succ_low;
- k = j->spec_start;
- do {
- unsigned int zig;
- int c,r,s;
- if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
- c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
- r = fac[c];
- if (r) { // fast-AC path
- k += (r >> 4) & 15; // run
- s = r & 15; // combined length
- j->code_buffer <<= s;
- j->code_bits -= s;
- zig = stbi__jpeg_dezigzag[k++];
- data[zig] = (short) ((r >> 8) << shift);
- } else {
- int rs = stbi__jpeg_huff_decode(j, hac);
- if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG");
- s = rs & 15;
- r = rs >> 4;
- if (s == 0) {
- if (r < 15) {
- j->eob_run = (1 << r);
- if (r)
- j->eob_run += stbi__jpeg_get_bits(j, r);
- --j->eob_run;
- break;
- }
- k += 16;
- } else {
- k += r;
- zig = stbi__jpeg_dezigzag[k++];
- data[zig] = (short) (stbi__extend_receive(j,s) << shift);
+ if (j->eob_run) {
+ --j->eob_run;
+ return 1;
+ }
+
+ k = j->spec_start;
+ do {
+ unsigned int zig;
+ int c, r, s;
+ if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
+ c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1);
+ r = fac[c];
+ if (r) { // fast-AC path
+ k += (r >> 4) & 15; // run
+ s = r & 15; // combined length
+ if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available");
+ j->code_buffer <<= s;
+ j->code_bits -= s;
+ zig = stbi__jpeg_dezigzag[k++];
+ data[zig] = (short)((r >> 8) * (1 << shift));
}
- }
- } while (k <= j->spec_end);
- } else {
- // refinement scan for these AC coefficients
-
- short bit = (short) (1 << j->succ_low);
-
- if (j->eob_run) {
- --j->eob_run;
- for (k = j->spec_start; k <= j->spec_end; ++k) {
- short *p = &data[stbi__jpeg_dezigzag[k]];
- if (*p != 0)
- if (stbi__jpeg_get_bit(j))
- if ((*p & bit)==0) {
- if (*p > 0)
- *p += bit;
- else
- *p -= bit;
- }
- }
- } else {
- k = j->spec_start;
- do {
- int r,s;
- int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh
- if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG");
- s = rs & 15;
- r = rs >> 4;
- if (s == 0) {
- if (r < 15) {
- j->eob_run = (1 << r) - 1;
- if (r)
- j->eob_run += stbi__jpeg_get_bits(j, r);
- r = 64; // force end of block
- } else {
- // r=15 s=0 should write 16 0s, so we just do
- // a run of 15 0s and then write s (which is 0),
- // so we don't have to do anything special here
- }
- } else {
- if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG");
- // sign bit
- if (stbi__jpeg_get_bit(j))
- s = bit;
- else
- s = -bit;
+ else {
+ int rs = stbi__jpeg_huff_decode(j, hac);
+ if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG");
+ s = rs & 15;
+ r = rs >> 4;
+ if (s == 0) {
+ if (r < 15) {
+ j->eob_run = (1 << r);
+ if (r)
+ j->eob_run += stbi__jpeg_get_bits(j, r);
+ --j->eob_run;
+ break;
+ }
+ k += 16;
+ }
+ else {
+ k += r;
+ zig = stbi__jpeg_dezigzag[k++];
+ data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift));
+ }
}
-
- // advance by r
- while (k <= j->spec_end) {
- short *p = &data[stbi__jpeg_dezigzag[k++]];
- if (*p != 0) {
- if (stbi__jpeg_get_bit(j))
- if ((*p & bit)==0) {
- if (*p > 0)
- *p += bit;
- else
- *p -= bit;
- }
- } else {
- if (r == 0) {
- *p = (short) s;
- break;
- }
- --r;
- }
+ } while (k <= j->spec_end);
+ }
+ else {
+ // refinement scan for these AC coefficients
+
+ short bit = (short)(1 << j->succ_low);
+
+ if (j->eob_run) {
+ --j->eob_run;
+ for (k = j->spec_start; k <= j->spec_end; ++k) {
+ short* p = &data[stbi__jpeg_dezigzag[k]];
+ if (*p != 0)
+ if (stbi__jpeg_get_bit(j))
+ if ((*p & bit) == 0) {
+ if (*p > 0)
+ *p += bit;
+ else
+ *p -= bit;
+ }
}
- } while (k <= j->spec_end);
- }
- }
- return 1;
+ }
+ else {
+ k = j->spec_start;
+ do {
+ int r, s;
+ int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh
+ if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG");
+ s = rs & 15;
+ r = rs >> 4;
+ if (s == 0) {
+ if (r < 15) {
+ j->eob_run = (1 << r) - 1;
+ if (r)
+ j->eob_run += stbi__jpeg_get_bits(j, r);
+ r = 64; // force end of block
+ }
+ else {
+ // r=15 s=0 should write 16 0s, so we just do
+ // a run of 15 0s and then write s (which is 0),
+ // so we don't have to do anything special here
+ }
+ }
+ else {
+ if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG");
+ // sign bit
+ if (stbi__jpeg_get_bit(j))
+ s = bit;
+ else
+ s = -bit;
+ }
+
+ // advance by r
+ while (k <= j->spec_end) {
+ short* p = &data[stbi__jpeg_dezigzag[k++]];
+ if (*p != 0) {
+ if (stbi__jpeg_get_bit(j))
+ if ((*p & bit) == 0) {
+ if (*p > 0)
+ *p += bit;
+ else
+ *p -= bit;
+ }
+ }
+ else {
+ if (r == 0) {
+ *p = (short)s;
+ break;
+ }
+ --r;
+ }
+ }
+ } while (k <= j->spec_end);
+ }
+ }
+ return 1;
}
// take a -128..127 value and stbi__clamp it and convert to 0..255
stbi_inline static stbi_uc stbi__clamp(int x)
{
- // trick to use a single test to catch both cases
- if ((unsigned int) x > 255) {
- if (x < 0) return 0;
- if (x > 255) return 255;
- }
- return (stbi_uc) x;
+ // trick to use a single test to catch both cases
+ if ((unsigned int)x > 255) {
+ if (x < 0) return 0;
+ if (x > 255) return 255;
+ }
+ return (stbi_uc)x;
}
#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5)))
-#define stbi__fsh(x) ((x) << 12)
+#define stbi__fsh(x) ((x) * 4096)
// derived from jidctint -- DCT_ISLOW
#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \
@@ -1944,81 +2474,82 @@ stbi_inline static stbi_uc stbi__clamp(int x)
t1 += p2+p4; \
t0 += p1+p3;
-static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64])
-{
- int i,val[64],*v=val;
- stbi_uc *o;
- short *d = data;
-
- // columns
- for (i=0; i < 8; ++i,++d, ++v) {
- // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing
- if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0
- && d[40]==0 && d[48]==0 && d[56]==0) {
- // no shortcut 0 seconds
- // (1|2|3|4|5|6|7)==0 0 seconds
- // all separate -0.047 seconds
- // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds
- int dcterm = d[0] << 2;
- v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm;
- } else {
- STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56])
- // constants scaled things up by 1<<12; let's bring them back
- // down, but keep 2 extra bits of precision
- x0 += 512; x1 += 512; x2 += 512; x3 += 512;
- v[ 0] = (x0+t3) >> 10;
- v[56] = (x0-t3) >> 10;
- v[ 8] = (x1+t2) >> 10;
- v[48] = (x1-t2) >> 10;
- v[16] = (x2+t1) >> 10;
- v[40] = (x2-t1) >> 10;
- v[24] = (x3+t0) >> 10;
- v[32] = (x3-t0) >> 10;
- }
- }
+static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64])
+{
+ int i, val[64], * v = val;
+ stbi_uc* o;
+ short* d = data;
+
+ // columns
+ for (i = 0; i < 8; ++i, ++d, ++v) {
+ // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing
+ if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0
+ && d[40] == 0 && d[48] == 0 && d[56] == 0) {
+ // no shortcut 0 seconds
+ // (1|2|3|4|5|6|7)==0 0 seconds
+ // all separate -0.047 seconds
+ // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds
+ int dcterm = d[0] * 4;
+ v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm;
+ }
+ else {
+ STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56])
+ // constants scaled things up by 1<<12; let's bring them back
+ // down, but keep 2 extra bits of precision
+ x0 += 512; x1 += 512; x2 += 512; x3 += 512;
+ v[0] = (x0 + t3) >> 10;
+ v[56] = (x0 - t3) >> 10;
+ v[8] = (x1 + t2) >> 10;
+ v[48] = (x1 - t2) >> 10;
+ v[16] = (x2 + t1) >> 10;
+ v[40] = (x2 - t1) >> 10;
+ v[24] = (x3 + t0) >> 10;
+ v[32] = (x3 - t0) >> 10;
+ }
+ }
- for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) {
- // no fast case since the first 1D IDCT spread components out
- STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7])
- // constants scaled things up by 1<<12, plus we had 1<<2 from first
- // loop, plus horizontal and vertical each scale by sqrt(8) so together
- // we've got an extra 1<<3, so 1<<17 total we need to remove.
- // so we want to round that, which means adding 0.5 * 1<<17,
- // aka 65536. Also, we'll end up with -128 to 127 that we want
- // to encode as 0..255 by adding 128, so we'll add that before the shift
- x0 += 65536 + (128<<17);
- x1 += 65536 + (128<<17);
- x2 += 65536 + (128<<17);
- x3 += 65536 + (128<<17);
- // tried computing the shifts into temps, or'ing the temps to see
- // if any were out of range, but that was slower
- o[0] = stbi__clamp((x0+t3) >> 17);
- o[7] = stbi__clamp((x0-t3) >> 17);
- o[1] = stbi__clamp((x1+t2) >> 17);
- o[6] = stbi__clamp((x1-t2) >> 17);
- o[2] = stbi__clamp((x2+t1) >> 17);
- o[5] = stbi__clamp((x2-t1) >> 17);
- o[3] = stbi__clamp((x3+t0) >> 17);
- o[4] = stbi__clamp((x3-t0) >> 17);
- }
+ for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) {
+ // no fast case since the first 1D IDCT spread components out
+ STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7])
+ // constants scaled things up by 1<<12, plus we had 1<<2 from first
+ // loop, plus horizontal and vertical each scale by sqrt(8) so together
+ // we've got an extra 1<<3, so 1<<17 total we need to remove.
+ // so we want to round that, which means adding 0.5 * 1<<17,
+ // aka 65536. Also, we'll end up with -128 to 127 that we want
+ // to encode as 0..255 by adding 128, so we'll add that before the shift
+ x0 += 65536 + (128 << 17);
+ x1 += 65536 + (128 << 17);
+ x2 += 65536 + (128 << 17);
+ x3 += 65536 + (128 << 17);
+ // tried computing the shifts into temps, or'ing the temps to see
+ // if any were out of range, but that was slower
+ o[0] = stbi__clamp((x0 + t3) >> 17);
+ o[7] = stbi__clamp((x0 - t3) >> 17);
+ o[1] = stbi__clamp((x1 + t2) >> 17);
+ o[6] = stbi__clamp((x1 - t2) >> 17);
+ o[2] = stbi__clamp((x2 + t1) >> 17);
+ o[5] = stbi__clamp((x2 - t1) >> 17);
+ o[3] = stbi__clamp((x3 + t0) >> 17);
+ o[4] = stbi__clamp((x3 - t0) >> 17);
+ }
}
#ifdef STBI_SSE2
// sse2 integer IDCT. not the fastest possible implementation but it
// produces bit-identical results to the generic C version so it's
// fully "transparent".
-static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
+static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64])
{
- // This is constructed to match our regular (generic) integer IDCT exactly.
- __m128i row0, row1, row2, row3, row4, row5, row6, row7;
- __m128i tmp;
+ // This is constructed to match our regular (generic) integer IDCT exactly.
+ __m128i row0, row1, row2, row3, row4, row5, row6, row7;
+ __m128i tmp;
- // dot product constant: even elems=x, odd elems=y
- #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
+ // dot product constant: even elems=x, odd elems=y
+#define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
- // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit)
- // out(1) = c1[even]*x + c1[odd]*y
- #define dct_rot(out0,out1, x,y,c0,c1) \
+// out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit)
+// out(1) = c1[even]*x + c1[odd]*y
+#define dct_rot(out0,out1, x,y,c0,c1) \
__m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
__m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
__m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
@@ -2027,22 +2558,22 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
__m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
// out = in << 12 (in 16-bit, out 32-bit)
- #define dct_widen(out, in) \
+#define dct_widen(out, in) \
__m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
__m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
// wide add
- #define dct_wadd(out, a, b) \
+#define dct_wadd(out, a, b) \
__m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
__m128i out##_h = _mm_add_epi32(a##_h, b##_h)
// wide sub
- #define dct_wsub(out, a, b) \
+#define dct_wsub(out, a, b) \
__m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
__m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
// butterfly a/b, add bias, then shift by "s" and pack
- #define dct_bfly32o(out0, out1, a,b,bias,s) \
+#define dct_bfly32o(out0, out1, a,b,bias,s) \
{ \
__m128i abiased_l = _mm_add_epi32(a##_l, bias); \
__m128i abiased_h = _mm_add_epi32(a##_h, bias); \
@@ -2053,18 +2584,18 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
}
// 8-bit interleave step (for transposes)
- #define dct_interleave8(a, b) \
+#define dct_interleave8(a, b) \
tmp = a; \
a = _mm_unpacklo_epi8(a, b); \
b = _mm_unpackhi_epi8(tmp, b)
// 16-bit interleave step (for transposes)
- #define dct_interleave16(a, b) \
+#define dct_interleave16(a, b) \
tmp = a; \
a = _mm_unpacklo_epi16(a, b); \
b = _mm_unpackhi_epi16(tmp, b)
- #define dct_pass(bias,shift) \
+#define dct_pass(bias,shift) \
{ \
/* even part */ \
dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \
@@ -2092,84 +2623,84 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
dct_bfly32o(row3,row4, x3,x4,bias,shift); \
}
- __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f));
- __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f));
- __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f));
- __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f));
- __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f));
- __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f));
- __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f));
- __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f));
-
- // rounding biases in column/row passes, see stbi__idct_block for explanation.
- __m128i bias_0 = _mm_set1_epi32(512);
- __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17));
-
- // load
- row0 = _mm_load_si128((const __m128i *) (data + 0*8));
- row1 = _mm_load_si128((const __m128i *) (data + 1*8));
- row2 = _mm_load_si128((const __m128i *) (data + 2*8));
- row3 = _mm_load_si128((const __m128i *) (data + 3*8));
- row4 = _mm_load_si128((const __m128i *) (data + 4*8));
- row5 = _mm_load_si128((const __m128i *) (data + 5*8));
- row6 = _mm_load_si128((const __m128i *) (data + 6*8));
- row7 = _mm_load_si128((const __m128i *) (data + 7*8));
-
- // column pass
- dct_pass(bias_0, 10);
-
- {
- // 16bit 8x8 transpose pass 1
- dct_interleave16(row0, row4);
- dct_interleave16(row1, row5);
- dct_interleave16(row2, row6);
- dct_interleave16(row3, row7);
-
- // transpose pass 2
- dct_interleave16(row0, row2);
- dct_interleave16(row1, row3);
- dct_interleave16(row4, row6);
- dct_interleave16(row5, row7);
-
- // transpose pass 3
- dct_interleave16(row0, row1);
- dct_interleave16(row2, row3);
- dct_interleave16(row4, row5);
- dct_interleave16(row6, row7);
- }
+ __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f));
+ __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f));
+ __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f));
+ __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f));
+ __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f));
+ __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f));
+ __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f));
+ __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f));
+
+ // rounding biases in column/row passes, see stbi__idct_block for explanation.
+ __m128i bias_0 = _mm_set1_epi32(512);
+ __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17));
+
+ // load
+ row0 = _mm_load_si128((const __m128i*) (data + 0 * 8));
+ row1 = _mm_load_si128((const __m128i*) (data + 1 * 8));
+ row2 = _mm_load_si128((const __m128i*) (data + 2 * 8));
+ row3 = _mm_load_si128((const __m128i*) (data + 3 * 8));
+ row4 = _mm_load_si128((const __m128i*) (data + 4 * 8));
+ row5 = _mm_load_si128((const __m128i*) (data + 5 * 8));
+ row6 = _mm_load_si128((const __m128i*) (data + 6 * 8));
+ row7 = _mm_load_si128((const __m128i*) (data + 7 * 8));
+
+ // column pass
+ dct_pass(bias_0, 10);
+
+ {
+ // 16bit 8x8 transpose pass 1
+ dct_interleave16(row0, row4);
+ dct_interleave16(row1, row5);
+ dct_interleave16(row2, row6);
+ dct_interleave16(row3, row7);
+
+ // transpose pass 2
+ dct_interleave16(row0, row2);
+ dct_interleave16(row1, row3);
+ dct_interleave16(row4, row6);
+ dct_interleave16(row5, row7);
+
+ // transpose pass 3
+ dct_interleave16(row0, row1);
+ dct_interleave16(row2, row3);
+ dct_interleave16(row4, row5);
+ dct_interleave16(row6, row7);
+ }
- // row pass
- dct_pass(bias_1, 17);
-
- {
- // pack
- __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7
- __m128i p1 = _mm_packus_epi16(row2, row3);
- __m128i p2 = _mm_packus_epi16(row4, row5);
- __m128i p3 = _mm_packus_epi16(row6, row7);
-
- // 8bit 8x8 transpose pass 1
- dct_interleave8(p0, p2); // a0e0a1e1...
- dct_interleave8(p1, p3); // c0g0c1g1...
-
- // transpose pass 2
- dct_interleave8(p0, p1); // a0c0e0g0...
- dct_interleave8(p2, p3); // b0d0f0h0...
-
- // transpose pass 3
- dct_interleave8(p0, p2); // a0b0c0d0...
- dct_interleave8(p1, p3); // a4b4c4d4...
-
- // store
- _mm_storel_epi64((__m128i *) out, p0); out += out_stride;
- _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride;
- _mm_storel_epi64((__m128i *) out, p2); out += out_stride;
- _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride;
- _mm_storel_epi64((__m128i *) out, p1); out += out_stride;
- _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride;
- _mm_storel_epi64((__m128i *) out, p3); out += out_stride;
- _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e));
- }
+ // row pass
+ dct_pass(bias_1, 17);
+
+ {
+ // pack
+ __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7
+ __m128i p1 = _mm_packus_epi16(row2, row3);
+ __m128i p2 = _mm_packus_epi16(row4, row5);
+ __m128i p3 = _mm_packus_epi16(row6, row7);
+
+ // 8bit 8x8 transpose pass 1
+ dct_interleave8(p0, p2); // a0e0a1e1...
+ dct_interleave8(p1, p3); // c0g0c1g1...
+
+ // transpose pass 2
+ dct_interleave8(p0, p1); // a0c0e0g0...
+ dct_interleave8(p2, p3); // b0d0f0h0...
+
+ // transpose pass 3
+ dct_interleave8(p0, p2); // a0b0c0d0...
+ dct_interleave8(p1, p3); // a4b4c4d4...
+
+ // store
+ _mm_storel_epi64((__m128i*) out, p0); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, p2); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, p1); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, p3); out += out_stride;
+ _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e));
+ }
#undef dct_const
#undef dct_rot
@@ -2188,22 +2719,22 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
// NEON integer IDCT. should produce bit-identical
// results to the generic C version.
-static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
-{
- int16x8_t row0, row1, row2, row3, row4, row5, row6, row7;
-
- int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f));
- int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f));
- int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f));
- int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f));
- int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f));
- int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f));
- int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f));
- int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f));
- int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f));
- int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f));
- int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f));
- int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f));
+static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64])
+{
+ int16x8_t row0, row1, row2, row3, row4, row5, row6, row7;
+
+ int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f));
+ int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f));
+ int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f));
+ int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f));
+ int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f));
+ int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f));
+ int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f));
+ int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f));
+ int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f));
+ int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f));
+ int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f));
+ int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f));
#define dct_long_mul(out, inq, coeff) \
int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \
@@ -2217,7 +2748,7 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \
int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12)
-// wide add
+ // wide add
#define dct_wadd(out, a, b) \
int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \
int32x4_t out##_h = vaddq_s32(a##_h, b##_h)
@@ -2277,70 +2808,70 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
}
// load
- row0 = vld1q_s16(data + 0*8);
- row1 = vld1q_s16(data + 1*8);
- row2 = vld1q_s16(data + 2*8);
- row3 = vld1q_s16(data + 3*8);
- row4 = vld1q_s16(data + 4*8);
- row5 = vld1q_s16(data + 5*8);
- row6 = vld1q_s16(data + 6*8);
- row7 = vld1q_s16(data + 7*8);
-
- // add DC bias
- row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0));
-
- // column pass
- dct_pass(vrshrn_n_s32, 10);
-
- // 16bit 8x8 transpose
- {
-// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively.
-// whether compilers actually get this is another story, sadly.
+ row0 = vld1q_s16(data + 0 * 8);
+ row1 = vld1q_s16(data + 1 * 8);
+ row2 = vld1q_s16(data + 2 * 8);
+ row3 = vld1q_s16(data + 3 * 8);
+ row4 = vld1q_s16(data + 4 * 8);
+ row5 = vld1q_s16(data + 5 * 8);
+ row6 = vld1q_s16(data + 6 * 8);
+ row7 = vld1q_s16(data + 7 * 8);
+
+ // add DC bias
+ row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0));
+
+ // column pass
+ dct_pass(vrshrn_n_s32, 10);
+
+ // 16bit 8x8 transpose
+ {
+ // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively.
+ // whether compilers actually get this is another story, sadly.
#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; }
#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); }
#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); }
// pass 1
- dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6
- dct_trn16(row2, row3);
- dct_trn16(row4, row5);
- dct_trn16(row6, row7);
-
- // pass 2
- dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4
- dct_trn32(row1, row3);
- dct_trn32(row4, row6);
- dct_trn32(row5, row7);
-
- // pass 3
- dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0
- dct_trn64(row1, row5);
- dct_trn64(row2, row6);
- dct_trn64(row3, row7);
+ dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6
+ dct_trn16(row2, row3);
+ dct_trn16(row4, row5);
+ dct_trn16(row6, row7);
+
+ // pass 2
+ dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4
+ dct_trn32(row1, row3);
+ dct_trn32(row4, row6);
+ dct_trn32(row5, row7);
+
+ // pass 3
+ dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0
+ dct_trn64(row1, row5);
+ dct_trn64(row2, row6);
+ dct_trn64(row3, row7);
#undef dct_trn16
#undef dct_trn32
#undef dct_trn64
- }
+ }
- // row pass
- // vrshrn_n_s32 only supports shifts up to 16, we need
- // 17. so do a non-rounding shift of 16 first then follow
- // up with a rounding shift by 1.
- dct_pass(vshrn_n_s32, 16);
-
- {
- // pack and round
- uint8x8_t p0 = vqrshrun_n_s16(row0, 1);
- uint8x8_t p1 = vqrshrun_n_s16(row1, 1);
- uint8x8_t p2 = vqrshrun_n_s16(row2, 1);
- uint8x8_t p3 = vqrshrun_n_s16(row3, 1);
- uint8x8_t p4 = vqrshrun_n_s16(row4, 1);
- uint8x8_t p5 = vqrshrun_n_s16(row5, 1);
- uint8x8_t p6 = vqrshrun_n_s16(row6, 1);
- uint8x8_t p7 = vqrshrun_n_s16(row7, 1);
-
- // again, these can translate into one instruction, but often don't.
+ // row pass
+ // vrshrn_n_s32 only supports shifts up to 16, we need
+ // 17. so do a non-rounding shift of 16 first then follow
+ // up with a rounding shift by 1.
+ dct_pass(vshrn_n_s32, 16);
+
+ {
+ // pack and round
+ uint8x8_t p0 = vqrshrun_n_s16(row0, 1);
+ uint8x8_t p1 = vqrshrun_n_s16(row1, 1);
+ uint8x8_t p2 = vqrshrun_n_s16(row2, 1);
+ uint8x8_t p3 = vqrshrun_n_s16(row3, 1);
+ uint8x8_t p4 = vqrshrun_n_s16(row4, 1);
+ uint8x8_t p5 = vqrshrun_n_s16(row5, 1);
+ uint8x8_t p6 = vqrshrun_n_s16(row6, 1);
+ uint8x8_t p7 = vqrshrun_n_s16(row7, 1);
+
+ // again, these can translate into one instruction, but often don't.
#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; }
#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); }
#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); }
@@ -2349,37 +2880,37 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
// 8 bytes to each scan line!
// 8x8 8-bit transpose pass 1
- dct_trn8_8(p0, p1);
- dct_trn8_8(p2, p3);
- dct_trn8_8(p4, p5);
- dct_trn8_8(p6, p7);
-
- // pass 2
- dct_trn8_16(p0, p2);
- dct_trn8_16(p1, p3);
- dct_trn8_16(p4, p6);
- dct_trn8_16(p5, p7);
-
- // pass 3
- dct_trn8_32(p0, p4);
- dct_trn8_32(p1, p5);
- dct_trn8_32(p2, p6);
- dct_trn8_32(p3, p7);
-
- // store
- vst1_u8(out, p0); out += out_stride;
- vst1_u8(out, p1); out += out_stride;
- vst1_u8(out, p2); out += out_stride;
- vst1_u8(out, p3); out += out_stride;
- vst1_u8(out, p4); out += out_stride;
- vst1_u8(out, p5); out += out_stride;
- vst1_u8(out, p6); out += out_stride;
- vst1_u8(out, p7);
+ dct_trn8_8(p0, p1);
+ dct_trn8_8(p2, p3);
+ dct_trn8_8(p4, p5);
+ dct_trn8_8(p6, p7);
+
+ // pass 2
+ dct_trn8_16(p0, p2);
+ dct_trn8_16(p1, p3);
+ dct_trn8_16(p4, p6);
+ dct_trn8_16(p5, p7);
+
+ // pass 3
+ dct_trn8_32(p0, p4);
+ dct_trn8_32(p1, p5);
+ dct_trn8_32(p2, p6);
+ dct_trn8_32(p3, p7);
+
+ // store
+ vst1_u8(out, p0); out += out_stride;
+ vst1_u8(out, p1); out += out_stride;
+ vst1_u8(out, p2); out += out_stride;
+ vst1_u8(out, p3); out += out_stride;
+ vst1_u8(out, p4); out += out_stride;
+ vst1_u8(out, p5); out += out_stride;
+ vst1_u8(out, p6); out += out_stride;
+ vst1_u8(out, p7);
#undef dct_trn8_8
#undef dct_trn8_16
#undef dct_trn8_32
- }
+ }
#undef dct_long_mul
#undef dct_long_mac
@@ -2396,15 +2927,15 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
// if there's a pending marker from the entropy stream, return that
// otherwise, fetch from the stream and get a marker. if there's no
// marker, return 0xff, which is never a valid marker value
-static stbi_uc stbi__get_marker(stbi__jpeg *j)
+static stbi_uc stbi__get_marker(stbi__jpeg* j)
{
- stbi_uc x;
- if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
- x = stbi__get8(j->s);
- if (x != 0xff) return STBI__MARKER_none;
- while (x == 0xff)
- x = stbi__get8(j->s);
- return x;
+ stbi_uc x;
+ if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
+ x = stbi__get8(j->s);
+ if (x != 0xff) return STBI__MARKER_none;
+ while (x == 0xff)
+ x = stbi__get8(j->s); // consume repeated 0xff fill bytes
+ return x;
}
// in each scan, we'll have scan_n components, and the order
@@ -2413,352 +2944,431 @@ static stbi_uc stbi__get_marker(stbi__jpeg *j)
// after a restart interval, stbi__jpeg_reset the entropy decoder and
// the dc prediction
-static void stbi__jpeg_reset(stbi__jpeg *j)
-{
- j->code_bits = 0;
- j->code_buffer = 0;
- j->nomore = 0;
- j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = 0;
- j->marker = STBI__MARKER_none;
- j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
- j->eob_run = 0;
- // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
- // since we don't even allow 1<<30 pixels
-}
-
-static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
-{
- stbi__jpeg_reset(z);
- if (!z->progressive) {
- if (z->scan_n == 1) {
- int i,j;
- STBI_SIMD_ALIGN(short, data[64]);
- int n = z->order[0];
- // non-interleaved data, we just need to process one block at a time,
- // in trivial scanline order
- // number of blocks to do just depends on how many actual "pixels" this
- // component has, independent of interleaved MCU blocking and such
- int w = (z->img_comp[n].x+7) >> 3;
- int h = (z->img_comp[n].y+7) >> 3;
- for (j=0; j < h; ++j) {
- for (i=0; i < w; ++i) {
- int ha = z->img_comp[n].ha;
- if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;
- z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data);
- // every data block is an MCU, so countdown the restart interval
- if (--z->todo <= 0) {
- if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
- // if it's NOT a restart, then just bail, so we get corrupt data
- // rather than no data
- if (!STBI__RESTART(z->marker)) return 1;
- stbi__jpeg_reset(z);
- }
- }
- }
- return 1;
- } else { // interleaved
- int i,j,k,x,y;
- STBI_SIMD_ALIGN(short, data[64]);
- for (j=0; j < z->img_mcu_y; ++j) {
- for (i=0; i < z->img_mcu_x; ++i) {
- // scan an interleaved mcu... process scan_n components in order
- for (k=0; k < z->scan_n; ++k) {
- int n = z->order[k];
- // scan out an mcu's worth of this component; that's just determined
- // by the basic H and V specified for the component
- for (y=0; y < z->img_comp[n].v; ++y) {
- for (x=0; x < z->img_comp[n].h; ++x) {
- int x2 = (i*z->img_comp[n].h + x)*8;
- int y2 = (j*z->img_comp[n].v + y)*8;
- int ha = z->img_comp[n].ha;
- if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;
- z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data);
- }
- }
- }
- // after all interleaved components, that's an interleaved MCU,
- // so now count down the restart interval
- if (--z->todo <= 0) {
- if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
- if (!STBI__RESTART(z->marker)) return 1;
- stbi__jpeg_reset(z);
- }
+static void stbi__jpeg_reset(stbi__jpeg* j)
+{
+ j->code_bits = 0;
+ j->code_buffer = 0;
+ j->nomore = 0;
+ j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0;
+ j->marker = STBI__MARKER_none;
+ j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
+ j->eob_run = 0;
+ // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
+ // since we don't even allow 1<<30 pixels
+}
+
+static int stbi__parse_entropy_coded_data(stbi__jpeg* z)
+{
+ stbi__jpeg_reset(z);
+ if (!z->progressive) {
+ if (z->scan_n == 1) {
+ int i, j;
+ STBI_SIMD_ALIGN(short, data[64]);
+ int n = z->order[0];
+ // non-interleaved data, we just need to process one block at a time,
+ // in trivial scanline order
+ // number of blocks to do just depends on how many actual "pixels" this
+ // component has, independent of interleaved MCU blocking and such
+ int w = (z->img_comp[n].x + 7) >> 3;
+ int h = (z->img_comp[n].y + 7) >> 3;
+ for (j = 0; j < h; ++j) {
+ for (i = 0; i < w; ++i) {
+ int ha = z->img_comp[n].ha;
+ if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;
+ z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data);
+ // every data block is an MCU, so countdown the restart interval
+ if (--z->todo <= 0) {
+ if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
+ // if it's NOT a restart, then just bail, so we get corrupt data
+ // rather than no data
+ if (!STBI__RESTART(z->marker)) return 1;
+ stbi__jpeg_reset(z);
+ }
+ }
}
- }
- return 1;
- }
- } else {
- if (z->scan_n == 1) {
- int i,j;
- int n = z->order[0];
- // non-interleaved data, we just need to process one block at a time,
- // in trivial scanline order
- // number of blocks to do just depends on how many actual "pixels" this
- // component has, independent of interleaved MCU blocking and such
- int w = (z->img_comp[n].x+7) >> 3;
- int h = (z->img_comp[n].y+7) >> 3;
- for (j=0; j < h; ++j) {
- for (i=0; i < w; ++i) {
- short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);
- if (z->spec_start == 0) {
- if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))
- return 0;
- } else {
- int ha = z->img_comp[n].ha;
- if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha]))
- return 0;
- }
- // every data block is an MCU, so countdown the restart interval
- if (--z->todo <= 0) {
- if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
- if (!STBI__RESTART(z->marker)) return 1;
- stbi__jpeg_reset(z);
- }
+ return 1;
+ }
+ else { // interleaved
+ int i, j, k, x, y;
+ STBI_SIMD_ALIGN(short, data[64]);
+ for (j = 0; j < z->img_mcu_y; ++j) {
+ for (i = 0; i < z->img_mcu_x; ++i) {
+ // scan an interleaved mcu... process scan_n components in order
+ for (k = 0; k < z->scan_n; ++k) {
+ int n = z->order[k];
+ // scan out an mcu's worth of this component; that's just determined
+ // by the basic H and V specified for the component
+ for (y = 0; y < z->img_comp[n].v; ++y) {
+ for (x = 0; x < z->img_comp[n].h; ++x) {
+ int x2 = (i * z->img_comp[n].h + x) * 8;
+ int y2 = (j * z->img_comp[n].v + y) * 8;
+ int ha = z->img_comp[n].ha;
+ if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0;
+ z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data);
+ }
+ }
+ }
+ // after all interleaved components, that's an interleaved MCU,
+ // so now count down the restart interval
+ if (--z->todo <= 0) {
+ if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
+ if (!STBI__RESTART(z->marker)) return 1;
+ stbi__jpeg_reset(z);
+ }
+ }
}
- }
- return 1;
- } else { // interleaved
- int i,j,k,x,y;
- for (j=0; j < z->img_mcu_y; ++j) {
- for (i=0; i < z->img_mcu_x; ++i) {
- // scan an interleaved mcu... process scan_n components in order
- for (k=0; k < z->scan_n; ++k) {
- int n = z->order[k];
- // scan out an mcu's worth of this component; that's just determined
- // by the basic H and V specified for the component
- for (y=0; y < z->img_comp[n].v; ++y) {
- for (x=0; x < z->img_comp[n].h; ++x) {
- int x2 = (i*z->img_comp[n].h + x);
- int y2 = (j*z->img_comp[n].v + y);
- short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w);
+ return 1;
+ }
+ }
+ else {
+ if (z->scan_n == 1) {
+ int i, j;
+ int n = z->order[0];
+ // non-interleaved data, we just need to process one block at a time,
+ // in trivial scanline order
+ // number of blocks to do just depends on how many actual "pixels" this
+ // component has, independent of interleaved MCU blocking and such
+ int w = (z->img_comp[n].x + 7) >> 3;
+ int h = (z->img_comp[n].y + 7) >> 3;
+ for (j = 0; j < h; ++j) {
+ for (i = 0; i < w; ++i) {
+ short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);
+ if (z->spec_start == 0) {
if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))
- return 0;
- }
- }
- }
- // after all interleaved components, that's an interleaved MCU,
- // so now count down the restart interval
- if (--z->todo <= 0) {
- if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
- if (!STBI__RESTART(z->marker)) return 1;
- stbi__jpeg_reset(z);
- }
+ return 0;
+ }
+ else {
+ int ha = z->img_comp[n].ha;
+ if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha]))
+ return 0;
+ }
+ // every data block is an MCU, so countdown the restart interval
+ if (--z->todo <= 0) {
+ if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
+ if (!STBI__RESTART(z->marker)) return 1;
+ stbi__jpeg_reset(z);
+ }
+ }
}
- }
- return 1;
- }
- }
+ return 1;
+ }
+ else { // interleaved
+ int i, j, k, x, y;
+ for (j = 0; j < z->img_mcu_y; ++j) {
+ for (i = 0; i < z->img_mcu_x; ++i) {
+ // scan an interleaved mcu... process scan_n components in order
+ for (k = 0; k < z->scan_n; ++k) {
+ int n = z->order[k];
+ // scan out an mcu's worth of this component; that's just determined
+ // by the basic H and V specified for the component
+ for (y = 0; y < z->img_comp[n].v; ++y) {
+ for (x = 0; x < z->img_comp[n].h; ++x) {
+ int x2 = (i * z->img_comp[n].h + x);
+ int y2 = (j * z->img_comp[n].v + y);
+ short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w);
+ if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))
+ return 0;
+ }
+ }
+ }
+ // after all interleaved components, that's an interleaved MCU,
+ // so now count down the restart interval
+ if (--z->todo <= 0) {
+ if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
+ if (!STBI__RESTART(z->marker)) return 1;
+ stbi__jpeg_reset(z);
+ }
+ }
+ }
+ return 1;
+ }
+ }
}
-static void stbi__jpeg_dequantize(short *data, stbi_uc *dequant)
+static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant)
{
- int i;
- for (i=0; i < 64; ++i)
- data[i] *= dequant[i];
+ int i;
+ for (i = 0; i < 64; ++i)
+ data[i] *= dequant[i];
}
-static void stbi__jpeg_finish(stbi__jpeg *z)
+static void stbi__jpeg_finish(stbi__jpeg* z)
{
- if (z->progressive) {
- // dequantize and idct the data
- int i,j,n;
- for (n=0; n < z->s->img_n; ++n) {
- int w = (z->img_comp[n].x+7) >> 3;
- int h = (z->img_comp[n].y+7) >> 3;
- for (j=0; j < h; ++j) {
- for (i=0; i < w; ++i) {
- short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);
- stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]);
- z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data);
+ if (z->progressive) {
+ // dequantize and idct the data
+ int i, j, n;
+ for (n = 0; n < z->s->img_n; ++n) {
+ int w = (z->img_comp[n].x + 7) >> 3;
+ int h = (z->img_comp[n].y + 7) >> 3;
+ for (j = 0; j < h; ++j) {
+ for (i = 0; i < w; ++i) {
+ short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);
+ stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]);
+ z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data);
+ }
}
- }
- }
- }
+ }
+ }
}
-static int stbi__process_marker(stbi__jpeg *z, int m)
+static int stbi__process_marker(stbi__jpeg* z, int m)
{
- int L;
- switch (m) {
- case STBI__MARKER_none: // no marker found
- return stbi__err("expected marker","Corrupt JPEG");
+ int L;
+ switch (m) {
+ case STBI__MARKER_none: // no marker found
+ return stbi__err("expected marker", "Corrupt JPEG");
- case 0xDD: // DRI - specify restart interval
- if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG");
- z->restart_interval = stbi__get16be(z->s);
- return 1;
+ case 0xDD: // DRI - specify restart interval
+ if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG");
+ z->restart_interval = stbi__get16be(z->s);
+ return 1;
- case 0xDB: // DQT - define quantization table
- L = stbi__get16be(z->s)-2;
- while (L > 0) {
+ case 0xDB: // DQT - define quantization table
+ L = stbi__get16be(z->s) - 2;
+ while (L > 0) {
int q = stbi__get8(z->s);
- int p = q >> 4;
- int t = q & 15,i;
- if (p != 0) return stbi__err("bad DQT type","Corrupt JPEG");
- if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG");
- for (i=0; i < 64; ++i)
- z->dequant[t][stbi__jpeg_dezigzag[i]] = stbi__get8(z->s);
- L -= 65;
- }
- return L==0;
-
- case 0xC4: // DHT - define huffman table
- L = stbi__get16be(z->s)-2;
- while (L > 0) {
- stbi_uc *v;
- int sizes[16],i,n=0;
+ int p = q >> 4, sixteen = (p != 0);
+ int t = q & 15, i;
+ if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG");
+ if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG");
+
+ for (i = 0; i < 64; ++i)
+ z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s));
+ L -= (sixteen ? 129 : 65);
+ }
+ return L == 0;
+
+ case 0xC4: // DHT - define huffman table
+ L = stbi__get16be(z->s) - 2;
+ while (L > 0) {
+ stbi_uc* v;
+ int sizes[16], i, n = 0;
int q = stbi__get8(z->s);
int tc = q >> 4;
int th = q & 15;
- if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG");
- for (i=0; i < 16; ++i) {
- sizes[i] = stbi__get8(z->s);
- n += sizes[i];
+ if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG");
+ for (i = 0; i < 16; ++i) {
+ sizes[i] = stbi__get8(z->s);
+ n += sizes[i];
}
+ if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values!
L -= 17;
if (tc == 0) {
- if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0;
- v = z->huff_dc[th].values;
- } else {
- if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0;
- v = z->huff_ac[th].values;
+ if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0;
+ v = z->huff_dc[th].values;
}
- for (i=0; i < n; ++i)
- v[i] = stbi__get8(z->s);
+ else {
+ if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0;
+ v = z->huff_ac[th].values;
+ }
+ for (i = 0; i < n; ++i)
+ v[i] = stbi__get8(z->s);
if (tc != 0)
- stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th);
+ stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th);
L -= n;
- }
- return L==0;
- }
- // check for comment block or APP blocks
- if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
- stbi__skip(z->s, stbi__get16be(z->s)-2);
- return 1;
- }
- return 0;
+ }
+ return L == 0;
+ }
+
+ // check for comment block or APP blocks
+ if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
+ L = stbi__get16be(z->s);
+ if (L < 2) {
+ if (m == 0xFE)
+ return stbi__err("bad COM len", "Corrupt JPEG");
+ else
+ return stbi__err("bad APP len", "Corrupt JPEG");
+ }
+ L -= 2;
+
+ if (m == 0xE0 && L >= 5) { // JFIF APP0 segment
+ static const unsigned char tag[5] = { 'J','F','I','F','\0' };
+ int ok = 1;
+ int i;
+ for (i = 0; i < 5; ++i)
+ if (stbi__get8(z->s) != tag[i])
+ ok = 0;
+ L -= 5;
+ if (ok)
+ z->jfif = 1;
+ }
+ else if (m == 0xEE && L >= 12) { // Adobe APP14 segment
+ static const unsigned char tag[6] = { 'A','d','o','b','e','\0' };
+ int ok = 1;
+ int i;
+ for (i = 0; i < 6; ++i)
+ if (stbi__get8(z->s) != tag[i])
+ ok = 0;
+ L -= 6;
+ if (ok) {
+ stbi__get8(z->s); // version
+ stbi__get16be(z->s); // flags0
+ stbi__get16be(z->s); // flags1
+ z->app14_color_transform = stbi__get8(z->s); // color transform
+ L -= 6;
+ }
+ }
+
+ stbi__skip(z->s, L);
+ return 1;
+ }
+
+ return stbi__err("unknown marker", "Corrupt JPEG");
}
// after we see SOS
-static int stbi__process_scan_header(stbi__jpeg *z)
-{
- int i;
- int Ls = stbi__get16be(z->s);
- z->scan_n = stbi__get8(z->s);
- if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG");
- if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG");
- for (i=0; i < z->scan_n; ++i) {
- int id = stbi__get8(z->s), which;
- int q = stbi__get8(z->s);
- for (which = 0; which < z->s->img_n; ++which)
- if (z->img_comp[which].id == id)
- break;
- if (which == z->s->img_n) return 0; // no match
- z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG");
- z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG");
- z->order[i] = which;
- }
+static int stbi__process_scan_header(stbi__jpeg* z)
+{
+ int i;
+ int Ls = stbi__get16be(z->s);
+ z->scan_n = stbi__get8(z->s);
+ if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG");
+ if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG");
+ for (i = 0; i < z->scan_n; ++i) {
+ int id = stbi__get8(z->s), which;
+ int q = stbi__get8(z->s);
+ for (which = 0; which < z->s->img_n; ++which)
+ if (z->img_comp[which].id == id)
+ break;
+ if (which == z->s->img_n) return 0; // no match
+ z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG");
+ z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG");
+ z->order[i] = which;
+ }
- {
- int aa;
- z->spec_start = stbi__get8(z->s);
- z->spec_end = stbi__get8(z->s); // should be 63, but might be 0
- aa = stbi__get8(z->s);
- z->succ_high = (aa >> 4);
- z->succ_low = (aa & 15);
- if (z->progressive) {
- if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13)
- return stbi__err("bad SOS", "Corrupt JPEG");
- } else {
- if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG");
- if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG");
- z->spec_end = 63;
- }
- }
+ {
+ int aa;
+ z->spec_start = stbi__get8(z->s);
+ z->spec_end = stbi__get8(z->s); // should be 63, but might be 0
+ aa = stbi__get8(z->s);
+ z->succ_high = (aa >> 4);
+ z->succ_low = (aa & 15);
+ if (z->progressive) {
+ if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13)
+ return stbi__err("bad SOS", "Corrupt JPEG");
+ }
+ else {
+ if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG");
+ if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG");
+ z->spec_end = 63;
+ }
+ }
- return 1;
+ return 1;
}
-static int stbi__process_frame_header(stbi__jpeg *z, int scan)
+static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why)
{
- stbi__context *s = z->s;
- int Lf,p,i,q, h_max=1,v_max=1,c;
- Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG
- p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline
- s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG
- s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires
- c = stbi__get8(s);
- if (c != 3 && c != 1) return stbi__err("bad component count","Corrupt JPEG"); // JFIF requires
- s->img_n = c;
- for (i=0; i < c; ++i) {
- z->img_comp[i].data = NULL;
- z->img_comp[i].linebuf = NULL;
- }
+ int i;
+ for (i = 0; i < ncomp; ++i) {
+ if (z->img_comp[i].raw_data) {
+ STBI_FREE(z->img_comp[i].raw_data);
+ z->img_comp[i].raw_data = NULL;
+ z->img_comp[i].data = NULL;
+ }
+ if (z->img_comp[i].raw_coeff) {
+ STBI_FREE(z->img_comp[i].raw_coeff);
+ z->img_comp[i].raw_coeff = 0;
+ z->img_comp[i].coeff = 0;
+ }
+ if (z->img_comp[i].linebuf) {
+ STBI_FREE(z->img_comp[i].linebuf);
+ z->img_comp[i].linebuf = NULL;
+ }
+ }
+ return why;
+}
+
+static int stbi__process_frame_header(stbi__jpeg* z, int scan)
+{
+ stbi__context* s = z->s;
+ int Lf, p, i, q, h_max = 1, v_max = 1, c;
+ Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG
+ p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline
+ s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG
+ s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires
+ if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
+ if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
+ c = stbi__get8(s);
+ if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG");
+ s->img_n = c;
+ for (i = 0; i < c; ++i) {
+ z->img_comp[i].data = NULL;
+ z->img_comp[i].linebuf = NULL;
+ }
- if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG");
-
- for (i=0; i < s->img_n; ++i) {
- z->img_comp[i].id = stbi__get8(s);
- if (z->img_comp[i].id != i+1) // JFIF requires
- if (z->img_comp[i].id != i) // some version of jpegtran outputs non-JFIF-compliant files!
- return stbi__err("bad component ID","Corrupt JPEG");
- q = stbi__get8(s);
- z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG");
- z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG");
- z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG");
- }
+ if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG");
+
+ z->rgb = 0;
+ for (i = 0; i < s->img_n; ++i) {
+ static const unsigned char rgb[3] = { 'R', 'G', 'B' };
+ z->img_comp[i].id = stbi__get8(s);
+ if (s->img_n == 3 && z->img_comp[i].id == rgb[i])
+ ++z->rgb;
+ q = stbi__get8(s);
+ z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG");
+ z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG");
+ z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG");
+ }
- if (scan != STBI__SCAN_load) return 1;
+ if (scan != STBI__SCAN_load) return 1;
- if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
+ if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode");
- for (i=0; i < s->img_n; ++i) {
- if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;
- if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;
- }
+ for (i = 0; i < s->img_n; ++i) {
+ if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;
+ if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;
+ }
- // compute interleaved mcu info
- z->img_h_max = h_max;
- z->img_v_max = v_max;
- z->img_mcu_w = h_max * 8;
- z->img_mcu_h = v_max * 8;
- z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
- z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h;
-
- for (i=0; i < s->img_n; ++i) {
- // number of effective pixels (e.g. for non-interleaved MCU)
- z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
- z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max;
- // to simplify generation, we'll allocate enough memory to decode
- // the bogus oversized data from using interleaved MCUs and their
- // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
- // discard the extra data until colorspace conversion
- z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;
- z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;
- z->img_comp[i].raw_data = stbi__malloc(z->img_comp[i].w2 * z->img_comp[i].h2+15);
-
- if (z->img_comp[i].raw_data == NULL) {
- for(--i; i >= 0; --i) {
- STBI_FREE(z->img_comp[i].raw_data);
- z->img_comp[i].data = NULL;
- }
- return stbi__err("outofmem", "Out of memory");
- }
- // align blocks for idct using mmx/sse
- z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15);
- z->img_comp[i].linebuf = NULL;
- if (z->progressive) {
- z->img_comp[i].coeff_w = (z->img_comp[i].w2 + 7) >> 3;
- z->img_comp[i].coeff_h = (z->img_comp[i].h2 + 7) >> 3;
- z->img_comp[i].raw_coeff = STBI_MALLOC(z->img_comp[i].coeff_w * z->img_comp[i].coeff_h * 64 * sizeof(short) + 15);
- z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15);
- } else {
- z->img_comp[i].coeff = 0;
- z->img_comp[i].raw_coeff = 0;
- }
- }
+ // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios
+ // and I've never seen a non-corrupted JPEG file actually use them
+ for (i = 0; i < s->img_n; ++i) {
+ if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG");
+ if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG");
+ }
- return 1;
+ // compute interleaved mcu info
+ z->img_h_max = h_max;
+ z->img_v_max = v_max;
+ z->img_mcu_w = h_max * 8;
+ z->img_mcu_h = v_max * 8;
+ // these sizes can't be more than 17 bits
+ z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w;
+ z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h;
+
+ for (i = 0; i < s->img_n; ++i) {
+ // number of effective pixels (e.g. for non-interleaved MCU)
+ z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max;
+ z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max;
+ // to simplify generation, we'll allocate enough memory to decode
+ // the bogus oversized data from using interleaved MCUs and their
+ // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
+ // discard the extra data until colorspace conversion
+ //
+ // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier)
+ // so these muls can't overflow with 32-bit ints (which we require)
+ z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;
+ z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;
+ z->img_comp[i].coeff = 0;
+ z->img_comp[i].raw_coeff = 0;
+ z->img_comp[i].linebuf = NULL;
+ z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15);
+ if (z->img_comp[i].raw_data == NULL)
+ return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory"));
+ // align blocks for idct using mmx/sse
+ z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15);
+ if (z->progressive) {
+ // w2, h2 are multiples of 8 (see above)
+ z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8;
+ z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8;
+ z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15);
+ if (z->img_comp[i].raw_coeff == NULL)
+ return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory"));
+ z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15);
+ }
+ }
+
+ return 1;
}
// use comparisons since in some cases we handle more than one case (e.g. SOF)
@@ -2770,658 +3380,730 @@ static int stbi__process_frame_header(stbi__jpeg *z, int scan)
#define stbi__SOF_progressive(x) ((x) == 0xc2)
-static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
-{
- int m;
- z->marker = STBI__MARKER_none; // initialize cached marker to empty
- m = stbi__get_marker(z);
- if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
- if (scan == STBI__SCAN_type) return 1;
- m = stbi__get_marker(z);
- while (!stbi__SOF(m)) {
- if (!stbi__process_marker(z,m)) return 0;
- m = stbi__get_marker(z);
- while (m == STBI__MARKER_none) {
- // some files have extra padding after their blocks, so ok, we'll scan
- if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
- m = stbi__get_marker(z);
- }
- }
- z->progressive = stbi__SOF_progressive(m);
- if (!stbi__process_frame_header(z, scan)) return 0;
- return 1;
+static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan)
+{
+ int m;
+ z->jfif = 0;
+ z->app14_color_transform = -1; // valid values are 0,1,2
+ z->marker = STBI__MARKER_none; // initialize cached marker to empty
+ m = stbi__get_marker(z);
+ if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG");
+ if (scan == STBI__SCAN_type) return 1;
+ m = stbi__get_marker(z);
+ while (!stbi__SOF(m)) {
+ if (!stbi__process_marker(z, m)) return 0;
+ m = stbi__get_marker(z);
+ while (m == STBI__MARKER_none) {
+ // some files have extra padding after their blocks, so ok, we'll scan
+ if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
+ m = stbi__get_marker(z);
+ }
+ }
+ z->progressive = stbi__SOF_progressive(m);
+ if (!stbi__process_frame_header(z, scan)) return 0;
+ return 1;
+}
+
+static stbi_uc stbi__skip_jpeg_junk_at_end(stbi__jpeg* j)
+{
+ // some JPEGs have junk at end, skip over it but if we find what looks
+ // like a valid marker, resume there
+ while (!stbi__at_eof(j->s)) {
+ stbi_uc x = stbi__get8(j->s);
+ while (x == 255) { // might be a marker
+ if (stbi__at_eof(j->s)) return STBI__MARKER_none;
+ x = stbi__get8(j->s);
+ if (x != 0x00 && x != 0xff) {
+ // not a stuffed zero or lead-in to another marker, looks
+ // like an actual marker, return it
+ return x;
+ }
+ // stuffed zero has x=0 now which ends the loop, meaning we go
+ // back to regular scan loop.
+ // repeated 0xff keeps trying to read the next byte of the marker.
+ }
+ }
+ return STBI__MARKER_none;
}
// decode image to YCbCr format
-static int stbi__decode_jpeg_image(stbi__jpeg *j)
+static int stbi__decode_jpeg_image(stbi__jpeg* j)
{
- int m;
- for (m = 0; m < 4; m++) {
- j->img_comp[m].raw_data = NULL;
- j->img_comp[m].raw_coeff = NULL;
- }
- j->restart_interval = 0;
- if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0;
- m = stbi__get_marker(j);
- while (!stbi__EOI(m)) {
- if (stbi__SOS(m)) {
- if (!stbi__process_scan_header(j)) return 0;
- if (!stbi__parse_entropy_coded_data(j)) return 0;
- if (j->marker == STBI__MARKER_none ) {
- // handle 0s at the end of image data from IP Kamera 9060
- while (!stbi__at_eof(j->s)) {
- int x = stbi__get8(j->s);
- if (x == 255) {
- j->marker = stbi__get8(j->s);
- break;
- } else if (x != 0) {
- return stbi__err("junk before marker", "Corrupt JPEG");
- }
+ int m;
+ for (m = 0; m < 4; m++) {
+ j->img_comp[m].raw_data = NULL;
+ j->img_comp[m].raw_coeff = NULL;
+ }
+ j->restart_interval = 0;
+ if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0;
+ m = stbi__get_marker(j);
+ while (!stbi__EOI(m)) {
+ if (stbi__SOS(m)) {
+ if (!stbi__process_scan_header(j)) return 0;
+ if (!stbi__parse_entropy_coded_data(j)) return 0;
+ if (j->marker == STBI__MARKER_none) {
+ j->marker = stbi__skip_jpeg_junk_at_end(j);
+ // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0
}
- // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0
- }
- } else {
- if (!stbi__process_marker(j, m)) return 0;
- }
- m = stbi__get_marker(j);
- }
- if (j->progressive)
- stbi__jpeg_finish(j);
- return 1;
+ m = stbi__get_marker(j);
+ if (STBI__RESTART(m))
+ m = stbi__get_marker(j);
+ }
+ else if (stbi__DNL(m)) {
+ int Ld = stbi__get16be(j->s);
+ stbi__uint32 NL = stbi__get16be(j->s);
+ if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG");
+ if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG");
+ m = stbi__get_marker(j);
+ }
+ else {
+ if (!stbi__process_marker(j, m)) return 1;
+ m = stbi__get_marker(j);
+ }
+ }
+ if (j->progressive)
+ stbi__jpeg_finish(j);
+ return 1;
}
// static jfif-centered resampling (across block boundaries)
-typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1,
- int w, int hs);
+typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1,
+ int w, int hs);
#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
-static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
+static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
{
- STBI_NOTUSED(out);
- STBI_NOTUSED(in_far);
- STBI_NOTUSED(w);
- STBI_NOTUSED(hs);
- return in_near;
+ STBI_NOTUSED(out);
+ STBI_NOTUSED(in_far);
+ STBI_NOTUSED(w);
+ STBI_NOTUSED(hs);
+ return in_near;
}
-static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
+static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
{
- // need to generate two samples vertically for every one in input
- int i;
- STBI_NOTUSED(hs);
- for (i=0; i < w; ++i)
- out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);
- return out;
+ // need to generate two samples vertically for every one in input
+ int i;
+ STBI_NOTUSED(hs);
+ for (i = 0; i < w; ++i)
+ out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2);
+ return out;
}
-static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
+static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
{
- // need to generate two samples horizontally for every one in input
- int i;
- stbi_uc *input = in_near;
+ // need to generate two samples horizontally for every one in input
+ int i;
+ stbi_uc* input = in_near;
- if (w == 1) {
- // if only one sample, can't do any interpolation
- out[0] = out[1] = input[0];
- return out;
- }
+ if (w == 1) {
+ // if only one sample, can't do any interpolation
+ out[0] = out[1] = input[0];
+ return out;
+ }
- out[0] = input[0];
- out[1] = stbi__div4(input[0]*3 + input[1] + 2);
- for (i=1; i < w-1; ++i) {
- int n = 3*input[i]+2;
- out[i*2+0] = stbi__div4(n+input[i-1]);
- out[i*2+1] = stbi__div4(n+input[i+1]);
- }
- out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2);
- out[i*2+1] = input[w-1];
+ out[0] = input[0];
+ out[1] = stbi__div4(input[0] * 3 + input[1] + 2);
+ for (i = 1; i < w - 1; ++i) {
+ int n = 3 * input[i] + 2;
+ out[i * 2 + 0] = stbi__div4(n + input[i - 1]);
+ out[i * 2 + 1] = stbi__div4(n + input[i + 1]);
+ }
+ out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2);
+ out[i * 2 + 1] = input[w - 1];
- STBI_NOTUSED(in_far);
- STBI_NOTUSED(hs);
+ STBI_NOTUSED(in_far);
+ STBI_NOTUSED(hs);
- return out;
+ return out;
}
#define stbi__div16(x) ((stbi_uc) ((x) >> 4))
-static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
+static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
{
- // need to generate 2x2 samples for every one in input
- int i,t0,t1;
- if (w == 1) {
- out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);
- return out;
- }
+ // need to generate 2x2 samples for every one in input
+ int i, t0, t1;
+ if (w == 1) {
+ out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2);
+ return out;
+ }
- t1 = 3*in_near[0] + in_far[0];
- out[0] = stbi__div4(t1+2);
- for (i=1; i < w; ++i) {
- t0 = t1;
- t1 = 3*in_near[i]+in_far[i];
- out[i*2-1] = stbi__div16(3*t0 + t1 + 8);
- out[i*2 ] = stbi__div16(3*t1 + t0 + 8);
- }
- out[w*2-1] = stbi__div4(t1+2);
+ t1 = 3 * in_near[0] + in_far[0];
+ out[0] = stbi__div4(t1 + 2);
+ for (i = 1; i < w; ++i) {
+ t0 = t1;
+ t1 = 3 * in_near[i] + in_far[i];
+ out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8);
+ out[i * 2] = stbi__div16(3 * t1 + t0 + 8);
+ }
+ out[w * 2 - 1] = stbi__div4(t1 + 2);
- STBI_NOTUSED(hs);
+ STBI_NOTUSED(hs);
- return out;
+ return out;
}
#if defined(STBI_SSE2) || defined(STBI_NEON)
-static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
+static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
{
- // need to generate 2x2 samples for every one in input
- int i=0,t0,t1;
+ // need to generate 2x2 samples for every one in input
+ int i = 0, t0, t1;
- if (w == 1) {
- out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);
- return out;
- }
+ if (w == 1) {
+ out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2);
+ return out;
+ }
- t1 = 3*in_near[0] + in_far[0];
- // process groups of 8 pixels for as long as we can.
- // note we can't handle the last pixel in a row in this loop
- // because we need to handle the filter boundary conditions.
- for (; i < ((w-1) & ~7); i += 8) {
+ t1 = 3 * in_near[0] + in_far[0];
+ // process groups of 8 pixels for as long as we can.
+ // note we can't handle the last pixel in a row in this loop
+ // because we need to handle the filter boundary conditions.
+ for (; i < ((w - 1) & ~7); i += 8) {
#if defined(STBI_SSE2)
- // load and perform the vertical filtering pass
- // this uses 3*x + y = 4*x + (y - x)
- __m128i zero = _mm_setzero_si128();
- __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i));
- __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i));
- __m128i farw = _mm_unpacklo_epi8(farb, zero);
- __m128i nearw = _mm_unpacklo_epi8(nearb, zero);
- __m128i diff = _mm_sub_epi16(farw, nearw);
- __m128i nears = _mm_slli_epi16(nearw, 2);
- __m128i curr = _mm_add_epi16(nears, diff); // current row
-
- // horizontal filter works the same based on shifted vers of current
- // row. "prev" is current row shifted right by 1 pixel; we need to
- // insert the previous pixel value (from t1).
- // "next" is current row shifted left by 1 pixel, with first pixel
- // of next block of 8 pixels added in.
- __m128i prv0 = _mm_slli_si128(curr, 2);
- __m128i nxt0 = _mm_srli_si128(curr, 2);
- __m128i prev = _mm_insert_epi16(prv0, t1, 0);
- __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7);
-
- // horizontal filter, polyphase implementation since it's convenient:
- // even pixels = 3*cur + prev = cur*4 + (prev - cur)
- // odd pixels = 3*cur + next = cur*4 + (next - cur)
- // note the shared term.
- __m128i bias = _mm_set1_epi16(8);
- __m128i curs = _mm_slli_epi16(curr, 2);
- __m128i prvd = _mm_sub_epi16(prev, curr);
- __m128i nxtd = _mm_sub_epi16(next, curr);
- __m128i curb = _mm_add_epi16(curs, bias);
- __m128i even = _mm_add_epi16(prvd, curb);
- __m128i odd = _mm_add_epi16(nxtd, curb);
-
- // interleave even and odd pixels, then undo scaling.
- __m128i int0 = _mm_unpacklo_epi16(even, odd);
- __m128i int1 = _mm_unpackhi_epi16(even, odd);
- __m128i de0 = _mm_srli_epi16(int0, 4);
- __m128i de1 = _mm_srli_epi16(int1, 4);
-
- // pack and write output
- __m128i outv = _mm_packus_epi16(de0, de1);
- _mm_storeu_si128((__m128i *) (out + i*2), outv);
+ // load and perform the vertical filtering pass
+ // this uses 3*x + y = 4*x + (y - x)
+ __m128i zero = _mm_setzero_si128();
+ __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i));
+ __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i));
+ __m128i farw = _mm_unpacklo_epi8(farb, zero);
+ __m128i nearw = _mm_unpacklo_epi8(nearb, zero);
+ __m128i diff = _mm_sub_epi16(farw, nearw);
+ __m128i nears = _mm_slli_epi16(nearw, 2);
+ __m128i curr = _mm_add_epi16(nears, diff); // current row
+
+ // horizontal filter works the same based on shifted vers of current
+ // row. "prev" is current row shifted right by 1 pixel; we need to
+ // insert the previous pixel value (from t1).
+ // "next" is current row shifted left by 1 pixel, with first pixel
+ // of next block of 8 pixels added in.
+ __m128i prv0 = _mm_slli_si128(curr, 2);
+ __m128i nxt0 = _mm_srli_si128(curr, 2);
+ __m128i prev = _mm_insert_epi16(prv0, t1, 0);
+ __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7);
+
+ // horizontal filter, polyphase implementation since it's convenient:
+ // even pixels = 3*cur + prev = cur*4 + (prev - cur)
+ // odd pixels = 3*cur + next = cur*4 + (next - cur)
+ // note the shared term.
+ __m128i bias = _mm_set1_epi16(8);
+ __m128i curs = _mm_slli_epi16(curr, 2);
+ __m128i prvd = _mm_sub_epi16(prev, curr);
+ __m128i nxtd = _mm_sub_epi16(next, curr);
+ __m128i curb = _mm_add_epi16(curs, bias);
+ __m128i even = _mm_add_epi16(prvd, curb);
+ __m128i odd = _mm_add_epi16(nxtd, curb);
+
+ // interleave even and odd pixels, then undo scaling.
+ __m128i int0 = _mm_unpacklo_epi16(even, odd);
+ __m128i int1 = _mm_unpackhi_epi16(even, odd);
+ __m128i de0 = _mm_srli_epi16(int0, 4);
+ __m128i de1 = _mm_srli_epi16(int1, 4);
+
+ // pack and write output
+ __m128i outv = _mm_packus_epi16(de0, de1);
+ _mm_storeu_si128((__m128i*) (out + i * 2), outv);
#elif defined(STBI_NEON)
- // load and perform the vertical filtering pass
- // this uses 3*x + y = 4*x + (y - x)
- uint8x8_t farb = vld1_u8(in_far + i);
- uint8x8_t nearb = vld1_u8(in_near + i);
- int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb));
- int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2));
- int16x8_t curr = vaddq_s16(nears, diff); // current row
-
- // horizontal filter works the same based on shifted vers of current
- // row. "prev" is current row shifted right by 1 pixel; we need to
- // insert the previous pixel value (from t1).
- // "next" is current row shifted left by 1 pixel, with first pixel
- // of next block of 8 pixels added in.
- int16x8_t prv0 = vextq_s16(curr, curr, 7);
- int16x8_t nxt0 = vextq_s16(curr, curr, 1);
- int16x8_t prev = vsetq_lane_s16(t1, prv0, 0);
- int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7);
-
- // horizontal filter, polyphase implementation since it's convenient:
- // even pixels = 3*cur + prev = cur*4 + (prev - cur)
- // odd pixels = 3*cur + next = cur*4 + (next - cur)
- // note the shared term.
- int16x8_t curs = vshlq_n_s16(curr, 2);
- int16x8_t prvd = vsubq_s16(prev, curr);
- int16x8_t nxtd = vsubq_s16(next, curr);
- int16x8_t even = vaddq_s16(curs, prvd);
- int16x8_t odd = vaddq_s16(curs, nxtd);
-
- // undo scaling and round, then store with even/odd phases interleaved
- uint8x8x2_t o;
- o.val[0] = vqrshrun_n_s16(even, 4);
- o.val[1] = vqrshrun_n_s16(odd, 4);
- vst2_u8(out + i*2, o);
-#endif
-
- // "previous" value for next iter
- t1 = 3*in_near[i+7] + in_far[i+7];
- }
+ // load and perform the vertical filtering pass
+ // this uses 3*x + y = 4*x + (y - x)
+ uint8x8_t farb = vld1_u8(in_far + i);
+ uint8x8_t nearb = vld1_u8(in_near + i);
+ int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb));
+ int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2));
+ int16x8_t curr = vaddq_s16(nears, diff); // current row
+
+ // horizontal filter works the same based on shifted vers of current
+ // row. "prev" is current row shifted right by 1 pixel; we need to
+ // insert the previous pixel value (from t1).
+ // "next" is current row shifted left by 1 pixel, with first pixel
+ // of next block of 8 pixels added in.
+ int16x8_t prv0 = vextq_s16(curr, curr, 7);
+ int16x8_t nxt0 = vextq_s16(curr, curr, 1);
+ int16x8_t prev = vsetq_lane_s16(t1, prv0, 0);
+ int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7);
+
+ // horizontal filter, polyphase implementation since it's convenient:
+ // even pixels = 3*cur + prev = cur*4 + (prev - cur)
+ // odd pixels = 3*cur + next = cur*4 + (next - cur)
+ // note the shared term.
+ int16x8_t curs = vshlq_n_s16(curr, 2);
+ int16x8_t prvd = vsubq_s16(prev, curr);
+ int16x8_t nxtd = vsubq_s16(next, curr);
+ int16x8_t even = vaddq_s16(curs, prvd);
+ int16x8_t odd = vaddq_s16(curs, nxtd);
+
+ // undo scaling and round, then store with even/odd phases interleaved
+ uint8x8x2_t o;
+ o.val[0] = vqrshrun_n_s16(even, 4);
+ o.val[1] = vqrshrun_n_s16(odd, 4);
+ vst2_u8(out + i * 2, o);
+#endif
- t0 = t1;
- t1 = 3*in_near[i] + in_far[i];
- out[i*2] = stbi__div16(3*t1 + t0 + 8);
+ // "previous" value for next iter
+ t1 = 3 * in_near[i + 7] + in_far[i + 7];
+ }
- for (++i; i < w; ++i) {
- t0 = t1;
- t1 = 3*in_near[i]+in_far[i];
- out[i*2-1] = stbi__div16(3*t0 + t1 + 8);
- out[i*2 ] = stbi__div16(3*t1 + t0 + 8);
- }
- out[w*2-1] = stbi__div4(t1+2);
-
- STBI_NOTUSED(hs);
-
- return out;
-}
-#endif
-
-static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
-{
- // resample with nearest-neighbor
- int i,j;
- STBI_NOTUSED(in_far);
- for (i=0; i < w; ++i)
- for (j=0; j < hs; ++j)
- out[i*hs+j] = in_near[i];
- return out;
-}
-
-#ifdef STBI_JPEG_OLD
-// this is the same YCbCr-to-RGB calculation that stb_image has used
-// historically before the algorithm changes in 1.49
-#define float2fixed(x) ((int) ((x) * 65536 + 0.5))
-static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)
-{
- int i;
- for (i=0; i < count; ++i) {
- int y_fixed = (y[i] << 16) + 32768; // rounding
- int r,g,b;
- int cr = pcr[i] - 128;
- int cb = pcb[i] - 128;
- r = y_fixed + cr*float2fixed(1.40200f);
- g = y_fixed - cr*float2fixed(0.71414f) - cb*float2fixed(0.34414f);
- b = y_fixed + cb*float2fixed(1.77200f);
- r >>= 16;
- g >>= 16;
- b >>= 16;
- if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
- if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
- if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
- out[0] = (stbi_uc)r;
- out[1] = (stbi_uc)g;
- out[2] = (stbi_uc)b;
- out[3] = 255;
- out += step;
- }
+ t0 = t1;
+ t1 = 3 * in_near[i] + in_far[i];
+ out[i * 2] = stbi__div16(3 * t1 + t0 + 8);
+
+ for (++i; i < w; ++i) {
+ t0 = t1;
+ t1 = 3 * in_near[i] + in_far[i];
+ out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8);
+ out[i * 2] = stbi__div16(3 * t1 + t0 + 8);
+ }
+ out[w * 2 - 1] = stbi__div4(t1 + 2);
+
+ STBI_NOTUSED(hs);
+
+ return out;
}
-#else
+#endif
+
+static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs)
+{
+ // resample with nearest-neighbor
+ int i, j;
+ STBI_NOTUSED(in_far);
+ for (i = 0; i < w; ++i)
+ for (j = 0; j < hs; ++j)
+ out[i * hs + j] = in_near[i];
+ return out;
+}
+
// this is a reduced-precision calculation of YCbCr-to-RGB introduced
// to make sure the code produces the same results in both SIMD and scalar
-#define float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8)
-static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)
-{
- int i;
- for (i=0; i < count; ++i) {
- int y_fixed = (y[i] << 20) + (1<<19); // rounding
- int r,g,b;
- int cr = pcr[i] - 128;
- int cb = pcb[i] - 128;
- r = y_fixed + cr* float2fixed(1.40200f);
- g = y_fixed + (cr*-float2fixed(0.71414f)) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);
- b = y_fixed + cb* float2fixed(1.77200f);
- r >>= 20;
- g >>= 20;
- b >>= 20;
- if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
- if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
- if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
- out[0] = (stbi_uc)r;
- out[1] = (stbi_uc)g;
- out[2] = (stbi_uc)b;
- out[3] = 255;
- out += step;
- }
+#define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8)
+static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step)
+{
+ int i;
+ for (i = 0; i < count; ++i) {
+ int y_fixed = (y[i] << 20) + (1 << 19); // rounding
+ int r, g, b;
+ int cr = pcr[i] - 128;
+ int cb = pcb[i] - 128;
+ r = y_fixed + cr * stbi__float2fixed(1.40200f);
+ g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000);
+ b = y_fixed + cb * stbi__float2fixed(1.77200f);
+ r >>= 20;
+ g >>= 20;
+ b >>= 20;
+ if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; }
+ if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; }
+ if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; }
+ out[0] = (stbi_uc)r;
+ out[1] = (stbi_uc)g;
+ out[2] = (stbi_uc)b;
+ out[3] = 255;
+ out += step;
+ }
}
-#endif
#if defined(STBI_SSE2) || defined(STBI_NEON)
-static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step)
+static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step)
{
- int i = 0;
+ int i = 0;
#ifdef STBI_SSE2
- // step == 3 is pretty ugly on the final interleave, and i'm not convinced
- // it's useful in practice (you wouldn't use it for textures, for example).
- // so just accelerate step == 4 case.
- if (step == 4) {
- // this is a fairly straightforward implementation and not super-optimized.
- __m128i signflip = _mm_set1_epi8(-0x80);
- __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f));
- __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));
- __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));
- __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f));
- __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128);
- __m128i xw = _mm_set1_epi16(255); // alpha channel
-
- for (; i+7 < count; i += 8) {
- // load
- __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i));
- __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i));
- __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i));
- __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128
- __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128
-
- // unpack to short (and left-shift cr, cb by 8)
- __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes);
- __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);
- __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);
-
- // color transform
- __m128i yws = _mm_srli_epi16(yw, 4);
- __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);
- __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);
- __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);
- __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);
- __m128i rws = _mm_add_epi16(cr0, yws);
- __m128i gwt = _mm_add_epi16(cb0, yws);
- __m128i bws = _mm_add_epi16(yws, cb1);
- __m128i gws = _mm_add_epi16(gwt, cr1);
-
- // descale
- __m128i rw = _mm_srai_epi16(rws, 4);
- __m128i bw = _mm_srai_epi16(bws, 4);
- __m128i gw = _mm_srai_epi16(gws, 4);
-
- // back to byte, set up for transpose
- __m128i brb = _mm_packus_epi16(rw, bw);
- __m128i gxb = _mm_packus_epi16(gw, xw);
-
- // transpose to interleave channels
- __m128i t0 = _mm_unpacklo_epi8(brb, gxb);
- __m128i t1 = _mm_unpackhi_epi8(brb, gxb);
- __m128i o0 = _mm_unpacklo_epi16(t0, t1);
- __m128i o1 = _mm_unpackhi_epi16(t0, t1);
-
- // store
- _mm_storeu_si128((__m128i *) (out + 0), o0);
- _mm_storeu_si128((__m128i *) (out + 16), o1);
- out += 32;
- }
- }
+ // step == 3 is pretty ugly on the final interleave, and i'm not convinced
+ // it's useful in practice (you wouldn't use it for textures, for example).
+ // so just accelerate step == 4 case.
+ if (step == 4) {
+ // this is a fairly straightforward implementation and not super-optimized.
+ __m128i signflip = _mm_set1_epi8(-0x80);
+ __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f));
+ __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f));
+ __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f));
+ __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f));
+ __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128);
+ __m128i xw = _mm_set1_epi16(255); // alpha channel
+
+ for (; i + 7 < count; i += 8) {
+ // load
+ __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i));
+ __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i));
+ __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i));
+ __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128
+ __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128
+
+ // unpack to short (and left-shift cr, cb by 8)
+ __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes);
+ __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);
+ __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);
+
+ // color transform
+ __m128i yws = _mm_srli_epi16(yw, 4);
+ __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);
+ __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);
+ __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);
+ __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);
+ __m128i rws = _mm_add_epi16(cr0, yws);
+ __m128i gwt = _mm_add_epi16(cb0, yws);
+ __m128i bws = _mm_add_epi16(yws, cb1);
+ __m128i gws = _mm_add_epi16(gwt, cr1);
+
+ // descale
+ __m128i rw = _mm_srai_epi16(rws, 4);
+ __m128i bw = _mm_srai_epi16(bws, 4);
+ __m128i gw = _mm_srai_epi16(gws, 4);
+
+ // back to byte, set up for transpose
+ __m128i brb = _mm_packus_epi16(rw, bw);
+ __m128i gxb = _mm_packus_epi16(gw, xw);
+
+ // transpose to interleave channels
+ __m128i t0 = _mm_unpacklo_epi8(brb, gxb);
+ __m128i t1 = _mm_unpackhi_epi8(brb, gxb);
+ __m128i o0 = _mm_unpacklo_epi16(t0, t1);
+ __m128i o1 = _mm_unpackhi_epi16(t0, t1);
+
+ // store
+ _mm_storeu_si128((__m128i*) (out + 0), o0);
+ _mm_storeu_si128((__m128i*) (out + 16), o1);
+ out += 32;
+ }
+ }
#endif
#ifdef STBI_NEON
- // in this version, step=3 support would be easy to add. but is there demand?
- if (step == 4) {
- // this is a fairly straightforward implementation and not super-optimized.
- uint8x8_t signflip = vdup_n_u8(0x80);
- int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f));
- int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f));
- int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f));
- int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f));
-
- for (; i+7 < count; i += 8) {
- // load
- uint8x8_t y_bytes = vld1_u8(y + i);
- uint8x8_t cr_bytes = vld1_u8(pcr + i);
- uint8x8_t cb_bytes = vld1_u8(pcb + i);
- int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));
- int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));
-
- // expand to s16
- int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));
- int16x8_t crw = vshll_n_s8(cr_biased, 7);
- int16x8_t cbw = vshll_n_s8(cb_biased, 7);
-
- // color transform
- int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);
- int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);
- int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);
- int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);
- int16x8_t rws = vaddq_s16(yws, cr0);
- int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);
- int16x8_t bws = vaddq_s16(yws, cb1);
-
- // undo scaling, round, convert to byte
- uint8x8x4_t o;
- o.val[0] = vqrshrun_n_s16(rws, 4);
- o.val[1] = vqrshrun_n_s16(gws, 4);
- o.val[2] = vqrshrun_n_s16(bws, 4);
- o.val[3] = vdup_n_u8(255);
-
- // store, interleaving r/g/b/a
- vst4_u8(out, o);
- out += 8*4;
- }
- }
+ // in this version, step=3 support would be easy to add. but is there demand?
+ if (step == 4) {
+ // this is a fairly straightforward implementation and not super-optimized.
+ uint8x8_t signflip = vdup_n_u8(0x80);
+ int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f));
+ int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f));
+ int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f));
+ int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f));
+
+ for (; i + 7 < count; i += 8) {
+ // load
+ uint8x8_t y_bytes = vld1_u8(y + i);
+ uint8x8_t cr_bytes = vld1_u8(pcr + i);
+ uint8x8_t cb_bytes = vld1_u8(pcb + i);
+ int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));
+ int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));
+
+ // expand to s16
+ int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));
+ int16x8_t crw = vshll_n_s8(cr_biased, 7);
+ int16x8_t cbw = vshll_n_s8(cb_biased, 7);
+
+ // color transform
+ int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);
+ int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);
+ int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);
+ int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);
+ int16x8_t rws = vaddq_s16(yws, cr0);
+ int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);
+ int16x8_t bws = vaddq_s16(yws, cb1);
+
+ // undo scaling, round, convert to byte
+ uint8x8x4_t o;
+ o.val[0] = vqrshrun_n_s16(rws, 4);
+ o.val[1] = vqrshrun_n_s16(gws, 4);
+ o.val[2] = vqrshrun_n_s16(bws, 4);
+ o.val[3] = vdup_n_u8(255);
+
+ // store, interleaving r/g/b/a
+ vst4_u8(out, o);
+ out += 8 * 4;
+ }
+ }
#endif
- for (; i < count; ++i) {
- int y_fixed = (y[i] << 20) + (1<<19); // rounding
- int r,g,b;
- int cr = pcr[i] - 128;
- int cb = pcb[i] - 128;
- r = y_fixed + cr* float2fixed(1.40200f);
- g = y_fixed + cr*-float2fixed(0.71414f) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);
- b = y_fixed + cb* float2fixed(1.77200f);
- r >>= 20;
- g >>= 20;
- b >>= 20;
- if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
- if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
- if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
- out[0] = (stbi_uc)r;
- out[1] = (stbi_uc)g;
- out[2] = (stbi_uc)b;
- out[3] = 255;
- out += step;
- }
+ for (; i < count; ++i) {
+ int y_fixed = (y[i] << 20) + (1 << 19); // rounding
+ int r, g, b;
+ int cr = pcr[i] - 128;
+ int cb = pcb[i] - 128;
+ r = y_fixed + cr * stbi__float2fixed(1.40200f);
+ g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000);
+ b = y_fixed + cb * stbi__float2fixed(1.77200f);
+ r >>= 20;
+ g >>= 20;
+ b >>= 20;
+ if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; }
+ if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; }
+ if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; }
+ out[0] = (stbi_uc)r;
+ out[1] = (stbi_uc)g;
+ out[2] = (stbi_uc)b;
+ out[3] = 255;
+ out += step;
+ }
}
#endif
// set up the kernels
-static void stbi__setup_jpeg(stbi__jpeg *j)
+static void stbi__setup_jpeg(stbi__jpeg* j)
{
- j->idct_block_kernel = stbi__idct_block;
- j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row;
- j->resample_row_hv_2_kernel = stbi__resample_row_hv_2;
+ j->idct_block_kernel = stbi__idct_block;
+ j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row;
+ j->resample_row_hv_2_kernel = stbi__resample_row_hv_2;
#ifdef STBI_SSE2
- if (stbi__sse2_available()) {
- j->idct_block_kernel = stbi__idct_simd;
- #ifndef STBI_JPEG_OLD
- j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
- #endif
- j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
- }
+ if (stbi__sse2_available()) {
+ j->idct_block_kernel = stbi__idct_simd;
+ j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
+ j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
+ }
#endif
#ifdef STBI_NEON
- j->idct_block_kernel = stbi__idct_simd;
- #ifndef STBI_JPEG_OLD
- j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
- #endif
- j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
+ j->idct_block_kernel = stbi__idct_simd;
+ j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
+ j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
#endif
}
// clean up the temporary component buffers
-static void stbi__cleanup_jpeg(stbi__jpeg *j)
-{
- int i;
- for (i=0; i < j->s->img_n; ++i) {
- if (j->img_comp[i].raw_data) {
- STBI_FREE(j->img_comp[i].raw_data);
- j->img_comp[i].raw_data = NULL;
- j->img_comp[i].data = NULL;
- }
- if (j->img_comp[i].raw_coeff) {
- STBI_FREE(j->img_comp[i].raw_coeff);
- j->img_comp[i].raw_coeff = 0;
- j->img_comp[i].coeff = 0;
- }
- if (j->img_comp[i].linebuf) {
- STBI_FREE(j->img_comp[i].linebuf);
- j->img_comp[i].linebuf = NULL;
- }
- }
+static void stbi__cleanup_jpeg(stbi__jpeg* j)
+{
+ stbi__free_jpeg_components(j, j->s->img_n, 0);
}
typedef struct
{
- resample_row_func resample;
- stbi_uc *line0,*line1;
- int hs,vs; // expansion factor in each axis
- int w_lores; // horizontal pixels pre-expansion
- int ystep; // how far through vertical expansion we are
- int ypos; // which pre-expansion row we're on
+ resample_row_func resample;
+ stbi_uc* line0, * line1;
+ int hs, vs; // expansion factor in each axis
+ int w_lores; // horizontal pixels pre-expansion
+ int ystep; // how far through vertical expansion we are
+ int ypos; // which pre-expansion row we're on
} stbi__resample;
-static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp)
-{
- int n, decode_n;
- z->s->img_n = 0; // make stbi__cleanup_jpeg safe
-
- // validate req_comp
- if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
-
- // load a jpeg image from whichever source, but leave in YCbCr format
- if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; }
-
- // determine actual number of components to generate
- n = req_comp ? req_comp : z->s->img_n;
-
- if (z->s->img_n == 3 && n < 3)
- decode_n = 1;
- else
- decode_n = z->s->img_n;
-
- // resample and color-convert
- {
- int k;
- unsigned int i,j;
- stbi_uc *output;
- stbi_uc *coutput[4];
-
- stbi__resample res_comp[4];
-
- for (k=0; k < decode_n; ++k) {
- stbi__resample *r = &res_comp[k];
-
- // allocate line buffer big enough for upsampling off the edges
- // with upsample factor of 4
- z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3);
- if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
-
- r->hs = z->img_h_max / z->img_comp[k].h;
- r->vs = z->img_v_max / z->img_comp[k].v;
- r->ystep = r->vs >> 1;
- r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
- r->ypos = 0;
- r->line0 = r->line1 = z->img_comp[k].data;
-
- if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
- else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2;
- else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2;
- else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel;
- else r->resample = stbi__resample_row_generic;
- }
-
- // can't error after this so, this is safe
- output = (stbi_uc *) stbi__malloc(n * z->s->img_x * z->s->img_y + 1);
- if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
-
- // now go ahead and resample
- for (j=0; j < z->s->img_y; ++j) {
- stbi_uc *out = output + n * z->s->img_x * j;
- for (k=0; k < decode_n; ++k) {
- stbi__resample *r = &res_comp[k];
- int y_bot = r->ystep >= (r->vs >> 1);
- coutput[k] = r->resample(z->img_comp[k].linebuf,
- y_bot ? r->line1 : r->line0,
- y_bot ? r->line0 : r->line1,
- r->w_lores, r->hs);
- if (++r->ystep >= r->vs) {
- r->ystep = 0;
- r->line0 = r->line1;
- if (++r->ypos < z->img_comp[k].y)
- r->line1 += z->img_comp[k].w2;
+// fast 0..255 * 0..255 => 0..255 rounded multiplication
+static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y)
+{
+ unsigned int t = x * y + 128;
+ return (stbi_uc)((t + (t >> 8)) >> 8);
+}
+
+static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp)
+{
+ int n, decode_n, is_rgb;
+ z->s->img_n = 0; // make stbi__cleanup_jpeg safe
+
+ // validate req_comp
+ if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
+
+ // load a jpeg image from whichever source, but leave in YCbCr format
+ if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; }
+
+ // determine actual number of components to generate
+ n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1;
+
+ is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif));
+
+ if (z->s->img_n == 3 && n < 3 && !is_rgb)
+ decode_n = 1;
+ else
+ decode_n = z->s->img_n;
+
+ // nothing to do if no components requested; check this now to avoid
+ // accessing uninitialized coutput[0] later
+ if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; }
+
+ // resample and color-convert
+ {
+ int k;
+ unsigned int i, j;
+ stbi_uc* output;
+ stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL };
+
+ stbi__resample res_comp[4];
+
+ for (k = 0; k < decode_n; ++k) {
+ stbi__resample* r = &res_comp[k];
+
+ // allocate line buffer big enough for upsampling off the edges
+ // with upsample factor of 4
+ z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3);
+ if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
+
+ r->hs = z->img_h_max / z->img_comp[k].h;
+ r->vs = z->img_v_max / z->img_comp[k].v;
+ r->ystep = r->vs >> 1;
+ r->w_lores = (z->s->img_x + r->hs - 1) / r->hs;
+ r->ypos = 0;
+ r->line0 = r->line1 = z->img_comp[k].data;
+
+ if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
+ else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2;
+ else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2;
+ else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel;
+ else r->resample = stbi__resample_row_generic;
+ }
+
+ // can't error after this so, this is safe
+ output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1);
+ if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
+
+ // now go ahead and resample
+ for (j = 0; j < z->s->img_y; ++j) {
+ stbi_uc* out = output + n * z->s->img_x * j;
+ for (k = 0; k < decode_n; ++k) {
+ stbi__resample* r = &res_comp[k];
+ int y_bot = r->ystep >= (r->vs >> 1);
+ coutput[k] = r->resample(z->img_comp[k].linebuf,
+ y_bot ? r->line1 : r->line0,
+ y_bot ? r->line0 : r->line1,
+ r->w_lores, r->hs);
+ if (++r->ystep >= r->vs) {
+ r->ystep = 0;
+ r->line0 = r->line1;
+ if (++r->ypos < z->img_comp[k].y)
+ r->line1 += z->img_comp[k].w2;
+ }
}
- }
- if (n >= 3) {
- stbi_uc *y = coutput[0];
- if (z->s->img_n == 3) {
- z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
- } else
- for (i=0; i < z->s->img_x; ++i) {
- out[0] = out[1] = out[2] = y[i];
- out[3] = 255; // not used if n==3
- out += n;
- }
- } else {
- stbi_uc *y = coutput[0];
- if (n == 1)
- for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
- else
- for (i=0; i < z->s->img_x; ++i) *out++ = y[i], *out++ = 255;
- }
- }
- stbi__cleanup_jpeg(z);
- *out_x = z->s->img_x;
- *out_y = z->s->img_y;
- if (comp) *comp = z->s->img_n; // report original components, not output
- return output;
- }
+ if (n >= 3) {
+ stbi_uc* y = coutput[0];
+ if (z->s->img_n == 3) {
+ if (is_rgb) {
+ for (i = 0; i < z->s->img_x; ++i) {
+ out[0] = y[i];
+ out[1] = coutput[1][i];
+ out[2] = coutput[2][i];
+ out[3] = 255;
+ out += n;
+ }
+ }
+ else {
+ z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
+ }
+ }
+ else if (z->s->img_n == 4) {
+ if (z->app14_color_transform == 0) { // CMYK
+ for (i = 0; i < z->s->img_x; ++i) {
+ stbi_uc m = coutput[3][i];
+ out[0] = stbi__blinn_8x8(coutput[0][i], m);
+ out[1] = stbi__blinn_8x8(coutput[1][i], m);
+ out[2] = stbi__blinn_8x8(coutput[2][i], m);
+ out[3] = 255;
+ out += n;
+ }
+ }
+ else if (z->app14_color_transform == 2) { // YCCK
+ z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
+ for (i = 0; i < z->s->img_x; ++i) {
+ stbi_uc m = coutput[3][i];
+ out[0] = stbi__blinn_8x8(255 - out[0], m);
+ out[1] = stbi__blinn_8x8(255 - out[1], m);
+ out[2] = stbi__blinn_8x8(255 - out[2], m);
+ out += n;
+ }
+ }
+ else { // YCbCr + alpha? Ignore the fourth channel for now
+ z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
+ }
+ }
+ else
+ for (i = 0; i < z->s->img_x; ++i) {
+ out[0] = out[1] = out[2] = y[i];
+ out[3] = 255; // not used if n==3
+ out += n;
+ }
+ }
+ else {
+ if (is_rgb) {
+ if (n == 1)
+ for (i = 0; i < z->s->img_x; ++i)
+ *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
+ else {
+ for (i = 0; i < z->s->img_x; ++i, out += 2) {
+ out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
+ out[1] = 255;
+ }
+ }
+ }
+ else if (z->s->img_n == 4 && z->app14_color_transform == 0) {
+ for (i = 0; i < z->s->img_x; ++i) {
+ stbi_uc m = coutput[3][i];
+ stbi_uc r = stbi__blinn_8x8(coutput[0][i], m);
+ stbi_uc g = stbi__blinn_8x8(coutput[1][i], m);
+ stbi_uc b = stbi__blinn_8x8(coutput[2][i], m);
+ out[0] = stbi__compute_y(r, g, b);
+ out[1] = 255;
+ out += n;
+ }
+ }
+ else if (z->s->img_n == 4 && z->app14_color_transform == 2) {
+ for (i = 0; i < z->s->img_x; ++i) {
+ out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]);
+ out[1] = 255;
+ out += n;
+ }
+ }
+ else {
+ stbi_uc* y = coutput[0];
+ if (n == 1)
+ for (i = 0; i < z->s->img_x; ++i) out[i] = y[i];
+ else
+ for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; }
+ }
+ }
+ }
+ stbi__cleanup_jpeg(z);
+ *out_x = z->s->img_x;
+ *out_y = z->s->img_y;
+ if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output
+ return output;
+ }
}
-static unsigned char *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
{
- stbi__jpeg j;
- j.s = s;
- stbi__setup_jpeg(&j);
- return load_jpeg_image(&j, x,y,comp,req_comp);
+ unsigned char* result;
+ stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
+ if (!j) return stbi__errpuc("outofmem", "Out of memory");
+ memset(j, 0, sizeof(stbi__jpeg));
+ STBI_NOTUSED(ri);
+ j->s = s;
+ stbi__setup_jpeg(j);
+ result = load_jpeg_image(j, x, y, comp, req_comp);
+ STBI_FREE(j);
+ return result;
}
-static int stbi__jpeg_test(stbi__context *s)
+static int stbi__jpeg_test(stbi__context* s)
{
- int r;
- stbi__jpeg j;
- j.s = s;
- stbi__setup_jpeg(&j);
- r = stbi__decode_jpeg_header(&j, STBI__SCAN_type);
- stbi__rewind(s);
- return r;
+ int r;
+ stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
+ if (!j) return stbi__err("outofmem", "Out of memory");
+ memset(j, 0, sizeof(stbi__jpeg));
+ j->s = s;
+ stbi__setup_jpeg(j);
+ r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
+ stbi__rewind(s);
+ STBI_FREE(j);
+ return r;
}
-static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)
+static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp)
{
- if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) {
- stbi__rewind( j->s );
- return 0;
- }
- if (x) *x = j->s->img_x;
- if (y) *y = j->s->img_y;
- if (comp) *comp = j->s->img_n;
- return 1;
+ if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) {
+ stbi__rewind(j->s);
+ return 0;
+ }
+ if (x) *x = j->s->img_x;
+ if (y) *y = j->s->img_y;
+ if (comp) *comp = j->s->img_n >= 3 ? 3 : 1;
+ return 1;
}
-static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp)
{
- stbi__jpeg j;
- j.s = s;
- return stbi__jpeg_info_raw(&j, x, y, comp);
+ int result;
+ stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg)));
+ if (!j) return stbi__err("outofmem", "Out of memory");
+ memset(j, 0, sizeof(stbi__jpeg));
+ j->s = s;
+ result = stbi__jpeg_info_raw(j, x, y, comp);
+ STBI_FREE(j);
+ return result;
}
#endif
@@ -3437,81 +4119,82 @@ static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
// fast-way is faster to check than jpeg huffman, but slow way is slower
#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables
#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1)
+#define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet
// zlib-style huffman encoding
// (jpegs packs from left, zlib from right, so can't share code)
typedef struct
{
- stbi__uint16 fast[1 << STBI__ZFAST_BITS];
- stbi__uint16 firstcode[16];
- int maxcode[17];
- stbi__uint16 firstsymbol[16];
- stbi_uc size[288];
- stbi__uint16 value[288];
+ stbi__uint16 fast[1 << STBI__ZFAST_BITS];
+ stbi__uint16 firstcode[16];
+ int maxcode[17];
+ stbi__uint16 firstsymbol[16];
+ stbi_uc size[STBI__ZNSYMS];
+ stbi__uint16 value[STBI__ZNSYMS];
} stbi__zhuffman;
stbi_inline static int stbi__bitreverse16(int n)
{
- n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
- n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
- n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
- n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
- return n;
+ n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
+ n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
+ n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
+ n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
+ return n;
}
stbi_inline static int stbi__bit_reverse(int v, int bits)
{
- STBI_ASSERT(bits <= 16);
- // to bit reverse n bits, reverse 16 and shift
- // e.g. 11 bits, bit reverse and shift away 5
- return stbi__bitreverse16(v) >> (16-bits);
-}
-
-static int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num)
-{
- int i,k=0;
- int code, next_code[16], sizes[17];
-
- // DEFLATE spec for generating codes
- memset(sizes, 0, sizeof(sizes));
- memset(z->fast, 0, sizeof(z->fast));
- for (i=0; i < num; ++i)
- ++sizes[sizelist[i]];
- sizes[0] = 0;
- for (i=1; i < 16; ++i)
- if (sizes[i] > (1 << i))
- return stbi__err("bad sizes", "Corrupt PNG");
- code = 0;
- for (i=1; i < 16; ++i) {
- next_code[i] = code;
- z->firstcode[i] = (stbi__uint16) code;
- z->firstsymbol[i] = (stbi__uint16) k;
- code = (code + sizes[i]);
- if (sizes[i])
- if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG");
- z->maxcode[i] = code << (16-i); // preshift for inner loop
- code <<= 1;
- k += sizes[i];
- }
- z->maxcode[16] = 0x10000; // sentinel
- for (i=0; i < num; ++i) {
- int s = sizelist[i];
- if (s) {
- int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s];
- stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i);
- z->size [c] = (stbi_uc ) s;
- z->value[c] = (stbi__uint16) i;
- if (s <= STBI__ZFAST_BITS) {
- int k = stbi__bit_reverse(next_code[s],s);
- while (k < (1 << STBI__ZFAST_BITS)) {
- z->fast[k] = fastv;
- k += (1 << s);
+ STBI_ASSERT(bits <= 16);
+ // to bit reverse n bits, reverse 16 and shift
+ // e.g. 11 bits, bit reverse and shift away 5
+ return stbi__bitreverse16(v) >> (16 - bits);
+}
+
+static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num)
+{
+ int i, k = 0;
+ int code, next_code[16], sizes[17];
+
+ // DEFLATE spec for generating codes
+ memset(sizes, 0, sizeof(sizes));
+ memset(z->fast, 0, sizeof(z->fast));
+ for (i = 0; i < num; ++i)
+ ++sizes[sizelist[i]];
+ sizes[0] = 0;
+ for (i = 1; i < 16; ++i)
+ if (sizes[i] > (1 << i))
+ return stbi__err("bad sizes", "Corrupt PNG");
+ code = 0;
+ for (i = 1; i < 16; ++i) {
+ next_code[i] = code;
+ z->firstcode[i] = (stbi__uint16)code;
+ z->firstsymbol[i] = (stbi__uint16)k;
+ code = (code + sizes[i]);
+ if (sizes[i])
+ if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG");
+ z->maxcode[i] = code << (16 - i); // preshift for inner loop
+ code <<= 1;
+ k += sizes[i];
+ }
+ z->maxcode[16] = 0x10000; // sentinel
+ for (i = 0; i < num; ++i) {
+ int s = sizelist[i];
+ if (s) {
+ int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s];
+ stbi__uint16 fastv = (stbi__uint16)((s << 9) | i);
+ z->size[c] = (stbi_uc)s;
+ z->value[c] = (stbi__uint16)i;
+ if (s <= STBI__ZFAST_BITS) {
+ int j = stbi__bit_reverse(next_code[s], s);
+ while (j < (1 << STBI__ZFAST_BITS)) {
+ z->fast[j] = fastv;
+ j += (1 << s);
+ }
}
- }
- ++next_code[s];
- }
- }
- return 1;
+ ++next_code[s];
+ }
+ }
+ return 1;
}
// zlib-from-memory implementation for PNG reading
@@ -3522,240 +4205,304 @@ static int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num)
typedef struct
{
- stbi_uc *zbuffer, *zbuffer_end;
- int num_bits;
- stbi__uint32 code_buffer;
+ stbi_uc* zbuffer, * zbuffer_end;
+ int num_bits;
+ int hit_zeof_once;
+ stbi__uint32 code_buffer;
- char *zout;
- char *zout_start;
- char *zout_end;
- int z_expandable;
+ char* zout;
+ char* zout_start;
+ char* zout_end;
+ int z_expandable;
- stbi__zhuffman z_length, z_distance;
+ stbi__zhuffman z_length, z_distance;
} stbi__zbuf;
-stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)
+stbi_inline static int stbi__zeof(stbi__zbuf* z)
{
- if (z->zbuffer >= z->zbuffer_end) return 0;
- return *z->zbuffer++;
+ return (z->zbuffer >= z->zbuffer_end);
}
-static void stbi__fill_bits(stbi__zbuf *z)
+stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z)
{
- do {
- STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
- z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits;
- z->num_bits += 8;
- } while (z->num_bits <= 24);
+ return stbi__zeof(z) ? 0 : *z->zbuffer++;
}
-stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n)
+static void stbi__fill_bits(stbi__zbuf* z)
{
- unsigned int k;
- if (z->num_bits < n) stbi__fill_bits(z);
- k = z->code_buffer & ((1 << n) - 1);
- z->code_buffer >>= n;
- z->num_bits -= n;
- return k;
+ do {
+ if (z->code_buffer >= (1U << z->num_bits)) {
+ z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */
+ return;
+ }
+ z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits;
+ z->num_bits += 8;
+ } while (z->num_bits <= 24);
}
-static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z)
+stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n)
{
- int b,s,k;
- // not resolved by fast table, so compute it the slow way
- // use jpeg approach, which requires MSbits at top
- k = stbi__bit_reverse(a->code_buffer, 16);
- for (s=STBI__ZFAST_BITS+1; ; ++s)
- if (k < z->maxcode[s])
- break;
- if (s == 16) return -1; // invalid code!
- // code size is s, so:
- b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s];
- STBI_ASSERT(z->size[b] == s);
- a->code_buffer >>= s;
- a->num_bits -= s;
- return z->value[b];
+ unsigned int k;
+ if (z->num_bits < n) stbi__fill_bits(z);
+ k = z->code_buffer & ((1 << n) - 1);
+ z->code_buffer >>= n;
+ z->num_bits -= n;
+ return k;
}
-stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
+static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z)
{
- int b,s;
- if (a->num_bits < 16) stbi__fill_bits(a);
- b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
- if (b) {
- s = b >> 9;
- a->code_buffer >>= s;
- a->num_bits -= s;
- return b & 511;
- }
- return stbi__zhuffman_decode_slowpath(a, z);
+ int b, s, k;
+ // not resolved by fast table, so compute it the slow way
+ // use jpeg approach, which requires MSbits at top
+ k = stbi__bit_reverse(a->code_buffer, 16);
+ for (s = STBI__ZFAST_BITS + 1; ; ++s)
+ if (k < z->maxcode[s])
+ break;
+ if (s >= 16) return -1; // invalid code!
+ // code size is s, so:
+ b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s];
+ if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere!
+ if (z->size[b] != s) return -1; // was originally an assert, but report failure instead.
+ a->code_buffer >>= s;
+ a->num_bits -= s;
+ return z->value[b];
+}
+
+stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z)
+{
+ int b, s;
+ if (a->num_bits < 16) {
+ if (stbi__zeof(a)) {
+ if (!a->hit_zeof_once) {
+ // This is the first time we hit eof, insert 16 extra padding btis
+ // to allow us to keep going; if we actually consume any of them
+ // though, that is invalid data. This is caught later.
+ a->hit_zeof_once = 1;
+ a->num_bits += 16; // add 16 implicit zero bits
+ }
+ else {
+ // We already inserted our extra 16 padding bits and are again
+ // out, this stream is actually prematurely terminated.
+ return -1;
+ }
+ }
+ else {
+ stbi__fill_bits(a);
+ }
+ }
+ b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
+ if (b) {
+ s = b >> 9;
+ a->code_buffer >>= s;
+ a->num_bits -= s;
+ return b & 511;
+ }
+ return stbi__zhuffman_decode_slowpath(a, z);
}
-static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes
+static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes
{
- char *q;
- int cur, limit;
- z->zout = zout;
- if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
- cur = (int) (z->zout - z->zout_start);
- limit = (int) (z->zout_end - z->zout_start);
- while (cur + n > limit)
- limit *= 2;
- q = (char *) STBI_REALLOC(z->zout_start, limit);
- if (q == NULL) return stbi__err("outofmem", "Out of memory");
- z->zout_start = q;
- z->zout = q + cur;
- z->zout_end = q + limit;
- return 1;
+ char* q;
+ unsigned int cur, limit, old_limit;
+ z->zout = zout;
+ if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG");
+ cur = (unsigned int)(z->zout - z->zout_start);
+ limit = old_limit = (unsigned)(z->zout_end - z->zout_start);
+ if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory");
+ while (cur + n > limit) {
+ if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory");
+ limit *= 2;
+ }
+ q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit);
+ STBI_NOTUSED(old_limit);
+ if (q == NULL) return stbi__err("outofmem", "Out of memory");
+ z->zout_start = q;
+ z->zout = q + cur;
+ z->zout_end = q + limit;
+ return 1;
}
-static int stbi__zlength_base[31] = {
+static const int stbi__zlength_base[31] = {
3,4,5,6,7,8,9,10,11,13,
15,17,19,23,27,31,35,43,51,59,
67,83,99,115,131,163,195,227,258,0,0 };
-static int stbi__zlength_extra[31]=
+static const int stbi__zlength_extra[31] =
{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
-static int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,
-257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
-
-static int stbi__zdist_extra[32] =
-{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-static int stbi__parse_huffman_block(stbi__zbuf *a)
-{
- char *zout = a->zout;
- for(;;) {
- int z = stbi__zhuffman_decode(a, &a->z_length);
- if (z < 256) {
- if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes
- if (zout >= a->zout_end) {
- if (!stbi__zexpand(a, zout, 1)) return 0;
- zout = a->zout;
- }
- *zout++ = (char) z;
- } else {
- stbi_uc *p;
- int len,dist;
- if (z == 256) {
- a->zout = zout;
- return 1;
- }
- z -= 257;
- len = stbi__zlength_base[z];
- if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]);
- z = stbi__zhuffman_decode(a, &a->z_distance);
- if (z < 0) return stbi__err("bad huffman code","Corrupt PNG");
- dist = stbi__zdist_base[z];
- if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]);
- if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG");
- if (zout + len > a->zout_end) {
- if (!stbi__zexpand(a, zout, len)) return 0;
- zout = a->zout;
- }
- p = (stbi_uc *) (zout - dist);
- if (dist == 1) { // run of one byte; common in images.
- stbi_uc v = *p;
- if (len) { do *zout++ = v; while (--len); }
- } else {
- if (len) { do *zout++ = *p++; while (--len); }
- }
- }
- }
+static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,
+257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 };
+
+static const int stbi__zdist_extra[32] =
+{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };
+
+static int stbi__parse_huffman_block(stbi__zbuf* a)
+{
+ char* zout = a->zout;
+ for (;;) {
+ int z = stbi__zhuffman_decode(a, &a->z_length);
+ if (z < 256) {
+ if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes
+ if (zout >= a->zout_end) {
+ if (!stbi__zexpand(a, zout, 1)) return 0;
+ zout = a->zout;
+ }
+ *zout++ = (char)z;
+ }
+ else {
+ stbi_uc* p;
+ int len, dist;
+ if (z == 256) {
+ a->zout = zout;
+ if (a->hit_zeof_once && a->num_bits < 16) {
+ // The first time we hit zeof, we inserted 16 extra zero bits into our bit
+ // buffer so the decoder can just do its speculative decoding. But if we
+ // actually consumed any of those bits (which is the case when num_bits < 16),
+ // the stream actually read past the end so it is malformed.
+ return stbi__err("unexpected end", "Corrupt PNG");
+ }
+ return 1;
+ }
+ if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data
+ z -= 257;
+ len = stbi__zlength_base[z];
+ if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]);
+ z = stbi__zhuffman_decode(a, &a->z_distance);
+ if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data
+ dist = stbi__zdist_base[z];
+ if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]);
+ if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG");
+ if (len > a->zout_end - zout) {
+ if (!stbi__zexpand(a, zout, len)) return 0;
+ zout = a->zout;
+ }
+ p = (stbi_uc*)(zout - dist);
+ if (dist == 1) { // run of one byte; common in images.
+ stbi_uc v = *p;
+ if (len) { do *zout++ = v; while (--len); }
+ }
+ else {
+ if (len) { do *zout++ = *p++; while (--len); }
+ }
+ }
+ }
}
-static int stbi__compute_huffman_codes(stbi__zbuf *a)
+static int stbi__compute_huffman_codes(stbi__zbuf* a)
{
- static stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
- stbi__zhuffman z_codelength;
- stbi_uc lencodes[286+32+137];//padding for maximum single op
- stbi_uc codelength_sizes[19];
- int i,n;
+ static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
+ stbi__zhuffman z_codelength;
+ stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op
+ stbi_uc codelength_sizes[19];
+ int i, n;
- int hlit = stbi__zreceive(a,5) + 257;
- int hdist = stbi__zreceive(a,5) + 1;
- int hclen = stbi__zreceive(a,4) + 4;
+ int hlit = stbi__zreceive(a, 5) + 257;
+ int hdist = stbi__zreceive(a, 5) + 1;
+ int hclen = stbi__zreceive(a, 4) + 4;
+ int ntot = hlit + hdist;
- memset(codelength_sizes, 0, sizeof(codelength_sizes));
- for (i=0; i < hclen; ++i) {
- int s = stbi__zreceive(a,3);
- codelength_sizes[length_dezigzag[i]] = (stbi_uc) s;
- }
- if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0;
-
- n = 0;
- while (n < hlit + hdist) {
- int c = stbi__zhuffman_decode(a, &z_codelength);
- if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG");
- if (c < 16)
- lencodes[n++] = (stbi_uc) c;
- else if (c == 16) {
- c = stbi__zreceive(a,2)+3;
- memset(lencodes+n, lencodes[n-1], c);
- n += c;
- } else if (c == 17) {
- c = stbi__zreceive(a,3)+3;
- memset(lencodes+n, 0, c);
- n += c;
- } else {
- STBI_ASSERT(c == 18);
- c = stbi__zreceive(a,7)+11;
- memset(lencodes+n, 0, c);
- n += c;
- }
- }
- if (n != hlit+hdist) return stbi__err("bad codelengths","Corrupt PNG");
- if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;
- if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0;
- return 1;
-}
-
-static int stbi__parse_uncomperssed_block(stbi__zbuf *a)
-{
- stbi_uc header[4];
- int len,nlen,k;
- if (a->num_bits & 7)
- stbi__zreceive(a, a->num_bits & 7); // discard
- // drain the bit-packed data into header
- k = 0;
- while (a->num_bits > 0) {
- header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check
- a->code_buffer >>= 8;
- a->num_bits -= 8;
- }
- STBI_ASSERT(a->num_bits == 0);
- // now fill header the normal way
- while (k < 4)
- header[k++] = stbi__zget8(a);
- len = header[1] * 256 + header[0];
- nlen = header[3] * 256 + header[2];
- if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG");
- if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG");
- if (a->zout + len > a->zout_end)
- if (!stbi__zexpand(a, a->zout, len)) return 0;
- memcpy(a->zout, a->zbuffer, len);
- a->zbuffer += len;
- a->zout += len;
- return 1;
-}
-
-static int stbi__parse_zlib_header(stbi__zbuf *a)
-{
- int cmf = stbi__zget8(a);
- int cm = cmf & 15;
- /* int cinfo = cmf >> 4; */
- int flg = stbi__zget8(a);
- if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec
- if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png
- if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png
- // window = 1 << (8 + cinfo)... but who cares, we fully buffer output
- return 1;
-}
-
-// @TODO: should statically initialize these for optimal thread safety
-static stbi_uc stbi__zdefault_length[288], stbi__zdefault_distance[32];
-static void stbi__init_zdefaults(void)
+ memset(codelength_sizes, 0, sizeof(codelength_sizes));
+ for (i = 0; i < hclen; ++i) {
+ int s = stbi__zreceive(a, 3);
+ codelength_sizes[length_dezigzag[i]] = (stbi_uc)s;
+ }
+ if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0;
+
+ n = 0;
+ while (n < ntot) {
+ int c = stbi__zhuffman_decode(a, &z_codelength);
+ if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG");
+ if (c < 16)
+ lencodes[n++] = (stbi_uc)c;
+ else {
+ stbi_uc fill = 0;
+ if (c == 16) {
+ c = stbi__zreceive(a, 2) + 3;
+ if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG");
+ fill = lencodes[n - 1];
+ }
+ else if (c == 17) {
+ c = stbi__zreceive(a, 3) + 3;
+ }
+ else if (c == 18) {
+ c = stbi__zreceive(a, 7) + 11;
+ }
+ else {
+ return stbi__err("bad codelengths", "Corrupt PNG");
+ }
+ if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG");
+ memset(lencodes + n, fill, c);
+ n += c;
+ }
+ }
+ if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG");
+ if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;
+ if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0;
+ return 1;
+}
+
+static int stbi__parse_uncompressed_block(stbi__zbuf* a)
+{
+ stbi_uc header[4];
+ int len, nlen, k;
+ if (a->num_bits & 7)
+ stbi__zreceive(a, a->num_bits & 7); // discard
+ // drain the bit-packed data into header
+ k = 0;
+ while (a->num_bits > 0) {
+ header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check
+ a->code_buffer >>= 8;
+ a->num_bits -= 8;
+ }
+ if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG");
+ // now fill header the normal way
+ while (k < 4)
+ header[k++] = stbi__zget8(a);
+ len = header[1] * 256 + header[0];
+ nlen = header[3] * 256 + header[2];
+ if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG");
+ if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG");
+ if (a->zout + len > a->zout_end)
+ if (!stbi__zexpand(a, a->zout, len)) return 0;
+ memcpy(a->zout, a->zbuffer, len);
+ a->zbuffer += len;
+ a->zout += len;
+ return 1;
+}
+
+static int stbi__parse_zlib_header(stbi__zbuf* a)
+{
+ int cmf = stbi__zget8(a);
+ int cm = cmf & 15;
+ /* int cinfo = cmf >> 4; */
+ int flg = stbi__zget8(a);
+ if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec
+ if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec
+ if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png
+ if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png
+ // window = 1 << (8 + cinfo)... but who cares, we fully buffer output
+ return 1;
+}
+
+static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] =
+{
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+ 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+ 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+ 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8
+};
+static const stbi_uc stbi__zdefault_distance[32] =
+{
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
+};
+/*
+Init algorithm:
{
int i; // use <= to match clearly with spec
for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8;
@@ -3765,119 +4512,126 @@ static void stbi__init_zdefaults(void)
for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5;
}
+*/
-static int stbi__parse_zlib(stbi__zbuf *a, int parse_header)
-{
- int final, type;
- if (parse_header)
- if (!stbi__parse_zlib_header(a)) return 0;
- a->num_bits = 0;
- a->code_buffer = 0;
- do {
- final = stbi__zreceive(a,1);
- type = stbi__zreceive(a,2);
- if (type == 0) {
- if (!stbi__parse_uncomperssed_block(a)) return 0;
- } else if (type == 3) {
- return 0;
- } else {
- if (type == 1) {
- // use fixed code lengths
- if (!stbi__zdefault_distance[31]) stbi__init_zdefaults();
- if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , 288)) return 0;
- if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0;
- } else {
- if (!stbi__compute_huffman_codes(a)) return 0;
- }
- if (!stbi__parse_huffman_block(a)) return 0;
- }
- } while (!final);
- return 1;
+static int stbi__parse_zlib(stbi__zbuf* a, int parse_header)
+{
+ int final, type;
+ if (parse_header)
+ if (!stbi__parse_zlib_header(a)) return 0;
+ a->num_bits = 0;
+ a->code_buffer = 0;
+ a->hit_zeof_once = 0;
+ do {
+ final = stbi__zreceive(a, 1);
+ type = stbi__zreceive(a, 2);
+ if (type == 0) {
+ if (!stbi__parse_uncompressed_block(a)) return 0;
+ }
+ else if (type == 3) {
+ return 0;
+ }
+ else {
+ if (type == 1) {
+ // use fixed code lengths
+ if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0;
+ if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0;
+ }
+ else {
+ if (!stbi__compute_huffman_codes(a)) return 0;
+ }
+ if (!stbi__parse_huffman_block(a)) return 0;
+ }
+ } while (!final);
+ return 1;
}
-static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header)
+static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header)
{
- a->zout_start = obuf;
- a->zout = obuf;
- a->zout_end = obuf + olen;
- a->z_expandable = exp;
+ a->zout_start = obuf;
+ a->zout = obuf;
+ a->zout_end = obuf + olen;
+ a->z_expandable = exp;
- return stbi__parse_zlib(a, parse_header);
+ return stbi__parse_zlib(a, parse_header);
}
-STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
+STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen)
{
- stbi__zbuf a;
- char *p = (char *) stbi__malloc(initial_size);
- if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer + len;
- if (stbi__do_zlib(&a, p, initial_size, 1, 1)) {
- if (outlen) *outlen = (int) (a.zout - a.zout_start);
- return a.zout_start;
- } else {
- STBI_FREE(a.zout_start);
- return NULL;
- }
+ stbi__zbuf a;
+ char* p = (char*)stbi__malloc(initial_size);
+ if (p == NULL) return NULL;
+ a.zbuffer = (stbi_uc*)buffer;
+ a.zbuffer_end = (stbi_uc*)buffer + len;
+ if (stbi__do_zlib(&a, p, initial_size, 1, 1)) {
+ if (outlen) *outlen = (int)(a.zout - a.zout_start);
+ return a.zout_start;
+ }
+ else {
+ STBI_FREE(a.zout_start);
+ return NULL;
+ }
}
-STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)
+STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen)
{
- return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
+ return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
}
-STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
+STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header)
{
- stbi__zbuf a;
- char *p = (char *) stbi__malloc(initial_size);
- if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer + len;
- if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) {
- if (outlen) *outlen = (int) (a.zout - a.zout_start);
- return a.zout_start;
- } else {
- STBI_FREE(a.zout_start);
- return NULL;
- }
+ stbi__zbuf a;
+ char* p = (char*)stbi__malloc(initial_size);
+ if (p == NULL) return NULL;
+ a.zbuffer = (stbi_uc*)buffer;
+ a.zbuffer_end = (stbi_uc*)buffer + len;
+ if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) {
+ if (outlen) *outlen = (int)(a.zout - a.zout_start);
+ return a.zout_start;
+ }
+ else {
+ STBI_FREE(a.zout_start);
+ return NULL;
+ }
}
-STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
+STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen)
{
- stbi__zbuf a;
- a.zbuffer = (stbi_uc *) ibuffer;
- a.zbuffer_end = (stbi_uc *) ibuffer + ilen;
- if (stbi__do_zlib(&a, obuffer, olen, 0, 1))
- return (int) (a.zout - a.zout_start);
- else
- return -1;
+ stbi__zbuf a;
+ a.zbuffer = (stbi_uc*)ibuffer;
+ a.zbuffer_end = (stbi_uc*)ibuffer + ilen;
+ if (stbi__do_zlib(&a, obuffer, olen, 0, 1))
+ return (int)(a.zout - a.zout_start);
+ else
+ return -1;
}
-STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)
+STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen)
{
- stbi__zbuf a;
- char *p = (char *) stbi__malloc(16384);
- if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer+len;
- if (stbi__do_zlib(&a, p, 16384, 1, 0)) {
- if (outlen) *outlen = (int) (a.zout - a.zout_start);
- return a.zout_start;
- } else {
- STBI_FREE(a.zout_start);
- return NULL;
- }
+ stbi__zbuf a;
+ char* p = (char*)stbi__malloc(16384);
+ if (p == NULL) return NULL;
+ a.zbuffer = (stbi_uc*)buffer;
+ a.zbuffer_end = (stbi_uc*)buffer + len;
+ if (stbi__do_zlib(&a, p, 16384, 1, 0)) {
+ if (outlen) *outlen = (int)(a.zout - a.zout_start);
+ return a.zout_start;
+ }
+ else {
+ STBI_FREE(a.zout_start);
+ return NULL;
+ }
}
-STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)
+STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen)
{
- stbi__zbuf a;
- a.zbuffer = (stbi_uc *) ibuffer;
- a.zbuffer_end = (stbi_uc *) ibuffer + ilen;
- if (stbi__do_zlib(&a, obuffer, olen, 0, 0))
- return (int) (a.zout - a.zout_start);
- else
- return -1;
+ stbi__zbuf a;
+ a.zbuffer = (stbi_uc*)ibuffer;
+ a.zbuffer_end = (stbi_uc*)ibuffer + ilen;
+ if (stbi__do_zlib(&a, obuffer, olen, 0, 0))
+ return (int)(a.zout - a.zout_start);
+ else
+ return -1;
}
#endif
@@ -3894,43 +4648,44 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char
#ifndef STBI_NO_PNG
typedef struct
{
- stbi__uint32 length;
- stbi__uint32 type;
+ stbi__uint32 length;
+ stbi__uint32 type;
} stbi__pngchunk;
-static stbi__pngchunk stbi__get_chunk_header(stbi__context *s)
+static stbi__pngchunk stbi__get_chunk_header(stbi__context* s)
{
- stbi__pngchunk c;
- c.length = stbi__get32be(s);
- c.type = stbi__get32be(s);
- return c;
+ stbi__pngchunk c;
+ c.length = stbi__get32be(s);
+ c.type = stbi__get32be(s);
+ return c;
}
-static int stbi__check_png_header(stbi__context *s)
+static int stbi__check_png_header(stbi__context* s)
{
- static stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };
- int i;
- for (i=0; i < 8; ++i)
- if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG");
- return 1;
+ static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };
+ int i;
+ for (i = 0; i < 8; ++i)
+ if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG");
+ return 1;
}
typedef struct
{
- stbi__context *s;
- stbi_uc *idata, *expanded, *out;
+ stbi__context* s;
+ stbi_uc* idata, * expanded, * out;
+ int depth;
} stbi__png;
enum {
- STBI__F_none=0,
- STBI__F_sub=1,
- STBI__F_up=2,
- STBI__F_avg=3,
- STBI__F_paeth=4,
- // synthetic filters used for first scanline to avoid needing a dummy row of 0s
- STBI__F_avg_first,
- STBI__F_paeth_first
+ STBI__F_none = 0,
+ STBI__F_sub = 1,
+ STBI__F_up = 2,
+ STBI__F_avg = 3,
+ STBI__F_paeth = 4,
+ // synthetic filters used for first scanline to avoid needing a dummy row of 0s
+ STBI__F_avg_first,
+ STBI__F_paeth_first
};
static stbi_uc first_row_filter[5] =
@@ -3944,1098 +4699,1480 @@ static stbi_uc first_row_filter[5] =
static int stbi__paeth(int a, int b, int c)
{
- int p = a + b - c;
- int pa = abs(p-a);
- int pb = abs(p-b);
- int pc = abs(p-c);
- if (pa <= pb && pa <= pc) return a;
- if (pb <= pc) return b;
- return c;
+ int p = a + b - c;
+ int pa = abs(p - a);
+ int pb = abs(p - b);
+ int pc = abs(p - c);
+ if (pa <= pb && pa <= pc) return a;
+ if (pb <= pc) return b;
+ return c;
}
-static stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 };
+static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 };
// create the png data from post-deflated data
-static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
-{
- stbi__context *s = a->s;
- stbi__uint32 i,j,stride = x*out_n;
- stbi__uint32 img_len, img_width_bytes;
- int k;
- int img_n = s->img_n; // copy it into a local for later
-
- STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1);
- a->out = (stbi_uc *) stbi__malloc(x * y * out_n); // extra bytes to write off the end into
- if (!a->out) return stbi__err("outofmem", "Out of memory");
-
- img_width_bytes = (((img_n * x * depth) + 7) >> 3);
- img_len = (img_width_bytes + 1) * y;
- if (s->img_x == x && s->img_y == y) {
- if (raw_len != img_len) return stbi__err("not enough pixels","Corrupt PNG");
- } else { // interlaced:
- if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG");
- }
-
- for (j=0; j < y; ++j) {
- stbi_uc *cur = a->out + stride*j;
- stbi_uc *prior = cur - stride;
- int filter = *raw++;
- int filter_bytes = img_n;
- int width = x;
- if (filter > 4)
- return stbi__err("invalid filter","Corrupt PNG");
-
- if (depth < 8) {
- STBI_ASSERT(img_width_bytes <= x);
- cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place
- filter_bytes = 1;
- width = img_width_bytes;
- }
-
- // if first row, use special filter that doesn't sample previous row
- if (j == 0) filter = first_row_filter[filter];
-
- // handle first byte explicitly
- for (k=0; k < filter_bytes; ++k) {
- switch (filter) {
- case STBI__F_none : cur[k] = raw[k]; break;
- case STBI__F_sub : cur[k] = raw[k]; break;
- case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
- case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break;
- case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break;
- case STBI__F_avg_first : cur[k] = raw[k]; break;
+static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
+{
+ int bytes = (depth == 16 ? 2 : 1);
+ stbi__context* s = a->s;
+ stbi__uint32 i, j, stride = x * out_n * bytes;
+ stbi__uint32 img_len, img_width_bytes;
+ int k;
+ int img_n = s->img_n; // copy it into a local for later
+
+ int output_bytes = out_n * bytes;
+ int filter_bytes = img_n * bytes;
+ int width = x;
+
+ STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1);
+ a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into
+ if (!a->out) return stbi__err("outofmem", "Out of memory");
+
+ if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG");
+ img_width_bytes = (((img_n * x * depth) + 7) >> 3);
+ img_len = (img_width_bytes + 1) * y;
+
+ // we used to check for exact match between raw_len and img_len on non-interlaced PNGs,
+ // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros),
+ // so just check for raw_len < img_len always.
+ if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG");
+
+ for (j = 0; j < y; ++j) {
+ stbi_uc* cur = a->out + stride * j;
+ stbi_uc* prior;
+ int filter = *raw++;
+
+ if (filter > 4)
+ return stbi__err("invalid filter", "Corrupt PNG");
+
+ if (depth < 8) {
+ if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG");
+ cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place
+ filter_bytes = 1;
+ width = img_width_bytes;
+ }
+ prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above
+
+ // if first row, use special filter that doesn't sample previous row
+ if (j == 0) filter = first_row_filter[filter];
+
+ // handle first byte explicitly
+ for (k = 0; k < filter_bytes; ++k) {
+ switch (filter) {
+ case STBI__F_none: cur[k] = raw[k]; break;
+ case STBI__F_sub: cur[k] = raw[k]; break;
+ case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
+ case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break;
+ case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break;
+ case STBI__F_avg_first: cur[k] = raw[k]; break;
case STBI__F_paeth_first: cur[k] = raw[k]; break;
- }
- }
-
- if (depth == 8) {
- if (img_n != out_n)
- cur[img_n] = 255; // first pixel
- raw += img_n;
- cur += out_n;
- prior += out_n;
- } else {
- raw += 1;
- cur += 1;
- prior += 1;
- }
-
- // this is a little gross, so that we don't switch per-pixel or per-component
- if (depth < 8 || img_n == out_n) {
- int nk = (width - 1)*img_n;
- #define CASE(f) \
+ }
+ }
+
+ if (depth == 8) {
+ if (img_n != out_n)
+ cur[img_n] = 255; // first pixel
+ raw += img_n;
+ cur += out_n;
+ prior += out_n;
+ }
+ else if (depth == 16) {
+ if (img_n != out_n) {
+ cur[filter_bytes] = 255; // first pixel top byte
+ cur[filter_bytes + 1] = 255; // first pixel bottom byte
+ }
+ raw += filter_bytes;
+ cur += output_bytes;
+ prior += output_bytes;
+ }
+ else {
+ raw += 1;
+ cur += 1;
+ prior += 1;
+ }
+
+ // this is a little gross, so that we don't switch per-pixel or per-component
+ if (depth < 8 || img_n == out_n) {
+ int nk = (width - 1) * filter_bytes;
+#define STBI__CASE(f) \
case f: \
for (k=0; k < nk; ++k)
- switch (filter) {
- // "none" filter turns into a memcpy here; make that explicit.
+ switch (filter) {
+ // "none" filter turns into a memcpy here; make that explicit.
case STBI__F_none: memcpy(cur, raw, nk); break;
- CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break;
- CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
- CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break;
- CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break;
- CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break;
- CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break;
- }
- #undef CASE
- raw += nk;
- } else {
- STBI_ASSERT(img_n+1 == out_n);
- #define CASE(f) \
+ STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break;
+ STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
+ STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break;
+ STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break;
+ STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break;
+ STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break;
+ }
+#undef STBI__CASE
+ raw += nk;
+ }
+ else {
+ STBI_ASSERT(img_n + 1 == out_n);
+#define STBI__CASE(f) \
case f: \
- for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \
- for (k=0; k < img_n; ++k)
- switch (filter) {
- CASE(STBI__F_none) cur[k] = raw[k]; break;
- CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-out_n]); break;
- CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
- CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-out_n])>>1)); break;
- CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;
- CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-out_n] >> 1)); break;
- CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;
- }
- #undef CASE
- }
- }
+ for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
+ for (k=0; k < filter_bytes; ++k)
+ switch (filter) {
+ STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break;
+ STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break;
+ STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
+ STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break;
+ STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break;
+ STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break;
+ STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break;
+ }
+#undef STBI__CASE
+
+ // the loop above sets the high byte of the pixels' alpha, but for
+ // 16 bit png files we also need the low byte set. we'll do that here.
+ if (depth == 16) {
+ cur = a->out + stride * j; // start at the beginning of the row again
+ for (i = 0; i < x; ++i, cur += output_bytes) {
+ cur[filter_bytes + 1] = 255;
+ }
+ }
+ }
+ }
- // we make a separate pass to expand bits to pixels; for performance,
- // this could run two scanlines behind the above code, so it won't
- // intefere with filtering but will still be in the cache.
- if (depth < 8) {
- for (j=0; j < y; ++j) {
- stbi_uc *cur = a->out + stride*j;
- stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes;
- // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit
- // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop
- stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range
-
- // note that the final byte might overshoot and write more data than desired.
- // we can allocate enough data that this never writes out of memory, but it
- // could also overwrite the next scanline. can it overwrite non-empty data
- // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel.
- // so we need to explicitly clamp the final ones
-
- if (depth == 4) {
- for (k=x*img_n; k >= 2; k-=2, ++in) {
- *cur++ = scale * ((*in >> 4) );
- *cur++ = scale * ((*in ) & 0x0f);
+ // we make a separate pass to expand bits to pixels; for performance,
+ // this could run two scanlines behind the above code, so it won't
+ // intefere with filtering but will still be in the cache.
+ if (depth < 8) {
+ for (j = 0; j < y; ++j) {
+ stbi_uc* cur = a->out + stride * j;
+ stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes;
+ // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit
+ // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop
+ stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range
+
+ // note that the final byte might overshoot and write more data than desired.
+ // we can allocate enough data that this never writes out of memory, but it
+ // could also overwrite the next scanline. can it overwrite non-empty data
+ // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel.
+ // so we need to explicitly clamp the final ones
+
+ if (depth == 4) {
+ for (k = x * img_n; k >= 2; k -= 2, ++in) {
+ *cur++ = scale * ((*in >> 4));
+ *cur++ = scale * ((*in) & 0x0f);
+ }
+ if (k > 0) *cur++ = scale * ((*in >> 4));
}
- if (k > 0) *cur++ = scale * ((*in >> 4) );
- } else if (depth == 2) {
- for (k=x*img_n; k >= 4; k-=4, ++in) {
- *cur++ = scale * ((*in >> 6) );
- *cur++ = scale * ((*in >> 4) & 0x03);
- *cur++ = scale * ((*in >> 2) & 0x03);
- *cur++ = scale * ((*in ) & 0x03);
+ else if (depth == 2) {
+ for (k = x * img_n; k >= 4; k -= 4, ++in) {
+ *cur++ = scale * ((*in >> 6));
+ *cur++ = scale * ((*in >> 4) & 0x03);
+ *cur++ = scale * ((*in >> 2) & 0x03);
+ *cur++ = scale * ((*in) & 0x03);
+ }
+ if (k > 0) *cur++ = scale * ((*in >> 6));
+ if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03);
+ if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03);
}
- if (k > 0) *cur++ = scale * ((*in >> 6) );
- if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03);
- if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03);
- } else if (depth == 1) {
- for (k=x*img_n; k >= 8; k-=8, ++in) {
- *cur++ = scale * ((*in >> 7) );
- *cur++ = scale * ((*in >> 6) & 0x01);
- *cur++ = scale * ((*in >> 5) & 0x01);
- *cur++ = scale * ((*in >> 4) & 0x01);
- *cur++ = scale * ((*in >> 3) & 0x01);
- *cur++ = scale * ((*in >> 2) & 0x01);
- *cur++ = scale * ((*in >> 1) & 0x01);
- *cur++ = scale * ((*in ) & 0x01);
+ else if (depth == 1) {
+ for (k = x * img_n; k >= 8; k -= 8, ++in) {
+ *cur++ = scale * ((*in >> 7));
+ *cur++ = scale * ((*in >> 6) & 0x01);
+ *cur++ = scale * ((*in >> 5) & 0x01);
+ *cur++ = scale * ((*in >> 4) & 0x01);
+ *cur++ = scale * ((*in >> 3) & 0x01);
+ *cur++ = scale * ((*in >> 2) & 0x01);
+ *cur++ = scale * ((*in >> 1) & 0x01);
+ *cur++ = scale * ((*in) & 0x01);
+ }
+ if (k > 0) *cur++ = scale * ((*in >> 7));
+ if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01);
+ if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01);
+ if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01);
+ if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01);
+ if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01);
+ if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);
}
- if (k > 0) *cur++ = scale * ((*in >> 7) );
- if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01);
- if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01);
- if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01);
- if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01);
- if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01);
- if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);
- }
- if (img_n != out_n) {
- // insert alpha = 255
- stbi_uc *cur = a->out + stride*j;
- int i;
- if (img_n == 1) {
- for (i=x-1; i >= 0; --i) {
- cur[i*2+1] = 255;
- cur[i*2+0] = cur[i];
- }
- } else {
- STBI_ASSERT(img_n == 3);
- for (i=x-1; i >= 0; --i) {
- cur[i*4+3] = 255;
- cur[i*4+2] = cur[i*3+2];
- cur[i*4+1] = cur[i*3+1];
- cur[i*4+0] = cur[i*3+0];
- }
+ if (img_n != out_n) {
+ int q;
+ // insert alpha = 255
+ cur = a->out + stride * j;
+ if (img_n == 1) {
+ for (q = x - 1; q >= 0; --q) {
+ cur[q * 2 + 1] = 255;
+ cur[q * 2 + 0] = cur[q];
+ }
+ }
+ else {
+ STBI_ASSERT(img_n == 3);
+ for (q = x - 1; q >= 0; --q) {
+ cur[q * 4 + 3] = 255;
+ cur[q * 4 + 2] = cur[q * 3 + 2];
+ cur[q * 4 + 1] = cur[q * 3 + 1];
+ cur[q * 4 + 0] = cur[q * 3 + 0];
+ }
+ }
}
- }
- }
- }
+ }
+ }
+ else if (depth == 16) {
+ // force the image data from big-endian to platform-native.
+ // this is done in a separate pass due to the decoding relying
+ // on the data being untouched, but could probably be done
+ // per-line during decode if care is taken.
+ stbi_uc* cur = a->out;
+ stbi__uint16* cur16 = (stbi__uint16*)cur;
+
+ for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) {
+ *cur16 = (cur[0] << 8) | cur[1];
+ }
+ }
- return 1;
-}
-
-static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced)
-{
- stbi_uc *final;
- int p;
- if (!interlaced)
- return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color);
-
- // de-interlacing
- final = (stbi_uc *) stbi__malloc(a->s->img_x * a->s->img_y * out_n);
- for (p=0; p < 7; ++p) {
- int xorig[] = { 0,4,0,2,0,1,0 };
- int yorig[] = { 0,0,4,0,2,0,1 };
- int xspc[] = { 8,8,4,4,2,2,1 };
- int yspc[] = { 8,8,8,4,4,2,2 };
- int i,j,x,y;
- // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1
- x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p];
- y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p];
- if (x && y) {
- stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y;
- if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) {
- STBI_FREE(final);
- return 0;
- }
- for (j=0; j < y; ++j) {
- for (i=0; i < x; ++i) {
- int out_y = j*yspc[p]+yorig[p];
- int out_x = i*xspc[p]+xorig[p];
- memcpy(final + out_y*a->s->img_x*out_n + out_x*out_n,
- a->out + (j*x+i)*out_n, out_n);
+ return 1;
+}
+
+static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced)
+{
+ int bytes = (depth == 16 ? 2 : 1);
+ int out_bytes = out_n * bytes;
+ stbi_uc* final;
+ int p;
+ if (!interlaced)
+ return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color);
+
+ // de-interlacing
+ final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0);
+ if (!final) return stbi__err("outofmem", "Out of memory");
+ for (p = 0; p < 7; ++p) {
+ int xorig[] = { 0,4,0,2,0,1,0 };
+ int yorig[] = { 0,0,4,0,2,0,1 };
+ int xspc[] = { 8,8,4,4,2,2,1 };
+ int yspc[] = { 8,8,8,4,4,2,2 };
+ int i, j, x, y;
+ // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1
+ x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p];
+ y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p];
+ if (x && y) {
+ stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y;
+ if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) {
+ STBI_FREE(final);
+ return 0;
}
- }
- STBI_FREE(a->out);
- image_data += img_len;
- image_data_len -= img_len;
- }
- }
- a->out = final;
+ for (j = 0; j < y; ++j) {
+ for (i = 0; i < x; ++i) {
+ int out_y = j * yspc[p] + yorig[p];
+ int out_x = i * xspc[p] + xorig[p];
+ memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes,
+ a->out + (j * x + i) * out_bytes, out_bytes);
+ }
+ }
+ STBI_FREE(a->out);
+ image_data += img_len;
+ image_data_len -= img_len;
+ }
+ }
+ a->out = final;
- return 1;
+ return 1;
}
-static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n)
+static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n)
{
- stbi__context *s = z->s;
- stbi__uint32 i, pixel_count = s->img_x * s->img_y;
- stbi_uc *p = z->out;
+ stbi__context* s = z->s;
+ stbi__uint32 i, pixel_count = s->img_x * s->img_y;
+ stbi_uc* p = z->out;
- // compute color-based transparency, assuming we've
- // already got 255 as the alpha value in the output
- STBI_ASSERT(out_n == 2 || out_n == 4);
+ // compute color-based transparency, assuming we've
+ // already got 255 as the alpha value in the output
+ STBI_ASSERT(out_n == 2 || out_n == 4);
- if (out_n == 2) {
- for (i=0; i < pixel_count; ++i) {
- p[1] = (p[0] == tc[0] ? 0 : 255);
- p += 2;
- }
- } else {
- for (i=0; i < pixel_count; ++i) {
- if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
- p[3] = 0;
- p += 4;
- }
- }
- return 1;
+ if (out_n == 2) {
+ for (i = 0; i < pixel_count; ++i) {
+ p[1] = (p[0] == tc[0] ? 0 : 255);
+ p += 2;
+ }
+ }
+ else {
+ for (i = 0; i < pixel_count; ++i) {
+ if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
+ p[3] = 0;
+ p += 4;
+ }
+ }
+ return 1;
+}
+
+static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n)
+{
+ stbi__context* s = z->s;
+ stbi__uint32 i, pixel_count = s->img_x * s->img_y;
+ stbi__uint16* p = (stbi__uint16*)z->out;
+
+ // compute color-based transparency, assuming we've
+ // already got 65535 as the alpha value in the output
+ STBI_ASSERT(out_n == 2 || out_n == 4);
+
+ if (out_n == 2) {
+ for (i = 0; i < pixel_count; ++i) {
+ p[1] = (p[0] == tc[0] ? 0 : 65535);
+ p += 2;
+ }
+ }
+ else {
+ for (i = 0; i < pixel_count; ++i) {
+ if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
+ p[3] = 0;
+ p += 4;
+ }
+ }
+ return 1;
}
-static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n)
+static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n)
{
- stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;
- stbi_uc *p, *temp_out, *orig = a->out;
+ stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;
+ stbi_uc* p, * temp_out, * orig = a->out;
- p = (stbi_uc *) stbi__malloc(pixel_count * pal_img_n);
- if (p == NULL) return stbi__err("outofmem", "Out of memory");
+ p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0);
+ if (p == NULL) return stbi__err("outofmem", "Out of memory");
- // between here and free(out) below, exitting would leak
- temp_out = p;
+ // between here and free(out) below, exitting would leak
+ temp_out = p;
- if (pal_img_n == 3) {
- for (i=0; i < pixel_count; ++i) {
- int n = orig[i]*4;
- p[0] = palette[n ];
- p[1] = palette[n+1];
- p[2] = palette[n+2];
- p += 3;
- }
- } else {
- for (i=0; i < pixel_count; ++i) {
- int n = orig[i]*4;
- p[0] = palette[n ];
- p[1] = palette[n+1];
- p[2] = palette[n+2];
- p[3] = palette[n+3];
- p += 4;
- }
- }
- STBI_FREE(a->out);
- a->out = temp_out;
+ if (pal_img_n == 3) {
+ for (i = 0; i < pixel_count; ++i) {
+ int n = orig[i] * 4;
+ p[0] = palette[n];
+ p[1] = palette[n + 1];
+ p[2] = palette[n + 2];
+ p += 3;
+ }
+ }
+ else {
+ for (i = 0; i < pixel_count; ++i) {
+ int n = orig[i] * 4;
+ p[0] = palette[n];
+ p[1] = palette[n + 1];
+ p[2] = palette[n + 2];
+ p[3] = palette[n + 3];
+ p += 4;
+ }
+ }
+ STBI_FREE(a->out);
+ a->out = temp_out;
- STBI_NOTUSED(len);
+ STBI_NOTUSED(len);
- return 1;
+ return 1;
}
-static int stbi__unpremultiply_on_load = 0;
-static int stbi__de_iphone_flag = 0;
+static int stbi__unpremultiply_on_load_global = 0;
+static int stbi__de_iphone_flag_global = 0;
STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply)
{
- stbi__unpremultiply_on_load = flag_true_if_should_unpremultiply;
+ stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply;
}
STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert)
{
- stbi__de_iphone_flag = flag_true_if_should_convert;
+ stbi__de_iphone_flag_global = flag_true_if_should_convert;
}
-static void stbi__de_iphone(stbi__png *z)
+#ifndef STBI_THREAD_LOCAL
+#define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global
+#define stbi__de_iphone_flag stbi__de_iphone_flag_global
+#else
+static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set;
+static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set;
+
+STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply)
{
- stbi__context *s = z->s;
- stbi__uint32 i, pixel_count = s->img_x * s->img_y;
- stbi_uc *p = z->out;
+ stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply;
+ stbi__unpremultiply_on_load_set = 1;
+}
- if (s->img_out_n == 3) { // convert bgr to rgb
- for (i=0; i < pixel_count; ++i) {
- stbi_uc t = p[0];
- p[0] = p[2];
- p[2] = t;
- p += 3;
- }
- } else {
- STBI_ASSERT(s->img_out_n == 4);
- if (stbi__unpremultiply_on_load) {
- // convert bgr to rgb and unpremultiply
- for (i=0; i < pixel_count; ++i) {
- stbi_uc a = p[3];
- stbi_uc t = p[0];
- if (a) {
- p[0] = p[2] * 255 / a;
- p[1] = p[1] * 255 / a;
- p[2] = t * 255 / a;
- } else {
- p[0] = p[2];
- p[2] = t;
- }
- p += 4;
- }
- } else {
- // convert bgr to rgb
- for (i=0; i < pixel_count; ++i) {
+STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert)
+{
+ stbi__de_iphone_flag_local = flag_true_if_should_convert;
+ stbi__de_iphone_flag_set = 1;
+}
+
+#define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \
+ ? stbi__unpremultiply_on_load_local \
+ : stbi__unpremultiply_on_load_global)
+#define stbi__de_iphone_flag (stbi__de_iphone_flag_set \
+ ? stbi__de_iphone_flag_local \
+ : stbi__de_iphone_flag_global)
+#endif // STBI_THREAD_LOCAL
+
+static void stbi__de_iphone(stbi__png* z)
+{
+ stbi__context* s = z->s;
+ stbi__uint32 i, pixel_count = s->img_x * s->img_y;
+ stbi_uc* p = z->out;
+
+ if (s->img_out_n == 3) { // convert bgr to rgb
+ for (i = 0; i < pixel_count; ++i) {
stbi_uc t = p[0];
p[0] = p[2];
p[2] = t;
- p += 4;
- }
- }
- }
+ p += 3;
+ }
+ }
+ else {
+ STBI_ASSERT(s->img_out_n == 4);
+ if (stbi__unpremultiply_on_load) {
+ // convert bgr to rgb and unpremultiply
+ for (i = 0; i < pixel_count; ++i) {
+ stbi_uc a = p[3];
+ stbi_uc t = p[0];
+ if (a) {
+ stbi_uc half = a / 2;
+ p[0] = (p[2] * 255 + half) / a;
+ p[1] = (p[1] * 255 + half) / a;
+ p[2] = (t * 255 + half) / a;
+ }
+ else {
+ p[0] = p[2];
+ p[2] = t;
+ }
+ p += 4;
+ }
+ }
+ else {
+ // convert bgr to rgb
+ for (i = 0; i < pixel_count; ++i) {
+ stbi_uc t = p[0];
+ p[0] = p[2];
+ p[2] = t;
+ p += 4;
+ }
+ }
+ }
}
-#define STBI__PNG_TYPE(a,b,c,d) (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
+#define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
-static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
+static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp)
{
- stbi_uc palette[1024], pal_img_n=0;
- stbi_uc has_trans=0, tc[3];
- stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
- int first=1,k,interlace=0, color=0, depth=0, is_iphone=0;
- stbi__context *s = z->s;
+ stbi_uc palette[1024], pal_img_n = 0;
+ stbi_uc has_trans = 0, tc[3] = { 0 };
+ stbi__uint16 tc16[3];
+ stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0;
+ int first = 1, k, interlace = 0, color = 0, is_iphone = 0;
+ stbi__context* s = z->s;
- z->expanded = NULL;
- z->idata = NULL;
- z->out = NULL;
+ z->expanded = NULL;
+ z->idata = NULL;
+ z->out = NULL;
- if (!stbi__check_png_header(s)) return 0;
+ if (!stbi__check_png_header(s)) return 0;
- if (scan == STBI__SCAN_type) return 1;
+ if (scan == STBI__SCAN_type) return 1;
- for (;;) {
- stbi__pngchunk c = stbi__get_chunk_header(s);
- switch (c.type) {
- case STBI__PNG_TYPE('C','g','B','I'):
+ for (;;) {
+ stbi__pngchunk c = stbi__get_chunk_header(s);
+ switch (c.type) {
+ case STBI__PNG_TYPE('C', 'g', 'B', 'I'):
is_iphone = 1;
stbi__skip(s, c.length);
break;
- case STBI__PNG_TYPE('I','H','D','R'): {
- int comp,filter;
- if (!first) return stbi__err("multiple IHDR","Corrupt PNG");
+ case STBI__PNG_TYPE('I', 'H', 'D', 'R'): {
+ int comp, filter;
+ if (!first) return stbi__err("multiple IHDR", "Corrupt PNG");
first = 0;
- if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG");
- s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
- s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
- depth = stbi__get8(s); if (depth != 1 && depth != 2 && depth != 4 && depth != 8) return stbi__err("1/2/4/8-bit only","PNG not supported: 1/2/4/8-bit only");
- color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG");
- if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG");
- comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG");
- filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG");
- interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG");
- if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG");
+ if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG");
+ s->img_x = stbi__get32be(s);
+ s->img_y = stbi__get32be(s);
+ if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
+ if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
+ z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only");
+ color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG");
+ if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG");
+ if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG");
+ comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG");
+ filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG");
+ interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG");
+ if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG");
if (!pal_img_n) {
- s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
- if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
- if (scan == STBI__SCAN_header) return 1;
- } else {
- // if paletted, then pal_n is our final components, and
- // img_n is # components to decompress/filter.
- s->img_n = 1;
- if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG");
- // if SCAN_header, have to scan to see if we have a tRNS
+ s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
+ if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
}
+ else {
+ // if paletted, then pal_n is our final components, and
+ // img_n is # components to decompress/filter.
+ s->img_n = 1;
+ if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG");
+ }
+ // even with SCAN_header, have to scan to see if we have a tRNS
break;
- }
+ }
- case STBI__PNG_TYPE('P','L','T','E'): {
+ case STBI__PNG_TYPE('P', 'L', 'T', 'E'): {
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
- if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG");
+ if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG");
pal_len = c.length / 3;
- if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG");
- for (i=0; i < pal_len; ++i) {
- palette[i*4+0] = stbi__get8(s);
- palette[i*4+1] = stbi__get8(s);
- palette[i*4+2] = stbi__get8(s);
- palette[i*4+3] = 255;
+ if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG");
+ for (i = 0; i < pal_len; ++i) {
+ palette[i * 4 + 0] = stbi__get8(s);
+ palette[i * 4 + 1] = stbi__get8(s);
+ palette[i * 4 + 2] = stbi__get8(s);
+ palette[i * 4 + 3] = 255;
}
break;
- }
+ }
- case STBI__PNG_TYPE('t','R','N','S'): {
+ case STBI__PNG_TYPE('t', 'R', 'N', 'S'): {
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
- if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG");
+ if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG");
if (pal_img_n) {
- if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; }
- if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG");
- if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG");
- pal_img_n = 4;
- for (i=0; i < c.length; ++i)
- palette[i*4+3] = stbi__get8(s);
- } else {
- if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG");
- if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG");
- has_trans = 1;
- for (k=0; k < s->img_n; ++k)
- tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger
+ if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; }
+ if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG");
+ if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG");
+ pal_img_n = 4;
+ for (i = 0; i < c.length; ++i)
+ palette[i * 4 + 3] = stbi__get8(s);
+ }
+ else {
+ if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG");
+ if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG");
+ has_trans = 1;
+ // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now.
+ if (scan == STBI__SCAN_header) { ++s->img_n; return 1; }
+ if (z->depth == 16) {
+ for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
+ }
+ else {
+ for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
+ }
}
break;
- }
+ }
- case STBI__PNG_TYPE('I','D','A','T'): {
+ case STBI__PNG_TYPE('I', 'D', 'A', 'T'): {
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
- if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG");
- if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; }
+ if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG");
+ if (scan == STBI__SCAN_header) {
+ // header scan definitely stops at first IDAT
+ if (pal_img_n)
+ s->img_n = pal_img_n;
+ return 1;
+ }
+ if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes");
if ((int)(ioff + c.length) < (int)ioff) return 0;
if (ioff + c.length > idata_limit) {
- stbi_uc *p;
- if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
- while (ioff + c.length > idata_limit)
- idata_limit *= 2;
- p = (stbi_uc *) STBI_REALLOC(z->idata, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
- z->idata = p;
+ stbi__uint32 idata_limit_old = idata_limit;
+ stbi_uc* p;
+ if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
+ while (ioff + c.length > idata_limit)
+ idata_limit *= 2;
+ STBI_NOTUSED(idata_limit_old);
+ p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
+ z->idata = p;
}
- if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG");
+ if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG");
ioff += c.length;
break;
- }
+ }
- case STBI__PNG_TYPE('I','E','N','D'): {
+ case STBI__PNG_TYPE('I', 'E', 'N', 'D'): {
stbi__uint32 raw_len, bpl;
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
if (scan != STBI__SCAN_load) return 1;
- if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG");
+ if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG");
// initial guess for decoded data size to avoid unnecessary reallocs
- bpl = (s->img_x * depth + 7) / 8; // bytes per line, per component
+ bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component
raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */;
- z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone);
+ z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone);
if (z->expanded == NULL) return 0; // zlib should set error
STBI_FREE(z->idata); z->idata = NULL;
- if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)
- s->img_out_n = s->img_n+1;
+ if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans)
+ s->img_out_n = s->img_n + 1;
else
- s->img_out_n = s->img_n;
- if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, depth, color, interlace)) return 0;
- if (has_trans)
- if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
+ s->img_out_n = s->img_n;
+ if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0;
+ if (has_trans) {
+ if (z->depth == 16) {
+ if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0;
+ }
+ else {
+ if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
+ }
+ }
if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2)
- stbi__de_iphone(z);
+ stbi__de_iphone(z);
if (pal_img_n) {
- // pal_img_n == 3 or 4
- s->img_n = pal_img_n; // record the actual colors we had
- s->img_out_n = pal_img_n;
- if (req_comp >= 3) s->img_out_n = req_comp;
- if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n))
- return 0;
+ // pal_img_n == 3 or 4
+ s->img_n = pal_img_n; // record the actual colors we had
+ s->img_out_n = pal_img_n;
+ if (req_comp >= 3) s->img_out_n = req_comp;
+ if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n))
+ return 0;
+ }
+ else if (has_trans) {
+ // non-paletted image with tRNS -> source image has (constant) alpha
+ ++s->img_n;
}
STBI_FREE(z->expanded); z->expanded = NULL;
+ // end of PNG chunk, read and skip CRC
+ stbi__get32be(s);
return 1;
- }
+ }
- default:
+ default:
// if critical, fail
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
if ((c.type & (1 << 29)) == 0) {
- #ifndef STBI_NO_FAILURE_STRINGS
- // not threadsafe
- static char invalid_chunk[] = "XXXX PNG chunk not known";
- invalid_chunk[0] = STBI__BYTECAST(c.type >> 24);
- invalid_chunk[1] = STBI__BYTECAST(c.type >> 16);
- invalid_chunk[2] = STBI__BYTECAST(c.type >> 8);
- invalid_chunk[3] = STBI__BYTECAST(c.type >> 0);
- #endif
- return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type");
+#ifndef STBI_NO_FAILURE_STRINGS
+ // not threadsafe
+ static char invalid_chunk[] = "XXXX PNG chunk not known";
+ invalid_chunk[0] = STBI__BYTECAST(c.type >> 24);
+ invalid_chunk[1] = STBI__BYTECAST(c.type >> 16);
+ invalid_chunk[2] = STBI__BYTECAST(c.type >> 8);
+ invalid_chunk[3] = STBI__BYTECAST(c.type >> 0);
+#endif
+ return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type");
}
stbi__skip(s, c.length);
break;
- }
- // end of PNG chunk, read and skip CRC
- stbi__get32be(s);
- }
+ }
+ // end of PNG chunk, read and skip CRC
+ stbi__get32be(s);
+ }
}
-static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp)
-{
- unsigned char *result=NULL;
- if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
- if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {
- result = p->out;
- p->out = NULL;
- if (req_comp && req_comp != p->s->img_out_n) {
- result = stbi__convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
- p->s->img_out_n = req_comp;
- if (result == NULL) return result;
- }
- *x = p->s->img_x;
- *y = p->s->img_y;
- if (n) *n = p->s->img_out_n;
- }
- STBI_FREE(p->out); p->out = NULL;
- STBI_FREE(p->expanded); p->expanded = NULL;
- STBI_FREE(p->idata); p->idata = NULL;
+static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri)
+{
+ void* result = NULL;
+ if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
+ if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {
+ if (p->depth <= 8)
+ ri->bits_per_channel = 8;
+ else if (p->depth == 16)
+ ri->bits_per_channel = 16;
+ else
+ return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth");
+ result = p->out;
+ p->out = NULL;
+ if (req_comp && req_comp != p->s->img_out_n) {
+ if (ri->bits_per_channel == 8)
+ result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
+ else
+ result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
+ p->s->img_out_n = req_comp;
+ if (result == NULL) return result;
+ }
+ *x = p->s->img_x;
+ *y = p->s->img_y;
+ if (n) *n = p->s->img_n;
+ }
+ STBI_FREE(p->out); p->out = NULL;
+ STBI_FREE(p->expanded); p->expanded = NULL;
+ STBI_FREE(p->idata); p->idata = NULL;
- return result;
+ return result;
}
-static unsigned char *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
{
- stbi__png p;
- p.s = s;
- return stbi__do_png(&p, x,y,comp,req_comp);
+ stbi__png p;
+ p.s = s;
+ return stbi__do_png(&p, x, y, comp, req_comp, ri);
}
-static int stbi__png_test(stbi__context *s)
+static int stbi__png_test(stbi__context* s)
{
- int r;
- r = stbi__check_png_header(s);
- stbi__rewind(s);
- return r;
+ int r;
+ r = stbi__check_png_header(s);
+ stbi__rewind(s);
+ return r;
}
-static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)
+static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp)
{
- if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
- stbi__rewind( p->s );
- return 0;
- }
- if (x) *x = p->s->img_x;
- if (y) *y = p->s->img_y;
- if (comp) *comp = p->s->img_n;
- return 1;
+ if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
+ stbi__rewind(p->s);
+ return 0;
+ }
+ if (x) *x = p->s->img_x;
+ if (y) *y = p->s->img_y;
+ if (comp) *comp = p->s->img_n;
+ return 1;
}
-static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp)
{
- stbi__png p;
- p.s = s;
- return stbi__png_info_raw(&p, x, y, comp);
+ stbi__png p;
+ p.s = s;
+ return stbi__png_info_raw(&p, x, y, comp);
+}
+
+static int stbi__png_is16(stbi__context* s)
+{
+ stbi__png p;
+ p.s = s;
+ if (!stbi__png_info_raw(&p, NULL, NULL, NULL))
+ return 0;
+ if (p.depth != 16) {
+ stbi__rewind(p.s);
+ return 0;
+ }
+ return 1;
}
#endif
// Microsoft/Windows BMP image
#ifndef STBI_NO_BMP
-static int stbi__bmp_test_raw(stbi__context *s)
+static int stbi__bmp_test_raw(stbi__context* s)
{
- int r;
- int sz;
- if (stbi__get8(s) != 'B') return 0;
- if (stbi__get8(s) != 'M') return 0;
- stbi__get32le(s); // discard filesize
- stbi__get16le(s); // discard reserved
- stbi__get16le(s); // discard reserved
- stbi__get32le(s); // discard data offset
- sz = stbi__get32le(s);
- r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
- return r;
+ int r;
+ int sz;
+ if (stbi__get8(s) != 'B') return 0;
+ if (stbi__get8(s) != 'M') return 0;
+ stbi__get32le(s); // discard filesize
+ stbi__get16le(s); // discard reserved
+ stbi__get16le(s); // discard reserved
+ stbi__get32le(s); // discard data offset
+ sz = stbi__get32le(s);
+ r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
+ return r;
}
-static int stbi__bmp_test(stbi__context *s)
+static int stbi__bmp_test(stbi__context* s)
{
- int r = stbi__bmp_test_raw(s);
- stbi__rewind(s);
- return r;
+ int r = stbi__bmp_test_raw(s);
+ stbi__rewind(s);
+ return r;
}
// returns 0..31 for the highest set bit
static int stbi__high_bit(unsigned int z)
{
- int n=0;
- if (z == 0) return -1;
- if (z >= 0x10000) n += 16, z >>= 16;
- if (z >= 0x00100) n += 8, z >>= 8;
- if (z >= 0x00010) n += 4, z >>= 4;
- if (z >= 0x00004) n += 2, z >>= 2;
- if (z >= 0x00002) n += 1, z >>= 1;
- return n;
+ int n = 0;
+ if (z == 0) return -1;
+ if (z >= 0x10000) { n += 16; z >>= 16; }
+ if (z >= 0x00100) { n += 8; z >>= 8; }
+ if (z >= 0x00010) { n += 4; z >>= 4; }
+ if (z >= 0x00004) { n += 2; z >>= 2; }
+ if (z >= 0x00002) { n += 1;/* >>= 1;*/ }
+ return n;
}
static int stbi__bitcount(unsigned int a)
{
- a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2
- a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4
- a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
- a = (a + (a >> 8)); // max 16 per 8 bits
- a = (a + (a >> 16)); // max 32 per 8 bits
- return a & 0xff;
+ a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2
+ a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4
+ a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
+ a = (a + (a >> 8)); // max 16 per 8 bits
+ a = (a + (a >> 16)); // max 32 per 8 bits
+ return a & 0xff;
+}
+
+// extract an arbitrarily-aligned N-bit value (N=bits)
+// from v, and then make it 8-bits long and fractionally
+// extend it to full full range.
+static int stbi__shiftsigned(unsigned int v, int shift, int bits)
+{
+ static unsigned int mul_table[9] = {
+ 0,
+ 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/,
+ 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/,
+ };
+ static unsigned int shift_table[9] = {
+ 0, 0,0,1,0,2,4,6,0,
+ };
+ if (shift < 0)
+ v <<= -shift;
+ else
+ v >>= shift;
+ STBI_ASSERT(v < 256);
+ v >>= (8 - bits);
+ STBI_ASSERT(bits >= 0 && bits <= 8);
+ return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits];
}
-static int stbi__shiftsigned(int v, int shift, int bits)
+typedef struct
{
- int result;
- int z=0;
+ int bpp, offset, hsz;
+ unsigned int mr, mg, mb, ma, all_a;
+ int extra_read;
+} stbi__bmp_data;
+
+static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress)
+{
+ // BI_BITFIELDS specifies masks explicitly, don't override
+ if (compress == 3)
+ return 1;
+
+ if (compress == 0) {
+ if (info->bpp == 16) {
+ info->mr = 31u << 10;
+ info->mg = 31u << 5;
+ info->mb = 31u << 0;
+ }
+ else if (info->bpp == 32) {
+ info->mr = 0xffu << 16;
+ info->mg = 0xffu << 8;
+ info->mb = 0xffu << 0;
+ info->ma = 0xffu << 24;
+ info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0
+ }
+ else {
+ // otherwise, use defaults, which is all-0
+ info->mr = info->mg = info->mb = info->ma = 0;
+ }
+ return 1;
+ }
+ return 0; // error
+}
- if (shift < 0) v <<= -shift;
- else v >>= shift;
- result = v;
+static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info)
+{
+ int hsz;
+ if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
+ stbi__get32le(s); // discard filesize
+ stbi__get16le(s); // discard reserved
+ stbi__get16le(s); // discard reserved
+ info->offset = stbi__get32le(s);
+ info->hsz = hsz = stbi__get32le(s);
+ info->mr = info->mg = info->mb = info->ma = 0;
+ info->extra_read = 14;
- z = bits;
- while (z < 8) {
- result += v >> z;
- z += bits;
- }
- return result;
-}
-
-static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- stbi_uc *out;
- unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
- stbi_uc pal[256][4];
- int psize=0,i,j,compress=0,width;
- int bpp, flip_vertically, pad, target, offset, hsz;
- if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
- stbi__get32le(s); // discard filesize
- stbi__get16le(s); // discard reserved
- stbi__get16le(s); // discard reserved
- offset = stbi__get32le(s);
- hsz = stbi__get32le(s);
- if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
- if (hsz == 12) {
- s->img_x = stbi__get16le(s);
- s->img_y = stbi__get16le(s);
- } else {
- s->img_x = stbi__get32le(s);
- s->img_y = stbi__get32le(s);
- }
- if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
- bpp = stbi__get16le(s);
- if (bpp == 1) return stbi__errpuc("monochrome", "BMP type not supported: 1-bit");
- flip_vertically = ((int) s->img_y) > 0;
- s->img_y = abs((int) s->img_y);
- if (hsz == 12) {
- if (bpp < 24)
- psize = (offset - 14 - 24) / 3;
- } else {
- compress = stbi__get32le(s);
- if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
- stbi__get32le(s); // discard sizeof
- stbi__get32le(s); // discard hres
- stbi__get32le(s); // discard vres
- stbi__get32le(s); // discard colorsused
- stbi__get32le(s); // discard max important
- if (hsz == 40 || hsz == 56) {
- if (hsz == 56) {
- stbi__get32le(s);
- stbi__get32le(s);
- stbi__get32le(s);
- stbi__get32le(s);
- }
- if (bpp == 16 || bpp == 32) {
- mr = mg = mb = 0;
- if (compress == 0) {
- if (bpp == 32) {
- mr = 0xffu << 16;
- mg = 0xffu << 8;
- mb = 0xffu << 0;
- ma = 0xffu << 24;
- fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
- STBI_NOTUSED(fake_a);
- } else {
- mr = 31u << 10;
- mg = 31u << 5;
- mb = 31u << 0;
- }
- } else if (compress == 3) {
- mr = stbi__get32le(s);
- mg = stbi__get32le(s);
- mb = stbi__get32le(s);
- // not documented, but generated by photoshop and handled by mspaint
- if (mr == mg && mg == mb) {
- // ?!?!?
- return stbi__errpuc("bad BMP", "bad BMP");
- }
- } else
- return stbi__errpuc("bad BMP", "bad BMP");
- }
- } else {
- STBI_ASSERT(hsz == 108 || hsz == 124);
- mr = stbi__get32le(s);
- mg = stbi__get32le(s);
- mb = stbi__get32le(s);
- ma = stbi__get32le(s);
- stbi__get32le(s); // discard color space
- for (i=0; i < 12; ++i)
- stbi__get32le(s); // discard color space parameters
- if (hsz == 124) {
- stbi__get32le(s); // discard rendering intent
- stbi__get32le(s); // discard offset of profile data
- stbi__get32le(s); // discard size of profile data
- stbi__get32le(s); // discard reserved
- }
- }
- if (bpp < 16)
- psize = (offset - 14 - hsz) >> 2;
- }
- s->img_n = ma ? 4 : 3;
- if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
- target = req_comp;
- else
- target = s->img_n; // if they want monochrome, we'll post-convert
- out = (stbi_uc *) stbi__malloc(target * s->img_x * s->img_y);
- if (!out) return stbi__errpuc("outofmem", "Out of memory");
- if (bpp < 16) {
- int z=0;
- if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); }
- for (i=0; i < psize; ++i) {
- pal[i][2] = stbi__get8(s);
- pal[i][1] = stbi__get8(s);
- pal[i][0] = stbi__get8(s);
- if (hsz != 12) stbi__get8(s);
- pal[i][3] = 255;
- }
- stbi__skip(s, offset - 14 - hsz - psize * (hsz == 12 ? 3 : 4));
- if (bpp == 4) width = (s->img_x + 1) >> 1;
- else if (bpp == 8) width = s->img_x;
- else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); }
- pad = (-width)&3;
- for (j=0; j < (int) s->img_y; ++j) {
- for (i=0; i < (int) s->img_x; i += 2) {
- int v=stbi__get8(s),v2=0;
- if (bpp == 4) {
- v2 = v & 15;
- v >>= 4;
+ if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
+
+ if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
+ if (hsz == 12) {
+ s->img_x = stbi__get16le(s);
+ s->img_y = stbi__get16le(s);
+ }
+ else {
+ s->img_x = stbi__get32le(s);
+ s->img_y = stbi__get32le(s);
+ }
+ if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
+ info->bpp = stbi__get16le(s);
+ if (hsz != 12) {
+ int compress = stbi__get32le(s);
+ if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
+ if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes
+ if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
+ stbi__get32le(s); // discard sizeof
+ stbi__get32le(s); // discard hres
+ stbi__get32le(s); // discard vres
+ stbi__get32le(s); // discard colorsused
+ stbi__get32le(s); // discard max important
+ if (hsz == 40 || hsz == 56) {
+ if (hsz == 56) {
+ stbi__get32le(s);
+ stbi__get32le(s);
+ stbi__get32le(s);
+ stbi__get32le(s);
}
- out[z++] = pal[v][0];
- out[z++] = pal[v][1];
- out[z++] = pal[v][2];
- if (target == 4) out[z++] = 255;
- if (i+1 == (int) s->img_x) break;
- v = (bpp == 8) ? stbi__get8(s) : v2;
- out[z++] = pal[v][0];
- out[z++] = pal[v][1];
- out[z++] = pal[v][2];
- if (target == 4) out[z++] = 255;
- }
- stbi__skip(s, pad);
- }
- } else {
- int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;
- int z = 0;
- int easy=0;
- stbi__skip(s, offset - 14 - hsz);
- if (bpp == 24) width = 3 * s->img_x;
- else if (bpp == 16) width = 2*s->img_x;
- else /* bpp = 32 and pad = 0 */ width=0;
- pad = (-width) & 3;
- if (bpp == 24) {
- easy = 1;
- } else if (bpp == 32) {
- if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
- easy = 2;
- }
- if (!easy) {
- if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
- // right shift amt to put high bit in position #7
- rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr);
- gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg);
- bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb);
- ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma);
- }
- for (j=0; j < (int) s->img_y; ++j) {
- if (easy) {
- for (i=0; i < (int) s->img_x; ++i) {
- unsigned char a;
- out[z+2] = stbi__get8(s);
- out[z+1] = stbi__get8(s);
- out[z+0] = stbi__get8(s);
- z += 3;
- a = (easy == 2 ? stbi__get8(s) : 255);
- if (target == 4) out[z++] = a;
+ if (info->bpp == 16 || info->bpp == 32) {
+ if (compress == 0) {
+ stbi__bmp_set_mask_defaults(info, compress);
+ }
+ else if (compress == 3) {
+ info->mr = stbi__get32le(s);
+ info->mg = stbi__get32le(s);
+ info->mb = stbi__get32le(s);
+ info->extra_read += 12;
+ // not documented, but generated by photoshop and handled by mspaint
+ if (info->mr == info->mg && info->mg == info->mb) {
+ // ?!?!?
+ return stbi__errpuc("bad BMP", "bad BMP");
+ }
+ }
+ else
+ return stbi__errpuc("bad BMP", "bad BMP");
}
- } else {
- for (i=0; i < (int) s->img_x; ++i) {
- stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s));
- int a;
- out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount));
- out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount));
- out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount));
- a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255);
- if (target == 4) out[z++] = STBI__BYTECAST(a);
+ }
+ else {
+ // V4/V5 header
+ int i;
+ if (hsz != 108 && hsz != 124)
+ return stbi__errpuc("bad BMP", "bad BMP");
+ info->mr = stbi__get32le(s);
+ info->mg = stbi__get32le(s);
+ info->mb = stbi__get32le(s);
+ info->ma = stbi__get32le(s);
+ if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs
+ stbi__bmp_set_mask_defaults(info, compress);
+ stbi__get32le(s); // discard color space
+ for (i = 0; i < 12; ++i)
+ stbi__get32le(s); // discard color space parameters
+ if (hsz == 124) {
+ stbi__get32le(s); // discard rendering intent
+ stbi__get32le(s); // discard offset of profile data
+ stbi__get32le(s); // discard size of profile data
+ stbi__get32le(s); // discard reserved
}
- }
- stbi__skip(s, pad);
- }
- }
- if (flip_vertically) {
- stbi_uc t;
- for (j=0; j < (int) s->img_y>>1; ++j) {
- stbi_uc *p1 = out + j *s->img_x*target;
- stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
- for (i=0; i < (int) s->img_x*target; ++i) {
- t = p1[i], p1[i] = p2[i], p2[i] = t;
- }
- }
- }
+ }
+ }
+ return (void*)1;
+}
- if (req_comp && req_comp != target) {
- out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y);
- if (out == NULL) return out; // stbi__convert_format frees input on failure
- }
- *x = s->img_x;
- *y = s->img_y;
- if (comp) *comp = s->img_n;
- return out;
+static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
+{
+ stbi_uc* out;
+ unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a;
+ stbi_uc pal[256][4];
+ int psize = 0, i, j, width;
+ int flip_vertically, pad, target;
+ stbi__bmp_data info;
+ STBI_NOTUSED(ri);
+
+ info.all_a = 255;
+ if (stbi__bmp_parse_header(s, &info) == NULL)
+ return NULL; // error code already set
+
+ flip_vertically = ((int)s->img_y) > 0;
+ s->img_y = abs((int)s->img_y);
+
+ if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+ if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+
+ mr = info.mr;
+ mg = info.mg;
+ mb = info.mb;
+ ma = info.ma;
+ all_a = info.all_a;
+
+ if (info.hsz == 12) {
+ if (info.bpp < 24)
+ psize = (info.offset - info.extra_read - 24) / 3;
+ }
+ else {
+ if (info.bpp < 16)
+ psize = (info.offset - info.extra_read - info.hsz) >> 2;
+ }
+ if (psize == 0) {
+ // accept some number of extra bytes after the header, but if the offset points either to before
+ // the header ends or implies a large amount of extra data, reject the file as malformed
+ int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original);
+ int header_limit = 1024; // max we actually read is below 256 bytes currently.
+ int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size.
+ if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) {
+ return stbi__errpuc("bad header", "Corrupt BMP");
+ }
+ // we established that bytes_read_so_far is positive and sensible.
+ // the first half of this test rejects offsets that are either too small positives, or
+ // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn
+ // ensures the number computed in the second half of the test can't overflow.
+ if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) {
+ return stbi__errpuc("bad offset", "Corrupt BMP");
+ }
+ else {
+ stbi__skip(s, info.offset - bytes_read_so_far);
+ }
+ }
+
+ if (info.bpp == 24 && ma == 0xff000000)
+ s->img_n = 3;
+ else
+ s->img_n = ma ? 4 : 3;
+ if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
+ target = req_comp;
+ else
+ target = s->img_n; // if they want monochrome, we'll post-convert
+
+ // sanity-check size
+ if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0))
+ return stbi__errpuc("too large", "Corrupt BMP");
+
+ out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0);
+ if (!out) return stbi__errpuc("outofmem", "Out of memory");
+ if (info.bpp < 16) {
+ int z = 0;
+ if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); }
+ for (i = 0; i < psize; ++i) {
+ pal[i][2] = stbi__get8(s);
+ pal[i][1] = stbi__get8(s);
+ pal[i][0] = stbi__get8(s);
+ if (info.hsz != 12) stbi__get8(s);
+ pal[i][3] = 255;
+ }
+ stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4));
+ if (info.bpp == 1) width = (s->img_x + 7) >> 3;
+ else if (info.bpp == 4) width = (s->img_x + 1) >> 1;
+ else if (info.bpp == 8) width = s->img_x;
+ else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); }
+ pad = (-width) & 3;
+ if (info.bpp == 1) {
+ for (j = 0; j < (int)s->img_y; ++j) {
+ int bit_offset = 7, v = stbi__get8(s);
+ for (i = 0; i < (int)s->img_x; ++i) {
+ int color = (v >> bit_offset) & 0x1;
+ out[z++] = pal[color][0];
+ out[z++] = pal[color][1];
+ out[z++] = pal[color][2];
+ if (target == 4) out[z++] = 255;
+ if (i + 1 == (int)s->img_x) break;
+ if ((--bit_offset) < 0) {
+ bit_offset = 7;
+ v = stbi__get8(s);
+ }
+ }
+ stbi__skip(s, pad);
+ }
+ }
+ else {
+ for (j = 0; j < (int)s->img_y; ++j) {
+ for (i = 0; i < (int)s->img_x; i += 2) {
+ int v = stbi__get8(s), v2 = 0;
+ if (info.bpp == 4) {
+ v2 = v & 15;
+ v >>= 4;
+ }
+ out[z++] = pal[v][0];
+ out[z++] = pal[v][1];
+ out[z++] = pal[v][2];
+ if (target == 4) out[z++] = 255;
+ if (i + 1 == (int)s->img_x) break;
+ v = (info.bpp == 8) ? stbi__get8(s) : v2;
+ out[z++] = pal[v][0];
+ out[z++] = pal[v][1];
+ out[z++] = pal[v][2];
+ if (target == 4) out[z++] = 255;
+ }
+ stbi__skip(s, pad);
+ }
+ }
+ }
+ else {
+ int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0;
+ int z = 0;
+ int easy = 0;
+ stbi__skip(s, info.offset - info.extra_read - info.hsz);
+ if (info.bpp == 24) width = 3 * s->img_x;
+ else if (info.bpp == 16) width = 2 * s->img_x;
+ else /* bpp = 32 and pad = 0 */ width = 0;
+ pad = (-width) & 3;
+ if (info.bpp == 24) {
+ easy = 1;
+ }
+ else if (info.bpp == 32) {
+ if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
+ easy = 2;
+ }
+ if (!easy) {
+ if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
+ // right shift amt to put high bit in position #7
+ rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr);
+ gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg);
+ bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb);
+ ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma);
+ if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
+ }
+ for (j = 0; j < (int)s->img_y; ++j) {
+ if (easy) {
+ for (i = 0; i < (int)s->img_x; ++i) {
+ unsigned char a;
+ out[z + 2] = stbi__get8(s);
+ out[z + 1] = stbi__get8(s);
+ out[z + 0] = stbi__get8(s);
+ z += 3;
+ a = (easy == 2 ? stbi__get8(s) : 255);
+ all_a |= a;
+ if (target == 4) out[z++] = a;
+ }
+ }
+ else {
+ int bpp = info.bpp;
+ for (i = 0; i < (int)s->img_x; ++i) {
+ stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s));
+ unsigned int a;
+ out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount));
+ out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount));
+ out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount));
+ a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255);
+ all_a |= a;
+ if (target == 4) out[z++] = STBI__BYTECAST(a);
+ }
+ }
+ stbi__skip(s, pad);
+ }
+ }
+
+ // if alpha channel is all 0s, replace with all 255s
+ if (target == 4 && all_a == 0)
+ for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4)
+ out[i] = 255;
+
+ if (flip_vertically) {
+ stbi_uc t;
+ for (j = 0; j < (int)s->img_y >> 1; ++j) {
+ stbi_uc* p1 = out + j * s->img_x * target;
+ stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target;
+ for (i = 0; i < (int)s->img_x * target; ++i) {
+ t = p1[i]; p1[i] = p2[i]; p2[i] = t;
+ }
+ }
+ }
+
+ if (req_comp && req_comp != target) {
+ out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y);
+ if (out == NULL) return out; // stbi__convert_format frees input on failure
+ }
+
+ *x = s->img_x;
+ *y = s->img_y;
+ if (comp) *comp = s->img_n;
+ return out;
}
#endif
// Targa Truevision - TGA
// by Jonathan Dummer
#ifndef STBI_NO_TGA
-static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
+// returns STBI_rgb or whatever, 0 on error
+static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
+{
+ // only RGB or RGBA (incl. 16bit) or grey allowed
+ if (is_rgb16) *is_rgb16 = 0;
+ switch (bits_per_pixel) {
+ case 8: return STBI_grey;
+ case 16: if (is_grey) return STBI_grey_alpha;
+ // fallthrough
+ case 15: if (is_rgb16) *is_rgb16 = 1;
+ return STBI_rgb;
+ case 24: // fallthrough
+ case 32: return bits_per_pixel / 8;
+ default: return 0;
+ }
+}
+
+static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp)
{
- int tga_w, tga_h, tga_comp;
- int sz;
+ int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp;
+ int sz, tga_colormap_type;
stbi__get8(s); // discard Offset
- sz = stbi__get8(s); // color type
- if( sz > 1 ) {
+ tga_colormap_type = stbi__get8(s); // colormap type
+ if (tga_colormap_type > 1) {
stbi__rewind(s);
return 0; // only RGB or indexed allowed
}
- sz = stbi__get8(s); // image type
- // only RGB or grey allowed, +/- RLE
- if ((sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11)) return 0;
- stbi__skip(s,9);
+ tga_image_type = stbi__get8(s); // image type
+ if (tga_colormap_type == 1) { // colormapped (paletted) image
+ if (tga_image_type != 1 && tga_image_type != 9) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s, 4); // skip index of first colormap entry and number of entries
+ sz = stbi__get8(s); // check bits per palette color entry
+ if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s, 4); // skip image x and y origin
+ tga_colormap_bpp = sz;
+ }
+ else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE
+ if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) {
+ stbi__rewind(s);
+ return 0; // only RGB or grey allowed, +/- RLE
+ }
+ stbi__skip(s, 9); // skip colormap specification and image x/y origin
+ tga_colormap_bpp = 0;
+ }
tga_w = stbi__get16le(s);
- if( tga_w < 1 ) {
+ if (tga_w < 1) {
stbi__rewind(s);
return 0; // test width
}
tga_h = stbi__get16le(s);
- if( tga_h < 1 ) {
+ if (tga_h < 1) {
stbi__rewind(s);
return 0; // test height
}
- sz = stbi__get8(s); // bits per pixel
- // only RGB or RGBA or grey allowed
- if ((sz != 8) && (sz != 16) && (sz != 24) && (sz != 32)) {
+ tga_bits_per_pixel = stbi__get8(s); // bits per pixel
+ stbi__get8(s); // ignore alpha bits
+ if (tga_colormap_bpp != 0) {
+ if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) {
+ // when using a colormap, tga_bits_per_pixel is the size of the indexes
+ // I don't think anything but 8 or 16bit indexes makes sense
+ stbi__rewind(s);
+ return 0;
+ }
+ tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL);
+ }
+ else {
+ tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL);
+ }
+ if (!tga_comp) {
stbi__rewind(s);
return 0;
}
- tga_comp = sz;
if (x) *x = tga_w;
if (y) *y = tga_h;
- if (comp) *comp = tga_comp / 8;
+ if (comp) *comp = tga_comp;
return 1; // seems to have passed everything
}
-static int stbi__tga_test(stbi__context *s)
-{
- int res;
- int sz;
- stbi__get8(s); // discard Offset
- sz = stbi__get8(s); // color type
- if ( sz > 1 ) return 0; // only RGB or indexed allowed
- sz = stbi__get8(s); // image type
- if ( (sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11) ) return 0; // only RGB or grey allowed, +/- RLE
- stbi__get16be(s); // discard palette start
- stbi__get16be(s); // discard palette length
- stbi__get8(s); // discard bits per palette color entry
- stbi__get16be(s); // discard x origin
- stbi__get16be(s); // discard y origin
- if ( stbi__get16be(s) < 1 ) return 0; // test width
- if ( stbi__get16be(s) < 1 ) return 0; // test height
- sz = stbi__get8(s); // bits per pixel
- if ( (sz != 8) && (sz != 16) && (sz != 24) && (sz != 32) )
- res = 0;
- else
- res = 1;
- stbi__rewind(s);
- return res;
-}
-
-static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- // read in the TGA header stuff
- int tga_offset = stbi__get8(s);
- int tga_indexed = stbi__get8(s);
- int tga_image_type = stbi__get8(s);
- int tga_is_RLE = 0;
- int tga_palette_start = stbi__get16le(s);
- int tga_palette_len = stbi__get16le(s);
- int tga_palette_bits = stbi__get8(s);
- int tga_x_origin = stbi__get16le(s);
- int tga_y_origin = stbi__get16le(s);
- int tga_width = stbi__get16le(s);
- int tga_height = stbi__get16le(s);
- int tga_bits_per_pixel = stbi__get8(s);
- int tga_comp = tga_bits_per_pixel / 8;
- int tga_inverted = stbi__get8(s);
- // image data
- unsigned char *tga_data;
- unsigned char *tga_palette = NULL;
- int i, j;
- unsigned char raw_data[4];
- int RLE_count = 0;
- int RLE_repeating = 0;
- int read_next_pixel = 1;
-
- // do a tiny bit of precessing
- if ( tga_image_type >= 8 )
- {
- tga_image_type -= 8;
- tga_is_RLE = 1;
- }
- /* int tga_alpha_bits = tga_inverted & 15; */
- tga_inverted = 1 - ((tga_inverted >> 5) & 1);
-
- // error check
- if ( //(tga_indexed) ||
- (tga_width < 1) || (tga_height < 1) ||
- (tga_image_type < 1) || (tga_image_type > 3) ||
- ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16) &&
- (tga_bits_per_pixel != 24) && (tga_bits_per_pixel != 32))
- )
- {
- return NULL; // we don't report this as a bad TGA because we don't even know if it's TGA
- }
+static int stbi__tga_test(stbi__context* s)
+{
+ int res = 0;
+ int sz, tga_color_type;
+ stbi__get8(s); // discard Offset
+ tga_color_type = stbi__get8(s); // color type
+ if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed
+ sz = stbi__get8(s); // image type
+ if (tga_color_type == 1) { // colormapped (paletted) image
+ if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9
+ stbi__skip(s, 4); // skip index of first colormap entry and number of entries
+ sz = stbi__get8(s); // check bits per palette color entry
+ if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd;
+ stbi__skip(s, 4); // skip image x and y origin
+ }
+ else { // "normal" image w/o colormap
+ if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE
+ stbi__skip(s, 9); // skip colormap specification and image x/y origin
+ }
+ if (stbi__get16le(s) < 1) goto errorEnd; // test width
+ if (stbi__get16le(s) < 1) goto errorEnd; // test height
+ sz = stbi__get8(s); // bits per pixel
+ if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index
+ if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd;
+
+ res = 1; // if we got this far, everything's good and we can return 1 instead of 0
+
+errorEnd:
+ stbi__rewind(s);
+ return res;
+}
+
+// read 16bit value and convert to 24bit RGB
+static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out)
+{
+ stbi__uint16 px = (stbi__uint16)stbi__get16le(s);
+ stbi__uint16 fiveBitMask = 31;
+ // we have 3 channels with 5bits each
+ int r = (px >> 10) & fiveBitMask;
+ int g = (px >> 5) & fiveBitMask;
+ int b = px & fiveBitMask;
+ // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later
+ out[0] = (stbi_uc)((r * 255) / 31);
+ out[1] = (stbi_uc)((g * 255) / 31);
+ out[2] = (stbi_uc)((b * 255) / 31);
+
+ // some people claim that the most significant bit might be used for alpha
+ // (possibly if an alpha-bit is set in the "image descriptor byte")
+ // but that only made 16bit test images completely translucent..
+ // so let's treat all 15 and 16bit TGAs as RGB with no alpha.
+}
+
+static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
+{
+ // read in the TGA header stuff
+ int tga_offset = stbi__get8(s);
+ int tga_indexed = stbi__get8(s);
+ int tga_image_type = stbi__get8(s);
+ int tga_is_RLE = 0;
+ int tga_palette_start = stbi__get16le(s);
+ int tga_palette_len = stbi__get16le(s);
+ int tga_palette_bits = stbi__get8(s);
+ int tga_x_origin = stbi__get16le(s);
+ int tga_y_origin = stbi__get16le(s);
+ int tga_width = stbi__get16le(s);
+ int tga_height = stbi__get16le(s);
+ int tga_bits_per_pixel = stbi__get8(s);
+ int tga_comp, tga_rgb16 = 0;
+ int tga_inverted = stbi__get8(s);
+ // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?)
+ // image data
+ unsigned char* tga_data;
+ unsigned char* tga_palette = NULL;
+ int i, j;
+ unsigned char raw_data[4] = { 0 };
+ int RLE_count = 0;
+ int RLE_repeating = 0;
+ int read_next_pixel = 1;
+ STBI_NOTUSED(ri);
+ STBI_NOTUSED(tga_x_origin); // @TODO
+ STBI_NOTUSED(tga_y_origin); // @TODO
+
+ if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+ if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+
+ // do a tiny bit of precessing
+ if (tga_image_type >= 8)
+ {
+ tga_image_type -= 8;
+ tga_is_RLE = 1;
+ }
+ tga_inverted = 1 - ((tga_inverted >> 5) & 1);
- // If I'm paletted, then I'll use the number of bits from the palette
- if ( tga_indexed )
- {
- tga_comp = tga_palette_bits / 8;
- }
+ // If I'm paletted, then I'll use the number of bits from the palette
+ if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16);
+ else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16);
- // tga info
- *x = tga_width;
- *y = tga_height;
- if (comp) *comp = tga_comp;
+ if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency
+ return stbi__errpuc("bad format", "Can't find out TGA pixelformat");
- tga_data = (unsigned char*)stbi__malloc( (size_t)tga_width * tga_height * tga_comp );
- if (!tga_data) return stbi__errpuc("outofmem", "Out of memory");
+ // tga info
+ *x = tga_width;
+ *y = tga_height;
+ if (comp) *comp = tga_comp;
- // skip to the data's starting position (offset usually = 0)
- stbi__skip(s, tga_offset );
+ if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0))
+ return stbi__errpuc("too large", "Corrupt TGA");
- if ( !tga_indexed && !tga_is_RLE) {
- for (i=0; i < tga_height; ++i) {
- int y = tga_inverted ? tga_height -i - 1 : i;
- stbi_uc *tga_row = tga_data + y*tga_width*tga_comp;
- stbi__getn(s, tga_row, tga_width * tga_comp);
- }
- } else {
- // do I need to load a palette?
- if ( tga_indexed)
- {
- // any data to skip? (offset usually = 0)
- stbi__skip(s, tga_palette_start );
- // load the palette
- tga_palette = (unsigned char*)stbi__malloc( tga_palette_len * tga_palette_bits / 8 );
- if (!tga_palette) {
- STBI_FREE(tga_data);
- return stbi__errpuc("outofmem", "Out of memory");
- }
- if (!stbi__getn(s, tga_palette, tga_palette_len * tga_palette_bits / 8 )) {
- STBI_FREE(tga_data);
- STBI_FREE(tga_palette);
- return stbi__errpuc("bad palette", "Corrupt TGA");
- }
- }
- // load the data
- for (i=0; i < tga_width * tga_height; ++i)
- {
- // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk?
- if ( tga_is_RLE )
- {
- if ( RLE_count == 0 )
- {
- // yep, get the next byte as a RLE command
- int RLE_cmd = stbi__get8(s);
- RLE_count = 1 + (RLE_cmd & 127);
- RLE_repeating = RLE_cmd >> 7;
- read_next_pixel = 1;
- } else if ( !RLE_repeating )
- {
- read_next_pixel = 1;
+ tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0);
+ if (!tga_data) return stbi__errpuc("outofmem", "Out of memory");
+
+ // skip to the data's starting position (offset usually = 0)
+ stbi__skip(s, tga_offset);
+
+ if (!tga_indexed && !tga_is_RLE && !tga_rgb16) {
+ for (i = 0; i < tga_height; ++i) {
+ int row = tga_inverted ? tga_height - i - 1 : i;
+ stbi_uc* tga_row = tga_data + row * tga_width * tga_comp;
+ stbi__getn(s, tga_row, tga_width * tga_comp);
+ }
+ }
+ else {
+ // do I need to load a palette?
+ if (tga_indexed)
+ {
+ if (tga_palette_len == 0) { /* you have to have at least one entry! */
+ STBI_FREE(tga_data);
+ return stbi__errpuc("bad palette", "Corrupt TGA");
+ }
+
+ // any data to skip? (offset usually = 0)
+ stbi__skip(s, tga_palette_start);
+ // load the palette
+ tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0);
+ if (!tga_palette) {
+ STBI_FREE(tga_data);
+ return stbi__errpuc("outofmem", "Out of memory");
}
- } else
- {
- read_next_pixel = 1;
- }
- // OK, if I need to read a pixel, do it now
- if ( read_next_pixel )
- {
- // load however much data we did have
- if ( tga_indexed )
+ if (tga_rgb16) {
+ stbi_uc* pal_entry = tga_palette;
+ STBI_ASSERT(tga_comp == STBI_rgb);
+ for (i = 0; i < tga_palette_len; ++i) {
+ stbi__tga_read_rgb16(s, pal_entry);
+ pal_entry += tga_comp;
+ }
+ }
+ else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) {
+ STBI_FREE(tga_data);
+ STBI_FREE(tga_palette);
+ return stbi__errpuc("bad palette", "Corrupt TGA");
+ }
+ }
+ // load the data
+ for (i = 0; i < tga_width * tga_height; ++i)
+ {
+ // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk?
+ if (tga_is_RLE)
{
- // read in 1 byte, then perform the lookup
- int pal_idx = stbi__get8(s);
- if ( pal_idx >= tga_palette_len )
- {
- // invalid index
- pal_idx = 0;
- }
- pal_idx *= tga_bits_per_pixel / 8;
- for (j = 0; j*8 < tga_bits_per_pixel; ++j)
- {
- raw_data[j] = tga_palette[pal_idx+j];
- }
- } else
+ if (RLE_count == 0)
+ {
+ // yep, get the next byte as a RLE command
+ int RLE_cmd = stbi__get8(s);
+ RLE_count = 1 + (RLE_cmd & 127);
+ RLE_repeating = RLE_cmd >> 7;
+ read_next_pixel = 1;
+ }
+ else if (!RLE_repeating)
+ {
+ read_next_pixel = 1;
+ }
+ }
+ else
{
- // read in the data raw
- for (j = 0; j*8 < tga_bits_per_pixel; ++j)
- {
- raw_data[j] = stbi__get8(s);
- }
+ read_next_pixel = 1;
}
- // clear the reading flag for the next pixel
- read_next_pixel = 0;
- } // end of reading a pixel
-
- // copy data
- for (j = 0; j < tga_comp; ++j)
- tga_data[i*tga_comp+j] = raw_data[j];
-
- // in case we're in RLE mode, keep counting down
- --RLE_count;
- }
- // do I need to invert the image?
- if ( tga_inverted )
- {
- for (j = 0; j*2 < tga_height; ++j)
- {
- int index1 = j * tga_width * tga_comp;
- int index2 = (tga_height - 1 - j) * tga_width * tga_comp;
- for (i = tga_width * tga_comp; i > 0; --i)
+ // OK, if I need to read a pixel, do it now
+ if (read_next_pixel)
+ {
+ // load however much data we did have
+ if (tga_indexed)
+ {
+ // read in index, then perform the lookup
+ int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s);
+ if (pal_idx >= tga_palette_len) {
+ // invalid index
+ pal_idx = 0;
+ }
+ pal_idx *= tga_comp;
+ for (j = 0; j < tga_comp; ++j) {
+ raw_data[j] = tga_palette[pal_idx + j];
+ }
+ }
+ else if (tga_rgb16) {
+ STBI_ASSERT(tga_comp == STBI_rgb);
+ stbi__tga_read_rgb16(s, raw_data);
+ }
+ else {
+ // read in the data raw
+ for (j = 0; j < tga_comp; ++j) {
+ raw_data[j] = stbi__get8(s);
+ }
+ }
+ // clear the reading flag for the next pixel
+ read_next_pixel = 0;
+ } // end of reading a pixel
+
+ // copy data
+ for (j = 0; j < tga_comp; ++j)
+ tga_data[i * tga_comp + j] = raw_data[j];
+
+ // in case we're in RLE mode, keep counting down
+ --RLE_count;
+ }
+ // do I need to invert the image?
+ if (tga_inverted)
+ {
+ for (j = 0; j * 2 < tga_height; ++j)
{
- unsigned char temp = tga_data[index1];
- tga_data[index1] = tga_data[index2];
- tga_data[index2] = temp;
- ++index1;
- ++index2;
+ int index1 = j * tga_width * tga_comp;
+ int index2 = (tga_height - 1 - j) * tga_width * tga_comp;
+ for (i = tga_width * tga_comp; i > 0; --i)
+ {
+ unsigned char temp = tga_data[index1];
+ tga_data[index1] = tga_data[index2];
+ tga_data[index2] = temp;
+ ++index1;
+ ++index2;
+ }
}
- }
- }
- // clear my palette, if I had one
- if ( tga_palette != NULL )
- {
- STBI_FREE( tga_palette );
- }
- }
+ }
+ // clear my palette, if I had one
+ if (tga_palette != NULL)
+ {
+ STBI_FREE(tga_palette);
+ }
+ }
- // swap RGB
- if (tga_comp >= 3)
- {
- unsigned char* tga_pixel = tga_data;
- for (i=0; i < tga_width * tga_height; ++i)
- {
- unsigned char temp = tga_pixel[0];
- tga_pixel[0] = tga_pixel[2];
- tga_pixel[2] = temp;
- tga_pixel += tga_comp;
- }
- }
+ // swap RGB - if the source data was RGB16, it already is in the right order
+ if (tga_comp >= 3 && !tga_rgb16)
+ {
+ unsigned char* tga_pixel = tga_data;
+ for (i = 0; i < tga_width * tga_height; ++i)
+ {
+ unsigned char temp = tga_pixel[0];
+ tga_pixel[0] = tga_pixel[2];
+ tga_pixel[2] = temp;
+ tga_pixel += tga_comp;
+ }
+ }
- // convert to target component count
- if (req_comp && req_comp != tga_comp)
- tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);
+ // convert to target component count
+ if (req_comp && req_comp != tga_comp)
+ tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);
- // the things I do to get rid of an error message, and yet keep
- // Microsoft's C compilers happy... [8^(
- tga_palette_start = tga_palette_len = tga_palette_bits =
- tga_x_origin = tga_y_origin = 0;
- // OK, done
- return tga_data;
+ // the things I do to get rid of an error message, and yet keep
+ // Microsoft's C compilers happy... [8^(
+ tga_palette_start = tga_palette_len = tga_palette_bits =
+ tga_x_origin = tga_y_origin = 0;
+ STBI_NOTUSED(tga_palette_start);
+ // OK, done
+ return tga_data;
}
#endif
@@ -5043,171 +6180,260 @@ static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int
// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB
#ifndef STBI_NO_PSD
-static int stbi__psd_test(stbi__context *s)
-{
- int r = (stbi__get32be(s) == 0x38425053);
- stbi__rewind(s);
- return r;
-}
-
-static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- int pixelCount;
- int channelCount, compression;
- int channel, i, count, len;
- int w,h;
- stbi_uc *out;
-
- // Check identifier
- if (stbi__get32be(s) != 0x38425053) // "8BPS"
- return stbi__errpuc("not PSD", "Corrupt PSD image");
-
- // Check file type version.
- if (stbi__get16be(s) != 1)
- return stbi__errpuc("wrong version", "Unsupported version of PSD image");
-
- // Skip 6 reserved bytes.
- stbi__skip(s, 6 );
-
- // Read the number of channels (R, G, B, A, etc).
- channelCount = stbi__get16be(s);
- if (channelCount < 0 || channelCount > 16)
- return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image");
-
- // Read the rows and columns of the image.
- h = stbi__get32be(s);
- w = stbi__get32be(s);
-
- // Make sure the depth is 8 bits.
- if (stbi__get16be(s) != 8)
- return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 bit");
-
- // Make sure the color mode is RGB.
- // Valid options are:
- // 0: Bitmap
- // 1: Grayscale
- // 2: Indexed color
- // 3: RGB color
- // 4: CMYK color
- // 7: Multichannel
- // 8: Duotone
- // 9: Lab color
- if (stbi__get16be(s) != 3)
- return stbi__errpuc("wrong color format", "PSD is not in RGB color format");
-
- // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.)
- stbi__skip(s,stbi__get32be(s) );
-
- // Skip the image resources. (resolution, pen tool paths, etc)
- stbi__skip(s, stbi__get32be(s) );
-
- // Skip the reserved data.
- stbi__skip(s, stbi__get32be(s) );
-
- // Find out if the data is compressed.
- // Known values:
- // 0: no compression
- // 1: RLE compressed
- compression = stbi__get16be(s);
- if (compression > 1)
- return stbi__errpuc("bad compression", "PSD has an unknown compression format");
-
- // Create the destination image.
- out = (stbi_uc *) stbi__malloc(4 * w*h);
- if (!out) return stbi__errpuc("outofmem", "Out of memory");
- pixelCount = w*h;
-
- // Initialize the data to zero.
- //memset( out, 0, pixelCount * 4 );
-
- // Finally, the image data.
- if (compression) {
- // RLE as used by .PSD and .TIFF
- // Loop until you get the number of unpacked bytes you are expecting:
- // Read the next source byte into n.
- // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.
- // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.
- // Else if n is 128, noop.
- // Endloop
-
- // The RLE-compressed data is preceeded by a 2-byte data count for each row in the data,
- // which we're going to just skip.
- stbi__skip(s, h * channelCount * 2 );
-
- // Read the RLE data by channel.
- for (channel = 0; channel < 4; channel++) {
- stbi_uc *p;
-
- p = out+channel;
- if (channel >= channelCount) {
- // Fill this channel with default data.
- for (i = 0; i < pixelCount; i++, p += 4)
- *p = (channel == 3 ? 255 : 0);
- } else {
- // Read the RLE data.
- count = 0;
- while (count < pixelCount) {
- len = stbi__get8(s);
- if (len == 128) {
- // No-op.
- } else if (len < 128) {
- // Copy next len+1 bytes literally.
- len++;
- count += len;
- while (len) {
- *p = stbi__get8(s);
- p += 4;
- len--;
- }
- } else if (len > 128) {
- stbi_uc val;
- // Next -len+1 bytes in the dest are replicated from next source byte.
- // (Interpret len as a negative 8-bit int.)
- len ^= 0x0FF;
- len += 2;
- val = stbi__get8(s);
- count += len;
- while (len) {
- *p = val;
- p += 4;
- len--;
- }
- }
+static int stbi__psd_test(stbi__context* s)
+{
+ int r = (stbi__get32be(s) == 0x38425053);
+ stbi__rewind(s);
+ return r;
+}
+
+static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount)
+{
+ int count, nleft, len;
+
+ count = 0;
+ while ((nleft = pixelCount - count) > 0) {
+ len = stbi__get8(s);
+ if (len == 128) {
+ // No-op.
+ }
+ else if (len < 128) {
+ // Copy next len+1 bytes literally.
+ len++;
+ if (len > nleft) return 0; // corrupt data
+ count += len;
+ while (len) {
+ *p = stbi__get8(s);
+ p += 4;
+ len--;
}
- }
- }
+ }
+ else if (len > 128) {
+ stbi_uc val;
+ // Next -len+1 bytes in the dest are replicated from next source byte.
+ // (Interpret len as a negative 8-bit int.)
+ len = 257 - len;
+ if (len > nleft) return 0; // corrupt data
+ val = stbi__get8(s);
+ count += len;
+ while (len) {
+ *p = val;
+ p += 4;
+ len--;
+ }
+ }
+ }
- } else {
- // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...)
- // where each channel consists of an 8-bit value for each pixel in the image.
-
- // Read the data by channel.
- for (channel = 0; channel < 4; channel++) {
- stbi_uc *p;
-
- p = out + channel;
- if (channel > channelCount) {
- // Fill this channel with default data.
- for (i = 0; i < pixelCount; i++, p += 4)
- *p = channel == 3 ? 255 : 0;
- } else {
- // Read the data.
- for (i = 0; i < pixelCount; i++, p += 4)
- *p = stbi__get8(s);
- }
- }
- }
+ return 1;
+}
+
+static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc)
+{
+ int pixelCount;
+ int channelCount, compression;
+ int channel, i;
+ int bitdepth;
+ int w, h;
+ stbi_uc* out;
+ STBI_NOTUSED(ri);
+
+ // Check identifier
+ if (stbi__get32be(s) != 0x38425053) // "8BPS"
+ return stbi__errpuc("not PSD", "Corrupt PSD image");
+
+ // Check file type version.
+ if (stbi__get16be(s) != 1)
+ return stbi__errpuc("wrong version", "Unsupported version of PSD image");
+
+ // Skip 6 reserved bytes.
+ stbi__skip(s, 6);
+
+ // Read the number of channels (R, G, B, A, etc).
+ channelCount = stbi__get16be(s);
+ if (channelCount < 0 || channelCount > 16)
+ return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image");
+
+ // Read the rows and columns of the image.
+ h = stbi__get32be(s);
+ w = stbi__get32be(s);
+
+ if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+ if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+
+ // Make sure the depth is 8 bits.
+ bitdepth = stbi__get16be(s);
+ if (bitdepth != 8 && bitdepth != 16)
+ return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit");
+
+ // Make sure the color mode is RGB.
+ // Valid options are:
+ // 0: Bitmap
+ // 1: Grayscale
+ // 2: Indexed color
+ // 3: RGB color
+ // 4: CMYK color
+ // 7: Multichannel
+ // 8: Duotone
+ // 9: Lab color
+ if (stbi__get16be(s) != 3)
+ return stbi__errpuc("wrong color format", "PSD is not in RGB color format");
+
+ // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.)
+ stbi__skip(s, stbi__get32be(s));
+
+ // Skip the image resources. (resolution, pen tool paths, etc)
+ stbi__skip(s, stbi__get32be(s));
+
+ // Skip the reserved data.
+ stbi__skip(s, stbi__get32be(s));
+
+ // Find out if the data is compressed.
+ // Known values:
+ // 0: no compression
+ // 1: RLE compressed
+ compression = stbi__get16be(s);
+ if (compression > 1)
+ return stbi__errpuc("bad compression", "PSD has an unknown compression format");
+
+ // Check size
+ if (!stbi__mad3sizes_valid(4, w, h, 0))
+ return stbi__errpuc("too large", "Corrupt PSD");
+
+ // Create the destination image.
+
+ if (!compression && bitdepth == 16 && bpc == 16) {
+ out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0);
+ ri->bits_per_channel = 16;
+ }
+ else
+ out = (stbi_uc*)stbi__malloc(4 * w * h);
+
+ if (!out) return stbi__errpuc("outofmem", "Out of memory");
+ pixelCount = w * h;
+
+ // Initialize the data to zero.
+ //memset( out, 0, pixelCount * 4 );
+
+ // Finally, the image data.
+ if (compression) {
+ // RLE as used by .PSD and .TIFF
+ // Loop until you get the number of unpacked bytes you are expecting:
+ // Read the next source byte into n.
+ // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.
+ // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.
+ // Else if n is 128, noop.
+ // Endloop
+
+ // The RLE-compressed data is preceded by a 2-byte data count for each row in the data,
+ // which we're going to just skip.
+ stbi__skip(s, h * channelCount * 2);
+
+ // Read the RLE data by channel.
+ for (channel = 0; channel < 4; channel++) {
+ stbi_uc* p;
+
+ p = out + channel;
+ if (channel >= channelCount) {
+ // Fill this channel with default data.
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = (channel == 3 ? 255 : 0);
+ }
+ else {
+ // Read the RLE data.
+ if (!stbi__psd_decode_rle(s, p, pixelCount)) {
+ STBI_FREE(out);
+ return stbi__errpuc("corrupt", "bad RLE data");
+ }
+ }
+ }
- if (req_comp && req_comp != 4) {
- out = stbi__convert_format(out, 4, req_comp, w, h);
- if (out == NULL) return out; // stbi__convert_format frees input on failure
- }
+ }
+ else {
+ // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...)
+ // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image.
+
+ // Read the data by channel.
+ for (channel = 0; channel < 4; channel++) {
+ if (channel >= channelCount) {
+ // Fill this channel with default data.
+ if (bitdepth == 16 && bpc == 16) {
+ stbi__uint16* q = ((stbi__uint16*)out) + channel;
+ stbi__uint16 val = channel == 3 ? 65535 : 0;
+ for (i = 0; i < pixelCount; i++, q += 4)
+ *q = val;
+ }
+ else {
+ stbi_uc* p = out + channel;
+ stbi_uc val = channel == 3 ? 255 : 0;
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = val;
+ }
+ }
+ else {
+ if (ri->bits_per_channel == 16) { // output bpc
+ stbi__uint16* q = ((stbi__uint16*)out) + channel;
+ for (i = 0; i < pixelCount; i++, q += 4)
+ *q = (stbi__uint16)stbi__get16be(s);
+ }
+ else {
+ stbi_uc* p = out + channel;
+ if (bitdepth == 16) { // input bpc
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = (stbi_uc)(stbi__get16be(s) >> 8);
+ }
+ else {
+ for (i = 0; i < pixelCount; i++, p += 4)
+ *p = stbi__get8(s);
+ }
+ }
+ }
+ }
+ }
+
+ // remove weird white matte from PSD
+ if (channelCount >= 4) {
+ if (ri->bits_per_channel == 16) {
+ for (i = 0; i < w * h; ++i) {
+ stbi__uint16* pixel = (stbi__uint16*)out + 4 * i;
+ if (pixel[3] != 0 && pixel[3] != 65535) {
+ float a = pixel[3] / 65535.0f;
+ float ra = 1.0f / a;
+ float inv_a = 65535.0f * (1 - ra);
+ pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a);
+ pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a);
+ pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a);
+ }
+ }
+ }
+ else {
+ for (i = 0; i < w * h; ++i) {
+ unsigned char* pixel = out + 4 * i;
+ if (pixel[3] != 0 && pixel[3] != 255) {
+ float a = pixel[3] / 255.0f;
+ float ra = 1.0f / a;
+ float inv_a = 255.0f * (1 - ra);
+ pixel[0] = (unsigned char)(pixel[0] * ra + inv_a);
+ pixel[1] = (unsigned char)(pixel[1] * ra + inv_a);
+ pixel[2] = (unsigned char)(pixel[2] * ra + inv_a);
+ }
+ }
+ }
+ }
+
+ // convert to desired output format
+ if (req_comp && req_comp != 4) {
+ if (ri->bits_per_channel == 16)
+ out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h);
+ else
+ out = stbi__convert_format(out, 4, req_comp, w, h);
+ if (out == NULL) return out; // stbi__convert_format frees input on failure
+ }
- if (comp) *comp = 4;
- *y = h;
- *x = w;
+ if (comp) *comp = 4;
+ *y = h;
+ *x = w;
- return out;
+ return out;
}
#endif
@@ -5219,209 +6445,217 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/
#ifndef STBI_NO_PIC
-static int stbi__pic_is4(stbi__context *s,const char *str)
+static int stbi__pic_is4(stbi__context* s, const char* str)
{
- int i;
- for (i=0; i<4; ++i)
- if (stbi__get8(s) != (stbi_uc)str[i])
- return 0;
+ int i;
+ for (i = 0; i < 4; ++i)
+ if (stbi__get8(s) != (stbi_uc)str[i])
+ return 0;
- return 1;
+ return 1;
}
-static int stbi__pic_test_core(stbi__context *s)
+static int stbi__pic_test_core(stbi__context* s)
{
- int i;
+ int i;
- if (!stbi__pic_is4(s,"\x53\x80\xF6\x34"))
- return 0;
+ if (!stbi__pic_is4(s, "\x53\x80\xF6\x34"))
+ return 0;
- for(i=0;i<84;++i)
- stbi__get8(s);
+ for (i = 0; i < 84; ++i)
+ stbi__get8(s);
- if (!stbi__pic_is4(s,"PICT"))
- return 0;
+ if (!stbi__pic_is4(s, "PICT"))
+ return 0;
- return 1;
+ return 1;
}
typedef struct
{
- stbi_uc size,type,channel;
+ stbi_uc size, type, channel;
} stbi__pic_packet;
-static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
+static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest)
{
- int mask=0x80, i;
+ int mask = 0x80, i;
- for (i=0; i<4; ++i, mask>>=1) {
- if (channel & mask) {
- if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short");
- dest[i]=stbi__get8(s);
- }
- }
+ for (i = 0; i < 4; ++i, mask >>= 1) {
+ if (channel & mask) {
+ if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short");
+ dest[i] = stbi__get8(s);
+ }
+ }
- return dest;
+ return dest;
}
-static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)
+static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src)
{
- int mask=0x80,i;
+ int mask = 0x80, i;
- for (i=0;i<4; ++i, mask>>=1)
- if (channel&mask)
- dest[i]=src[i];
+ for (i = 0; i < 4; ++i, mask >>= 1)
+ if (channel & mask)
+ dest[i] = src[i];
}
-static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result)
+static stbi_uc* stbi__pic_load_core(stbi__context* s, int width, int height, int* comp, stbi_uc* result)
{
- int act_comp=0,num_packets=0,y,chained;
- stbi__pic_packet packets[10];
+ int act_comp = 0, num_packets = 0, y, chained;
+ stbi__pic_packet packets[10];
- // this will (should...) cater for even some bizarre stuff like having data
- // for the same channel in multiple packets.
- do {
- stbi__pic_packet *packet;
+ // this will (should...) cater for even some bizarre stuff like having data
+ // for the same channel in multiple packets.
+ do {
+ stbi__pic_packet* packet;
- if (num_packets==sizeof(packets)/sizeof(packets[0]))
- return stbi__errpuc("bad format","too many packets");
+ if (num_packets == sizeof(packets) / sizeof(packets[0]))
+ return stbi__errpuc("bad format", "too many packets");
- packet = &packets[num_packets++];
+ packet = &packets[num_packets++];
- chained = stbi__get8(s);
- packet->size = stbi__get8(s);
- packet->type = stbi__get8(s);
- packet->channel = stbi__get8(s);
+ chained = stbi__get8(s);
+ packet->size = stbi__get8(s);
+ packet->type = stbi__get8(s);
+ packet->channel = stbi__get8(s);
- act_comp |= packet->channel;
+ act_comp |= packet->channel;
- if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)");
- if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp");
- } while (chained);
+ if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (reading packets)");
+ if (packet->size != 8) return stbi__errpuc("bad format", "packet isn't 8bpp");
+ } while (chained);
- *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel?
+ *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel?
- for(y=0; ytype) {
+ switch (packet->type) {
default:
- return stbi__errpuc("bad format","packet has bad compression type");
+ return stbi__errpuc("bad format", "packet has bad compression type");
case 0: {//uncompressed
- int x;
+ int x;
- for(x=0;xchannel,dest))
- return 0;
- break;
+ for (x = 0; x < width; ++x, dest += 4)
+ if (!stbi__readval(s, packet->channel, dest))
+ return 0;
+ break;
}
case 1://Pure RLE
- {
- int left=width, i;
+ {
+ int left = width, i;
- while (left>0) {
- stbi_uc count,value[4];
+ while (left > 0) {
+ stbi_uc count, value[4];
- count=stbi__get8(s);
- if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)");
+ count = stbi__get8(s);
+ if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pure read count)");
- if (count > left)
- count = (stbi_uc) left;
+ if (count > left)
+ count = (stbi_uc)left;
- if (!stbi__readval(s,packet->channel,value)) return 0;
+ if (!stbi__readval(s, packet->channel, value)) return 0;
- for(i=0; ichannel,dest,value);
- left -= count;
- }
- }
- break;
+ for (i = 0; i < count; ++i, dest += 4)
+ stbi__copyval(packet->channel, dest, value);
+ left -= count;
+ }
+ }
+ break;
case 2: {//Mixed RLE
- int left=width;
- while (left>0) {
- int count = stbi__get8(s), i;
- if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)");
-
- if (count >= 128) { // Repeated
- stbi_uc value[4];
- int i;
-
- if (count==128)
- count = stbi__get16be(s);
- else
- count -= 127;
- if (count > left)
- return stbi__errpuc("bad file","scanline overrun");
-
- if (!stbi__readval(s,packet->channel,value))
- return 0;
+ int left = width;
+ while (left > 0) {
+ int count = stbi__get8(s), i;
+ if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (mixed read count)");
- for(i=0;ichannel,dest,value);
- } else { // Raw
- ++count;
- if (count>left) return stbi__errpuc("bad file","scanline overrun");
-
- for(i=0;ichannel,dest))
- return 0;
- }
- left-=count;
- }
- break;
+ if (count >= 128) { // Repeated
+ stbi_uc value[4];
+
+ if (count == 128)
+ count = stbi__get16be(s);
+ else
+ count -= 127;
+ if (count > left)
+ return stbi__errpuc("bad file", "scanline overrun");
+
+ if (!stbi__readval(s, packet->channel, value))
+ return 0;
+
+ for (i = 0; i < count; ++i, dest += 4)
+ stbi__copyval(packet->channel, dest, value);
+ }
+ else { // Raw
+ ++count;
+ if (count > left) return stbi__errpuc("bad file", "scanline overrun");
+
+ for (i = 0; i < count; ++i, dest += 4)
+ if (!stbi__readval(s, packet->channel, dest))
+ return 0;
+ }
+ left -= count;
+ }
+ break;
}
- }
- }
- }
+ }
+ }
+ }
- return result;
+ return result;
}
-static stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp)
+static void* stbi__pic_load(stbi__context* s, int* px, int* py, int* comp, int req_comp, stbi__result_info* ri)
{
- stbi_uc *result;
- int i, x,y;
+ stbi_uc* result;
+ int i, x, y, internal_comp;
+ STBI_NOTUSED(ri);
- for (i=0; i<92; ++i)
- stbi__get8(s);
+ if (!comp) comp = &internal_comp;
- x = stbi__get16be(s);
- y = stbi__get16be(s);
- if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)");
- if ((1 << 28) / x < y) return stbi__errpuc("too large", "Image too large to decode");
+ for (i = 0; i < 92; ++i)
+ stbi__get8(s);
- stbi__get32be(s); //skip `ratio'
- stbi__get16be(s); //skip `fields'
- stbi__get16be(s); //skip `pad'
+ x = stbi__get16be(s);
+ y = stbi__get16be(s);
- // intermediate buffer is RGBA
- result = (stbi_uc *) stbi__malloc(x*y*4);
- memset(result, 0xff, x*y*4);
+ if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+ if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
- if (!stbi__pic_load_core(s,x,y,comp, result)) {
- STBI_FREE(result);
- result=0;
- }
- *px = x;
- *py = y;
- if (req_comp == 0) req_comp = *comp;
- result=stbi__convert_format(result,4,req_comp,x,y);
+ if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)");
+ if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode");
+
+ stbi__get32be(s); //skip `ratio'
+ stbi__get16be(s); //skip `fields'
+ stbi__get16be(s); //skip `pad'
+
+ // intermediate buffer is RGBA
+ result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0);
+ if (!result) return stbi__errpuc("outofmem", "Out of memory");
+ memset(result, 0xff, x * y * 4);
- return result;
+ if (!stbi__pic_load_core(s, x, y, comp, result)) {
+ STBI_FREE(result);
+ return 0;
+ }
+ *px = x;
+ *py = y;
+ if (req_comp == 0) req_comp = *comp;
+ result = stbi__convert_format(result, 4, req_comp, x, y);
+
+ return result;
}
-static int stbi__pic_test(stbi__context *s)
+static int stbi__pic_test(stbi__context* s)
{
- int r = stbi__pic_test_core(s);
- stbi__rewind(s);
- return r;
+ int r = stbi__pic_test_core(s);
+ stbi__rewind(s);
+ return r;
}
#endif
@@ -5431,344 +6665,547 @@ static int stbi__pic_test(stbi__context *s)
#ifndef STBI_NO_GIF
typedef struct
{
- stbi__int16 prefix;
- stbi_uc first;
- stbi_uc suffix;
+ stbi__int16 prefix;
+ stbi_uc first;
+ stbi_uc suffix;
} stbi__gif_lzw;
typedef struct
{
- int w,h;
- stbi_uc *out; // output buffer (always 4 components)
- int flags, bgindex, ratio, transparent, eflags;
- stbi_uc pal[256][4];
- stbi_uc lpal[256][4];
- stbi__gif_lzw codes[4096];
- stbi_uc *color_table;
- int parse, step;
- int lflags;
- int start_x, start_y;
- int max_x, max_y;
- int cur_x, cur_y;
- int line_size;
+ int w, h;
+ stbi_uc* out; // output buffer (always 4 components)
+ stbi_uc* background; // The current "background" as far as a gif is concerned
+ stbi_uc* history;
+ int flags, bgindex, ratio, transparent, eflags;
+ stbi_uc pal[256][4];
+ stbi_uc lpal[256][4];
+ stbi__gif_lzw codes[8192];
+ stbi_uc* color_table;
+ int parse, step;
+ int lflags;
+ int start_x, start_y;
+ int max_x, max_y;
+ int cur_x, cur_y;
+ int line_size;
+ int delay;
} stbi__gif;
-static int stbi__gif_test_raw(stbi__context *s)
+static int stbi__gif_test_raw(stbi__context* s)
{
- int sz;
- if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0;
- sz = stbi__get8(s);
- if (sz != '9' && sz != '7') return 0;
- if (stbi__get8(s) != 'a') return 0;
- return 1;
+ int sz;
+ if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0;
+ sz = stbi__get8(s);
+ if (sz != '9' && sz != '7') return 0;
+ if (stbi__get8(s) != 'a') return 0;
+ return 1;
}
-static int stbi__gif_test(stbi__context *s)
+static int stbi__gif_test(stbi__context* s)
{
- int r = stbi__gif_test_raw(s);
- stbi__rewind(s);
- return r;
+ int r = stbi__gif_test_raw(s);
+ stbi__rewind(s);
+ return r;
}
-static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp)
+static void stbi__gif_parse_colortable(stbi__context* s, stbi_uc pal[256][4], int num_entries, int transp)
{
- int i;
- for (i=0; i < num_entries; ++i) {
- pal[i][2] = stbi__get8(s);
- pal[i][1] = stbi__get8(s);
- pal[i][0] = stbi__get8(s);
- pal[i][3] = transp == i ? 0 : 255;
- }
+ int i;
+ for (i = 0; i < num_entries; ++i) {
+ pal[i][2] = stbi__get8(s);
+ pal[i][1] = stbi__get8(s);
+ pal[i][0] = stbi__get8(s);
+ pal[i][3] = transp == i ? 0 : 255;
+ }
}
-static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)
+static int stbi__gif_header(stbi__context* s, stbi__gif* g, int* comp, int is_info)
{
- stbi_uc version;
- if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
- return stbi__err("not GIF", "Corrupt GIF");
+ stbi_uc version;
+ if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
+ return stbi__err("not GIF", "Corrupt GIF");
+
+ version = stbi__get8(s);
+ if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF");
+ if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF");
- version = stbi__get8(s);
- if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF");
- if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF");
+ stbi__g_failure_reason = "";
+ g->w = stbi__get16le(s);
+ g->h = stbi__get16le(s);
+ g->flags = stbi__get8(s);
+ g->bgindex = stbi__get8(s);
+ g->ratio = stbi__get8(s);
+ g->transparent = -1;
- stbi__g_failure_reason = "";
- g->w = stbi__get16le(s);
- g->h = stbi__get16le(s);
- g->flags = stbi__get8(s);
- g->bgindex = stbi__get8(s);
- g->ratio = stbi__get8(s);
- g->transparent = -1;
+ if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
+ if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)");
- if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
+ if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
- if (is_info) return 1;
+ if (is_info) return 1;
- if (g->flags & 0x80)
- stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
+ if (g->flags & 0x80)
+ stbi__gif_parse_colortable(s, g->pal, 2 << (g->flags & 7), -1);
- return 1;
+ return 1;
}
-static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__gif_info_raw(stbi__context* s, int* x, int* y, int* comp)
{
- stbi__gif g;
- if (!stbi__gif_header(s, &g, comp, 1)) {
- stbi__rewind( s );
- return 0;
- }
- if (x) *x = g.w;
- if (y) *y = g.h;
- return 1;
+ stbi__gif* g = (stbi__gif*)stbi__malloc(sizeof(stbi__gif));
+ if (!g) return stbi__err("outofmem", "Out of memory");
+ if (!stbi__gif_header(s, g, comp, 1)) {
+ STBI_FREE(g);
+ stbi__rewind(s);
+ return 0;
+ }
+ if (x) *x = g->w;
+ if (y) *y = g->h;
+ STBI_FREE(g);
+ return 1;
}
-static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
+static void stbi__out_gif_code(stbi__gif* g, stbi__uint16 code)
{
- stbi_uc *p, *c;
+ stbi_uc* p, * c;
+ int idx;
- // recurse to decode the prefixes, since the linked-list is backwards,
- // and working backwards through an interleaved image would be nasty
- if (g->codes[code].prefix >= 0)
- stbi__out_gif_code(g, g->codes[code].prefix);
+ // recurse to decode the prefixes, since the linked-list is backwards,
+ // and working backwards through an interleaved image would be nasty
+ if (g->codes[code].prefix >= 0)
+ stbi__out_gif_code(g, g->codes[code].prefix);
- if (g->cur_y >= g->max_y) return;
+ if (g->cur_y >= g->max_y) return;
- p = &g->out[g->cur_x + g->cur_y];
- c = &g->color_table[g->codes[code].suffix * 4];
+ idx = g->cur_x + g->cur_y;
+ p = &g->out[idx];
+ g->history[idx / 4] = 1;
- if (c[3] >= 128) {
- p[0] = c[2];
- p[1] = c[1];
- p[2] = c[0];
- p[3] = c[3];
- }
- g->cur_x += 4;
+ c = &g->color_table[g->codes[code].suffix * 4];
+ if (c[3] > 128) { // don't render transparent pixels;
+ p[0] = c[2];
+ p[1] = c[1];
+ p[2] = c[0];
+ p[3] = c[3];
+ }
+ g->cur_x += 4;
- if (g->cur_x >= g->max_x) {
- g->cur_x = g->start_x;
- g->cur_y += g->step;
+ if (g->cur_x >= g->max_x) {
+ g->cur_x = g->start_x;
+ g->cur_y += g->step;
- while (g->cur_y >= g->max_y && g->parse > 0) {
- g->step = (1 << g->parse) * g->line_size;
- g->cur_y = g->start_y + (g->step >> 1);
- --g->parse;
- }
- }
+ while (g->cur_y >= g->max_y && g->parse > 0) {
+ g->step = (1 << g->parse) * g->line_size;
+ g->cur_y = g->start_y + (g->step >> 1);
+ --g->parse;
+ }
+ }
}
-static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
-{
- stbi_uc lzw_cs;
- stbi__int32 len, code;
- stbi__uint32 first;
- stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
- stbi__gif_lzw *p;
-
- lzw_cs = stbi__get8(s);
- if (lzw_cs > 12) return NULL;
- clear = 1 << lzw_cs;
- first = 1;
- codesize = lzw_cs + 1;
- codemask = (1 << codesize) - 1;
- bits = 0;
- valid_bits = 0;
- for (code = 0; code < clear; code++) {
- g->codes[code].prefix = -1;
- g->codes[code].first = (stbi_uc) code;
- g->codes[code].suffix = (stbi_uc) code;
- }
+static stbi_uc* stbi__process_gif_raster(stbi__context* s, stbi__gif* g)
+{
+ stbi_uc lzw_cs;
+ stbi__int32 len, init_code;
+ stbi__uint32 first;
+ stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
+ stbi__gif_lzw* p;
+
+ lzw_cs = stbi__get8(s);
+ if (lzw_cs > 12) return NULL;
+ clear = 1 << lzw_cs;
+ first = 1;
+ codesize = lzw_cs + 1;
+ codemask = (1 << codesize) - 1;
+ bits = 0;
+ valid_bits = 0;
+ for (init_code = 0; init_code < clear; init_code++) {
+ g->codes[init_code].prefix = -1;
+ g->codes[init_code].first = (stbi_uc)init_code;
+ g->codes[init_code].suffix = (stbi_uc)init_code;
+ }
- // support no starting clear code
- avail = clear+2;
- oldcode = -1;
-
- len = 0;
- for(;;) {
- if (valid_bits < codesize) {
- if (len == 0) {
- len = stbi__get8(s); // start new block
- if (len == 0)
- return g->out;
- }
- --len;
- bits |= (stbi__int32) stbi__get8(s) << valid_bits;
- valid_bits += 8;
- } else {
- stbi__int32 code = bits & codemask;
- bits >>= codesize;
- valid_bits -= codesize;
- // @OPTIMIZE: is there some way we can accelerate the non-clear path?
- if (code == clear) { // clear code
- codesize = lzw_cs + 1;
- codemask = (1 << codesize) - 1;
- avail = clear + 2;
- oldcode = -1;
- first = 0;
- } else if (code == clear + 1) { // end of stream code
- stbi__skip(s, len);
- while ((len = stbi__get8(s)) > 0)
- stbi__skip(s,len);
- return g->out;
- } else if (code <= avail) {
- if (first) return stbi__errpuc("no clear code", "Corrupt GIF");
-
- if (oldcode >= 0) {
- p = &g->codes[avail++];
- if (avail > 4096) return stbi__errpuc("too many codes", "Corrupt GIF");
- p->prefix = (stbi__int16) oldcode;
- p->first = g->codes[oldcode].first;
- p->suffix = (code == avail) ? p->first : g->codes[code].first;
- } else if (code == avail)
- return stbi__errpuc("illegal code in raster", "Corrupt GIF");
-
- stbi__out_gif_code(g, (stbi__uint16) code);
-
- if ((avail & codemask) == 0 && avail <= 0x0FFF) {
- codesize++;
- codemask = (1 << codesize) - 1;
+ // support no starting clear code
+ avail = clear + 2;
+ oldcode = -1;
+
+ len = 0;
+ for (;;) {
+ if (valid_bits < codesize) {
+ if (len == 0) {
+ len = stbi__get8(s); // start new block
+ if (len == 0)
+ return g->out;
}
-
- oldcode = code;
- } else {
- return stbi__errpuc("illegal code in raster", "Corrupt GIF");
- }
- }
- }
-}
-
-static void stbi__fill_gif_background(stbi__gif *g)
-{
- int i;
- stbi_uc *c = g->pal[g->bgindex];
- // @OPTIMIZE: write a dword at a time
- for (i = 0; i < g->w * g->h * 4; i += 4) {
- stbi_uc *p = &g->out[i];
- p[0] = c[2];
- p[1] = c[1];
- p[2] = c[0];
- p[3] = c[3];
- }
+ --len;
+ bits |= (stbi__int32)stbi__get8(s) << valid_bits;
+ valid_bits += 8;
+ }
+ else {
+ stbi__int32 code = bits & codemask;
+ bits >>= codesize;
+ valid_bits -= codesize;
+ // @OPTIMIZE: is there some way we can accelerate the non-clear path?
+ if (code == clear) { // clear code
+ codesize = lzw_cs + 1;
+ codemask = (1 << codesize) - 1;
+ avail = clear + 2;
+ oldcode = -1;
+ first = 0;
+ }
+ else if (code == clear + 1) { // end of stream code
+ stbi__skip(s, len);
+ while ((len = stbi__get8(s)) > 0)
+ stbi__skip(s, len);
+ return g->out;
+ }
+ else if (code <= avail) {
+ if (first) {
+ return stbi__errpuc("no clear code", "Corrupt GIF");
+ }
+
+ if (oldcode >= 0) {
+ p = &g->codes[avail++];
+ if (avail > 8192) {
+ return stbi__errpuc("too many codes", "Corrupt GIF");
+ }
+
+ p->prefix = (stbi__int16)oldcode;
+ p->first = g->codes[oldcode].first;
+ p->suffix = (code == avail) ? p->first : g->codes[code].first;
+ }
+ else if (code == avail)
+ return stbi__errpuc("illegal code in raster", "Corrupt GIF");
+
+ stbi__out_gif_code(g, (stbi__uint16)code);
+
+ if ((avail & codemask) == 0 && avail <= 0x0FFF) {
+ codesize++;
+ codemask = (1 << codesize) - 1;
+ }
+
+ oldcode = code;
+ }
+ else {
+ return stbi__errpuc("illegal code in raster", "Corrupt GIF");
+ }
+ }
+ }
}
// this function is designed to support animated gifs, although stb_image doesn't support it
-static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp)
-{
- int i;
- stbi_uc *old_out = 0;
-
- if (g->out == 0) {
- if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header
- g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);
- if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory");
- stbi__fill_gif_background(g);
- } else {
- // animated-gif-only path
- if (((g->eflags & 0x1C) >> 2) == 3) {
- old_out = g->out;
- g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h);
- if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory");
- memcpy(g->out, old_out, g->w*g->h*4);
- }
- }
+// two back is the image from two frames ago, used for a very specific disposal format
+static stbi_uc* stbi__gif_load_next(stbi__context* s, stbi__gif* g, int* comp, int req_comp, stbi_uc* two_back)
+{
+ int dispose;
+ int first_frame;
+ int pi;
+ int pcount;
+ STBI_NOTUSED(req_comp);
+
+ // on first frame, any non-written pixels get the background colour (non-transparent)
+ first_frame = 0;
+ if (g->out == 0) {
+ if (!stbi__gif_header(s, g, comp, 0)) return 0; // stbi__g_failure_reason set by stbi__gif_header
+ if (!stbi__mad3sizes_valid(4, g->w, g->h, 0))
+ return stbi__errpuc("too large", "GIF image is too large");
+ pcount = g->w * g->h;
+ g->out = (stbi_uc*)stbi__malloc(4 * pcount);
+ g->background = (stbi_uc*)stbi__malloc(4 * pcount);
+ g->history = (stbi_uc*)stbi__malloc(pcount);
+ if (!g->out || !g->background || !g->history)
+ return stbi__errpuc("outofmem", "Out of memory");
+
+ // image is treated as "transparent" at the start - ie, nothing overwrites the current background;
+ // background colour is only used for pixels that are not rendered first frame, after that "background"
+ // color refers to the color that was there the previous frame.
+ memset(g->out, 0x00, 4 * pcount);
+ memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent)
+ memset(g->history, 0x00, pcount); // pixels that were affected previous frame
+ first_frame = 1;
+ }
+ else {
+ // second frame - how do we dispose of the previous one?
+ dispose = (g->eflags & 0x1C) >> 2;
+ pcount = g->w * g->h;
+
+ if ((dispose == 3) && (two_back == 0)) {
+ dispose = 2; // if I don't have an image to revert back to, default to the old background
+ }
+
+ if (dispose == 3) { // use previous graphic
+ for (pi = 0; pi < pcount; ++pi) {
+ if (g->history[pi]) {
+ memcpy(&g->out[pi * 4], &two_back[pi * 4], 4);
+ }
+ }
+ }
+ else if (dispose == 2) {
+ // restore what was changed last frame to background before that frame;
+ for (pi = 0; pi < pcount; ++pi) {
+ if (g->history[pi]) {
+ memcpy(&g->out[pi * 4], &g->background[pi * 4], 4);
+ }
+ }
+ }
+ else {
+ // This is a non-disposal case eithe way, so just
+ // leave the pixels as is, and they will become the new background
+ // 1: do not dispose
+ // 0: not specified.
+ }
+
+ // background is what out is after the undoing of the previou frame;
+ memcpy(g->background, g->out, 4 * g->w * g->h);
+ }
- for (;;) {
- switch (stbi__get8(s)) {
- case 0x2C: /* Image Descriptor */
- {
+ // clear my history;
+ memset(g->history, 0x00, g->w * g->h); // pixels that were affected previous frame
+
+ for (;;) {
+ int tag = stbi__get8(s);
+ switch (tag) {
+ case 0x2C: /* Image Descriptor */
+ {
stbi__int32 x, y, w, h;
- stbi_uc *o;
+ stbi_uc* o;
x = stbi__get16le(s);
y = stbi__get16le(s);
w = stbi__get16le(s);
h = stbi__get16le(s);
if (((x + w) > (g->w)) || ((y + h) > (g->h)))
- return stbi__errpuc("bad Image Descriptor", "Corrupt GIF");
+ return stbi__errpuc("bad Image Descriptor", "Corrupt GIF");
g->line_size = g->w * 4;
g->start_x = x * 4;
g->start_y = y * g->line_size;
- g->max_x = g->start_x + w * 4;
- g->max_y = g->start_y + h * g->line_size;
- g->cur_x = g->start_x;
- g->cur_y = g->start_y;
+ g->max_x = g->start_x + w * 4;
+ g->max_y = g->start_y + h * g->line_size;
+ g->cur_x = g->start_x;
+ g->cur_y = g->start_y;
+
+ // if the width of the specified rectangle is 0, that means
+ // we may not see *any* pixels or the image is malformed;
+ // to make sure this is caught, move the current y down to
+ // max_y (which is what out_gif_code checks).
+ if (w == 0)
+ g->cur_y = g->max_y;
g->lflags = stbi__get8(s);
if (g->lflags & 0x40) {
- g->step = 8 * g->line_size; // first interlaced spacing
- g->parse = 3;
- } else {
- g->step = g->line_size;
- g->parse = 0;
+ g->step = 8 * g->line_size; // first interlaced spacing
+ g->parse = 3;
+ }
+ else {
+ g->step = g->line_size;
+ g->parse = 0;
}
if (g->lflags & 0x80) {
- stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
- g->color_table = (stbi_uc *) g->lpal;
- } else if (g->flags & 0x80) {
- for (i=0; i < 256; ++i) // @OPTIMIZE: stbi__jpeg_reset only the previous transparent
- g->pal[i][3] = 255;
- if (g->transparent >= 0 && (g->eflags & 0x01))
- g->pal[g->transparent][3] = 0;
- g->color_table = (stbi_uc *) g->pal;
- } else
- return stbi__errpuc("missing color table", "Corrupt GIF");
+ stbi__gif_parse_colortable(s, g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
+ g->color_table = (stbi_uc*)g->lpal;
+ }
+ else if (g->flags & 0x80) {
+ g->color_table = (stbi_uc*)g->pal;
+ }
+ else
+ return stbi__errpuc("missing color table", "Corrupt GIF");
o = stbi__process_gif_raster(s, g);
- if (o == NULL) return NULL;
+ if (!o) return NULL;
+
+ // if this was the first frame,
+ pcount = g->w * g->h;
+ if (first_frame && (g->bgindex > 0)) {
+ // if first frame, any pixel not drawn to gets the background color
+ for (pi = 0; pi < pcount; ++pi) {
+ if (g->history[pi] == 0) {
+ g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be;
+ memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4);
+ }
+ }
+ }
- if (req_comp && req_comp != 4)
- o = stbi__convert_format(o, 4, req_comp, g->w, g->h);
return o;
- }
+ }
- case 0x21: // Comment Extension.
- {
+ case 0x21: // Comment Extension.
+ {
int len;
- if (stbi__get8(s) == 0xF9) { // Graphic Control Extension.
- len = stbi__get8(s);
- if (len == 4) {
- g->eflags = stbi__get8(s);
- stbi__get16le(s); // delay
- g->transparent = stbi__get8(s);
- } else {
- stbi__skip(s, len);
- break;
- }
+ int ext = stbi__get8(s);
+ if (ext == 0xF9) { // Graphic Control Extension.
+ len = stbi__get8(s);
+ if (len == 4) {
+ g->eflags = stbi__get8(s);
+ g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths.
+
+ // unset old transparent
+ if (g->transparent >= 0) {
+ g->pal[g->transparent][3] = 255;
+ }
+ if (g->eflags & 0x01) {
+ g->transparent = stbi__get8(s);
+ if (g->transparent >= 0) {
+ g->pal[g->transparent][3] = 0;
+ }
+ }
+ else {
+ // don't need transparent
+ stbi__skip(s, 1);
+ g->transparent = -1;
+ }
+ }
+ else {
+ stbi__skip(s, len);
+ break;
+ }
+ }
+ while ((len = stbi__get8(s)) != 0) {
+ stbi__skip(s, len);
}
- while ((len = stbi__get8(s)) != 0)
- stbi__skip(s, len);
break;
- }
+ }
- case 0x3B: // gif stream termination code
- return (stbi_uc *) s; // using '1' causes warning on some compilers
+ case 0x3B: // gif stream termination code
+ return (stbi_uc*)s; // using '1' causes warning on some compilers
- default:
+ default:
return stbi__errpuc("unknown code", "Corrupt GIF");
- }
- }
+ }
+ }
+}
+
+static void* stbi__load_gif_main_outofmem(stbi__gif* g, stbi_uc* out, int** delays)
+{
+ STBI_FREE(g->out);
+ STBI_FREE(g->history);
+ STBI_FREE(g->background);
+
+ if (out) STBI_FREE(out);
+ if (delays && *delays) STBI_FREE(*delays);
+ return stbi__errpuc("outofmem", "Out of memory");
+}
+
+static void* stbi__load_gif_main(stbi__context* s, int** delays, int* x, int* y, int* z, int* comp, int req_comp)
+{
+ if (stbi__gif_test(s)) {
+ int layers = 0;
+ stbi_uc* u = 0;
+ stbi_uc* out = 0;
+ stbi_uc* two_back = 0;
+ stbi__gif g;
+ int stride;
+ int out_size = 0;
+ int delays_size = 0;
+
+ STBI_NOTUSED(out_size);
+ STBI_NOTUSED(delays_size);
+
+ memset(&g, 0, sizeof(g));
+ if (delays) {
+ *delays = 0;
+ }
+
+ do {
+ u = stbi__gif_load_next(s, &g, comp, req_comp, two_back);
+ if (u == (stbi_uc*)s) u = 0; // end of animated gif marker
+
+ if (u) {
+ *x = g.w;
+ *y = g.h;
+ ++layers;
+ stride = g.w * g.h * 4;
+
+ if (out) {
+ void* tmp = (stbi_uc*)STBI_REALLOC_SIZED(out, out_size, layers * stride);
+ if (!tmp)
+ return stbi__load_gif_main_outofmem(&g, out, delays);
+ else {
+ out = (stbi_uc*)tmp;
+ out_size = layers * stride;
+ }
+
+ if (delays) {
+ int* new_delays = (int*)STBI_REALLOC_SIZED(*delays, delays_size, sizeof(int) * layers);
+ if (!new_delays)
+ return stbi__load_gif_main_outofmem(&g, out, delays);
+ *delays = new_delays;
+ delays_size = layers * sizeof(int);
+ }
+ }
+ else {
+ out = (stbi_uc*)stbi__malloc(layers * stride);
+ if (!out)
+ return stbi__load_gif_main_outofmem(&g, out, delays);
+ out_size = layers * stride;
+ if (delays) {
+ *delays = (int*)stbi__malloc(layers * sizeof(int));
+ if (!*delays)
+ return stbi__load_gif_main_outofmem(&g, out, delays);
+ delays_size = layers * sizeof(int);
+ }
+ }
+ memcpy(out + ((layers - 1) * stride), u, stride);
+ if (layers >= 2) {
+ two_back = out - 2 * stride;
+ }
+
+ if (delays) {
+ (*delays)[layers - 1U] = g.delay;
+ }
+ }
+ } while (u != 0);
+
+ // free temp buffer;
+ STBI_FREE(g.out);
+ STBI_FREE(g.history);
+ STBI_FREE(g.background);
+
+ // do the final conversion after loading everything;
+ if (req_comp && req_comp != 4)
+ out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h);
+
+ *z = layers;
+ return out;
+ }
+ else {
+ return stbi__errpuc("not GIF", "Image was not as a gif type.");
+ }
}
-static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+static void* stbi__gif_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
{
- stbi_uc *u = 0;
- stbi__gif g;
- memset(&g, 0, sizeof(g));
+ stbi_uc* u = 0;
+ stbi__gif g;
+ memset(&g, 0, sizeof(g));
+ STBI_NOTUSED(ri);
- u = stbi__gif_load_next(s, &g, comp, req_comp);
- if (u == (stbi_uc *) s) u = 0; // end of animated gif marker
- if (u) {
- *x = g.w;
- *y = g.h;
- }
+ u = stbi__gif_load_next(s, &g, comp, req_comp, 0);
+ if (u == (stbi_uc*)s) u = 0; // end of animated gif marker
+ if (u) {
+ *x = g.w;
+ *y = g.h;
+
+ // moved conversion to after successful load so that the same
+ // can be done for multiple frames.
+ if (req_comp && req_comp != 4)
+ u = stbi__convert_format(u, 4, req_comp, g.w, g.h);
+ }
+ else if (g.out) {
+ // if there was an error and we allocated an image buffer, free it!
+ STBI_FREE(g.out);
+ }
- return u;
+ // free buffers needed for multiple frame loading;
+ STBI_FREE(g.history);
+ STBI_FREE(g.background);
+
+ return u;
}
-static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__gif_info(stbi__context* s, int* x, int* y, int* comp)
{
- return stbi__gif_info_raw(s,x,y,comp);
+ return stbi__gif_info_raw(s, x, y, comp);
}
#endif
@@ -5776,331 +7213,400 @@ static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp)
// Radiance RGBE HDR loader
// originally by Nicolas Schulz
#ifndef STBI_NO_HDR
-static int stbi__hdr_test_core(stbi__context *s)
+static int stbi__hdr_test_core(stbi__context* s, const char* signature)
{
- const char *signature = "#?RADIANCE\n";
- int i;
- for (i=0; signature[i]; ++i)
- if (stbi__get8(s) != signature[i])
- return 0;
- return 1;
+ int i;
+ for (i = 0; signature[i]; ++i)
+ if (stbi__get8(s) != signature[i])
+ return 0;
+ stbi__rewind(s);
+ return 1;
}
static int stbi__hdr_test(stbi__context* s)
{
- int r = stbi__hdr_test_core(s);
- stbi__rewind(s);
- return r;
+ int r = stbi__hdr_test_core(s, "#?RADIANCE\n");
+ stbi__rewind(s);
+ if (!r) {
+ r = stbi__hdr_test_core(s, "#?RGBE\n");
+ stbi__rewind(s);
+ }
+ return r;
}
#define STBI__HDR_BUFLEN 1024
-static char *stbi__hdr_gettoken(stbi__context *z, char *buffer)
+static char* stbi__hdr_gettoken(stbi__context* z, char* buffer)
{
- int len=0;
- char c = '\0';
+ int len = 0;
+ char c = '\0';
- c = (char) stbi__get8(z);
-
- while (!stbi__at_eof(z) && c != '\n') {
- buffer[len++] = c;
- if (len == STBI__HDR_BUFLEN-1) {
- // flush to end of line
- while (!stbi__at_eof(z) && stbi__get8(z) != '\n')
- ;
- break;
- }
- c = (char) stbi__get8(z);
- }
+ c = (char)stbi__get8(z);
- buffer[len] = 0;
- return buffer;
-}
+ while (!stbi__at_eof(z) && c != '\n') {
+ buffer[len++] = c;
+ if (len == STBI__HDR_BUFLEN - 1) {
+ // flush to end of line
+ while (!stbi__at_eof(z) && stbi__get8(z) != '\n')
+ ;
+ break;
+ }
+ c = (char)stbi__get8(z);
+ }
-static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)
-{
- if ( input[3] != 0 ) {
- float f1;
- // Exponent
- f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8));
- if (req_comp <= 2)
- output[0] = (input[0] + input[1] + input[2]) * f1 / 3;
- else {
- output[0] = input[0] * f1;
- output[1] = input[1] * f1;
- output[2] = input[2] * f1;
- }
- if (req_comp == 2) output[1] = 1;
- if (req_comp == 4) output[3] = 1;
- } else {
- switch (req_comp) {
- case 4: output[3] = 1; /* fallthrough */
- case 3: output[0] = output[1] = output[2] = 0;
- break;
- case 2: output[1] = 1; /* fallthrough */
- case 1: output[0] = 0;
- break;
- }
- }
+ buffer[len] = 0;
+ return buffer;
+}
+
+static void stbi__hdr_convert(float* output, stbi_uc* input, int req_comp)
+{
+ if (input[3] != 0) {
+ float f1;
+ // Exponent
+ f1 = (float)ldexp(1.0f, input[3] - (int)(128 + 8));
+ if (req_comp <= 2)
+ output[0] = (input[0] + input[1] + input[2]) * f1 / 3;
+ else {
+ output[0] = input[0] * f1;
+ output[1] = input[1] * f1;
+ output[2] = input[2] * f1;
+ }
+ if (req_comp == 2) output[1] = 1;
+ if (req_comp == 4) output[3] = 1;
+ }
+ else {
+ switch (req_comp) {
+ case 4: output[3] = 1; /* fallthrough */
+ case 3: output[0] = output[1] = output[2] = 0;
+ break;
+ case 2: output[1] = 1; /* fallthrough */
+ case 1: output[0] = 0;
+ break;
+ }
+ }
}
-static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
-{
- char buffer[STBI__HDR_BUFLEN];
- char *token;
- int valid = 0;
- int width, height;
- stbi_uc *scanline;
- float *hdr_data;
- int len;
- unsigned char count, value;
- int i, j, k, c1,c2, z;
-
-
- // Check identifier
- if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0)
- return stbi__errpf("not HDR", "Corrupt HDR image");
+static float* stbi__hdr_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
+{
+ char buffer[STBI__HDR_BUFLEN];
+ char* token;
+ int valid = 0;
+ int width, height;
+ stbi_uc* scanline;
+ float* hdr_data;
+ int len;
+ unsigned char count, value;
+ int i, j, k, c1, c2, z;
+ const char* headerToken;
+ STBI_NOTUSED(ri);
+
+ // Check identifier
+ headerToken = stbi__hdr_gettoken(s, buffer);
+ if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0)
+ return stbi__errpf("not HDR", "Corrupt HDR image");
+
+ // Parse header
+ for (;;) {
+ token = stbi__hdr_gettoken(s, buffer);
+ if (token[0] == 0) break;
+ if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
+ }
- // Parse header
- for(;;) {
- token = stbi__hdr_gettoken(s,buffer);
- if (token[0] == 0) break;
- if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
- }
+ if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format");
+
+ // Parse width and height
+ // can't use sscanf() if we're not using stdio!
+ token = stbi__hdr_gettoken(s, buffer);
+ if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format");
+ token += 3;
+ height = (int)strtol(token, &token, 10);
+ while (*token == ' ') ++token;
+ if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format");
+ token += 3;
+ width = (int)strtol(token, NULL, 10);
+
+ if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)");
+ if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)");
+
+ *x = width;
+ *y = height;
+
+ if (comp) *comp = 3;
+ if (req_comp == 0) req_comp = 3;
+
+ if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0))
+ return stbi__errpf("too large", "HDR image is too large");
+
+ // Read data
+ hdr_data = (float*)stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0);
+ if (!hdr_data)
+ return stbi__errpf("outofmem", "Out of memory");
+
+ // Load image data
+ // image data is stored as some number of sca
+ if (width < 8 || width >= 32768) {
+ // Read flat data
+ for (j = 0; j < height; ++j) {
+ for (i = 0; i < width; ++i) {
+ stbi_uc rgbe[4];
+ main_decode_loop:
+ stbi__getn(s, rgbe, 4);
+ stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
+ }
+ }
+ }
+ else {
+ // Read RLE-encoded data
+ scanline = NULL;
+
+ for (j = 0; j < height; ++j) {
+ c1 = stbi__get8(s);
+ c2 = stbi__get8(s);
+ len = stbi__get8(s);
+ if (c1 != 2 || c2 != 2 || (len & 0x80)) {
+ // not run-length encoded, so we have to actually use THIS data as a decoded
+ // pixel (note this can't be a valid pixel--one of RGB must be >= 128)
+ stbi_uc rgbe[4];
+ rgbe[0] = (stbi_uc)c1;
+ rgbe[1] = (stbi_uc)c2;
+ rgbe[2] = (stbi_uc)len;
+ rgbe[3] = (stbi_uc)stbi__get8(s);
+ stbi__hdr_convert(hdr_data, rgbe, req_comp);
+ i = 1;
+ j = 0;
+ STBI_FREE(scanline);
+ goto main_decode_loop; // yes, this makes no sense
+ }
+ len <<= 8;
+ len |= stbi__get8(s);
+ if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); }
+ if (scanline == NULL) {
+ scanline = (stbi_uc*)stbi__malloc_mad2(width, 4, 0);
+ if (!scanline) {
+ STBI_FREE(hdr_data);
+ return stbi__errpf("outofmem", "Out of memory");
+ }
+ }
- if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format");
-
- // Parse width and height
- // can't use sscanf() if we're not using stdio!
- token = stbi__hdr_gettoken(s,buffer);
- if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format");
- token += 3;
- height = (int) strtol(token, &token, 10);
- while (*token == ' ') ++token;
- if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format");
- token += 3;
- width = (int) strtol(token, NULL, 10);
-
- *x = width;
- *y = height;
-
- if (comp) *comp = 3;
- if (req_comp == 0) req_comp = 3;
-
- // Read data
- hdr_data = (float *) stbi__malloc(height * width * req_comp * sizeof(float));
-
- // Load image data
- // image data is stored as some number of sca
- if ( width < 8 || width >= 32768) {
- // Read flat data
- for (j=0; j < height; ++j) {
- for (i=0; i < width; ++i) {
- stbi_uc rgbe[4];
- main_decode_loop:
- stbi__getn(s, rgbe, 4);
- stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
- }
- }
- } else {
- // Read RLE-encoded data
- scanline = NULL;
-
- for (j = 0; j < height; ++j) {
- c1 = stbi__get8(s);
- c2 = stbi__get8(s);
- len = stbi__get8(s);
- if (c1 != 2 || c2 != 2 || (len & 0x80)) {
- // not run-length encoded, so we have to actually use THIS data as a decoded
- // pixel (note this can't be a valid pixel--one of RGB must be >= 128)
- stbi_uc rgbe[4];
- rgbe[0] = (stbi_uc) c1;
- rgbe[1] = (stbi_uc) c2;
- rgbe[2] = (stbi_uc) len;
- rgbe[3] = (stbi_uc) stbi__get8(s);
- stbi__hdr_convert(hdr_data, rgbe, req_comp);
- i = 1;
- j = 0;
- STBI_FREE(scanline);
- goto main_decode_loop; // yes, this makes no sense
- }
- len <<= 8;
- len |= stbi__get8(s);
- if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); }
- if (scanline == NULL) scanline = (stbi_uc *) stbi__malloc(width * 4);
-
- for (k = 0; k < 4; ++k) {
- i = 0;
- while (i < width) {
- count = stbi__get8(s);
- if (count > 128) {
- // Run
- value = stbi__get8(s);
- count -= 128;
- for (z = 0; z < count; ++z)
- scanline[i++ * 4 + k] = value;
- } else {
- // Dump
- for (z = 0; z < count; ++z)
- scanline[i++ * 4 + k] = stbi__get8(s);
- }
+ for (k = 0; k < 4; ++k) {
+ int nleft;
+ i = 0;
+ while ((nleft = width - i) > 0) {
+ count = stbi__get8(s);
+ if (count > 128) {
+ // Run
+ value = stbi__get8(s);
+ count -= 128;
+ if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); }
+ for (z = 0; z < count; ++z)
+ scanline[i++ * 4 + k] = value;
+ }
+ else {
+ // Dump
+ if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); }
+ for (z = 0; z < count; ++z)
+ scanline[i++ * 4 + k] = stbi__get8(s);
+ }
+ }
}
- }
- for (i=0; i < width; ++i)
- stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp);
- }
- STBI_FREE(scanline);
- }
+ for (i = 0; i < width; ++i)
+ stbi__hdr_convert(hdr_data + (j * width + i) * req_comp, scanline + i * 4, req_comp);
+ }
+ if (scanline)
+ STBI_FREE(scanline);
+ }
- return hdr_data;
+ return hdr_data;
}
-static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__hdr_info(stbi__context* s, int* x, int* y, int* comp)
{
- char buffer[STBI__HDR_BUFLEN];
- char *token;
- int valid = 0;
+ char buffer[STBI__HDR_BUFLEN];
+ char* token;
+ int valid = 0;
+ int dummy;
- if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
- stbi__rewind( s );
- return 0;
- }
+ if (!x) x = &dummy;
+ if (!y) y = &dummy;
+ if (!comp) comp = &dummy;
- for(;;) {
- token = stbi__hdr_gettoken(s,buffer);
- if (token[0] == 0) break;
- if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
- }
+ if (stbi__hdr_test(s) == 0) {
+ stbi__rewind(s);
+ return 0;
+ }
- if (!valid) {
- stbi__rewind( s );
- return 0;
- }
- token = stbi__hdr_gettoken(s,buffer);
- if (strncmp(token, "-Y ", 3)) {
- stbi__rewind( s );
- return 0;
- }
- token += 3;
- *y = (int) strtol(token, &token, 10);
- while (*token == ' ') ++token;
- if (strncmp(token, "+X ", 3)) {
- stbi__rewind( s );
- return 0;
- }
- token += 3;
- *x = (int) strtol(token, NULL, 10);
- *comp = 3;
- return 1;
+ for (;;) {
+ token = stbi__hdr_gettoken(s, buffer);
+ if (token[0] == 0) break;
+ if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
+ }
+
+ if (!valid) {
+ stbi__rewind(s);
+ return 0;
+ }
+ token = stbi__hdr_gettoken(s, buffer);
+ if (strncmp(token, "-Y ", 3)) {
+ stbi__rewind(s);
+ return 0;
+ }
+ token += 3;
+ *y = (int)strtol(token, &token, 10);
+ while (*token == ' ') ++token;
+ if (strncmp(token, "+X ", 3)) {
+ stbi__rewind(s);
+ return 0;
+ }
+ token += 3;
+ *x = (int)strtol(token, NULL, 10);
+ *comp = 3;
+ return 1;
}
#endif // STBI_NO_HDR
#ifndef STBI_NO_BMP
-static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__bmp_info(stbi__context* s, int* x, int* y, int* comp)
{
- int hsz;
- if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') {
- stbi__rewind( s );
- return 0;
- }
- stbi__skip(s,12);
- hsz = stbi__get32le(s);
- if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) {
- stbi__rewind( s );
- return 0;
- }
- if (hsz == 12) {
- *x = stbi__get16le(s);
- *y = stbi__get16le(s);
- } else {
- *x = stbi__get32le(s);
- *y = stbi__get32le(s);
- }
- if (stbi__get16le(s) != 1) {
- stbi__rewind( s );
- return 0;
- }
- *comp = stbi__get16le(s) / 8;
- return 1;
+ void* p;
+ stbi__bmp_data info;
+
+ info.all_a = 255;
+ p = stbi__bmp_parse_header(s, &info);
+ if (p == NULL) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if (x) *x = s->img_x;
+ if (y) *y = s->img_y;
+ if (comp) {
+ if (info.bpp == 24 && info.ma == 0xff000000)
+ *comp = 3;
+ else
+ *comp = info.ma ? 4 : 3;
+ }
+ return 1;
}
#endif
#ifndef STBI_NO_PSD
-static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__psd_info(stbi__context* s, int* x, int* y, int* comp)
{
- int channelCount;
- if (stbi__get32be(s) != 0x38425053) {
- stbi__rewind( s );
- return 0;
- }
- if (stbi__get16be(s) != 1) {
- stbi__rewind( s );
- return 0;
- }
- stbi__skip(s, 6);
- channelCount = stbi__get16be(s);
- if (channelCount < 0 || channelCount > 16) {
- stbi__rewind( s );
- return 0;
- }
- *y = stbi__get32be(s);
- *x = stbi__get32be(s);
- if (stbi__get16be(s) != 8) {
- stbi__rewind( s );
- return 0;
- }
- if (stbi__get16be(s) != 3) {
- stbi__rewind( s );
- return 0;
- }
- *comp = 4;
- return 1;
+ int channelCount, dummy, depth;
+ if (!x) x = &dummy;
+ if (!y) y = &dummy;
+ if (!comp) comp = &dummy;
+ if (stbi__get32be(s) != 0x38425053) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if (stbi__get16be(s) != 1) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s, 6);
+ channelCount = stbi__get16be(s);
+ if (channelCount < 0 || channelCount > 16) {
+ stbi__rewind(s);
+ return 0;
+ }
+ *y = stbi__get32be(s);
+ *x = stbi__get32be(s);
+ depth = stbi__get16be(s);
+ if (depth != 8 && depth != 16) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if (stbi__get16be(s) != 3) {
+ stbi__rewind(s);
+ return 0;
+ }
+ *comp = 4;
+ return 1;
+}
+
+static int stbi__psd_is16(stbi__context* s)
+{
+ int channelCount, depth;
+ if (stbi__get32be(s) != 0x38425053) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if (stbi__get16be(s) != 1) {
+ stbi__rewind(s);
+ return 0;
+ }
+ stbi__skip(s, 6);
+ channelCount = stbi__get16be(s);
+ if (channelCount < 0 || channelCount > 16) {
+ stbi__rewind(s);
+ return 0;
+ }
+ STBI_NOTUSED(stbi__get32be(s));
+ STBI_NOTUSED(stbi__get32be(s));
+ depth = stbi__get16be(s);
+ if (depth != 16) {
+ stbi__rewind(s);
+ return 0;
+ }
+ return 1;
}
#endif
#ifndef STBI_NO_PIC
-static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__pic_info(stbi__context* s, int* x, int* y, int* comp)
{
- int act_comp=0,num_packets=0,chained;
- stbi__pic_packet packets[10];
+ int act_comp = 0, num_packets = 0, chained, dummy;
+ stbi__pic_packet packets[10];
- stbi__skip(s, 92);
+ if (!x) x = &dummy;
+ if (!y) y = &dummy;
+ if (!comp) comp = &dummy;
- *x = stbi__get16be(s);
- *y = stbi__get16be(s);
- if (stbi__at_eof(s)) return 0;
- if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
- stbi__rewind( s );
- return 0;
- }
+ if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) {
+ stbi__rewind(s);
+ return 0;
+ }
+
+ stbi__skip(s, 88);
+
+ *x = stbi__get16be(s);
+ *y = stbi__get16be(s);
+ if (stbi__at_eof(s)) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if ((*x) != 0 && (1 << 28) / (*x) < (*y)) {
+ stbi__rewind(s);
+ return 0;
+ }
- stbi__skip(s, 8);
+ stbi__skip(s, 8);
- do {
- stbi__pic_packet *packet;
+ do {
+ stbi__pic_packet* packet;
- if (num_packets==sizeof(packets)/sizeof(packets[0]))
- return 0;
+ if (num_packets == sizeof(packets) / sizeof(packets[0]))
+ return 0;
- packet = &packets[num_packets++];
- chained = stbi__get8(s);
- packet->size = stbi__get8(s);
- packet->type = stbi__get8(s);
- packet->channel = stbi__get8(s);
- act_comp |= packet->channel;
+ packet = &packets[num_packets++];
+ chained = stbi__get8(s);
+ packet->size = stbi__get8(s);
+ packet->type = stbi__get8(s);
+ packet->channel = stbi__get8(s);
+ act_comp |= packet->channel;
- if (stbi__at_eof(s)) {
- stbi__rewind( s );
- return 0;
- }
- if (packet->size != 8) {
- stbi__rewind( s );
- return 0;
- }
- } while (chained);
+ if (stbi__at_eof(s)) {
+ stbi__rewind(s);
+ return 0;
+ }
+ if (packet->size != 8) {
+ stbi__rewind(s);
+ return 0;
+ }
+ } while (chained);
- *comp = (act_comp & 0x10 ? 4 : 3);
+ *comp = (act_comp & 0x10 ? 4 : 3);
- return 1;
+ return 1;
}
#endif
@@ -6114,151 +7620,210 @@ static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
// Known limitations:
// Does not support comments in the header section
// Does not support ASCII image data (formats P2 and P3)
-// Does not support 16-bit-per-channel
#ifndef STBI_NO_PNM
-static int stbi__pnm_test(stbi__context *s)
+static int stbi__pnm_test(stbi__context* s)
{
- char p, t;
- p = (char) stbi__get8(s);
- t = (char) stbi__get8(s);
- if (p != 'P' || (t != '5' && t != '6')) {
- stbi__rewind( s );
- return 0;
- }
- return 1;
+ char p, t;
+ p = (char)stbi__get8(s);
+ t = (char)stbi__get8(s);
+ if (p != 'P' || (t != '5' && t != '6')) {
+ stbi__rewind(s);
+ return 0;
+ }
+ return 1;
}
-static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
+static void* stbi__pnm_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri)
{
- stbi_uc *out;
- if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n))
- return 0;
- *x = s->img_x;
- *y = s->img_y;
- *comp = s->img_n;
+ stbi_uc* out;
+ STBI_NOTUSED(ri);
+
+ ri->bits_per_channel = stbi__pnm_info(s, (int*)&s->img_x, (int*)&s->img_y, (int*)&s->img_n);
+ if (ri->bits_per_channel == 0)
+ return 0;
- out = (stbi_uc *) stbi__malloc(s->img_n * s->img_x * s->img_y);
- if (!out) return stbi__errpuc("outofmem", "Out of memory");
- stbi__getn(s, out, s->img_n * s->img_x * s->img_y);
+ if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
+ if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)");
- if (req_comp && req_comp != s->img_n) {
- out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);
- if (out == NULL) return out; // stbi__convert_format frees input on failure
- }
- return out;
+ *x = s->img_x;
+ *y = s->img_y;
+ if (comp) *comp = s->img_n;
+
+ if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0))
+ return stbi__errpuc("too large", "PNM too large");
+
+ out = (stbi_uc*)stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0);
+ if (!out) return stbi__errpuc("outofmem", "Out of memory");
+ if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) {
+ STBI_FREE(out);
+ return stbi__errpuc("bad PNM", "PNM file truncated");
+ }
+
+ if (req_comp && req_comp != s->img_n) {
+ if (ri->bits_per_channel == 16) {
+ out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, s->img_n, req_comp, s->img_x, s->img_y);
+ }
+ else {
+ out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);
+ }
+ if (out == NULL) return out; // stbi__convert_format frees input on failure
+ }
+ return out;
}
static int stbi__pnm_isspace(char c)
{
- return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r';
+ return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r';
}
-static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
+static void stbi__pnm_skip_whitespace(stbi__context* s, char* c)
{
- while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
- *c = (char) stbi__get8(s);
+ for (;;) {
+ while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
+ *c = (char)stbi__get8(s);
+
+ if (stbi__at_eof(s) || *c != '#')
+ break;
+
+ while (!stbi__at_eof(s) && *c != '\n' && *c != '\r')
+ *c = (char)stbi__get8(s);
+ }
}
static int stbi__pnm_isdigit(char c)
{
- return c >= '0' && c <= '9';
+ return c >= '0' && c <= '9';
}
-static int stbi__pnm_getinteger(stbi__context *s, char *c)
+static int stbi__pnm_getinteger(stbi__context* s, char* c)
{
- int value = 0;
+ int value = 0;
- while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {
- value = value*10 + (*c - '0');
- *c = (char) stbi__get8(s);
- }
+ while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {
+ value = value * 10 + (*c - '0');
+ *c = (char)stbi__get8(s);
+ if ((value > 214748364) || (value == 214748364 && *c > '7'))
+ return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int");
+ }
- return value;
+ return value;
}
-static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__pnm_info(stbi__context* s, int* x, int* y, int* comp)
{
- int maxv;
- char c, p, t;
+ int maxv, dummy;
+ char c, p, t;
- stbi__rewind( s );
+ if (!x) x = &dummy;
+ if (!y) y = &dummy;
+ if (!comp) comp = &dummy;
- // Get identifier
- p = (char) stbi__get8(s);
- t = (char) stbi__get8(s);
- if (p != 'P' || (t != '5' && t != '6')) {
- stbi__rewind( s );
- return 0;
- }
+ stbi__rewind(s);
+
+ // Get identifier
+ p = (char)stbi__get8(s);
+ t = (char)stbi__get8(s);
+ if (p != 'P' || (t != '5' && t != '6')) {
+ stbi__rewind(s);
+ return 0;
+ }
- *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm
+ *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm
- c = (char) stbi__get8(s);
- stbi__pnm_skip_whitespace(s, &c);
+ c = (char)stbi__get8(s);
+ stbi__pnm_skip_whitespace(s, &c);
- *x = stbi__pnm_getinteger(s, &c); // read width
- stbi__pnm_skip_whitespace(s, &c);
+ *x = stbi__pnm_getinteger(s, &c); // read width
+ if (*x == 0)
+ return stbi__err("invalid width", "PPM image header had zero or overflowing width");
+ stbi__pnm_skip_whitespace(s, &c);
- *y = stbi__pnm_getinteger(s, &c); // read height
- stbi__pnm_skip_whitespace(s, &c);
+ *y = stbi__pnm_getinteger(s, &c); // read height
+ if (*y == 0)
+ return stbi__err("invalid width", "PPM image header had zero or overflowing width");
+ stbi__pnm_skip_whitespace(s, &c);
- maxv = stbi__pnm_getinteger(s, &c); // read max value
+ maxv = stbi__pnm_getinteger(s, &c); // read max value
+ if (maxv > 65535)
+ return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images");
+ else if (maxv > 255)
+ return 16;
+ else
+ return 8;
+}
- if (maxv > 255)
- return stbi__err("max value > 255", "PPM image not 8-bit");
- else
- return 1;
+static int stbi__pnm_is16(stbi__context* s)
+{
+ if (stbi__pnm_info(s, NULL, NULL, NULL) == 16)
+ return 1;
+ return 0;
}
#endif
-static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__info_main(stbi__context* s, int* x, int* y, int* comp)
{
- #ifndef STBI_NO_JPEG
- if (stbi__jpeg_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_JPEG
+ if (stbi__jpeg_info(s, x, y, comp)) return 1;
+#endif
+
+#ifndef STBI_NO_PNG
+ if (stbi__png_info(s, x, y, comp)) return 1;
+#endif
+
+#ifndef STBI_NO_GIF
+ if (stbi__gif_info(s, x, y, comp)) return 1;
+#endif
- #ifndef STBI_NO_PNG
- if (stbi__png_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_BMP
+ if (stbi__bmp_info(s, x, y, comp)) return 1;
+#endif
+
+#ifndef STBI_NO_PSD
+ if (stbi__psd_info(s, x, y, comp)) return 1;
+#endif
- #ifndef STBI_NO_GIF
- if (stbi__gif_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_PIC
+ if (stbi__pic_info(s, x, y, comp)) return 1;
+#endif
- #ifndef STBI_NO_BMP
- if (stbi__bmp_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_PNM
+ if (stbi__pnm_info(s, x, y, comp)) return 1;
+#endif
- #ifndef STBI_NO_PSD
- if (stbi__psd_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_HDR
+ if (stbi__hdr_info(s, x, y, comp)) return 1;
+#endif
- #ifndef STBI_NO_PIC
- if (stbi__pic_info(s, x, y, comp)) return 1;
- #endif
+ // test tga last because it's a crappy test!
+#ifndef STBI_NO_TGA
+ if (stbi__tga_info(s, x, y, comp))
+ return 1;
+#endif
+ return stbi__err("unknown image type", "Image not of any known type, or corrupt");
+}
- #ifndef STBI_NO_PNM
- if (stbi__pnm_info(s, x, y, comp)) return 1;
- #endif
+static int stbi__is_16_main(stbi__context* s)
+{
+#ifndef STBI_NO_PNG
+ if (stbi__png_is16(s)) return 1;
+#endif
- #ifndef STBI_NO_HDR
- if (stbi__hdr_info(s, x, y, comp)) return 1;
- #endif
+#ifndef STBI_NO_PSD
+ if (stbi__psd_is16(s)) return 1;
+#endif
- // test tga last because it's a crappy test!
- #ifndef STBI_NO_TGA
- if (stbi__tga_info(s, x, y, comp))
- return 1;
- #endif
- return stbi__err("unknown image type", "Image not of any known type, or corrupt");
+#ifndef STBI_NO_PNM
+ if (stbi__pnm_is16(s)) return 1;
+#endif
+ return 0;
}
#ifndef STBI_NO_STDIO
-STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)
+STBIDEF int stbi_info(char const* filename, int* x, int* y, int* comp)
{
- FILE *f = stbi__fopen(filename, "rb");
+ FILE* f = stbi__fopen(filename, "rb");
int result;
if (!f) return stbi__err("can't fopen", "Unable to open file");
result = stbi_info_from_file(f, x, y, comp);
@@ -6266,36 +7831,111 @@ STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)
return result;
}
-STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
+STBIDEF int stbi_info_from_file(FILE* f, int* x, int* y, int* comp)
+{
+ int r;
+ stbi__context s;
+ long pos = ftell(f);
+ stbi__start_file(&s, f);
+ r = stbi__info_main(&s, x, y, comp);
+ fseek(f, pos, SEEK_SET);
+ return r;
+}
+
+STBIDEF int stbi_is_16_bit(char const* filename)
+{
+ FILE* f = stbi__fopen(filename, "rb");
+ int result;
+ if (!f) return stbi__err("can't fopen", "Unable to open file");
+ result = stbi_is_16_bit_from_file(f);
+ fclose(f);
+ return result;
+}
+
+STBIDEF int stbi_is_16_bit_from_file(FILE* f)
{
- int r;
- stbi__context s;
- long pos = ftell(f);
- stbi__start_file(&s, f);
- r = stbi__info_main(&s,x,y,comp);
- fseek(f,pos,SEEK_SET);
- return r;
+ int r;
+ stbi__context s;
+ long pos = ftell(f);
+ stbi__start_file(&s, f);
+ r = stbi__is_16_main(&s);
+ fseek(f, pos, SEEK_SET);
+ return r;
}
#endif // !STBI_NO_STDIO
-STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)
+STBIDEF int stbi_info_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* comp)
+{
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__info_main(&s, x, y, comp);
+}
+
+STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const* c, void* user, int* x, int* y, int* comp)
+{
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)c, user);
+ return stbi__info_main(&s, x, y, comp);
+}
+
+STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const* buffer, int len)
{
- stbi__context s;
- stbi__start_mem(&s,buffer,len);
- return stbi__info_main(&s,x,y,comp);
+ stbi__context s;
+ stbi__start_mem(&s, buffer, len);
+ return stbi__is_16_main(&s);
}
-STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)
+STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const* c, void* user)
{
- stbi__context s;
- stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user);
- return stbi__info_main(&s,x,y,comp);
+ stbi__context s;
+ stbi__start_callbacks(&s, (stbi_io_callbacks*)c, user);
+ return stbi__is_16_main(&s);
}
#endif // STB_IMAGE_IMPLEMENTATION
/*
revision history:
+ 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs
+ 2.19 (2018-02-11) fix warning
+ 2.18 (2018-01-30) fix warnings
+ 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug
+ 1-bit BMP
+ *_is_16_bit api
+ avoid warnings
+ 2.16 (2017-07-23) all functions have 16-bit variants;
+ STBI_NO_STDIO works again;
+ compilation fixes;
+ fix rounding in unpremultiply;
+ optimize vertical flip;
+ disable raw_len validation;
+ documentation fixes
+ 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode;
+ warning fixes; disable run-time SSE detection on gcc;
+ uniform handling of optional "return" values;
+ thread-safe initialization of zlib tables
+ 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs
+ 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now
+ 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes
+ 2.11 (2016-04-02) allocate large structures on the stack
+ remove white matting for transparent PSD
+ fix reported channel count for PNG & BMP
+ re-enable SSE2 in non-gcc 64-bit
+ support RGB-formatted JPEG
+ read 16-bit PNGs (only as 8-bit)
+ 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED
+ 2.09 (2016-01-16) allow comments in PNM files
+ 16-bit-per-pixel TGA (not bit-per-component)
+ info() for TGA could break due to .hdr handling
+ info() for BMP to shares code instead of sloppy parse
+ can use STBI_REALLOC_SIZED if allocator doesn't support realloc
+ code cleanup
+ 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA
+ 2.07 (2015-09-13) fix compiler warnings
+ partial animated GIF support
+ limited 16-bpc PSD support
+ #ifdef unused functions
+ bug with < 92 byte PIC,PNM,HDR,TGA
2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
@@ -6436,3 +8076,46 @@ STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int
0.50 (2006-11-19)
first released version
*/
+
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
\ No newline at end of file
diff --git a/external/include/stb_image_write.h b/external/include/stb_image_write.h
index 59052f9c..52536579 100644
--- a/external/include/stb_image_write.h
+++ b/external/include/stb_image_write.h
@@ -1,5 +1,5 @@
-/* stb_image_write - v0.98 - public domain - http://nothings.org/stb/stb_image_write.h
- writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010
+/* stb_image_write - v1.16 - public domain - http://nothings.org/stb
+ writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015
no warranty implied; use at your own risk
Before #including,
@@ -12,29 +12,67 @@
ABOUT:
- This header file is a library for writing images to C stdio. It could be
- adapted to write to memory or a general streaming interface; let me know.
+ This header file is a library for writing images to C stdio or a callback.
The PNG output is not optimal; it is 20-50% larger than the file
- written by a decent optimizing implementation. This library is designed
- for source code compactness and simplicitly, not optimal image file size
- or run-time performance.
+ written by a decent optimizing implementation; though providing a custom
+ zlib compress function (see STBIW_ZLIB_COMPRESS) can mitigate that.
+ This library is designed for source code compactness and simplicity,
+ not optimal image file size or run-time performance.
BUILDING:
You can #define STBIW_ASSERT(x) before the #include to avoid using assert.h.
You can #define STBIW_MALLOC(), STBIW_REALLOC(), and STBIW_FREE() to replace
malloc,realloc,free.
- You can define STBIW_MEMMOVE() to replace memmove()
+ You can #define STBIW_MEMMOVE() to replace memmove()
+ You can #define STBIW_ZLIB_COMPRESS to use a custom zlib-style compress function
+ for PNG compression (instead of the builtin one), it must have the following signature:
+ unsigned char * my_compress(unsigned char *data, int data_len, int *out_len, int quality);
+ The returned data will be freed with STBIW_FREE() (free() by default),
+ so it must be heap allocated with STBIW_MALLOC() (malloc() by default),
+
+UNICODE:
+
+ If compiling for Windows and you wish to use Unicode filenames, compile
+ with
+ #define STBIW_WINDOWS_UTF8
+ and pass utf8-encoded filenames. Call stbiw_convert_wchar_to_utf8 to convert
+ Windows wchar_t filenames to utf8.
USAGE:
- There are four functions, one for each image file format:
+ There are five functions, one for each image file format:
int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
- int stbi_write_hdr(char const *filename, int w, int h, int comp, const void *data);
+ int stbi_write_jpg(char const *filename, int w, int h, int comp, const void *data, int quality);
+ int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
+
+ void stbi_flip_vertically_on_write(int flag); // flag is non-zero to flip data vertically
+
+ There are also five equivalent functions that use an arbitrary write function. You are
+ expected to open/close your file-equivalent before and after calling these:
+
+ int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
+ int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+ int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
+ int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
+ int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality);
+
+ where the callback is:
+ void stbi_write_func(void *context, void *data, int size);
+
+ You can configure it with these global variables:
+ int stbi_write_tga_with_rle; // defaults to true; set to 0 to disable RLE
+ int stbi_write_png_compression_level; // defaults to 8; set to higher for more compression
+ int stbi_write_force_png_filter; // defaults to -1; set to 0..5 to force a filter mode
+
+
+ You can define STBI_WRITE_NO_STDIO to disable the file variant of these
+ functions, so the library will not use stdio.h at all. However, this will
+ also disable HDR writing, because it requires stdio for formatted output.
Each function returns 0 on failure and non-0 on success.
@@ -58,69 +96,145 @@
writer, both because it is in BGR order and because it may have padding
at the end of the line.)
+ PNG allows you to set the deflate compression level by setting the global
+ variable 'stbi_write_png_compression_level' (it defaults to 8).
+
HDR expects linear float data. Since the format is always 32-bit rgb(e)
data, alpha (if provided) is discarded, and for monochrome data it is
replicated across all three channels.
+ TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed
+ data, set the global variable 'stbi_write_tga_with_rle' to 0.
+
+ JPEG does ignore alpha channels in input data; quality is between 1 and 100.
+ Higher quality looks better but results in a bigger image.
+ JPEG baseline (no JPEG progressive).
+
CREDITS:
- PNG/BMP/TGA
- Sean Barrett
- HDR
- Baldur Karlsson
- TGA monochrome:
- Jean-Sebastien Guay
- misc enhancements:
- Tim Kelsey
+
+ Sean Barrett - PNG/BMP/TGA
+ Baldur Karlsson - HDR
+ Jean-Sebastien Guay - TGA monochrome
+ Tim Kelsey - misc enhancements
+ Alan Hickman - TGA RLE
+ Emmanuel Julien - initial file IO callback implementation
+ Jon Olick - original jo_jpeg.cpp code
+ Daniel Gibson - integrate JPEG, allow external zlib
+ Aarni Koskela - allow choosing PNG filter
+
bugfixes:
github:Chribba
-
+ Guillaume Chereau
+ github:jry2
+ github:romigrou
+ Sergio Gonzalez
+ Jonas Karlsson
+ Filip Wasil
+ Thatcher Ulrich
+ github:poppolopoppo
+ Patrick Boettcher
+ github:xeekworx
+ Cap Petschulat
+ Simon Rodriguez
+ Ivan Tikhonov
+ github:ignotion
+ Adam Schackart
+ Andrew Kensler
+
LICENSE
-This software is in the public domain. Where that dedication is not
-recognized, you are granted a perpetual, irrevocable license to copy,
-distribute, and modify this file as you see fit.
+ See end of file for license information.
+
*/
#ifndef INCLUDE_STB_IMAGE_WRITE_H
#define INCLUDE_STB_IMAGE_WRITE_H
+#include
+
+// if STB_IMAGE_WRITE_STATIC causes problems, try defining STBIWDEF to 'inline' or 'static inline'
+#ifndef STBIWDEF
+#ifdef STB_IMAGE_WRITE_STATIC
+#define STBIWDEF static
+#else
#ifdef __cplusplus
-extern "C" {
+#define STBIWDEF extern "C"
+#else
+#define STBIWDEF extern
+#endif
+#endif
#endif
-extern int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
-extern int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
-extern int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
-extern int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
+#ifndef STB_IMAGE_WRITE_STATIC // C++ forbids static forward declarations
+STBIWDEF int stbi_write_tga_with_rle;
+STBIWDEF int stbi_write_png_compression_level;
+STBIWDEF int stbi_write_force_png_filter;
+#endif
-#ifdef __cplusplus
-}
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_png(char const* filename, int w, int h, int comp, const void* data, int stride_in_bytes);
+STBIWDEF int stbi_write_bmp(char const* filename, int w, int h, int comp, const void* data);
+STBIWDEF int stbi_write_tga(char const* filename, int w, int h, int comp, const void* data);
+STBIWDEF int stbi_write_hdr(char const* filename, int w, int h, int comp, const float* data);
+STBIWDEF int stbi_write_jpg(char const* filename, int x, int y, int comp, const void* data, int quality);
+
+#ifdef STBIW_WINDOWS_UTF8
+STBIWDEF int stbiw_convert_wchar_to_utf8(char* buffer, size_t bufferlen, const wchar_t* input);
+#endif
#endif
+typedef void stbi_write_func(void* context, void* data, int size);
+
+STBIWDEF int stbi_write_png_to_func(stbi_write_func* func, void* context, int w, int h, int comp, const void* data, int stride_in_bytes);
+STBIWDEF int stbi_write_bmp_to_func(stbi_write_func* func, void* context, int w, int h, int comp, const void* data);
+STBIWDEF int stbi_write_tga_to_func(stbi_write_func* func, void* context, int w, int h, int comp, const void* data);
+STBIWDEF int stbi_write_hdr_to_func(stbi_write_func* func, void* context, int w, int h, int comp, const float* data);
+STBIWDEF int stbi_write_jpg_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const void* data, int quality);
+
+STBIWDEF void stbi_flip_vertically_on_write(int flip_boolean);
+
#endif//INCLUDE_STB_IMAGE_WRITE_H
#ifdef STB_IMAGE_WRITE_IMPLEMENTATION
+#ifdef _WIN32
+#ifndef _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#ifndef _CRT_NONSTDC_NO_DEPRECATE
+#define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+#endif
+
+#ifndef STBI_WRITE_NO_STDIO
+#include
+#endif // STBI_WRITE_NO_STDIO
+
#include
#include
-#include
#include
#include
-#if defined(STBIW_MALLOC) && defined(STBIW_FREE) && defined(STBIW_REALLOC)
+#if defined(STBIW_MALLOC) && defined(STBIW_FREE) && (defined(STBIW_REALLOC) || defined(STBIW_REALLOC_SIZED))
// ok
-#elif !defined(STBIW_MALLOC) && !defined(STBIW_FREE) && !defined(STBIW_REALLOC)
+#elif !defined(STBIW_MALLOC) && !defined(STBIW_FREE) && !defined(STBIW_REALLOC) && !defined(STBIW_REALLOC_SIZED)
// ok
#else
-#error "Must define all or none of STBIW_MALLOC, STBIW_FREE, and STBIW_REALLOC."
+#error "Must define all or none of STBIW_MALLOC, STBIW_FREE, and STBIW_REALLOC (or STBIW_REALLOC_SIZED)."
#endif
#ifndef STBIW_MALLOC
-#define STBIW_MALLOC(sz) malloc(sz)
-#define STBIW_REALLOC(p,sz) realloc(p,sz)
-#define STBIW_FREE(p) free(p)
+#define STBIW_MALLOC(sz) malloc(sz)
+#define STBIW_REALLOC(p,newsz) realloc(p,newsz)
+#define STBIW_FREE(p) free(p)
#endif
+
+#ifndef STBIW_REALLOC_SIZED
+#define STBIW_REALLOC_SIZED(p,oldsz,newsz) STBIW_REALLOC(p,newsz)
+#endif
+
+
#ifndef STBIW_MEMMOVE
#define STBIW_MEMMOVE(a,b,sz) memmove(a,b,sz)
#endif
@@ -131,268 +245,587 @@ extern int stbi_write_hdr(char const *filename, int w, int h, int comp, const fl
#define STBIW_ASSERT(x) assert(x)
#endif
+#define STBIW_UCHAR(x) (unsigned char) ((x) & 0xff)
+
+#ifdef STB_IMAGE_WRITE_STATIC
+static int stbi_write_png_compression_level = 8;
+static int stbi_write_tga_with_rle = 1;
+static int stbi_write_force_png_filter = -1;
+#else
+int stbi_write_png_compression_level = 8;
+int stbi_write_tga_with_rle = 1;
+int stbi_write_force_png_filter = -1;
+#endif
+
+static int stbi__flip_vertically_on_write = 0;
+
+STBIWDEF void stbi_flip_vertically_on_write(int flag)
+{
+ stbi__flip_vertically_on_write = flag;
+}
+
+typedef struct
+{
+ stbi_write_func* func;
+ void* context;
+ unsigned char buffer[64];
+ int buf_used;
+} stbi__write_context;
+
+// initialize a callback-based context
+static void stbi__start_write_callbacks(stbi__write_context* s, stbi_write_func* c, void* context)
+{
+ s->func = c;
+ s->context = context;
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+
+static void stbi__stdio_write(void* context, void* data, int size)
+{
+ fwrite(data, 1, size, (FILE*)context);
+}
+
+#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8)
+#ifdef __cplusplus
+#define STBIW_EXTERN extern "C"
+#else
+#define STBIW_EXTERN extern
+#endif
+STBIW_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char* str, int cbmb, wchar_t* widestr, int cchwide);
+STBIW_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t* widestr, int cchwide, char* str, int cbmb, const char* defchar, int* used_default);
+
+STBIWDEF int stbiw_convert_wchar_to_utf8(char* buffer, size_t bufferlen, const wchar_t* input)
+{
+ return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int)bufferlen, NULL, NULL);
+}
+#endif
+
+static FILE* stbiw__fopen(char const* filename, char const* mode)
+{
+ FILE* f;
+#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8)
+ wchar_t wMode[64];
+ wchar_t wFilename[1024];
+ if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename) / sizeof(*wFilename)))
+ return 0;
+
+ if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode) / sizeof(*wMode)))
+ return 0;
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+ if (0 != _wfopen_s(&f, wFilename, wMode))
+ f = 0;
+#else
+ f = _wfopen(wFilename, wMode);
+#endif
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+ if (0 != fopen_s(&f, filename, mode))
+ f = 0;
+#else
+ f = fopen(filename, mode);
+#endif
+ return f;
+}
+
+static int stbi__start_write_file(stbi__write_context* s, const char* filename)
+{
+ FILE* f = stbiw__fopen(filename, "wb");
+ stbi__start_write_callbacks(s, stbi__stdio_write, (void*)f);
+ return f != NULL;
+}
+
+static void stbi__end_write_file(stbi__write_context* s)
+{
+ fclose((FILE*)s->context);
+}
+
+#endif // !STBI_WRITE_NO_STDIO
+
typedef unsigned int stbiw_uint32;
-typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];
-
-static void writefv(FILE *f, const char *fmt, va_list v)
-{
- while (*fmt) {
- switch (*fmt++) {
- case ' ': break;
- case '1': { unsigned char x = (unsigned char) va_arg(v, int); fputc(x,f); break; }
- case '2': { int x = va_arg(v,int); unsigned char b[2];
- b[0] = (unsigned char) x; b[1] = (unsigned char) (x>>8);
- fwrite(b,2,1,f); break; }
- case '4': { stbiw_uint32 x = va_arg(v,int); unsigned char b[4];
- b[0]=(unsigned char)x; b[1]=(unsigned char)(x>>8);
- b[2]=(unsigned char)(x>>16); b[3]=(unsigned char)(x>>24);
- fwrite(b,4,1,f); break; }
- default:
+typedef int stb_image_write_test[sizeof(stbiw_uint32) == 4 ? 1 : -1];
+
+static void stbiw__writefv(stbi__write_context* s, const char* fmt, va_list v)
+{
+ while (*fmt) {
+ switch (*fmt++) {
+ case ' ': break;
+ case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int));
+ s->func(s->context, &x, 1);
+ break; }
+ case '2': { int x = va_arg(v, int);
+ unsigned char b[2];
+ b[0] = STBIW_UCHAR(x);
+ b[1] = STBIW_UCHAR(x >> 8);
+ s->func(s->context, b, 2);
+ break; }
+ case '4': { stbiw_uint32 x = va_arg(v, int);
+ unsigned char b[4];
+ b[0] = STBIW_UCHAR(x);
+ b[1] = STBIW_UCHAR(x >> 8);
+ b[2] = STBIW_UCHAR(x >> 16);
+ b[3] = STBIW_UCHAR(x >> 24);
+ s->func(s->context, b, 4);
+ break; }
+ default:
STBIW_ASSERT(0);
return;
- }
- }
-}
-
-static void write3(FILE *f, unsigned char a, unsigned char b, unsigned char c)
-{
- unsigned char arr[3];
- arr[0] = a, arr[1] = b, arr[2] = c;
- fwrite(arr, 3, 1, f);
-}
-
-static void write_pixels(FILE *f, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono)
-{
- unsigned char bg[3] = { 255, 0, 255}, px[3];
- stbiw_uint32 zero = 0;
- int i,j,k, j_end;
-
- if (y <= 0)
- return;
-
- if (vdir < 0)
- j_end = -1, j = y-1;
- else
- j_end = y, j = 0;
-
- for (; j != j_end; j += vdir) {
- for (i=0; i < x; ++i) {
- unsigned char *d = (unsigned char *) data + (j*x+i)*comp;
- if (write_alpha < 0)
- fwrite(&d[comp-1], 1, 1, f);
- switch (comp) {
- case 1: fwrite(d, 1, 1, f);
- break;
- case 2: if (expand_mono)
- write3(f, d[0],d[0],d[0]); // monochrome bmp
- else
- fwrite(d, 1, 1, f); // monochrome TGA
- break;
- case 4:
- if (!write_alpha) {
- // composite against pink background
- for (k=0; k < 3; ++k)
- px[k] = bg[k] + ((d[k] - bg[k]) * d[3])/255;
- write3(f, px[1-rgb_dir],px[1],px[1+rgb_dir]);
- break;
- }
- /* FALLTHROUGH */
- case 3:
- write3(f, d[1-rgb_dir],d[1],d[1+rgb_dir]);
- break;
- }
- if (write_alpha > 0)
- fwrite(&d[comp-1], 1, 1, f);
- }
- fwrite(&zero,scanline_pad,1,f);
- }
-}
-
-static int outfile(char const *filename, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)
-{
- FILE *f;
- if (y < 0 || x < 0) return 0;
- f = fopen(filename, "wb");
- if (f) {
- va_list v;
- va_start(v, fmt);
- writefv(f, fmt, v);
- va_end(v);
- write_pixels(f,rgb_dir,vdir,x,y,comp,data,alpha,pad,expand_mono);
- fclose(f);
- }
- return f != NULL;
-}
-
-int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data)
-{
- int pad = (-x*3) & 3;
- return outfile(filename,-1,-1,x,y,comp,1,(void *) data,0,pad,
- "11 4 22 4" "4 44 22 444444",
- 'B', 'M', 14+40+(x*3+pad)*y, 0,0, 14+40, // file header
- 40, x,y, 1,24, 0,0,0,0,0,0); // bitmap header
-}
-
-int stbi_write_tga(char const *filename, int x, int y, int comp, const void *data)
-{
- int has_alpha = (comp == 2 || comp == 4);
- int colorbytes = has_alpha ? comp-1 : comp;
- int format = colorbytes < 2 ? 3 : 2; // 3 color channels (RGB/RGBA) = 2, 1 color channel (Y/YA) = 3
- return outfile(filename, -1,-1, x, y, comp, 0, (void *) data, has_alpha, 0,
- "111 221 2222 11", 0,0,format, 0,0,0, 0,0,x,y, (colorbytes+has_alpha)*8, has_alpha*8);
+ }
+ }
}
-// *************************************************************************************************
-// Radiance RGBE HDR writer
-// by Baldur Karlsson
-#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))
+static void stbiw__writef(stbi__write_context* s, const char* fmt, ...)
+{
+ va_list v;
+ va_start(v, fmt);
+ stbiw__writefv(s, fmt, v);
+ va_end(v);
+}
-void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
+static void stbiw__write_flush(stbi__write_context* s)
{
- int exponent;
- float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2]));
+ if (s->buf_used) {
+ s->func(s->context, &s->buffer, s->buf_used);
+ s->buf_used = 0;
+ }
+}
- if (maxcomp < 1e-32) {
- rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0;
- } else {
- float normalize = (float) frexp(maxcomp, &exponent) * 256.0f/maxcomp;
+static void stbiw__putc(stbi__write_context* s, unsigned char c)
+{
+ s->func(s->context, &c, 1);
+}
- rgbe[0] = (unsigned char)(linear[0] * normalize);
- rgbe[1] = (unsigned char)(linear[1] * normalize);
- rgbe[2] = (unsigned char)(linear[2] * normalize);
- rgbe[3] = (unsigned char)(exponent + 128);
- }
+static void stbiw__write1(stbi__write_context* s, unsigned char a)
+{
+ if ((size_t)s->buf_used + 1 > sizeof(s->buffer))
+ stbiw__write_flush(s);
+ s->buffer[s->buf_used++] = a;
}
-void stbiw__write_run_data(FILE *f, int length, unsigned char databyte)
+static void stbiw__write3(stbi__write_context* s, unsigned char a, unsigned char b, unsigned char c)
{
- unsigned char lengthbyte = (unsigned char) (length+128);
- STBIW_ASSERT(length+128 <= 255);
- fwrite(&lengthbyte, 1, 1, f);
- fwrite(&databyte, 1, 1, f);
+ int n;
+ if ((size_t)s->buf_used + 3 > sizeof(s->buffer))
+ stbiw__write_flush(s);
+ n = s->buf_used;
+ s->buf_used = n + 3;
+ s->buffer[n + 0] = a;
+ s->buffer[n + 1] = b;
+ s->buffer[n + 2] = c;
}
-void stbiw__write_dump_data(FILE *f, int length, unsigned char *data)
+static void stbiw__write_pixel(stbi__write_context* s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char* d)
{
- unsigned char lengthbyte = (unsigned char )(length & 0xff);
- STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code
- fwrite(&lengthbyte, 1, 1, f);
- fwrite(data, length, 1, f);
+ unsigned char bg[3] = { 255, 0, 255 }, px[3];
+ int k;
+
+ if (write_alpha < 0)
+ stbiw__write1(s, d[comp - 1]);
+
+ switch (comp) {
+ case 2: // 2 pixels = mono + alpha, alpha is written separately, so same as 1-channel case
+ case 1:
+ if (expand_mono)
+ stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp
+ else
+ stbiw__write1(s, d[0]); // monochrome TGA
+ break;
+ case 4:
+ if (!write_alpha) {
+ // composite against pink background
+ for (k = 0; k < 3; ++k)
+ px[k] = bg[k] + ((d[k] - bg[k]) * d[3]) / 255;
+ stbiw__write3(s, px[1 - rgb_dir], px[1], px[1 + rgb_dir]);
+ break;
+ }
+ /* FALLTHROUGH */
+ case 3:
+ stbiw__write3(s, d[1 - rgb_dir], d[1], d[1 + rgb_dir]);
+ break;
+ }
+ if (write_alpha > 0)
+ stbiw__write1(s, d[comp - 1]);
}
-void stbiw__write_hdr_scanline(FILE *f, int width, int comp, unsigned char *scratch, const float *scanline)
+static void stbiw__write_pixels(stbi__write_context* s, int rgb_dir, int vdir, int x, int y, int comp, void* data, int write_alpha, int scanline_pad, int expand_mono)
{
- unsigned char scanlineheader[4] = { 2, 2, 0, 0 };
- unsigned char rgbe[4];
- float linear[3];
- int x;
+ stbiw_uint32 zero = 0;
+ int i, j, j_end;
+
+ if (y <= 0)
+ return;
+
+ if (stbi__flip_vertically_on_write)
+ vdir *= -1;
+
+ if (vdir < 0) {
+ j_end = -1; j = y - 1;
+ }
+ else {
+ j_end = y; j = 0;
+ }
+
+ for (; j != j_end; j += vdir) {
+ for (i = 0; i < x; ++i) {
+ unsigned char* d = (unsigned char*)data + (j * x + i) * comp;
+ stbiw__write_pixel(s, rgb_dir, comp, write_alpha, expand_mono, d);
+ }
+ stbiw__write_flush(s);
+ s->func(s->context, &zero, scanline_pad);
+ }
+}
- scanlineheader[2] = (width&0xff00)>>8;
- scanlineheader[3] = (width&0x00ff);
+static int stbiw__outfile(stbi__write_context* s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void* data, int alpha, int pad, const char* fmt, ...)
+{
+ if (y < 0 || x < 0) {
+ return 0;
+ }
+ else {
+ va_list v;
+ va_start(v, fmt);
+ stbiw__writefv(s, fmt, v);
+ va_end(v);
+ stbiw__write_pixels(s, rgb_dir, vdir, x, y, comp, data, alpha, pad, expand_mono);
+ return 1;
+ }
+}
- /* skip RLE for images too small or large */
- if (width < 8 || width >= 32768) {
- for (x=0; x < width; x++) {
- switch (comp) {
- case 4: /* fallthrough */
- case 3: linear[2] = scanline[x*comp + 2];
- linear[1] = scanline[x*comp + 1];
- linear[0] = scanline[x*comp + 0];
- break;
- case 2: /* fallthrough */
- case 1: linear[0] = linear[1] = linear[2] = scanline[x*comp + 0];
- break;
- }
- stbiw__linear_to_rgbe(rgbe, linear);
- fwrite(rgbe, 4, 1, f);
- }
- } else {
- int c,r;
- /* encode into scratch buffer */
- for (x=0; x < width; x++) {
- switch(comp) {
+static int stbi_write_bmp_core(stbi__write_context* s, int x, int y, int comp, const void* data)
+{
+ if (comp != 4) {
+ // write RGB bitmap
+ int pad = (-x * 3) & 3;
+ return stbiw__outfile(s, -1, -1, x, y, comp, 1, (void*)data, 0, pad,
+ "11 4 22 4" "4 44 22 444444",
+ 'B', 'M', 14 + 40 + (x * 3 + pad) * y, 0, 0, 14 + 40, // file header
+ 40, x, y, 1, 24, 0, 0, 0, 0, 0, 0); // bitmap header
+ }
+ else {
+ // RGBA bitmaps need a v4 header
+ // use BI_BITFIELDS mode with 32bpp and alpha mask
+ // (straight BI_RGB with alpha mask doesn't work in most readers)
+ return stbiw__outfile(s, -1, -1, x, y, comp, 1, (void*)data, 1, 0,
+ "11 4 22 4" "4 44 22 444444 4444 4 444 444 444 444",
+ 'B', 'M', 14 + 108 + x * y * 4, 0, 0, 14 + 108, // file header
+ 108, x, y, 1, 32, 3, 0, 0, 0, 0, 0, 0xff0000, 0xff00, 0xff, 0xff000000u, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // bitmap V4 header
+ }
+}
+
+STBIWDEF int stbi_write_bmp_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const void* data)
+{
+ stbi__write_context s = { 0 };
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_bmp_core(&s, x, y, comp, data);
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_bmp(char const* filename, int x, int y, int comp, const void* data)
+{
+ stbi__write_context s = { 0 };
+ if (stbi__start_write_file(&s, filename)) {
+ int r = stbi_write_bmp_core(&s, x, y, comp, data);
+ stbi__end_write_file(&s);
+ return r;
+ }
+ else
+ return 0;
+}
+#endif //!STBI_WRITE_NO_STDIO
+
+static int stbi_write_tga_core(stbi__write_context* s, int x, int y, int comp, void* data)
+{
+ int has_alpha = (comp == 2 || comp == 4);
+ int colorbytes = has_alpha ? comp - 1 : comp;
+ int format = colorbytes < 2 ? 3 : 2; // 3 color channels (RGB/RGBA) = 2, 1 color channel (Y/YA) = 3
+
+ if (y < 0 || x < 0)
+ return 0;
+
+ if (!stbi_write_tga_with_rle) {
+ return stbiw__outfile(s, -1, -1, x, y, comp, 0, (void*)data, has_alpha, 0,
+ "111 221 2222 11", 0, 0, format, 0, 0, 0, 0, 0, x, y, (colorbytes + has_alpha) * 8, has_alpha * 8);
+ }
+ else {
+ int i, j, k;
+ int jend, jdir;
+
+ stbiw__writef(s, "111 221 2222 11", 0, 0, format + 8, 0, 0, 0, 0, 0, x, y, (colorbytes + has_alpha) * 8, has_alpha * 8);
+
+ if (stbi__flip_vertically_on_write) {
+ j = 0;
+ jend = y;
+ jdir = 1;
+ }
+ else {
+ j = y - 1;
+ jend = -1;
+ jdir = -1;
+ }
+ for (; j != jend; j += jdir) {
+ unsigned char* row = (unsigned char*)data + j * x * comp;
+ int len;
+
+ for (i = 0; i < x; i += len) {
+ unsigned char* begin = row + i * comp;
+ int diff = 1;
+ len = 1;
+
+ if (i < x - 1) {
+ ++len;
+ diff = memcmp(begin, row + (i + 1) * comp, comp);
+ if (diff) {
+ const unsigned char* prev = begin;
+ for (k = i + 2; k < x && len < 128; ++k) {
+ if (memcmp(prev, row + k * comp, comp)) {
+ prev += comp;
+ ++len;
+ }
+ else {
+ --len;
+ break;
+ }
+ }
+ }
+ else {
+ for (k = i + 2; k < x && len < 128; ++k) {
+ if (!memcmp(begin, row + k * comp, comp)) {
+ ++len;
+ }
+ else {
+ break;
+ }
+ }
+ }
+ }
+
+ if (diff) {
+ unsigned char header = STBIW_UCHAR(len - 1);
+ stbiw__write1(s, header);
+ for (k = 0; k < len; ++k) {
+ stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin + k * comp);
+ }
+ }
+ else {
+ unsigned char header = STBIW_UCHAR(len - 129);
+ stbiw__write1(s, header);
+ stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin);
+ }
+ }
+ }
+ stbiw__write_flush(s);
+ }
+ return 1;
+}
+
+STBIWDEF int stbi_write_tga_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const void* data)
+{
+ stbi__write_context s = { 0 };
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_tga_core(&s, x, y, comp, (void*)data);
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_tga(char const* filename, int x, int y, int comp, const void* data)
+{
+ stbi__write_context s = { 0 };
+ if (stbi__start_write_file(&s, filename)) {
+ int r = stbi_write_tga_core(&s, x, y, comp, (void*)data);
+ stbi__end_write_file(&s);
+ return r;
+ }
+ else
+ return 0;
+}
+#endif
+
+// *************************************************************************************************
+// Radiance RGBE HDR writer
+// by Baldur Karlsson
+
+#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))
+
+#ifndef STBI_WRITE_NO_STDIO
+
+static void stbiw__linear_to_rgbe(unsigned char* rgbe, float* linear)
+{
+ int exponent;
+ float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2]));
+
+ if (maxcomp < 1e-32f) {
+ rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0;
+ }
+ else {
+ float normalize = (float)frexp(maxcomp, &exponent) * 256.0f / maxcomp;
+
+ rgbe[0] = (unsigned char)(linear[0] * normalize);
+ rgbe[1] = (unsigned char)(linear[1] * normalize);
+ rgbe[2] = (unsigned char)(linear[2] * normalize);
+ rgbe[3] = (unsigned char)(exponent + 128);
+ }
+}
+
+static void stbiw__write_run_data(stbi__write_context* s, int length, unsigned char databyte)
+{
+ unsigned char lengthbyte = STBIW_UCHAR(length + 128);
+ STBIW_ASSERT(length + 128 <= 255);
+ s->func(s->context, &lengthbyte, 1);
+ s->func(s->context, &databyte, 1);
+}
+
+static void stbiw__write_dump_data(stbi__write_context* s, int length, unsigned char* data)
+{
+ unsigned char lengthbyte = STBIW_UCHAR(length);
+ STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code
+ s->func(s->context, &lengthbyte, 1);
+ s->func(s->context, data, length);
+}
+
+static void stbiw__write_hdr_scanline(stbi__write_context* s, int width, int ncomp, unsigned char* scratch, float* scanline)
+{
+ unsigned char scanlineheader[4] = { 2, 2, 0, 0 };
+ unsigned char rgbe[4];
+ float linear[3];
+ int x;
+
+ scanlineheader[2] = (width & 0xff00) >> 8;
+ scanlineheader[3] = (width & 0x00ff);
+
+ /* skip RLE for images too small or large */
+ if (width < 8 || width >= 32768) {
+ for (x = 0; x < width; x++) {
+ switch (ncomp) {
case 4: /* fallthrough */
- case 3: linear[2] = scanline[x*comp + 2];
- linear[1] = scanline[x*comp + 1];
- linear[0] = scanline[x*comp + 0];
- break;
- case 2: /* fallthrough */
- case 1: linear[0] = linear[1] = linear[2] = scanline[x*comp + 0];
- break;
- }
- stbiw__linear_to_rgbe(rgbe, linear);
- scratch[x + width*0] = rgbe[0];
- scratch[x + width*1] = rgbe[1];
- scratch[x + width*2] = rgbe[2];
- scratch[x + width*3] = rgbe[3];
- }
-
- fwrite(scanlineheader, 4, 1, f);
-
- /* RLE each component separately */
- for (c=0; c < 4; c++) {
- unsigned char *comp = &scratch[width*c];
-
- x = 0;
- while (x < width) {
- // find first run
- r = x;
- while (r+2 < width) {
- if (comp[r] == comp[r+1] && comp[r] == comp[r+2])
- break;
- ++r;
+ case 3: linear[2] = scanline[x * ncomp + 2];
+ linear[1] = scanline[x * ncomp + 1];
+ linear[0] = scanline[x * ncomp + 0];
+ break;
+ default:
+ linear[0] = linear[1] = linear[2] = scanline[x * ncomp + 0];
+ break;
}
- if (r+2 >= width)
- r = width;
- // dump up to first run
- while (x < r) {
- int len = r-x;
- if (len > 128) len = 128;
- stbiw__write_dump_data(f, len, &comp[x]);
- x += len;
+ stbiw__linear_to_rgbe(rgbe, linear);
+ s->func(s->context, rgbe, 4);
+ }
+ }
+ else {
+ int c, r;
+ /* encode into scratch buffer */
+ for (x = 0; x < width; x++) {
+ switch (ncomp) {
+ case 4: /* fallthrough */
+ case 3: linear[2] = scanline[x * ncomp + 2];
+ linear[1] = scanline[x * ncomp + 1];
+ linear[0] = scanline[x * ncomp + 0];
+ break;
+ default:
+ linear[0] = linear[1] = linear[2] = scanline[x * ncomp + 0];
+ break;
}
- // if there's a run, output it
- if (r+2 < width) { // same test as what we break out of in search loop, so only true if we break'd
- // find next byte after run
- while (r < width && comp[r] == comp[x])
- ++r;
- // output run up to r
- while (x < r) {
- int len = r-x;
- if (len > 127) len = 127;
- stbiw__write_run_data(f, len, comp[x]);
- x += len;
- }
+ stbiw__linear_to_rgbe(rgbe, linear);
+ scratch[x + width * 0] = rgbe[0];
+ scratch[x + width * 1] = rgbe[1];
+ scratch[x + width * 2] = rgbe[2];
+ scratch[x + width * 3] = rgbe[3];
+ }
+
+ s->func(s->context, scanlineheader, 4);
+
+ /* RLE each component separately */
+ for (c = 0; c < 4; c++) {
+ unsigned char* comp = &scratch[width * c];
+
+ x = 0;
+ while (x < width) {
+ // find first run
+ r = x;
+ while (r + 2 < width) {
+ if (comp[r] == comp[r + 1] && comp[r] == comp[r + 2])
+ break;
+ ++r;
+ }
+ if (r + 2 >= width)
+ r = width;
+ // dump up to first run
+ while (x < r) {
+ int len = r - x;
+ if (len > 128) len = 128;
+ stbiw__write_dump_data(s, len, &comp[x]);
+ x += len;
+ }
+ // if there's a run, output it
+ if (r + 2 < width) { // same test as what we break out of in search loop, so only true if we break'd
+ // find next byte after run
+ while (r < width && comp[r] == comp[x])
+ ++r;
+ // output run up to r
+ while (x < r) {
+ int len = r - x;
+ if (len > 127) len = 127;
+ stbiw__write_run_data(s, len, comp[x]);
+ x += len;
+ }
+ }
}
- }
- }
- }
+ }
+ }
}
-int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
+static int stbi_write_hdr_core(stbi__write_context* s, int x, int y, int comp, float* data)
{
- int i;
- FILE *f;
- if (y <= 0 || x <= 0 || data == NULL) return 0;
- f = fopen(filename, "wb");
- if (f) {
- /* Each component is stored separately. Allocate scratch space for full output scanline. */
- unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
- fprintf(f, "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n" );
- fprintf(f, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n" , y, x);
- for(i=0; i < y; i++)
- stbiw__write_hdr_scanline(f, x, comp, scratch, data + comp*i*x);
- STBIW_FREE(scratch);
- fclose(f);
- }
- return f != NULL;
+ if (y <= 0 || x <= 0 || data == NULL)
+ return 0;
+ else {
+ // Each component is stored separately. Allocate scratch space for full output scanline.
+ unsigned char* scratch = (unsigned char*)STBIW_MALLOC(x * 4);
+ int i, len;
+ char buffer[128];
+ char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
+ s->func(s->context, header, sizeof(header) - 1);
+
+#ifdef __STDC_LIB_EXT1__
+ len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
+#else
+ len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
+#endif
+ s->func(s->context, buffer, len);
+
+ for (i = 0; i < y; i++)
+ stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp * x * (stbi__flip_vertically_on_write ? y - 1 - i : i));
+ STBIW_FREE(scratch);
+ return 1;
+ }
+}
+
+STBIWDEF int stbi_write_hdr_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const float* data)
+{
+ stbi__write_context s = { 0 };
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_hdr_core(&s, x, y, comp, (float*)data);
}
-/////////////////////////////////////////////////////////
-// PNG
+STBIWDEF int stbi_write_hdr(char const* filename, int x, int y, int comp, const float* data)
+{
+ stbi__write_context s = { 0 };
+ if (stbi__start_write_file(&s, filename)) {
+ int r = stbi_write_hdr_core(&s, x, y, comp, (float*)data);
+ stbi__end_write_file(&s);
+ return r;
+ }
+ else
+ return 0;
+}
+#endif // STBI_WRITE_NO_STDIO
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PNG writer
+//
+
+#ifndef STBIW_ZLIB_COMPRESS
// stretchy buffer; stbiw__sbpush() == vector<>::push_back() -- stbiw__sbcount() == vector<>::size()
-#define stbiw__sbraw(a) ((int *) (a) - 2)
+#define stbiw__sbraw(a) ((int *) (void *) (a) - 2)
#define stbiw__sbm(a) stbiw__sbraw(a)[0]
#define stbiw__sbn(a) stbiw__sbraw(a)[1]
@@ -404,57 +837,57 @@ int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *da
#define stbiw__sbcount(a) ((a) ? stbiw__sbn(a) : 0)
#define stbiw__sbfree(a) ((a) ? STBIW_FREE(stbiw__sbraw(a)),0 : 0)
-static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
+static void* stbiw__sbgrowf(void** arr, int increment, int itemsize)
{
- int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
- void *p = STBIW_REALLOC(*arr ? stbiw__sbraw(*arr) : 0, itemsize * m + sizeof(int)*2);
- STBIW_ASSERT(p);
- if (p) {
- if (!*arr) ((int *) p)[1] = 0;
- *arr = (void *) ((int *) p + 2);
- stbiw__sbm(*arr) = m;
- }
- return *arr;
+ int m = *arr ? 2 * stbiw__sbm(*arr) + increment : increment + 1;
+ void* p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr) * itemsize + sizeof(int) * 2) : 0, itemsize * m + sizeof(int) * 2);
+ STBIW_ASSERT(p);
+ if (p) {
+ if (!*arr) ((int*)p)[1] = 0;
+ *arr = (void*)((int*)p + 2);
+ stbiw__sbm(*arr) = m;
+ }
+ return *arr;
}
-static unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)
+static unsigned char* stbiw__zlib_flushf(unsigned char* data, unsigned int* bitbuffer, int* bitcount)
{
- while (*bitcount >= 8) {
- stbiw__sbpush(data, (unsigned char) *bitbuffer);
- *bitbuffer >>= 8;
- *bitcount -= 8;
- }
- return data;
+ while (*bitcount >= 8) {
+ stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer));
+ *bitbuffer >>= 8;
+ *bitcount -= 8;
+ }
+ return data;
}
static int stbiw__zlib_bitrev(int code, int codebits)
{
- int res=0;
- while (codebits--) {
- res = (res << 1) | (code & 1);
- code >>= 1;
- }
- return res;
+ int res = 0;
+ while (codebits--) {
+ res = (res << 1) | (code & 1);
+ code >>= 1;
+ }
+ return res;
}
-static unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *b, int limit)
+static unsigned int stbiw__zlib_countm(unsigned char* a, unsigned char* b, int limit)
{
- int i;
- for (i=0; i < limit && i < 258; ++i)
- if (a[i] != b[i]) break;
- return i;
+ int i;
+ for (i = 0; i < limit && i < 258; ++i)
+ if (a[i] != b[i]) break;
+ return i;
}
-static unsigned int stbiw__zhash(unsigned char *data)
+static unsigned int stbiw__zhash(unsigned char* data)
{
- stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 4;
- hash += hash >> 17;
- hash ^= hash << 25;
- hash += hash >> 6;
- return hash;
+ stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 4;
+ hash += hash >> 17;
+ hash ^= hash << 25;
+ hash += hash >> 6;
+ return hash;
}
#define stbiw__zlib_flush() (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))
@@ -471,249 +904,782 @@ static unsigned int stbiw__zhash(unsigned char *data)
#define stbiw__ZHASH 16384
-unsigned char * stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality)
-{
- static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 };
- static unsigned char lengtheb[]= { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
- static unsigned short distc[] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 };
- static unsigned char disteb[] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };
- unsigned int bitbuf=0;
- int i,j, bitcount=0;
- unsigned char *out = NULL;
- unsigned char **hash_table[stbiw__ZHASH]; // 64KB on the stack!
- if (quality < 5) quality = 5;
-
- stbiw__sbpush(out, 0x78); // DEFLATE 32K window
- stbiw__sbpush(out, 0x5e); // FLEVEL = 1
- stbiw__zlib_add(1,1); // BFINAL = 1
- stbiw__zlib_add(1,2); // BTYPE = 1 -- fixed huffman
-
- for (i=0; i < stbiw__ZHASH; ++i)
- hash_table[i] = NULL;
-
- i=0;
- while (i < data_len-3) {
- // hash next 3 bytes of data to be compressed
- int h = stbiw__zhash(data+i)&(stbiw__ZHASH-1), best=3;
- unsigned char *bestloc = 0;
- unsigned char **hlist = hash_table[h];
- int n = stbiw__sbcount(hlist);
- for (j=0; j < n; ++j) {
- if (hlist[j]-data > i-32768) { // if entry lies within window
- int d = stbiw__zlib_countm(hlist[j], data+i, data_len-i);
- if (d >= best) best=d,bestloc=hlist[j];
- }
- }
- // when hash table entry is too long, delete half the entries
- if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2*quality) {
- STBIW_MEMMOVE(hash_table[h], hash_table[h]+quality, sizeof(hash_table[h][0])*quality);
- stbiw__sbn(hash_table[h]) = quality;
- }
- stbiw__sbpush(hash_table[h],data+i);
-
- if (bestloc) {
- // "lazy matching" - check match at *next* byte, and if it's better, do cur byte as literal
- h = stbiw__zhash(data+i+1)&(stbiw__ZHASH-1);
- hlist = hash_table[h];
- n = stbiw__sbcount(hlist);
- for (j=0; j < n; ++j) {
- if (hlist[j]-data > i-32767) {
- int e = stbiw__zlib_countm(hlist[j], data+i+1, data_len-i-1);
- if (e > best) { // if next match is better, bail on current match
- bestloc = NULL;
- break;
- }
+#endif // STBIW_ZLIB_COMPRESS
+
+STBIWDEF unsigned char* stbi_zlib_compress(unsigned char* data, int data_len, int* out_len, int quality)
+{
+#ifdef STBIW_ZLIB_COMPRESS
+ // user provided a zlib compress implementation, use that
+ return STBIW_ZLIB_COMPRESS(data, data_len, out_len, quality);
+#else // use builtin
+ static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 };
+ static unsigned char lengtheb[] = { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 };
+ static unsigned short distc[] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 };
+ static unsigned char disteb[] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };
+ unsigned int bitbuf = 0;
+ int i, j, bitcount = 0;
+ unsigned char* out = NULL;
+ unsigned char*** hash_table = (unsigned char***)STBIW_MALLOC(stbiw__ZHASH * sizeof(unsigned char**));
+ if (hash_table == NULL)
+ return NULL;
+ if (quality < 5) quality = 5;
+
+ stbiw__sbpush(out, 0x78); // DEFLATE 32K window
+ stbiw__sbpush(out, 0x5e); // FLEVEL = 1
+ stbiw__zlib_add(1, 1); // BFINAL = 1
+ stbiw__zlib_add(1, 2); // BTYPE = 1 -- fixed huffman
+
+ for (i = 0; i < stbiw__ZHASH; ++i)
+ hash_table[i] = NULL;
+
+ i = 0;
+ while (i < data_len - 3) {
+ // hash next 3 bytes of data to be compressed
+ int h = stbiw__zhash(data + i) & (stbiw__ZHASH - 1), best = 3;
+ unsigned char* bestloc = 0;
+ unsigned char** hlist = hash_table[h];
+ int n = stbiw__sbcount(hlist);
+ for (j = 0; j < n; ++j) {
+ if (hlist[j] - data > i - 32768) { // if entry lies within window
+ int d = stbiw__zlib_countm(hlist[j], data + i, data_len - i);
+ if (d >= best) { best = d; bestloc = hlist[j]; }
}
- }
- }
-
- if (bestloc) {
- int d = (int) (data+i - bestloc); // distance back
- STBIW_ASSERT(d <= 32767 && best <= 258);
- for (j=0; best > lengthc[j+1]-1; ++j);
- stbiw__zlib_huff(j+257);
- if (lengtheb[j]) stbiw__zlib_add(best - lengthc[j], lengtheb[j]);
- for (j=0; d > distc[j+1]-1; ++j);
- stbiw__zlib_add(stbiw__zlib_bitrev(j,5),5);
- if (disteb[j]) stbiw__zlib_add(d - distc[j], disteb[j]);
- i += best;
- } else {
- stbiw__zlib_huffb(data[i]);
- ++i;
- }
- }
- // write out final bytes
- for (;i < data_len; ++i)
- stbiw__zlib_huffb(data[i]);
- stbiw__zlib_huff(256); // end of block
- // pad with 0 bits to byte boundary
- while (bitcount)
- stbiw__zlib_add(0,1);
-
- for (i=0; i < stbiw__ZHASH; ++i)
- (void) stbiw__sbfree(hash_table[i]);
-
- {
- // compute adler32 on input
- unsigned int i=0, s1=1, s2=0, blocklen = data_len % 5552;
- int j=0;
- while (j < data_len) {
- for (i=0; i < blocklen; ++i) s1 += data[j+i], s2 += s1;
- s1 %= 65521, s2 %= 65521;
- j += blocklen;
- blocklen = 5552;
- }
- stbiw__sbpush(out, (unsigned char) (s2 >> 8));
- stbiw__sbpush(out, (unsigned char) s2);
- stbiw__sbpush(out, (unsigned char) (s1 >> 8));
- stbiw__sbpush(out, (unsigned char) s1);
- }
- *out_len = stbiw__sbn(out);
- // make returned pointer freeable
- STBIW_MEMMOVE(stbiw__sbraw(out), out, *out_len);
- return (unsigned char *) stbiw__sbraw(out);
-}
-
-unsigned int stbiw__crc32(unsigned char *buffer, int len)
-{
- static unsigned int crc_table[256];
- unsigned int crc = ~0u;
- int i,j;
- if (crc_table[1] == 0)
- for(i=0; i < 256; i++)
- for (crc_table[i]=i, j=0; j < 8; ++j)
- crc_table[i] = (crc_table[i] >> 1) ^ (crc_table[i] & 1 ? 0xedb88320 : 0);
- for (i=0; i < len; ++i)
- crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)];
- return ~crc;
-}
-
-#define stbiw__wpng4(o,a,b,c,d) ((o)[0]=(unsigned char)(a),(o)[1]=(unsigned char)(b),(o)[2]=(unsigned char)(c),(o)[3]=(unsigned char)(d),(o)+=4)
+ }
+ // when hash table entry is too long, delete half the entries
+ if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2 * quality) {
+ STBIW_MEMMOVE(hash_table[h], hash_table[h] + quality, sizeof(hash_table[h][0]) * quality);
+ stbiw__sbn(hash_table[h]) = quality;
+ }
+ stbiw__sbpush(hash_table[h], data + i);
+
+ if (bestloc) {
+ // "lazy matching" - check match at *next* byte, and if it's better, do cur byte as literal
+ h = stbiw__zhash(data + i + 1) & (stbiw__ZHASH - 1);
+ hlist = hash_table[h];
+ n = stbiw__sbcount(hlist);
+ for (j = 0; j < n; ++j) {
+ if (hlist[j] - data > i - 32767) {
+ int e = stbiw__zlib_countm(hlist[j], data + i + 1, data_len - i - 1);
+ if (e > best) { // if next match is better, bail on current match
+ bestloc = NULL;
+ break;
+ }
+ }
+ }
+ }
+
+ if (bestloc) {
+ int d = (int)(data + i - bestloc); // distance back
+ STBIW_ASSERT(d <= 32767 && best <= 258);
+ for (j = 0; best > lengthc[j + 1] - 1; ++j);
+ stbiw__zlib_huff(j + 257);
+ if (lengtheb[j]) stbiw__zlib_add(best - lengthc[j], lengtheb[j]);
+ for (j = 0; d > distc[j + 1] - 1; ++j);
+ stbiw__zlib_add(stbiw__zlib_bitrev(j, 5), 5);
+ if (disteb[j]) stbiw__zlib_add(d - distc[j], disteb[j]);
+ i += best;
+ }
+ else {
+ stbiw__zlib_huffb(data[i]);
+ ++i;
+ }
+ }
+ // write out final bytes
+ for (; i < data_len; ++i)
+ stbiw__zlib_huffb(data[i]);
+ stbiw__zlib_huff(256); // end of block
+ // pad with 0 bits to byte boundary
+ while (bitcount)
+ stbiw__zlib_add(0, 1);
+
+ for (i = 0; i < stbiw__ZHASH; ++i)
+ (void)stbiw__sbfree(hash_table[i]);
+ STBIW_FREE(hash_table);
+
+ // store uncompressed instead if compression was worse
+ if (stbiw__sbn(out) > data_len + 2 + ((data_len + 32766) / 32767) * 5) {
+ stbiw__sbn(out) = 2; // truncate to DEFLATE 32K window and FLEVEL = 1
+ for (j = 0; j < data_len;) {
+ int blocklen = data_len - j;
+ if (blocklen > 32767) blocklen = 32767;
+ stbiw__sbpush(out, data_len - j == blocklen); // BFINAL = ?, BTYPE = 0 -- no compression
+ stbiw__sbpush(out, STBIW_UCHAR(blocklen)); // LEN
+ stbiw__sbpush(out, STBIW_UCHAR(blocklen >> 8));
+ stbiw__sbpush(out, STBIW_UCHAR(~blocklen)); // NLEN
+ stbiw__sbpush(out, STBIW_UCHAR(~blocklen >> 8));
+ memcpy(out + stbiw__sbn(out), data + j, blocklen);
+ stbiw__sbn(out) += blocklen;
+ j += blocklen;
+ }
+ }
+
+ {
+ // compute adler32 on input
+ unsigned int s1 = 1, s2 = 0;
+ int blocklen = (int)(data_len % 5552);
+ j = 0;
+ while (j < data_len) {
+ for (i = 0; i < blocklen; ++i) { s1 += data[j + i]; s2 += s1; }
+ s1 %= 65521; s2 %= 65521;
+ j += blocklen;
+ blocklen = 5552;
+ }
+ stbiw__sbpush(out, STBIW_UCHAR(s2 >> 8));
+ stbiw__sbpush(out, STBIW_UCHAR(s2));
+ stbiw__sbpush(out, STBIW_UCHAR(s1 >> 8));
+ stbiw__sbpush(out, STBIW_UCHAR(s1));
+ }
+ *out_len = stbiw__sbn(out);
+ // make returned pointer freeable
+ STBIW_MEMMOVE(stbiw__sbraw(out), out, *out_len);
+ return (unsigned char*)stbiw__sbraw(out);
+#endif // STBIW_ZLIB_COMPRESS
+}
+
+static unsigned int stbiw__crc32(unsigned char* buffer, int len)
+{
+#ifdef STBIW_CRC32
+ return STBIW_CRC32(buffer, len);
+#else
+ static unsigned int crc_table[256] =
+ {
+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+ 0x0eDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+ };
+
+ unsigned int crc = ~0u;
+ int i;
+ for (i = 0; i < len; ++i)
+ crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)];
+ return ~crc;
+#endif
+}
+
+#define stbiw__wpng4(o,a,b,c,d) ((o)[0]=STBIW_UCHAR(a),(o)[1]=STBIW_UCHAR(b),(o)[2]=STBIW_UCHAR(c),(o)[3]=STBIW_UCHAR(d),(o)+=4)
#define stbiw__wp32(data,v) stbiw__wpng4(data, (v)>>24,(v)>>16,(v)>>8,(v));
#define stbiw__wptag(data,s) stbiw__wpng4(data, s[0],s[1],s[2],s[3])
-static void stbiw__wpcrc(unsigned char **data, int len)
+static void stbiw__wpcrc(unsigned char** data, int len)
{
- unsigned int crc = stbiw__crc32(*data - len - 4, len+4);
- stbiw__wp32(*data, crc);
+ unsigned int crc = stbiw__crc32(*data - len - 4, len + 4);
+ stbiw__wp32(*data, crc);
}
static unsigned char stbiw__paeth(int a, int b, int c)
{
- int p = a + b - c, pa = abs(p-a), pb = abs(p-b), pc = abs(p-c);
- if (pa <= pb && pa <= pc) return (unsigned char) a;
- if (pb <= pc) return (unsigned char) b;
- return (unsigned char) c;
-}
-
-unsigned char *stbi_write_png_to_mem(unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len)
-{
- int ctype[5] = { -1, 0, 4, 2, 6 };
- unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };
- unsigned char *out,*o, *filt, *zlib;
- signed char *line_buffer;
- int i,j,k,p,zlen;
-
- if (stride_bytes == 0)
- stride_bytes = x * n;
-
- filt = (unsigned char *) STBIW_MALLOC((x*n+1) * y); if (!filt) return 0;
- line_buffer = (signed char *) STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; }
- for (j=0; j < y; ++j) {
- static int mapping[] = { 0,1,2,3,4 };
- static int firstmap[] = { 0,1,0,5,6 };
- int *mymap = j ? mapping : firstmap;
- int best = 0, bestval = 0x7fffffff;
- for (p=0; p < 2; ++p) {
- for (k= p?best:0; k < 5; ++k) {
- int type = mymap[k],est=0;
- unsigned char *z = pixels + stride_bytes*j;
- for (i=0; i < n; ++i)
- switch (type) {
- case 0: line_buffer[i] = z[i]; break;
- case 1: line_buffer[i] = z[i]; break;
- case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
- case 3: line_buffer[i] = z[i] - (z[i-stride_bytes]>>1); break;
- case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-stride_bytes],0)); break;
- case 5: line_buffer[i] = z[i]; break;
- case 6: line_buffer[i] = z[i]; break;
- }
- for (i=n; i < x*n; ++i) {
- switch (type) {
- case 0: line_buffer[i] = z[i]; break;
- case 1: line_buffer[i] = z[i] - z[i-n]; break;
- case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;
- case 3: line_buffer[i] = z[i] - ((z[i-n] + z[i-stride_bytes])>>1); break;
- case 4: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-stride_bytes], z[i-stride_bytes-n]); break;
- case 5: line_buffer[i] = z[i] - (z[i-n]>>1); break;
- case 6: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break;
- }
+ int p = a + b - c, pa = abs(p - a), pb = abs(p - b), pc = abs(p - c);
+ if (pa <= pb && pa <= pc) return STBIW_UCHAR(a);
+ if (pb <= pc) return STBIW_UCHAR(b);
+ return STBIW_UCHAR(c);
+}
+
+// @OPTIMIZE: provide an option that always forces left-predict or paeth predict
+static void stbiw__encode_png_line(unsigned char* pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char* line_buffer)
+{
+ static int mapping[] = { 0,1,2,3,4 };
+ static int firstmap[] = { 0,1,0,5,6 };
+ int* mymap = (y != 0) ? mapping : firstmap;
+ int i;
+ int type = mymap[filter_type];
+ unsigned char* z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height - 1 - y : y);
+ int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes;
+
+ if (type == 0) {
+ memcpy(line_buffer, z, width * n);
+ return;
+ }
+
+ // first loop isn't optimized since it's just one pixel
+ for (i = 0; i < n; ++i) {
+ switch (type) {
+ case 1: line_buffer[i] = z[i]; break;
+ case 2: line_buffer[i] = z[i] - z[i - signed_stride]; break;
+ case 3: line_buffer[i] = z[i] - (z[i - signed_stride] >> 1); break;
+ case 4: line_buffer[i] = (signed char)(z[i] - stbiw__paeth(0, z[i - signed_stride], 0)); break;
+ case 5: line_buffer[i] = z[i]; break;
+ case 6: line_buffer[i] = z[i]; break;
+ }
+ }
+ switch (type) {
+ case 1: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - z[i - n]; break;
+ case 2: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - z[i - signed_stride]; break;
+ case 3: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - ((z[i - n] + z[i - signed_stride]) >> 1); break;
+ case 4: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i - n], z[i - signed_stride], z[i - signed_stride - n]); break;
+ case 5: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - (z[i - n] >> 1); break;
+ case 6: for (i = n; i < width * n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i - n], 0, 0); break;
+ }
+}
+
+STBIWDEF unsigned char* stbi_write_png_to_mem(const unsigned char* pixels, int stride_bytes, int x, int y, int n, int* out_len)
+{
+ int force_filter = stbi_write_force_png_filter;
+ int ctype[5] = { -1, 0, 4, 2, 6 };
+ unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };
+ unsigned char* out, * o, * filt, * zlib;
+ signed char* line_buffer;
+ int j, zlen;
+
+ if (stride_bytes == 0)
+ stride_bytes = x * n;
+
+ if (force_filter >= 5) {
+ force_filter = -1;
+ }
+
+ filt = (unsigned char*)STBIW_MALLOC((x * n + 1) * y); if (!filt) return 0;
+ line_buffer = (signed char*)STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; }
+ for (j = 0; j < y; ++j) {
+ int filter_type;
+ if (force_filter > -1) {
+ filter_type = force_filter;
+ stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, force_filter, line_buffer);
+ }
+ else { // Estimate the best filter by running through all of them:
+ int best_filter = 0, best_filter_val = 0x7fffffff, est, i;
+ for (filter_type = 0; filter_type < 5; filter_type++) {
+ stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, filter_type, line_buffer);
+
+ // Estimate the entropy of the line using this filter; the less, the better.
+ est = 0;
+ for (i = 0; i < x * n; ++i) {
+ est += abs((signed char)line_buffer[i]);
+ }
+ if (est < best_filter_val) {
+ best_filter_val = est;
+ best_filter = filter_type;
+ }
+ }
+ if (filter_type != best_filter) { // If the last iteration already got us the best filter, don't redo it
+ stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, best_filter, line_buffer);
+ filter_type = best_filter;
+ }
+ }
+ // when we get here, filter_type contains the filter type, and line_buffer contains the data
+ filt[j * (x * n + 1)] = (unsigned char)filter_type;
+ STBIW_MEMMOVE(filt + j * (x * n + 1) + 1, line_buffer, x * n);
+ }
+ STBIW_FREE(line_buffer);
+ zlib = stbi_zlib_compress(filt, y * (x * n + 1), &zlen, stbi_write_png_compression_level);
+ STBIW_FREE(filt);
+ if (!zlib) return 0;
+
+ // each tag requires 12 bytes of overhead
+ out = (unsigned char*)STBIW_MALLOC(8 + 12 + 13 + 12 + zlen + 12);
+ if (!out) return 0;
+ *out_len = 8 + 12 + 13 + 12 + zlen + 12;
+
+ o = out;
+ STBIW_MEMMOVE(o, sig, 8); o += 8;
+ stbiw__wp32(o, 13); // header length
+ stbiw__wptag(o, "IHDR");
+ stbiw__wp32(o, x);
+ stbiw__wp32(o, y);
+ *o++ = 8;
+ *o++ = STBIW_UCHAR(ctype[n]);
+ *o++ = 0;
+ *o++ = 0;
+ *o++ = 0;
+ stbiw__wpcrc(&o, 13);
+
+ stbiw__wp32(o, zlen);
+ stbiw__wptag(o, "IDAT");
+ STBIW_MEMMOVE(o, zlib, zlen);
+ o += zlen;
+ STBIW_FREE(zlib);
+ stbiw__wpcrc(&o, zlen);
+
+ stbiw__wp32(o, 0);
+ stbiw__wptag(o, "IEND");
+ stbiw__wpcrc(&o, 0);
+
+ STBIW_ASSERT(o == out + *out_len);
+
+ return out;
+}
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_png(char const* filename, int x, int y, int comp, const void* data, int stride_bytes)
+{
+ FILE* f;
+ int len;
+ unsigned char* png = stbi_write_png_to_mem((const unsigned char*)data, stride_bytes, x, y, comp, &len);
+ if (png == NULL) return 0;
+
+ f = stbiw__fopen(filename, "wb");
+ if (!f) { STBIW_FREE(png); return 0; }
+ fwrite(png, 1, len, f);
+ fclose(f);
+ STBIW_FREE(png);
+ return 1;
+}
+#endif
+
+STBIWDEF int stbi_write_png_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const void* data, int stride_bytes)
+{
+ int len;
+ unsigned char* png = stbi_write_png_to_mem((const unsigned char*)data, stride_bytes, x, y, comp, &len);
+ if (png == NULL) return 0;
+ func(context, png, len);
+ STBIW_FREE(png);
+ return 1;
+}
+
+
+/* ***************************************************************************
+ *
+ * JPEG writer
+ *
+ * This is based on Jon Olick's jo_jpeg.cpp:
+ * public domain Simple, Minimalistic JPEG writer - http://www.jonolick.com/code.html
+ */
+
+static const unsigned char stbiw__jpg_ZigZag[] = { 0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,
+ 24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63 };
+
+static void stbiw__jpg_writeBits(stbi__write_context* s, int* bitBufP, int* bitCntP, const unsigned short* bs) {
+ int bitBuf = *bitBufP, bitCnt = *bitCntP;
+ bitCnt += bs[1];
+ bitBuf |= bs[0] << (24 - bitCnt);
+ while (bitCnt >= 8) {
+ unsigned char c = (bitBuf >> 16) & 255;
+ stbiw__putc(s, c);
+ if (c == 255) {
+ stbiw__putc(s, 0);
+ }
+ bitBuf <<= 8;
+ bitCnt -= 8;
+ }
+ *bitBufP = bitBuf;
+ *bitCntP = bitCnt;
+}
+
+static void stbiw__jpg_DCT(float* d0p, float* d1p, float* d2p, float* d3p, float* d4p, float* d5p, float* d6p, float* d7p) {
+ float d0 = *d0p, d1 = *d1p, d2 = *d2p, d3 = *d3p, d4 = *d4p, d5 = *d5p, d6 = *d6p, d7 = *d7p;
+ float z1, z2, z3, z4, z5, z11, z13;
+
+ float tmp0 = d0 + d7;
+ float tmp7 = d0 - d7;
+ float tmp1 = d1 + d6;
+ float tmp6 = d1 - d6;
+ float tmp2 = d2 + d5;
+ float tmp5 = d2 - d5;
+ float tmp3 = d3 + d4;
+ float tmp4 = d3 - d4;
+
+ // Even part
+ float tmp10 = tmp0 + tmp3; // phase 2
+ float tmp13 = tmp0 - tmp3;
+ float tmp11 = tmp1 + tmp2;
+ float tmp12 = tmp1 - tmp2;
+
+ d0 = tmp10 + tmp11; // phase 3
+ d4 = tmp10 - tmp11;
+
+ z1 = (tmp12 + tmp13) * 0.707106781f; // c4
+ d2 = tmp13 + z1; // phase 5
+ d6 = tmp13 - z1;
+
+ // Odd part
+ tmp10 = tmp4 + tmp5; // phase 2
+ tmp11 = tmp5 + tmp6;
+ tmp12 = tmp6 + tmp7;
+
+ // The rotator is modified from fig 4-8 to avoid extra negations.
+ z5 = (tmp10 - tmp12) * 0.382683433f; // c6
+ z2 = tmp10 * 0.541196100f + z5; // c2-c6
+ z4 = tmp12 * 1.306562965f + z5; // c2+c6
+ z3 = tmp11 * 0.707106781f; // c4
+
+ z11 = tmp7 + z3; // phase 5
+ z13 = tmp7 - z3;
+
+ *d5p = z13 + z2; // phase 6
+ *d3p = z13 - z2;
+ *d1p = z11 + z4;
+ *d7p = z11 - z4;
+
+ *d0p = d0; *d2p = d2; *d4p = d4; *d6p = d6;
+}
+
+static void stbiw__jpg_calcBits(int val, unsigned short bits[2]) {
+ int tmp1 = val < 0 ? -val : val;
+ val = val < 0 ? val - 1 : val;
+ bits[1] = 1;
+ while (tmp1 >>= 1) {
+ ++bits[1];
+ }
+ bits[0] = val & ((1 << bits[1]) - 1);
+}
+
+static int stbiw__jpg_processDU(stbi__write_context* s, int* bitBuf, int* bitCnt, float* CDU, int du_stride, float* fdtbl, int DC, const unsigned short HTDC[256][2], const unsigned short HTAC[256][2]) {
+ const unsigned short EOB[2] = { HTAC[0x00][0], HTAC[0x00][1] };
+ const unsigned short M16zeroes[2] = { HTAC[0xF0][0], HTAC[0xF0][1] };
+ int dataOff, i, j, n, diff, end0pos, x, y;
+ int DU[64];
+
+ // DCT rows
+ for (dataOff = 0, n = du_stride * 8; dataOff < n; dataOff += du_stride) {
+ stbiw__jpg_DCT(&CDU[dataOff], &CDU[dataOff + 1], &CDU[dataOff + 2], &CDU[dataOff + 3], &CDU[dataOff + 4], &CDU[dataOff + 5], &CDU[dataOff + 6], &CDU[dataOff + 7]);
+ }
+ // DCT columns
+ for (dataOff = 0; dataOff < 8; ++dataOff) {
+ stbiw__jpg_DCT(&CDU[dataOff], &CDU[dataOff + du_stride], &CDU[dataOff + du_stride * 2], &CDU[dataOff + du_stride * 3], &CDU[dataOff + du_stride * 4],
+ &CDU[dataOff + du_stride * 5], &CDU[dataOff + du_stride * 6], &CDU[dataOff + du_stride * 7]);
+ }
+ // Quantize/descale/zigzag the coefficients
+ for (y = 0, j = 0; y < 8; ++y) {
+ for (x = 0; x < 8; ++x, ++j) {
+ float v;
+ i = y * du_stride + x;
+ v = CDU[i] * fdtbl[j];
+ // DU[stbiw__jpg_ZigZag[j]] = (int)(v < 0 ? ceilf(v - 0.5f) : floorf(v + 0.5f));
+ // ceilf() and floorf() are C99, not C89, but I /think/ they're not needed here anyway?
+ DU[stbiw__jpg_ZigZag[j]] = (int)(v < 0 ? v - 0.5f : v + 0.5f);
+ }
+ }
+
+ // Encode DC
+ diff = DU[0] - DC;
+ if (diff == 0) {
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, HTDC[0]);
+ }
+ else {
+ unsigned short bits[2];
+ stbiw__jpg_calcBits(diff, bits);
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, HTDC[bits[1]]);
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, bits);
+ }
+ // Encode ACs
+ end0pos = 63;
+ for (; (end0pos > 0) && (DU[end0pos] == 0); --end0pos) {
+ }
+ // end0pos = first element in reverse order !=0
+ if (end0pos == 0) {
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, EOB);
+ return DU[0];
+ }
+ for (i = 1; i <= end0pos; ++i) {
+ int startpos = i;
+ int nrzeroes;
+ unsigned short bits[2];
+ for (; DU[i] == 0 && i <= end0pos; ++i) {
+ }
+ nrzeroes = i - startpos;
+ if (nrzeroes >= 16) {
+ int lng = nrzeroes >> 4;
+ int nrmarker;
+ for (nrmarker = 1; nrmarker <= lng; ++nrmarker)
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, M16zeroes);
+ nrzeroes &= 15;
+ }
+ stbiw__jpg_calcBits(DU[i], bits);
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, HTAC[(nrzeroes << 4) + bits[1]]);
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, bits);
+ }
+ if (end0pos != 63) {
+ stbiw__jpg_writeBits(s, bitBuf, bitCnt, EOB);
+ }
+ return DU[0];
+}
+
+static int stbi_write_jpg_core(stbi__write_context* s, int width, int height, int comp, const void* data, int quality) {
+ // Constants that don't pollute global namespace
+ static const unsigned char std_dc_luminance_nrcodes[] = { 0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0 };
+ static const unsigned char std_dc_luminance_values[] = { 0,1,2,3,4,5,6,7,8,9,10,11 };
+ static const unsigned char std_ac_luminance_nrcodes[] = { 0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d };
+ static const unsigned char std_ac_luminance_values[] = {
+ 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
+ 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
+ 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
+ 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
+ 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
+ 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
+ 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa
+ };
+ static const unsigned char std_dc_chrominance_nrcodes[] = { 0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0 };
+ static const unsigned char std_dc_chrominance_values[] = { 0,1,2,3,4,5,6,7,8,9,10,11 };
+ static const unsigned char std_ac_chrominance_nrcodes[] = { 0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77 };
+ static const unsigned char std_ac_chrominance_values[] = {
+ 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
+ 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
+ 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
+ 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
+ 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
+ 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa
+ };
+ // Huffman tables
+ static const unsigned short YDC_HT[256][2] = { {0,2},{2,3},{3,3},{4,3},{5,3},{6,3},{14,4},{30,5},{62,6},{126,7},{254,8},{510,9} };
+ static const unsigned short UVDC_HT[256][2] = { {0,2},{1,2},{2,2},{6,3},{14,4},{30,5},{62,6},{126,7},{254,8},{510,9},{1022,10},{2046,11} };
+ static const unsigned short YAC_HT[256][2] = {
+ {10,4},{0,2},{1,2},{4,3},{11,4},{26,5},{120,7},{248,8},{1014,10},{65410,16},{65411,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {12,4},{27,5},{121,7},{502,9},{2038,11},{65412,16},{65413,16},{65414,16},{65415,16},{65416,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {28,5},{249,8},{1015,10},{4084,12},{65417,16},{65418,16},{65419,16},{65420,16},{65421,16},{65422,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {58,6},{503,9},{4085,12},{65423,16},{65424,16},{65425,16},{65426,16},{65427,16},{65428,16},{65429,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {59,6},{1016,10},{65430,16},{65431,16},{65432,16},{65433,16},{65434,16},{65435,16},{65436,16},{65437,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {122,7},{2039,11},{65438,16},{65439,16},{65440,16},{65441,16},{65442,16},{65443,16},{65444,16},{65445,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {123,7},{4086,12},{65446,16},{65447,16},{65448,16},{65449,16},{65450,16},{65451,16},{65452,16},{65453,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {250,8},{4087,12},{65454,16},{65455,16},{65456,16},{65457,16},{65458,16},{65459,16},{65460,16},{65461,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {504,9},{32704,15},{65462,16},{65463,16},{65464,16},{65465,16},{65466,16},{65467,16},{65468,16},{65469,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {505,9},{65470,16},{65471,16},{65472,16},{65473,16},{65474,16},{65475,16},{65476,16},{65477,16},{65478,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {506,9},{65479,16},{65480,16},{65481,16},{65482,16},{65483,16},{65484,16},{65485,16},{65486,16},{65487,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {1017,10},{65488,16},{65489,16},{65490,16},{65491,16},{65492,16},{65493,16},{65494,16},{65495,16},{65496,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {1018,10},{65497,16},{65498,16},{65499,16},{65500,16},{65501,16},{65502,16},{65503,16},{65504,16},{65505,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {2040,11},{65506,16},{65507,16},{65508,16},{65509,16},{65510,16},{65511,16},{65512,16},{65513,16},{65514,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {65515,16},{65516,16},{65517,16},{65518,16},{65519,16},{65520,16},{65521,16},{65522,16},{65523,16},{65524,16},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {2041,11},{65525,16},{65526,16},{65527,16},{65528,16},{65529,16},{65530,16},{65531,16},{65532,16},{65533,16},{65534,16},{0,0},{0,0},{0,0},{0,0},{0,0}
+ };
+ static const unsigned short UVAC_HT[256][2] = {
+ {0,2},{1,2},{4,3},{10,4},{24,5},{25,5},{56,6},{120,7},{500,9},{1014,10},{4084,12},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {11,4},{57,6},{246,8},{501,9},{2038,11},{4085,12},{65416,16},{65417,16},{65418,16},{65419,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {26,5},{247,8},{1015,10},{4086,12},{32706,15},{65420,16},{65421,16},{65422,16},{65423,16},{65424,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {27,5},{248,8},{1016,10},{4087,12},{65425,16},{65426,16},{65427,16},{65428,16},{65429,16},{65430,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {58,6},{502,9},{65431,16},{65432,16},{65433,16},{65434,16},{65435,16},{65436,16},{65437,16},{65438,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {59,6},{1017,10},{65439,16},{65440,16},{65441,16},{65442,16},{65443,16},{65444,16},{65445,16},{65446,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {121,7},{2039,11},{65447,16},{65448,16},{65449,16},{65450,16},{65451,16},{65452,16},{65453,16},{65454,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {122,7},{2040,11},{65455,16},{65456,16},{65457,16},{65458,16},{65459,16},{65460,16},{65461,16},{65462,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {249,8},{65463,16},{65464,16},{65465,16},{65466,16},{65467,16},{65468,16},{65469,16},{65470,16},{65471,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {503,9},{65472,16},{65473,16},{65474,16},{65475,16},{65476,16},{65477,16},{65478,16},{65479,16},{65480,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {504,9},{65481,16},{65482,16},{65483,16},{65484,16},{65485,16},{65486,16},{65487,16},{65488,16},{65489,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {505,9},{65490,16},{65491,16},{65492,16},{65493,16},{65494,16},{65495,16},{65496,16},{65497,16},{65498,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {506,9},{65499,16},{65500,16},{65501,16},{65502,16},{65503,16},{65504,16},{65505,16},{65506,16},{65507,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {2041,11},{65508,16},{65509,16},{65510,16},{65511,16},{65512,16},{65513,16},{65514,16},{65515,16},{65516,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {16352,14},{65517,16},{65518,16},{65519,16},{65520,16},{65521,16},{65522,16},{65523,16},{65524,16},{65525,16},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {1018,10},{32707,15},{65526,16},{65527,16},{65528,16},{65529,16},{65530,16},{65531,16},{65532,16},{65533,16},{65534,16},{0,0},{0,0},{0,0},{0,0},{0,0}
+ };
+ static const int YQT[] = { 16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,
+ 37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99 };
+ static const int UVQT[] = { 17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,
+ 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99 };
+ static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f,
+ 1.0f * 2.828427125f, 0.785694958f * 2.828427125f, 0.541196100f * 2.828427125f, 0.275899379f * 2.828427125f };
+
+ int row, col, i, k, subsample;
+ float fdtbl_Y[64], fdtbl_UV[64];
+ unsigned char YTable[64], UVTable[64];
+
+ if (!data || !width || !height || comp > 4 || comp < 1) {
+ return 0;
+ }
+
+ quality = quality ? quality : 90;
+ subsample = quality <= 90 ? 1 : 0;
+ quality = quality < 1 ? 1 : quality > 100 ? 100 : quality;
+ quality = quality < 50 ? 5000 / quality : 200 - quality * 2;
+
+ for (i = 0; i < 64; ++i) {
+ int uvti, yti = (YQT[i] * quality + 50) / 100;
+ YTable[stbiw__jpg_ZigZag[i]] = (unsigned char)(yti < 1 ? 1 : yti > 255 ? 255 : yti);
+ uvti = (UVQT[i] * quality + 50) / 100;
+ UVTable[stbiw__jpg_ZigZag[i]] = (unsigned char)(uvti < 1 ? 1 : uvti > 255 ? 255 : uvti);
+ }
+
+ for (row = 0, k = 0; row < 8; ++row) {
+ for (col = 0; col < 8; ++col, ++k) {
+ fdtbl_Y[k] = 1 / (YTable[stbiw__jpg_ZigZag[k]] * aasf[row] * aasf[col]);
+ fdtbl_UV[k] = 1 / (UVTable[stbiw__jpg_ZigZag[k]] * aasf[row] * aasf[col]);
+ }
+ }
+
+ // Write Headers
+ {
+ static const unsigned char head0[] = { 0xFF,0xD8,0xFF,0xE0,0,0x10,'J','F','I','F',0,1,1,0,0,1,0,1,0,0,0xFF,0xDB,0,0x84,0 };
+ static const unsigned char head2[] = { 0xFF,0xDA,0,0xC,3,1,0,2,0x11,3,0x11,0,0x3F,0 };
+ const unsigned char head1[] = { 0xFF,0xC0,0,0x11,8,(unsigned char)(height >> 8),STBIW_UCHAR(height),(unsigned char)(width >> 8),STBIW_UCHAR(width),
+ 3,1,(unsigned char)(subsample ? 0x22 : 0x11),0,2,0x11,1,3,0x11,1,0xFF,0xC4,0x01,0xA2,0 };
+ s->func(s->context, (void*)head0, sizeof(head0));
+ s->func(s->context, (void*)YTable, sizeof(YTable));
+ stbiw__putc(s, 1);
+ s->func(s->context, UVTable, sizeof(UVTable));
+ s->func(s->context, (void*)head1, sizeof(head1));
+ s->func(s->context, (void*)(std_dc_luminance_nrcodes + 1), sizeof(std_dc_luminance_nrcodes) - 1);
+ s->func(s->context, (void*)std_dc_luminance_values, sizeof(std_dc_luminance_values));
+ stbiw__putc(s, 0x10); // HTYACinfo
+ s->func(s->context, (void*)(std_ac_luminance_nrcodes + 1), sizeof(std_ac_luminance_nrcodes) - 1);
+ s->func(s->context, (void*)std_ac_luminance_values, sizeof(std_ac_luminance_values));
+ stbiw__putc(s, 1); // HTUDCinfo
+ s->func(s->context, (void*)(std_dc_chrominance_nrcodes + 1), sizeof(std_dc_chrominance_nrcodes) - 1);
+ s->func(s->context, (void*)std_dc_chrominance_values, sizeof(std_dc_chrominance_values));
+ stbiw__putc(s, 0x11); // HTUACinfo
+ s->func(s->context, (void*)(std_ac_chrominance_nrcodes + 1), sizeof(std_ac_chrominance_nrcodes) - 1);
+ s->func(s->context, (void*)std_ac_chrominance_values, sizeof(std_ac_chrominance_values));
+ s->func(s->context, (void*)head2, sizeof(head2));
+ }
+
+ // Encode 8x8 macroblocks
+ {
+ static const unsigned short fillBits[] = { 0x7F, 7 };
+ int DCY = 0, DCU = 0, DCV = 0;
+ int bitBuf = 0, bitCnt = 0;
+ // comp == 2 is grey+alpha (alpha is ignored)
+ int ofsG = comp > 2 ? 1 : 0, ofsB = comp > 2 ? 2 : 0;
+ const unsigned char* dataR = (const unsigned char*)data;
+ const unsigned char* dataG = dataR + ofsG;
+ const unsigned char* dataB = dataR + ofsB;
+ int x, y, pos;
+ if (subsample) {
+ for (y = 0; y < height; y += 16) {
+ for (x = 0; x < width; x += 16) {
+ float Y[256], U[256], V[256];
+ for (row = y, pos = 0; row < y + 16; ++row) {
+ // row >= height => use last input row
+ int clamped_row = (row < height) ? row : height - 1;
+ int base_p = (stbi__flip_vertically_on_write ? (height - 1 - clamped_row) : clamped_row) * width * comp;
+ for (col = x; col < x + 16; ++col, ++pos) {
+ // if col >= width => use pixel from last input column
+ int p = base_p + ((col < width) ? col : (width - 1)) * comp;
+ float r = dataR[p], g = dataG[p], b = dataB[p];
+ Y[pos] = +0.29900f * r + 0.58700f * g + 0.11400f * b - 128;
+ U[pos] = -0.16874f * r - 0.33126f * g + 0.50000f * b;
+ V[pos] = +0.50000f * r - 0.41869f * g - 0.08131f * b;
+ }
+ }
+ DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y + 0, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+ DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y + 8, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+ DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y + 128, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+ DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y + 136, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+
+ // subsample U,V
+ {
+ float subU[64], subV[64];
+ int yy, xx;
+ for (yy = 0, pos = 0; yy < 8; ++yy) {
+ for (xx = 0; xx < 8; ++xx, ++pos) {
+ int j = yy * 32 + xx * 2;
+ subU[pos] = (U[j + 0] + U[j + 1] + U[j + 16] + U[j + 17]) * 0.25f;
+ subV[pos] = (V[j + 0] + V[j + 1] + V[j + 16] + V[j + 17]) * 0.25f;
+ }
+ }
+ DCU = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, subU, 8, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+ DCV = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, subV, 8, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+ }
+ }
+ }
+ }
+ else {
+ for (y = 0; y < height; y += 8) {
+ for (x = 0; x < width; x += 8) {
+ float Y[64], U[64], V[64];
+ for (row = y, pos = 0; row < y + 8; ++row) {
+ // row >= height => use last input row
+ int clamped_row = (row < height) ? row : height - 1;
+ int base_p = (stbi__flip_vertically_on_write ? (height - 1 - clamped_row) : clamped_row) * width * comp;
+ for (col = x; col < x + 8; ++col, ++pos) {
+ // if col >= width => use pixel from last input column
+ int p = base_p + ((col < width) ? col : (width - 1)) * comp;
+ float r = dataR[p], g = dataG[p], b = dataB[p];
+ Y[pos] = +0.29900f * r + 0.58700f * g + 0.11400f * b - 128;
+ U[pos] = -0.16874f * r - 0.33126f * g + 0.50000f * b;
+ V[pos] = +0.50000f * r - 0.41869f * g - 0.08131f * b;
+ }
+ }
+
+ DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y, 8, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+ DCU = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, U, 8, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+ DCV = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, V, 8, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+ }
}
- if (p) break;
- for (i=0; i < x*n; ++i)
- est += abs((signed char) line_buffer[i]);
- if (est < bestval) { bestval = est; best = k; }
- }
- }
- // when we get here, best contains the filter type, and line_buffer contains the data
- filt[j*(x*n+1)] = (unsigned char) best;
- STBIW_MEMMOVE(filt+j*(x*n+1)+1, line_buffer, x*n);
- }
- STBIW_FREE(line_buffer);
- zlib = stbi_zlib_compress(filt, y*( x*n+1), &zlen, 8); // increase 8 to get smaller but use more memory
- STBIW_FREE(filt);
- if (!zlib) return 0;
-
- // each tag requires 12 bytes of overhead
- out = (unsigned char *) STBIW_MALLOC(8 + 12+13 + 12+zlen + 12);
- if (!out) return 0;
- *out_len = 8 + 12+13 + 12+zlen + 12;
-
- o=out;
- STBIW_MEMMOVE(o,sig,8); o+= 8;
- stbiw__wp32(o, 13); // header length
- stbiw__wptag(o, "IHDR");
- stbiw__wp32(o, x);
- stbiw__wp32(o, y);
- *o++ = 8;
- *o++ = (unsigned char) ctype[n];
- *o++ = 0;
- *o++ = 0;
- *o++ = 0;
- stbiw__wpcrc(&o,13);
-
- stbiw__wp32(o, zlen);
- stbiw__wptag(o, "IDAT");
- STBIW_MEMMOVE(o, zlib, zlen);
- o += zlen;
- STBIW_FREE(zlib);
- stbiw__wpcrc(&o, zlen);
-
- stbiw__wp32(o,0);
- stbiw__wptag(o, "IEND");
- stbiw__wpcrc(&o,0);
-
- STBIW_ASSERT(o == out + *out_len);
-
- return out;
-}
-
-int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
-{
- FILE *f;
- int len;
- unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
- if (!png) return 0;
- f = fopen(filename, "wb");
- if (!f) { STBIW_FREE(png); return 0; }
- fwrite(png, 1, len, f);
- fclose(f);
- STBIW_FREE(png);
- return 1;
+ }
+
+ // Do the bit alignment of the EOI marker
+ stbiw__jpg_writeBits(s, &bitBuf, &bitCnt, fillBits);
+ }
+
+ // EOI
+ stbiw__putc(s, 0xFF);
+ stbiw__putc(s, 0xD9);
+
+ return 1;
+}
+
+STBIWDEF int stbi_write_jpg_to_func(stbi_write_func* func, void* context, int x, int y, int comp, const void* data, int quality)
+{
+ stbi__write_context s = { 0 };
+ stbi__start_write_callbacks(&s, func, context);
+ return stbi_write_jpg_core(&s, x, y, comp, (void*)data, quality);
+}
+
+
+#ifndef STBI_WRITE_NO_STDIO
+STBIWDEF int stbi_write_jpg(char const* filename, int x, int y, int comp, const void* data, int quality)
+{
+ stbi__write_context s = { 0 };
+ if (stbi__start_write_file(&s, filename)) {
+ int r = stbi_write_jpg_core(&s, x, y, comp, data, quality);
+ stbi__end_write_file(&s);
+ return r;
+ }
+ else
+ return 0;
}
+#endif
+
#endif // STB_IMAGE_WRITE_IMPLEMENTATION
/* Revision history
+ 1.16 (2021-07-11)
+ make Deflate code emit uncompressed blocks when it would otherwise expand
+ support writing BMPs with alpha channel
+ 1.15 (2020-07-13) unknown
+ 1.14 (2020-02-02) updated JPEG writer to downsample chroma channels
+ 1.13
+ 1.12
+ 1.11 (2019-08-11)
+
+ 1.10 (2019-02-07)
+ support utf8 filenames in Windows; fix warnings and platform ifdefs
+ 1.09 (2018-02-11)
+ fix typo in zlib quality API, improve STB_I_W_STATIC in C++
+ 1.08 (2018-01-29)
+ add stbi__flip_vertically_on_write, external zlib, zlib quality, choose PNG filter
+ 1.07 (2017-07-24)
+ doc fix
+ 1.06 (2017-07-23)
+ writing JPEG (using Jon Olick's code)
+ 1.05 ???
+ 1.04 (2017-03-03)
+ monochrome BMP expansion
+ 1.03 ???
+ 1.02 (2016-04-02)
+ avoid allocating large structures on the stack
+ 1.01 (2016-01-16)
+ STBIW_REALLOC_SIZED: support allocators with no realloc support
+ avoid race-condition in crc initialization
+ minor compile issues
+ 1.00 (2015-09-14)
+ installable file IO function
+ 0.99 (2015-09-13)
+ warning fixes; TGA rle support
0.98 (2015-04-08)
added STBIW_MALLOC, STBIW_ASSERT etc
0.97 (2015-01-18)
@@ -722,7 +1688,7 @@ int stbi_write_png(char const *filename, int x, int y, int comp, const void *dat
add HDR output
fix monochrome BMP
0.95 (2014-08-17)
- add monochrome TGA output
+ add monochrome TGA output
0.94 (2014-05-31)
rename private functions to avoid conflicts with stb_image.h
0.93 (2014-05-27)
@@ -733,3 +1699,45 @@ int stbi_write_png(char const *filename, int x, int y, int comp, const void *dat
first public release
0.90 first internal release
*/
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
\ No newline at end of file
diff --git a/img/LTE.png b/img/LTE.png
new file mode 100644
index 00000000..dabf7618
Binary files /dev/null and b/img/LTE.png differ
diff --git a/img/aliasing.png b/img/aliasing.png
new file mode 100644
index 00000000..f10304a5
Binary files /dev/null and b/img/aliasing.png differ
diff --git a/img/backward_tracing.PNG b/img/backward_tracing.PNG
new file mode 100644
index 00000000..6925535b
Binary files /dev/null and b/img/backward_tracing.PNG differ
diff --git a/img/bsdf.png b/img/bsdf.png
new file mode 100644
index 00000000..8f2f17f3
Binary files /dev/null and b/img/bsdf.png differ
diff --git a/img/bvh.png b/img/bvh.png
new file mode 100644
index 00000000..3571d5c0
Binary files /dev/null and b/img/bvh.png differ
diff --git a/img/bvh_midpoint.jpg b/img/bvh_midpoint.jpg
new file mode 100644
index 00000000..2038d6c8
Binary files /dev/null and b/img/bvh_midpoint.jpg differ
diff --git a/img/real_world_light.PNG b/img/real_world_light.PNG
new file mode 100644
index 00000000..6e97a8b1
Binary files /dev/null and b/img/real_world_light.PNG differ
diff --git a/img/results/AA.png b/img/results/AA.png
new file mode 100644
index 00000000..ab1f01e0
Binary files /dev/null and b/img/results/AA.png differ
diff --git a/img/results/AA_orig.png b/img/results/AA_orig.png
new file mode 100644
index 00000000..0a13a09f
Binary files /dev/null and b/img/results/AA_orig.png differ
diff --git a/img/results/barbie.png b/img/results/barbie.png
new file mode 100644
index 00000000..248cfb56
Binary files /dev/null and b/img/results/barbie.png differ
diff --git a/img/results/bloopers/cornell.2023-10-06_03-55-39z.3126samp.png b/img/results/bloopers/cornell.2023-10-06_03-55-39z.3126samp.png
new file mode 100644
index 00000000..deacb8e9
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-06_03-55-39z.3126samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-06_05-32-04z.5000samp.png b/img/results/bloopers/cornell.2023-10-06_05-32-04z.5000samp.png
new file mode 100644
index 00000000..dd0036f3
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-06_05-32-04z.5000samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-06_05-34-09z.3222samp.png b/img/results/bloopers/cornell.2023-10-06_05-34-09z.3222samp.png
new file mode 100644
index 00000000..6d1468f5
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-06_05-34-09z.3222samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-06_15-01-58z.3682samp.png b/img/results/bloopers/cornell.2023-10-06_15-01-58z.3682samp.png
new file mode 100644
index 00000000..27f084b3
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-06_15-01-58z.3682samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-06_15-23-02z.3673samp.png b/img/results/bloopers/cornell.2023-10-06_15-23-02z.3673samp.png
new file mode 100644
index 00000000..e9718939
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-06_15-23-02z.3673samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-07_15-57-32z.2886samp.png b/img/results/bloopers/cornell.2023-10-07_15-57-32z.2886samp.png
new file mode 100644
index 00000000..60eebbba
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-07_15-57-32z.2886samp.png differ
diff --git a/img/results/bloopers/cornell.2023-10-07_15-58-20z.5000samp.png b/img/results/bloopers/cornell.2023-10-07_15-58-20z.5000samp.png
new file mode 100644
index 00000000..c876dd41
Binary files /dev/null and b/img/results/bloopers/cornell.2023-10-07_15-58-20z.5000samp.png differ
diff --git a/img/results/bloopers/cornell_diffuse_fixed_3719samp.png b/img/results/bloopers/cornell_diffuse_fixed_3719samp.png
new file mode 100644
index 00000000..22a76846
Binary files /dev/null and b/img/results/bloopers/cornell_diffuse_fixed_3719samp.png differ
diff --git a/img/results/bloopers/cornell_glass_cube_5000samp_attempt.png b/img/results/bloopers/cornell_glass_cube_5000samp_attempt.png
new file mode 100644
index 00000000..2d99499b
Binary files /dev/null and b/img/results/bloopers/cornell_glass_cube_5000samp_attempt.png differ
diff --git a/img/results/bloopers/cornell_glass_cube_5000samp_attempt1.png b/img/results/bloopers/cornell_glass_cube_5000samp_attempt1.png
new file mode 100644
index 00000000..01d6df85
Binary files /dev/null and b/img/results/bloopers/cornell_glass_cube_5000samp_attempt1.png differ
diff --git a/img/results/bloopers/cornell_refractive_all_1817samp_blooper.png b/img/results/bloopers/cornell_refractive_all_1817samp_blooper.png
new file mode 100644
index 00000000..8c5b61e2
Binary files /dev/null and b/img/results/bloopers/cornell_refractive_all_1817samp_blooper.png differ
diff --git a/img/results/bloopers/cornell_refractive_ball_noAA_5000samp.png b/img/results/bloopers/cornell_refractive_ball_noAA_5000samp.png
new file mode 100644
index 00000000..35684625
Binary files /dev/null and b/img/results/bloopers/cornell_refractive_ball_noAA_5000samp.png differ
diff --git a/img/results/bloopers/cornell_refractive_cube_5000samp.png b/img/results/bloopers/cornell_refractive_cube_5000samp.png
new file mode 100644
index 00000000..25c68bbb
Binary files /dev/null and b/img/results/bloopers/cornell_refractive_cube_5000samp.png differ
diff --git a/img/results/bunnyOBJ_3165samp.png b/img/results/bunnyOBJ_3165samp.png
new file mode 100644
index 00000000..9112b637
Binary files /dev/null and b/img/results/bunnyOBJ_3165samp.png differ
diff --git a/img/results/cornel_glass_box_wo_maxinfr_5000samp.png b/img/results/cornel_glass_box_wo_maxinfr_5000samp.png
new file mode 100644
index 00000000..ea638e30
Binary files /dev/null and b/img/results/cornel_glass_box_wo_maxinfr_5000samp.png differ
diff --git a/img/results/cornell.2023-10-05_22-19-40z.3521samp_blackLines.png b/img/results/cornell.2023-10-05_22-19-40z.3521samp_blackLines.png
new file mode 100644
index 00000000..0fe6765d
Binary files /dev/null and b/img/results/cornell.2023-10-05_22-19-40z.3521samp_blackLines.png differ
diff --git a/img/results/cornell.2023-10-05_22-20-38z.5000samp_blackLines.png b/img/results/cornell.2023-10-05_22-20-38z.5000samp_blackLines.png
new file mode 100644
index 00000000..f51f5dad
Binary files /dev/null and b/img/results/cornell.2023-10-05_22-20-38z.5000samp_blackLines.png differ
diff --git a/img/results/cornell.2023-10-06_03-49-37z.5000samp.png b/img/results/cornell.2023-10-06_03-49-37z.5000samp.png
new file mode 100644
index 00000000..407fad7a
Binary files /dev/null and b/img/results/cornell.2023-10-06_03-49-37z.5000samp.png differ
diff --git a/img/results/cornell.2023-10-06_14-27-53z.5000samp.png b/img/results/cornell.2023-10-06_14-27-53z.5000samp.png
new file mode 100644
index 00000000..07c03678
Binary files /dev/null and b/img/results/cornell.2023-10-06_14-27-53z.5000samp.png differ
diff --git a/img/results/cornell.2023-10-07_16-17-23z.5000samp.png b/img/results/cornell.2023-10-07_16-17-23z.5000samp.png
new file mode 100644
index 00000000..b9fd7432
Binary files /dev/null and b/img/results/cornell.2023-10-07_16-17-23z.5000samp.png differ
diff --git a/img/results/cornell.2023-10-07_17-25-18z.5000samp.png b/img/results/cornell.2023-10-07_17-25-18z.5000samp.png
new file mode 100644
index 00000000..afe8143d
Binary files /dev/null and b/img/results/cornell.2023-10-07_17-25-18z.5000samp.png differ
diff --git a/img/results/cornell.2023-10-13_00-13-05z.4650samp.png b/img/results/cornell.2023-10-13_00-13-05z.4650samp.png
new file mode 100644
index 00000000..f0b2bb9b
Binary files /dev/null and b/img/results/cornell.2023-10-13_00-13-05z.4650samp.png differ
diff --git a/img/results/cornell_diffuse_transmissive_ball_accidental_ao_5000samp.png b/img/results/cornell_diffuse_transmissive_ball_accidental_ao_5000samp.png
new file mode 100644
index 00000000..b4e6b95f
Binary files /dev/null and b/img/results/cornell_diffuse_transmissive_ball_accidental_ao_5000samp.png differ
diff --git a/img/results/cornell_glass_1292samp.png b/img/results/cornell_glass_1292samp.png
new file mode 100644
index 00000000..9c7bae81
Binary files /dev/null and b/img/results/cornell_glass_1292samp.png differ
diff --git a/img/results/cornell_glass_ball.png b/img/results/cornell_glass_ball.png
new file mode 100644
index 00000000..f1cbec22
Binary files /dev/null and b/img/results/cornell_glass_ball.png differ
diff --git a/img/results/cornell_glass_box_5000samp.png b/img/results/cornell_glass_box_5000samp.png
new file mode 100644
index 00000000..47d92214
Binary files /dev/null and b/img/results/cornell_glass_box_5000samp.png differ
diff --git a/img/results/cornell_motion_blur_5000samp.png b/img/results/cornell_motion_blur_5000samp.png
new file mode 100644
index 00000000..e231ea39
Binary files /dev/null and b/img/results/cornell_motion_blur_5000samp.png differ
diff --git a/img/results/cornell_plastic_5000samp.png b/img/results/cornell_plastic_5000samp.png
new file mode 100644
index 00000000..8f228846
Binary files /dev/null and b/img/results/cornell_plastic_5000samp.png differ
diff --git a/img/results/cornell_plastic_5000samp_attempt.png b/img/results/cornell_plastic_5000samp_attempt.png
new file mode 100644
index 00000000..a728671a
Binary files /dev/null and b/img/results/cornell_plastic_5000samp_attempt.png differ
diff --git a/img/results/cornell_plastic_ball.png b/img/results/cornell_plastic_ball.png
new file mode 100644
index 00000000..104aebb9
Binary files /dev/null and b/img/results/cornell_plastic_ball.png differ
diff --git a/img/results/cornell_plastic_cube_5000samp_attempt.png b/img/results/cornell_plastic_cube_5000samp_attempt.png
new file mode 100644
index 00000000..a4057173
Binary files /dev/null and b/img/results/cornell_plastic_cube_5000samp_attempt.png differ
diff --git a/img/results/cornell_refl_ball_AA.png b/img/results/cornell_refl_ball_AA.png
new file mode 100644
index 00000000..acac2309
Binary files /dev/null and b/img/results/cornell_refl_ball_AA.png differ
diff --git a/img/results/cornell_reflective_ball.png b/img/results/cornell_reflective_ball.png
new file mode 100644
index 00000000..1095d6b8
Binary files /dev/null and b/img/results/cornell_reflective_ball.png differ
diff --git a/img/results/cornell_refractive_5000samp.png b/img/results/cornell_refractive_5000samp.png
new file mode 100644
index 00000000..7a0ffe10
Binary files /dev/null and b/img/results/cornell_refractive_5000samp.png differ
diff --git a/img/results/cornell_refractive_ball.png b/img/results/cornell_refractive_ball.png
new file mode 100644
index 00000000..98544497
Binary files /dev/null and b/img/results/cornell_refractive_ball.png differ
diff --git a/img/results/cornell_refractive_ball_AA_5000samp.png b/img/results/cornell_refractive_ball_AA_5000samp.png
new file mode 100644
index 00000000..c48c78da
Binary files /dev/null and b/img/results/cornell_refractive_ball_AA_5000samp.png differ
diff --git a/img/results/cornell_refractive_ball_AAjitterRange2_5000samp.png b/img/results/cornell_refractive_ball_AAjitterRange2_5000samp.png
new file mode 100644
index 00000000..e27b72f1
Binary files /dev/null and b/img/results/cornell_refractive_ball_AAjitterRange2_5000samp.png differ
diff --git a/img/results/cornell_specBall_refrCube_AA_5000samp.png b/img/results/cornell_specBall_refrCube_AA_5000samp.png
new file mode 100644
index 00000000..5e279e9b
Binary files /dev/null and b/img/results/cornell_specBall_refrCube_AA_5000samp.png differ
diff --git a/img/results/cornell_specBall_refrCube_noAA_5000samp.png b/img/results/cornell_specBall_refrCube_noAA_5000samp.png
new file mode 100644
index 00000000..afe8143d
Binary files /dev/null and b/img/results/cornell_specBall_refrCube_noAA_5000samp.png differ
diff --git a/img/results/cornell_transmissive_cube_5000samp_attempt.png b/img/results/cornell_transmissive_cube_5000samp_attempt.png
new file mode 100644
index 00000000..1751cbcc
Binary files /dev/null and b/img/results/cornell_transmissive_cube_5000samp_attempt.png differ
diff --git a/img/results/defualt_cornell.hdr b/img/results/defualt_cornell.hdr
new file mode 100644
index 00000000..8bfd37be
Binary files /dev/null and b/img/results/defualt_cornell.hdr differ
diff --git a/img/results/dof_dist_10.png b/img/results/dof_dist_10.png
new file mode 100644
index 00000000..bdd9e4b1
Binary files /dev/null and b/img/results/dof_dist_10.png differ
diff --git a/img/results/dof_dist_6.png b/img/results/dof_dist_6.png
new file mode 100644
index 00000000..487698d2
Binary files /dev/null and b/img/results/dof_dist_6.png differ
diff --git a/img/results/dof_dist_8.png b/img/results/dof_dist_8.png
new file mode 100644
index 00000000..afeb7da3
Binary files /dev/null and b/img/results/dof_dist_8.png differ
diff --git a/img/results/dof_none.png b/img/results/dof_none.png
new file mode 100644
index 00000000..0186ba6e
Binary files /dev/null and b/img/results/dof_none.png differ
diff --git a/img/results/dragonGLTF_1580samp.png b/img/results/dragonGLTF_1580samp.png
new file mode 100644
index 00000000..cc74219d
Binary files /dev/null and b/img/results/dragonGLTF_1580samp.png differ
diff --git a/img/results/dragonGLTF_bottom_47samp.png b/img/results/dragonGLTF_bottom_47samp.png
new file mode 100644
index 00000000..2a0cdd81
Binary files /dev/null and b/img/results/dragonGLTF_bottom_47samp.png differ
diff --git a/img/results/dragonGLTF_normal_261samp.png b/img/results/dragonGLTF_normal_261samp.png
new file mode 100644
index 00000000..eaae2b34
Binary files /dev/null and b/img/results/dragonGLTF_normal_261samp.png differ
diff --git a/img/results/infinity.png b/img/results/infinity.png
new file mode 100644
index 00000000..ec2789d3
Binary files /dev/null and b/img/results/infinity.png differ
diff --git a/img/results/marioGLTF_4072samp.png b/img/results/marioGLTF_4072samp.png
new file mode 100644
index 00000000..e60a544b
Binary files /dev/null and b/img/results/marioGLTF_4072samp.png differ
diff --git a/img/results/motion_blur.png b/img/results/motion_blur.png
new file mode 100644
index 00000000..dc488970
Binary files /dev/null and b/img/results/motion_blur.png differ
diff --git a/img/results/motion_flying_out.png b/img/results/motion_flying_out.png
new file mode 100644
index 00000000..768ac5de
Binary files /dev/null and b/img/results/motion_flying_out.png differ
diff --git a/img/results/motion_real.png b/img/results/motion_real.png
new file mode 100644
index 00000000..81cd09f3
Binary files /dev/null and b/img/results/motion_real.png differ
diff --git a/img/results/motion_static.png b/img/results/motion_static.png
new file mode 100644
index 00000000..83a09d79
Binary files /dev/null and b/img/results/motion_static.png differ
diff --git a/img/results/naive_cornell_5000samp_black_lines.png b/img/results/naive_cornell_5000samp_black_lines.png
new file mode 100644
index 00000000..a99536fc
Binary files /dev/null and b/img/results/naive_cornell_5000samp_black_lines.png differ
diff --git a/img/results/naive_cornell_5000samp_closeup.png b/img/results/naive_cornell_5000samp_closeup.png
new file mode 100644
index 00000000..50f96b38
Binary files /dev/null and b/img/results/naive_cornell_5000samp_closeup.png differ
diff --git a/img/results/naive_cornell_5000samp_tilt.png b/img/results/naive_cornell_5000samp_tilt.png
new file mode 100644
index 00000000..3da461e6
Binary files /dev/null and b/img/results/naive_cornell_5000samp_tilt.png differ
diff --git a/img/results/naive_cornell_diffuseTrans_5000samp_blooper.png b/img/results/naive_cornell_diffuseTrans_5000samp_blooper.png
new file mode 100644
index 00000000..24f21044
Binary files /dev/null and b/img/results/naive_cornell_diffuseTrans_5000samp_blooper.png differ
diff --git a/img/results/naive_cornell_diffuse_ball_2618samp.png b/img/results/naive_cornell_diffuse_ball_2618samp.png
new file mode 100644
index 00000000..d80a6cd5
Binary files /dev/null and b/img/results/naive_cornell_diffuse_ball_2618samp.png differ
diff --git a/img/results/noAA.png b/img/results/noAA.png
new file mode 100644
index 00000000..994462ea
Binary files /dev/null and b/img/results/noAA.png differ
diff --git a/img/results/noAA_orig.png b/img/results/noAA_orig.png
new file mode 100644
index 00000000..e0b7840f
Binary files /dev/null and b/img/results/noAA_orig.png differ
diff --git a/img/results/obj.2023-10-13_03-09-04z.4815samp.png b/img/results/obj.2023-10-13_03-09-04z.4815samp.png
new file mode 100644
index 00000000..32b487ef
Binary files /dev/null and b/img/results/obj.2023-10-13_03-09-04z.4815samp.png differ
diff --git a/img/results/teapotGLTF_70-80ms_noBVH_5000samp.png b/img/results/teapotGLTF_70-80ms_noBVH_5000samp.png
new file mode 100644
index 00000000..4c7be7e3
Binary files /dev/null and b/img/results/teapotGLTF_70-80ms_noBVH_5000samp.png differ
diff --git a/img/stats/buildBVH.png b/img/stats/buildBVH.png
new file mode 100644
index 00000000..95a71314
Binary files /dev/null and b/img/stats/buildBVH.png differ
diff --git a/img/stats/firstCache.png b/img/stats/firstCache.png
new file mode 100644
index 00000000..8d088cff
Binary files /dev/null and b/img/stats/firstCache.png differ
diff --git a/img/stats/matSort.png b/img/stats/matSort.png
new file mode 100644
index 00000000..af6c53b8
Binary files /dev/null and b/img/stats/matSort.png differ
diff --git a/img/stats/meshLoadingAll.png b/img/stats/meshLoadingAll.png
new file mode 100644
index 00000000..8b39d677
Binary files /dev/null and b/img/stats/meshLoadingAll.png differ
diff --git a/img/stats/numRaysDepthStreamCompaction.png b/img/stats/numRaysDepthStreamCompaction.png
new file mode 100644
index 00000000..9c738518
Binary files /dev/null and b/img/stats/numRaysDepthStreamCompaction.png differ
diff --git a/img/stats/streamCompaction.png b/img/stats/streamCompaction.png
new file mode 100644
index 00000000..0cba8bc5
Binary files /dev/null and b/img/stats/streamCompaction.png differ
diff --git a/scenes/cornell.txt b/scenes/cornell.txt
index 83ff8202..9d84c50d 100644
--- a/scenes/cornell.txt
+++ b/scenes/cornell.txt
@@ -6,7 +6,8 @@ SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
-EMITTANCE 5
+EMITTANCE 10
+TRANS 0
// Diffuse white
MATERIAL 1
@@ -17,6 +18,7 @@ REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0
+TRANS 0
// Diffuse red
MATERIAL 2
@@ -27,6 +29,7 @@ REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0
+TRANS 0
// Diffuse green
MATERIAL 3
@@ -37,25 +40,71 @@ REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0
+TRANS 0
// Specular white
MATERIAL 4
-RGB .98 .98 .98
+RGB 0 0 0
SPECEX 0
SPECRGB .98 .98 .98
REFL 1
REFR 0
REFRIOR 0
EMITTANCE 0
+TRANS 0
+
+// Refractive white
+MATERIAL 5
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 0
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Transmissive purple
+MATERIAL 6
+RGB .8 .8 .8
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 1
+
+// Glass white
+MATERIAL 7
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Plastic white
+MATERIAL 8
+RGB 0.3 0.1 0.7
+SPECEX 0
+SPECRGB 0.98 0.98 0.98
+REFL 1
+REFR 0
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
// Camera
CAMERA
RES 800 800
FOVY 45
ITERATIONS 5000
-DEPTH 8
+DEPTH 9
FILE cornell
-EYE 0.0 5 10.5
+EYE 0.0 5 8.5
LOOKAT 0 5 0
UP 0 1 0
@@ -64,9 +113,10 @@ UP 0 1 0
OBJECT 0
cube
material 0
-TRANS 0 10 0
+TRANS -3 10 -3
ROTAT 0 0 0
-SCALE 3 .3 3
+SCALE 2 .1 2
+VEL 0 0 0
// Floor
OBJECT 1
@@ -75,6 +125,7 @@ material 1
TRANS 0 0 0
ROTAT 0 0 0
SCALE 10 .01 10
+VEL 0 0 0
// Ceiling
OBJECT 2
@@ -83,6 +134,7 @@ material 1
TRANS 0 10 0
ROTAT 0 0 90
SCALE .01 10 10
+VEL 0 0 0
// Back wall
OBJECT 3
@@ -91,6 +143,7 @@ material 1
TRANS 0 5 -5
ROTAT 0 90 0
SCALE .01 10 10
+VEL 0 0 0
// Left wall
OBJECT 4
@@ -99,6 +152,7 @@ material 2
TRANS -5 5 0
ROTAT 0 0 0
SCALE .01 10 10
+VEL 0 0 0
// Right wall
OBJECT 5
@@ -107,11 +161,41 @@ material 3
TRANS 5 5 0
ROTAT 0 0 0
SCALE .01 10 10
+VEL 0 0 0
// Sphere
OBJECT 6
sphere
material 4
-TRANS -1 4 -1
+TRANS -1 4.5 0
+ROTAT 0 0 0
+SCALE 3.5 3.5 3.5
+VEL 0.5 0.5 0
+
+// Cube
+OBJECT 7
+cube
+material 1
+TRANS 2 2 -2
+ROTAT 0 -30 0
+SCALE 2.5 4 2.5
+VEL 0 0 0
+
+
+// Ceiling light
+OBJECT 8
+cube
+material 0
+TRANS 0 10 0
+ROTAT 0 0 0
+SCALE 2 .1 2
+VEL 0 0 0
+
+// Ceiling light
+OBJECT 9
+cube
+material 0
+TRANS 3 10 3
ROTAT 0 0 0
-SCALE 3 3 3
+SCALE 2 .1 2
+VEL 0 0 0
diff --git a/scenes/cornell_motion.txt b/scenes/cornell_motion.txt
new file mode 100644
index 00000000..b59986ad
--- /dev/null
+++ b/scenes/cornell_motion.txt
@@ -0,0 +1,183 @@
+// Emissive material (light)
+MATERIAL 0
+RGB 1 1 1
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 10
+TRANS 0
+
+// Diffuse white
+MATERIAL 1
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse yellow
+MATERIAL 2
+RGB 1, 0.922, 0.49
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse blue
+MATERIAL 3
+RGB 0.42, 0.749, 0.949
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Specular white
+MATERIAL 4
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.318, 0.588, 0.208
+REFL 1
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Refractive white
+MATERIAL 5
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.98 0.98 0.98
+REFL 0
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Transmissive purple
+MATERIAL 6
+RGB 0.737, 0.435, 0.969
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 1
+
+// Glass white
+MATERIAL 7
+RGB 0.318, 0.588, 0.208
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Plastic white
+MATERIAL 8
+RGB 0.3 0.1 0.7
+SPECEX 0
+SPECRGB 0.98 0.98 0.98
+REFL 1
+REFR 0
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Camera
+CAMERA
+RES 800 800
+FOVY 45
+ITERATIONS 5000
+DEPTH 9
+FILE motion_blur
+EYE 0.0 5 8.5
+LOOKAT 0 5 0
+UP 0 1 0
+
+
+// Ceiling light
+OBJECT 0
+cube
+material 0
+TRANS 0 10 0
+ROTAT 0 0 0
+SCALE 10 .1 1
+VEL 0 0 0
+
+// Floor
+OBJECT 1
+cube
+material 1
+TRANS 0 0 0
+ROTAT 0 0 0
+SCALE 10 .01 10
+VEL 0 0 0
+
+// Ceiling
+OBJECT 2
+cube
+material 1
+TRANS 0 10 0
+ROTAT 0 0 90
+SCALE .01 10 10
+VEL 0 0 0
+
+// Back wall
+OBJECT 3
+cube
+material 1
+TRANS 0 5 -5
+ROTAT 0 90 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Left wall
+OBJECT 4
+cube
+material 2
+TRANS -5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Right wall
+OBJECT 5
+cube
+material 3
+TRANS 5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Sphere
+OBJECT 6
+sphere
+material 4
+TRANS -1 6 0
+ROTAT 0 0 0
+SCALE 3.5 3.5 3.5
+VEL 0.1 0.1 0
+
+// Cube
+OBJECT 7
+cube
+material 6
+TRANS 0 2 0
+ROTAT 0 -30 0
+SCALE 2.5 4 2.5
+VEL -0.4 0 0.1
+
diff --git a/scenes/dof.txt b/scenes/dof.txt
new file mode 100644
index 00000000..92922a9c
--- /dev/null
+++ b/scenes/dof.txt
@@ -0,0 +1,251 @@
+// Emissive material (light)
+MATERIAL 0
+RGB 1 1 1
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 5
+TRANS 0
+
+// Diffuse white
+MATERIAL 1
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// refr red
+MATERIAL 2
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.824, 0.314, 0.6
+REFL 0
+REFR 1
+REFRIOR 1.65
+EMITTANCE 0
+TRANS 0
+
+// refr midpink
+MATERIAL 3
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.882, 0.416, 0.678
+REFL 0
+REFR 1
+REFRIOR 1.7
+EMITTANCE 0
+TRANS 0
+
+// Specular white
+MATERIAL 4
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Refractive white
+MATERIAL 5
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.957, 0.635, 0.816
+REFL 0
+REFR 1
+REFRIOR 1.6
+EMITTANCE 0
+TRANS 0
+
+// Diffuse yellow
+MATERIAL 6
+RGB 0.976, 0.867, 0.604
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Glass white
+MATERIAL 7
+RGB 0.529, 0.808, 0.816
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Plastic white
+MATERIAL 8
+RGB 0.3 0.1 0.7
+SPECEX 0
+SPECRGB 0.98 0.98 0.98
+REFL 1
+REFR 0
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// refr pink
+MATERIAL 9
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 0
+REFR 1
+REFRIOR 1.8
+EMITTANCE 0
+TRANS 0
+
+// specular pink
+MATERIAL 10
+RGB 0 0 0
+SPECEX 0
+SPECRGB 0.965, 0.345, 0.722
+REFL 1
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// refractive pink
+MATERIAL 11
+RGB 0 0 0
+SPECEX 0
+SPECRGB 1 0.89 0.89
+REFL 0
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Camera---------------------------------------
+CAMERA
+RES 800 800
+FOVY 45
+ITERATIONS 5000
+DEPTH 9
+FILE cornell
+EYE 0.0 5 8.5
+LOOKAT 0 5 0
+UP 0 1 0
+
+
+// Ceiling light
+OBJECT 0
+cube
+material 0
+TRANS 0 15 0
+ROTAT 0 0 0
+SCALE 5 .1 5
+VEL 0 0 0
+
+// Floor
+OBJECT 1
+cube
+material 4
+TRANS 0 0 0
+ROTAT 0 0 0
+SCALE 20 .01 20
+VEL 0 0 0
+
+// Ceiling
+OBJECT 2
+cube
+material 4
+TRANS 0 15 0
+ROTAT 0 0 90
+SCALE .01 20 20
+VEL 0 0 0
+
+// Back wall
+OBJECT 3
+cube
+material 1
+TRANS 0 5 -5
+ROTAT 0 90 0
+SCALE .01 20 20
+VEL 0 0 0
+
+// Left wall
+OBJECT 4
+cube
+material 7
+TRANS -5 5 0
+ROTAT 0 0 0
+SCALE .01 20 20
+VEL 0 0 0
+
+// Right wall
+OBJECT 5
+cube
+material 6
+TRANS 5 5 0
+ROTAT 0 0 0
+SCALE .01 20 20
+VEL 0 0 0
+
+// Cube --------------------------------------
+OBJECT 6
+cube
+material 9
+TRANS 2.8 7.3 2.8
+ROTAT 0 0 0
+SCALE .5 .5 .5
+VEL 0.5 0.5 0
+
+// Cube
+OBJECT 7
+cube
+material 11
+TRANS 2 6.6 2
+ROTAT 0 15 0
+SCALE 1 1 1
+VEL 0 0 0
+
+// Cube
+OBJECT 8
+cube
+material 5
+TRANS .5 5.7 .5
+ROTAT 0 30 0
+SCALE 1.5 1.5 1.5
+VEL 0 0 0
+
+// Cube
+OBJECT 9
+cube
+material 3
+TRANS -1 4 -1
+ROTAT 0 45 0
+SCALE 2 2 2
+VEL 0 0 0
+
+// Cube
+OBJECT 10
+cube
+material 2
+TRANS -3 1.2 -3
+ROTAT 0 60 0
+SCALE 2.5 2.5 2.5
+VEL 0 0 0
+
+// Ceiling light--------------------------------
+OBJECT 11
+cube
+material 0
+TRANS 0 5 10
+ROTAT 90 0 0
+SCALE 1 .1 1
+VEL 0 0 0
diff --git a/scenes/gltf.txt b/scenes/gltf.txt
new file mode 100644
index 00000000..86a96b49
--- /dev/null
+++ b/scenes/gltf.txt
@@ -0,0 +1,191 @@
+// Emissive material (light)
+MATERIAL 0
+RGB 1 1 1
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 10
+TRANS 0
+
+// Diffuse white
+MATERIAL 1
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse red
+MATERIAL 2
+RGB .85 .35 .35
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse green
+MATERIAL 3
+RGB .35 .85 .35
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Specular white
+MATERIAL 4
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Refractive white
+MATERIAL 5
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 0
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Transmissive purple
+MATERIAL 6
+RGB .3 .1 .7
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 1
+
+// Glass white
+MATERIAL 7
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Plastic white
+MATERIAL 8
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 0
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Camera
+CAMERA
+RES 800 800
+FOVY 45
+ITERATIONS 5000
+DEPTH 9
+FILE dof
+EYE 0.0 5 8.5
+LOOKAT 0 5 0
+UP 0 1 0
+
+
+// Ceiling light
+OBJECT 0
+cube
+material 0
+TRANS 0 10 0
+ROTAT 0 0 0
+SCALE 4 .3 4
+VEL 0 0 0
+
+// Floor
+OBJECT 1
+cube
+material 4
+TRANS 0 0 0
+ROTAT 0 0 0
+SCALE 10 .01 10
+VEL 0 0 0
+
+// Ceiling
+OBJECT 2
+cube
+material 1
+TRANS 0 10 0
+ROTAT 0 0 90
+SCALE .01 10 10
+VEL 0 0 0
+
+// Back wall
+OBJECT 3
+cube
+material 1
+TRANS 0 5 -5
+ROTAT 0 90 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Left wall
+OBJECT 4
+cube
+material 2
+TRANS -5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Right wall
+OBJECT 5
+cube
+material 3
+TRANS 5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Mesh
+OBJECT 6
+gltf gltf/cube/Cube.gltf
+material 1
+TRANS -2 3 -2
+ROTAT 0 60 0
+SCALE 1 1 1
+VEL 0 0 0
+
+// Mesh
+OBJECT 7
+gltf gltf/cube/Cube.gltf
+material 2
+TRANS 0 3 0
+ROTAT 0 30 0
+SCALE 1 1 1
+VEL 0 0 0
+
+// Mesh
+OBJECT 8
+gltf gltf/cube/Cube.gltf
+material 3
+TRANS 2 3 2
+ROTAT 0 0 0
+SCALE 1 1 1
+VEL 0 0 0
diff --git a/scenes/gltf/avocado/Avocado.bin b/scenes/gltf/avocado/Avocado.bin
new file mode 100644
index 00000000..b98140c9
Binary files /dev/null and b/scenes/gltf/avocado/Avocado.bin differ
diff --git a/scenes/gltf/avocado/Avocado.gltf b/scenes/gltf/avocado/Avocado.gltf
new file mode 100644
index 00000000..55fcd955
--- /dev/null
+++ b/scenes/gltf/avocado/Avocado.gltf
@@ -0,0 +1,155 @@
+{
+ "accessors": [
+ {
+ "bufferView": 0,
+ "componentType": 5126,
+ "count": 406,
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 406,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "componentType": 5126,
+ "count": 406,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 3,
+ "componentType": 5126,
+ "count": 406,
+ "type": "VEC3",
+ "max": [
+ 0.02128091,
+ 0.06284806,
+ 0.0138090011
+ ],
+ "min": [
+ -0.02128091,
+ -4.773855E-05,
+ -0.013809
+ ]
+ },
+ {
+ "bufferView": 4,
+ "componentType": 5123,
+ "count": 2046,
+ "type": "SCALAR"
+ }
+ ],
+ "asset": {
+ "generator": "glTF Tools for Unity",
+ "version": "2.0"
+ },
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteLength": 3248
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 3248,
+ "byteLength": 4872
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 8120,
+ "byteLength": 6496
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 14616,
+ "byteLength": 4872
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 19488,
+ "byteLength": 4092
+ }
+ ],
+ "buffers": [
+ {
+ "uri": "Avocado.bin",
+ "byteLength": 23580
+ }
+ ],
+ "images": [
+ {
+ "uri": "Avocado_baseColor.png"
+ },
+ {
+ "uri": "Avocado_roughnessMetallic.png"
+ },
+ {
+ "uri": "Avocado_normal.png"
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "TEXCOORD_0": 0,
+ "NORMAL": 1,
+ "TANGENT": 2,
+ "POSITION": 3
+ },
+ "indices": 4,
+ "material": 0
+ }
+ ],
+ "name": "Avocado"
+ }
+ ],
+ "materials": [
+ {
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicRoughnessTexture": {
+ "index": 1
+ }
+ },
+ "normalTexture": {
+ "index": 2
+ },
+ "name": "2256_Avocado_d"
+ }
+ ],
+ "nodes": [
+ {
+ "mesh": 0,
+ "rotation": [
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "Avocado"
+ }
+ ],
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "textures": [
+ {
+ "source": 0
+ },
+ {
+ "source": 1
+ },
+ {
+ "source": 2
+ }
+ ]
+}
\ No newline at end of file
diff --git a/scenes/gltf/avocado/Avocado_baseColor.png b/scenes/gltf/avocado/Avocado_baseColor.png
new file mode 100644
index 00000000..38630edf
Binary files /dev/null and b/scenes/gltf/avocado/Avocado_baseColor.png differ
diff --git a/scenes/gltf/avocado/Avocado_normal.png b/scenes/gltf/avocado/Avocado_normal.png
new file mode 100644
index 00000000..73f90d59
Binary files /dev/null and b/scenes/gltf/avocado/Avocado_normal.png differ
diff --git a/scenes/gltf/avocado/Avocado_roughnessMetallic.png b/scenes/gltf/avocado/Avocado_roughnessMetallic.png
new file mode 100644
index 00000000..97c7f735
Binary files /dev/null and b/scenes/gltf/avocado/Avocado_roughnessMetallic.png differ
diff --git a/scenes/gltf/bunny/bunny.gltf b/scenes/gltf/bunny/bunny.gltf
new file mode 100644
index 00000000..acd5ba04
--- /dev/null
+++ b/scenes/gltf/bunny/bunny.gltf
@@ -0,0 +1,146 @@
+{
+ "accessors": [
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 2609,
+ "max": [
+ 0.06077880039811134,
+ 0.0616791695356369,
+ 0.18699601292610168
+ ],
+ "min": [
+ -0.09438042342662811,
+ -0.05871463939547539,
+ 0.033309899270534515
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 31308,
+ "componentType": 5126,
+ "count": 2609,
+ "max": [
+ 0.999043881893158,
+ 0.9992901086807251,
+ 0.9992524981498718
+ ],
+ "min": [
+ -0.9994020462036133,
+ -0.9993988275527954,
+ -0.9999822378158569
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 0,
+ "componentType": 5125,
+ "count": 14904,
+ "type": "SCALAR"
+ }
+ ],
+ "asset": {
+ "extras": {
+ "author": "darwinsenior (https://sketchfab.com/darwinsenior)",
+ "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
+ "source": "https://sketchfab.com/3d-models/stanford-bunny-43f266d6cd6e4c6888b9943557528c0f",
+ "title": "Stanford Bunny"
+ },
+ "generator": "Sketchfab-12.68.0",
+ "version": "2.0"
+ },
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteLength": 59616,
+ "name": "floatBufferViews",
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteLength": 62616,
+ "byteOffset": 59616,
+ "byteStride": 12,
+ "name": "floatBufferViews",
+ "target": 34962
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 122232,
+ "uri": "scene.bin"
+ }
+ ],
+ "materials": [
+ {
+ "doubleSided": true,
+ "name": "material_0",
+ "pbrMetallicRoughness": {
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.6
+ }
+ }
+ ],
+ "meshes": [
+ {
+ "name": "Object_0",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 1,
+ "POSITION": 0
+ },
+ "indices": 2,
+ "material": 0,
+ "mode": 4
+ }
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 1
+ ],
+ "matrix": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.220446049250313e-16,
+ -1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 2.220446049250313e-16,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ],
+ "name": "Sketchfab_model"
+ },
+ {
+ "children": [
+ 2
+ ],
+ "name": "55ae90b10c5c401ebb97a3808b2c07ac.obj.cleaner.materialmerger.gles"
+ },
+ {
+ "mesh": 0,
+ "name": "Object_2"
+ }
+ ],
+ "scene": 0,
+ "scenes": [
+ {
+ "name": "Sketchfab_Scene",
+ "nodes": [
+ 0
+ ]
+ }
+ ]
+}
diff --git a/scenes/gltf/bunny/license.txt b/scenes/gltf/bunny/license.txt
new file mode 100644
index 00000000..fbf5aee7
--- /dev/null
+++ b/scenes/gltf/bunny/license.txt
@@ -0,0 +1,11 @@
+Model Information:
+* title: Stanford Bunny
+* source: https://sketchfab.com/3d-models/stanford-bunny-43f266d6cd6e4c6888b9943557528c0f
+* author: darwinsenior (https://sketchfab.com/darwinsenior)
+
+Model License:
+* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
+* requirements: Author must be credited. Commercial use is allowed.
+
+If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
+This work is based on "Stanford Bunny" (https://sketchfab.com/3d-models/stanford-bunny-43f266d6cd6e4c6888b9943557528c0f) by darwinsenior (https://sketchfab.com/darwinsenior) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
\ No newline at end of file
diff --git a/scenes/gltf/bunny/scene.bin b/scenes/gltf/bunny/scene.bin
new file mode 100644
index 00000000..99b4c097
Binary files /dev/null and b/scenes/gltf/bunny/scene.bin differ
diff --git a/scenes/gltf/cube/Cube.bin b/scenes/gltf/cube/Cube.bin
new file mode 100644
index 00000000..7dae4b0b
Binary files /dev/null and b/scenes/gltf/cube/Cube.bin differ
diff --git a/scenes/gltf/cube/Cube.gltf b/scenes/gltf/cube/Cube.gltf
new file mode 100644
index 00000000..bc873da8
--- /dev/null
+++ b/scenes/gltf/cube/Cube.gltf
@@ -0,0 +1,193 @@
+{
+ "accessors" : [
+ {
+ "bufferView" : 0,
+ "byteOffset" : 0,
+ "componentType" : 5123,
+ "count" : 36,
+ "max" : [
+ 35
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 1,
+ "byteOffset" : 0,
+ "componentType" : 5126,
+ "count" : 36,
+ "max" : [
+ 1.000000,
+ 1.000000,
+ 1.000001
+ ],
+ "min" : [
+ -1.000000,
+ -1.000000,
+ -1.000000
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 2,
+ "byteOffset" : 0,
+ "componentType" : 5126,
+ "count" : 36,
+ "max" : [
+ 1.000000,
+ 1.000000,
+ 1.000000
+ ],
+ "min" : [
+ -1.000000,
+ -1.000000,
+ -1.000000
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 3,
+ "byteOffset" : 0,
+ "componentType" : 5126,
+ "count" : 36,
+ "max" : [
+ 1.000000,
+ -0.000000,
+ -0.000000,
+ 1.000000
+ ],
+ "min" : [
+ 0.000000,
+ -0.000000,
+ -1.000000,
+ -1.000000
+ ],
+ "type" : "VEC4"
+ },
+ {
+ "bufferView" : 4,
+ "byteOffset" : 0,
+ "componentType" : 5126,
+ "count" : 36,
+ "max" : [
+ 1.000000,
+ 1.000000
+ ],
+ "min" : [
+ -1.000000,
+ -1.000000
+ ],
+ "type" : "VEC2"
+ }
+ ],
+ "asset" : {
+ "generator" : "VKTS glTF 2.0 exporter",
+ "version" : "2.0"
+ },
+ "bufferViews" : [
+ {
+ "buffer" : 0,
+ "byteLength" : 72,
+ "byteOffset" : 0,
+ "target" : 34963
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 432,
+ "byteOffset" : 72,
+ "target" : 34962
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 432,
+ "byteOffset" : 504,
+ "target" : 34962
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 576,
+ "byteOffset" : 936,
+ "target" : 34962
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 1512,
+ "target" : 34962
+ }
+ ],
+ "buffers" : [
+ {
+ "byteLength" : 1800,
+ "uri" : "Cube.bin"
+ }
+ ],
+ "images" : [
+ {
+ "uri" : "Cube_BaseColor.png"
+ },
+ {
+ "uri" : "Cube_MetallicRoughness.png"
+ }
+ ],
+ "materials" : [
+ {
+ "name" : "Cube",
+ "pbrMetallicRoughness" : {
+ "baseColorTexture" : {
+ "index" : 0
+ },
+ "metallicRoughnessTexture" : {
+ "index" : 1
+ }
+ }
+ }
+ ],
+ "meshes" : [
+ {
+ "name" : "Cube",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 2,
+ "POSITION" : 1,
+ "TANGENT" : 3,
+ "TEXCOORD_0" : 4
+ },
+ "indices" : 0,
+ "material" : 0,
+ "mode" : 4
+ }
+ ]
+ }
+ ],
+ "nodes" : [
+ {
+ "mesh" : 0,
+ "name" : "Cube"
+ }
+ ],
+ "samplers" : [
+ {}
+ ],
+ "scene" : 0,
+ "scenes" : [
+ {
+ "nodes" : [
+ 0
+ ]
+ }
+ ],
+ "textures" : [
+ {
+ "sampler" : 0,
+ "source" : 0
+ },
+ {
+ "sampler" : 0,
+ "source" : 1
+ }
+ ]
+}
diff --git a/scenes/gltf/cube/Cube_BaseColor.png b/scenes/gltf/cube/Cube_BaseColor.png
new file mode 100644
index 00000000..5e5cb206
Binary files /dev/null and b/scenes/gltf/cube/Cube_BaseColor.png differ
diff --git a/scenes/gltf/cube/Cube_MetallicRoughness.png b/scenes/gltf/cube/Cube_MetallicRoughness.png
new file mode 100644
index 00000000..efd20260
Binary files /dev/null and b/scenes/gltf/cube/Cube_MetallicRoughness.png differ
diff --git a/scenes/gltf/dragon/dragon.bin b/scenes/gltf/dragon/dragon.bin
new file mode 100644
index 00000000..494daada
Binary files /dev/null and b/scenes/gltf/dragon/dragon.bin differ
diff --git a/scenes/gltf/dragon/dragon.glb b/scenes/gltf/dragon/dragon.glb
new file mode 100644
index 00000000..9efb7db2
Binary files /dev/null and b/scenes/gltf/dragon/dragon.glb differ
diff --git a/scenes/gltf/dragon/dragon.gltf b/scenes/gltf/dragon/dragon.gltf
new file mode 100644
index 00000000..4b2f2714
--- /dev/null
+++ b/scenes/gltf/dragon/dragon.gltf
@@ -0,0 +1,114 @@
+{
+ "asset":{
+ "generator":"Khronos glTF Blender I/O v3.6.27",
+ "version":"2.0"
+ },
+ "scene":0,
+ "scenes":[
+ {
+ "name":"Scene",
+ "nodes":[
+ 0
+ ]
+ }
+ ],
+ "nodes":[
+ {
+ "mesh":0,
+ "name":"dragon",
+ "rotation":[
+ 0.7071068286895752,
+ 0,
+ 0,
+ 0.7071068286895752
+ ]
+ }
+ ],
+ "materials":[
+ {
+ "doubleSided":true,
+ "name":"Default OBJ",
+ "pbrMetallicRoughness":{
+ "baseColorFactor":[
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor":0,
+ "roughnessFactor":0.5
+ }
+ }
+ ],
+ "meshes":[
+ {
+ "name":"dragon",
+ "primitives":[
+ {
+ "attributes":{
+ "POSITION":0,
+ "NORMAL":1
+ },
+ "indices":2,
+ "material":0
+ }
+ ]
+ }
+ ],
+ "accessors":[
+ {
+ "bufferView":0,
+ "componentType":5126,
+ "count":439102,
+ "max":[
+ 0.20739500224590302,
+ 0.5277529954910278,
+ 0.2829580008983612
+ ],
+ "min":[
+ -0.239779993891716,
+ -0.47224700450897217,
+ -0.4220220148563385
+ ],
+ "type":"VEC3"
+ },
+ {
+ "bufferView":1,
+ "componentType":5126,
+ "count":439102,
+ "type":"VEC3"
+ },
+ {
+ "bufferView":2,
+ "componentType":5125,
+ "count":2613918,
+ "type":"SCALAR"
+ }
+ ],
+ "bufferViews":[
+ {
+ "buffer":0,
+ "byteLength":5269224,
+ "byteOffset":0,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":5269224,
+ "byteOffset":5269224,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":10455672,
+ "byteOffset":10538448,
+ "target":34963
+ }
+ ],
+ "buffers":[
+ {
+ "byteLength":20994120,
+ "uri":"dragon.bin"
+ }
+ ]
+}
diff --git a/scenes/gltf/duck/Duck.gltf b/scenes/gltf/duck/Duck.gltf
new file mode 100644
index 00000000..b80c842c
--- /dev/null
+++ b/scenes/gltf/duck/Duck.gltf
@@ -0,0 +1,219 @@
+{
+ "asset": {
+ "generator": "COLLADA2GLTF",
+ "version": "2.0"
+ },
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 2,
+ 1
+ ],
+ "matrix": [
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ]
+ },
+ {
+ "matrix": [
+ -0.7289686799049377,
+ 0.0,
+ -0.6845470666885376,
+ 0.0,
+ -0.4252049028873444,
+ 0.7836934328079224,
+ 0.4527972936630249,
+ 0.0,
+ 0.5364750623703003,
+ 0.6211478114128113,
+ -0.571287989616394,
+ 0.0,
+ 400.1130065917969,
+ 463.2640075683594,
+ -431.0780334472656,
+ 1.0
+ ],
+ "camera": 0
+ },
+ {
+ "mesh": 0
+ }
+ ],
+ "cameras": [
+ {
+ "perspective": {
+ "aspectRatio": 1.5,
+ "yfov": 0.6605925559997559,
+ "zfar": 10000.0,
+ "znear": 1.0
+ },
+ "type": "perspective"
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 1,
+ "POSITION": 2,
+ "TEXCOORD_0": 3
+ },
+ "indices": 0,
+ "mode": 4,
+ "material": 0
+ }
+ ],
+ "name": "LOD3spShape"
+ }
+ ],
+ "accessors": [
+ {
+ "bufferView": 0,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 12636,
+ "max": [
+ 2398
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 0.9995989799499512,
+ 0.999580979347229,
+ 0.9984359741210938
+ ],
+ "min": [
+ -0.9990839958190918,
+ -1.0,
+ -0.9998319745063782
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 28788,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 96.17990112304688,
+ 163.97000122070313,
+ 53.92519760131836
+ ],
+ "min": [
+ -69.29850006103516,
+ 9.929369926452637,
+ -61.32819747924805
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 0.9833459854125976,
+ 0.9800369739532472
+ ],
+ "min": [
+ 0.026409000158309938,
+ 0.01996302604675293
+ ],
+ "type": "VEC2"
+ }
+ ],
+ "materials": [
+ {
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "blinn3-fx"
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ }
+ ],
+ "images": [
+ {
+ "uri": "DuckCM.png"
+ }
+ ],
+ "samplers": [
+ {
+ "magFilter": 9729,
+ "minFilter": 9986,
+ "wrapS": 10497,
+ "wrapT": 10497
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteOffset": 76768,
+ "byteLength": 25272,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 0,
+ "byteLength": 57576,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 57576,
+ "byteLength": 19192,
+ "byteStride": 8,
+ "target": 34962
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 102040,
+ "uri": "Duck0.bin"
+ }
+ ]
+}
diff --git a/scenes/gltf/duck/Duck0.bin b/scenes/gltf/duck/Duck0.bin
new file mode 100644
index 00000000..5f01f88a
Binary files /dev/null and b/scenes/gltf/duck/Duck0.bin differ
diff --git a/scenes/gltf/duck/DuckCM.png b/scenes/gltf/duck/DuckCM.png
new file mode 100644
index 00000000..9fa2dd4c
Binary files /dev/null and b/scenes/gltf/duck/DuckCM.png differ
diff --git a/scenes/gltf/duck_2decimals.glb b/scenes/gltf/duck_2decimals.glb
new file mode 100644
index 00000000..217170d2
Binary files /dev/null and b/scenes/gltf/duck_2decimals.glb differ
diff --git a/scenes/gltf/fox/Fox.bin b/scenes/gltf/fox/Fox.bin
new file mode 100644
index 00000000..41e41dc2
Binary files /dev/null and b/scenes/gltf/fox/Fox.bin differ
diff --git a/scenes/gltf/fox/Fox.gltf b/scenes/gltf/fox/Fox.gltf
new file mode 100644
index 00000000..e35b7d74
--- /dev/null
+++ b/scenes/gltf/fox/Fox.gltf
@@ -0,0 +1,1777 @@
+{
+ "asset": {
+ "copyright": "CC-BY 4.0 Model by PixelMannen https://opengameart.org/content/fox-and-shiba and @tomkranis https://sketchfab.com/3d-models/low-poly-fox-by-pixelmannen-animated-371dea88d7e04a76af5763f2a36866bc and @AsoboStudio with @scurest https://github.com/KhronosGroup/glTF-Sample-Models/pull/150#issuecomment-406300118",
+ "version": "2.0"
+ },
+ "accessors": [
+ {
+ "bufferView": 0,
+ "componentType": 5126,
+ "count": 1728,
+ "type": "VEC3",
+ "byteOffset": 0,
+ "min": [
+ -12.592718124389648,
+ -0.12174476683139801,
+ -88.09500122070312
+ ],
+ "max": [
+ 12.592718124389648,
+ 78.90718841552734,
+ 66.62486267089844
+ ]
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 1728,
+ "type": "VEC2",
+ "byteOffset": 0
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5123,
+ "count": 1728,
+ "type": "VEC4",
+ "byteOffset": 13824
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 1728,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 24,
+ "type": "MAT4"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 83,
+ "type": "SCALAR",
+ "min": [
+ 0.0
+ ],
+ "max": [
+ 3.4166667461395264
+ ]
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 1328,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 2656,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 3984,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 5312,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 6640,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 7968,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 9296,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 10624,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 11952,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 13280,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 14608,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 15936,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 17264,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 18592,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 19920,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 21248,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 22576,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 23904,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 25232,
+ "componentType": 5126,
+ "count": 83,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 332,
+ "componentType": 5126,
+ "count": 18,
+ "type": "SCALAR",
+ "min": [
+ 0.0
+ ],
+ "max": [
+ 0.7083333134651184
+ ]
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 26560,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 26848,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 27136,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 27424,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 27712,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 28000,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 28288,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 28576,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 28864,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 29152,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 29440,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 29728,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 30016,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 30304,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 30592,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 30880,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 31168,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 31456,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 31744,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 996,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 32032,
+ "componentType": 5126,
+ "count": 18,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 404,
+ "componentType": 5126,
+ "count": 25,
+ "type": "SCALAR",
+ "min": [
+ 0.0
+ ],
+ "max": [
+ 1.1583333015441895
+ ]
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 32320,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 32720,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 33120,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 33520,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 33920,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 34320,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 34720,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 35120,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 35520,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 35920,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 36320,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 36720,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 37120,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 37520,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 37920,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 38320,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 38720,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 39120,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 39520,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 1212,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 39920,
+ "componentType": 5126,
+ "count": 25,
+ "type": "VEC4"
+ }
+ ],
+ "animations": [
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 8,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 7,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 2,
+ "target": {
+ "node": 11,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 3,
+ "target": {
+ "node": 10,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 4,
+ "target": {
+ "node": 9,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 5,
+ "target": {
+ "node": 14,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 6,
+ "target": {
+ "node": 13,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 7,
+ "target": {
+ "node": 12,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 8,
+ "target": {
+ "node": 6,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 9,
+ "target": {
+ "node": 5,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 10,
+ "target": {
+ "node": 17,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 11,
+ "target": {
+ "node": 16,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 12,
+ "target": {
+ "node": 15,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 13,
+ "target": {
+ "node": 20,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 14,
+ "target": {
+ "node": 19,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 15,
+ "target": {
+ "node": 18,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 16,
+ "target": {
+ "node": 24,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 17,
+ "target": {
+ "node": 23,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 18,
+ "target": {
+ "node": 22,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 19,
+ "target": {
+ "node": 4,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 20,
+ "target": {
+ "node": 4,
+ "path": "rotation"
+ }
+ }
+ ],
+ "samplers": [
+ {
+ "input": 5,
+ "output": 6
+ },
+ {
+ "input": 5,
+ "output": 7
+ },
+ {
+ "input": 5,
+ "output": 8
+ },
+ {
+ "input": 5,
+ "output": 9
+ },
+ {
+ "input": 5,
+ "output": 10
+ },
+ {
+ "input": 5,
+ "output": 11
+ },
+ {
+ "input": 5,
+ "output": 12
+ },
+ {
+ "input": 5,
+ "output": 13
+ },
+ {
+ "input": 5,
+ "output": 14
+ },
+ {
+ "input": 5,
+ "output": 15
+ },
+ {
+ "input": 5,
+ "output": 16
+ },
+ {
+ "input": 5,
+ "output": 17
+ },
+ {
+ "input": 5,
+ "output": 18
+ },
+ {
+ "input": 5,
+ "output": 19
+ },
+ {
+ "input": 5,
+ "output": 20
+ },
+ {
+ "input": 5,
+ "output": 21
+ },
+ {
+ "input": 5,
+ "output": 22
+ },
+ {
+ "input": 5,
+ "output": 23
+ },
+ {
+ "input": 5,
+ "output": 24
+ },
+ {
+ "input": 5,
+ "output": 25
+ },
+ {
+ "input": 5,
+ "output": 26
+ }
+ ],
+ "name": "Survey"
+ },
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 8,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 7,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 2,
+ "target": {
+ "node": 11,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 3,
+ "target": {
+ "node": 10,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 4,
+ "target": {
+ "node": 9,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 5,
+ "target": {
+ "node": 14,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 6,
+ "target": {
+ "node": 13,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 7,
+ "target": {
+ "node": 12,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 8,
+ "target": {
+ "node": 6,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 9,
+ "target": {
+ "node": 5,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 10,
+ "target": {
+ "node": 17,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 11,
+ "target": {
+ "node": 16,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 12,
+ "target": {
+ "node": 15,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 13,
+ "target": {
+ "node": 20,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 14,
+ "target": {
+ "node": 19,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 15,
+ "target": {
+ "node": 18,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 16,
+ "target": {
+ "node": 24,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 17,
+ "target": {
+ "node": 23,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 18,
+ "target": {
+ "node": 22,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 19,
+ "target": {
+ "node": 4,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 20,
+ "target": {
+ "node": 4,
+ "path": "rotation"
+ }
+ }
+ ],
+ "samplers": [
+ {
+ "input": 27,
+ "output": 28
+ },
+ {
+ "input": 27,
+ "output": 29
+ },
+ {
+ "input": 27,
+ "output": 30
+ },
+ {
+ "input": 27,
+ "output": 31
+ },
+ {
+ "input": 27,
+ "output": 32
+ },
+ {
+ "input": 27,
+ "output": 33
+ },
+ {
+ "input": 27,
+ "output": 34
+ },
+ {
+ "input": 27,
+ "output": 35
+ },
+ {
+ "input": 27,
+ "output": 36
+ },
+ {
+ "input": 27,
+ "output": 37
+ },
+ {
+ "input": 27,
+ "output": 38
+ },
+ {
+ "input": 27,
+ "output": 39
+ },
+ {
+ "input": 27,
+ "output": 40
+ },
+ {
+ "input": 27,
+ "output": 41
+ },
+ {
+ "input": 27,
+ "output": 42
+ },
+ {
+ "input": 27,
+ "output": 43
+ },
+ {
+ "input": 27,
+ "output": 44
+ },
+ {
+ "input": 27,
+ "output": 45
+ },
+ {
+ "input": 27,
+ "output": 46
+ },
+ {
+ "input": 27,
+ "output": 47
+ },
+ {
+ "input": 27,
+ "output": 48
+ }
+ ],
+ "name": "Walk"
+ },
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 8,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 7,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 2,
+ "target": {
+ "node": 11,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 3,
+ "target": {
+ "node": 10,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 4,
+ "target": {
+ "node": 9,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 5,
+ "target": {
+ "node": 14,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 6,
+ "target": {
+ "node": 13,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 7,
+ "target": {
+ "node": 12,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 8,
+ "target": {
+ "node": 6,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 9,
+ "target": {
+ "node": 5,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 10,
+ "target": {
+ "node": 17,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 11,
+ "target": {
+ "node": 16,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 12,
+ "target": {
+ "node": 15,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 13,
+ "target": {
+ "node": 20,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 14,
+ "target": {
+ "node": 19,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 15,
+ "target": {
+ "node": 18,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 16,
+ "target": {
+ "node": 24,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 17,
+ "target": {
+ "node": 23,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 18,
+ "target": {
+ "node": 22,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 19,
+ "target": {
+ "node": 4,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 20,
+ "target": {
+ "node": 4,
+ "path": "rotation"
+ }
+ }
+ ],
+ "samplers": [
+ {
+ "input": 49,
+ "output": 50
+ },
+ {
+ "input": 49,
+ "output": 51
+ },
+ {
+ "input": 49,
+ "output": 52
+ },
+ {
+ "input": 49,
+ "output": 53
+ },
+ {
+ "input": 49,
+ "output": 54
+ },
+ {
+ "input": 49,
+ "output": 55
+ },
+ {
+ "input": 49,
+ "output": 56
+ },
+ {
+ "input": 49,
+ "output": 57
+ },
+ {
+ "input": 49,
+ "output": 58
+ },
+ {
+ "input": 49,
+ "output": 59
+ },
+ {
+ "input": 49,
+ "output": 60
+ },
+ {
+ "input": 49,
+ "output": 61
+ },
+ {
+ "input": 49,
+ "output": 62
+ },
+ {
+ "input": 49,
+ "output": 63
+ },
+ {
+ "input": 49,
+ "output": 64
+ },
+ {
+ "input": 49,
+ "output": 65
+ },
+ {
+ "input": 49,
+ "output": 66
+ },
+ {
+ "input": 49,
+ "output": 67
+ },
+ {
+ "input": 49,
+ "output": 68
+ },
+ {
+ "input": 49,
+ "output": 69
+ },
+ {
+ "input": 49,
+ "output": 70
+ }
+ ],
+ "name": "Run"
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteOffset": 0,
+ "byteLength": 20736,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 20736,
+ "byteLength": 27648,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 48384,
+ "byteLength": 27648,
+ "byteStride": 16,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 76032,
+ "byteLength": 1536
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 77568,
+ "byteLength": 504
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 78072,
+ "byteLength": 40320
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 118392,
+ "byteLength": 1512
+ }
+ ],
+ "buffers": [
+ {
+ "uri": "Fox.bin",
+ "byteLength": 119904
+ }
+ ],
+ "images": [
+ {
+ "uri": "Texture.png",
+ "mimeType": "image/png"
+ }
+ ],
+ "materials": [
+ {
+ "name": "fox_material",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicFactor": 0,
+ "roughnessFactor": 0.58
+ }
+ }
+ ],
+ "meshes": [
+ {
+ "name": "fox1",
+ "primitives": [
+ {
+ "attributes": {
+ "POSITION": 0,
+ "TEXCOORD_0": 1,
+ "JOINTS_0": 2,
+ "WEIGHTS_0": 3
+ },
+ "material": 0
+ }
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 2
+ ],
+ "name": "root"
+ },
+ {
+ "name": "fox",
+ "mesh": 0,
+ "skin": 0
+ },
+ {
+ "children": [
+ 3
+ ],
+ "name": "_rootJoint"
+ },
+ {
+ "children": [
+ 4
+ ],
+ "name": "b_Root_00",
+ "rotation": [
+ -0.7071080924875391,
+ 0.0,
+ 0.0,
+ 0.7071054698831242
+ ]
+ },
+ {
+ "children": [
+ 5,
+ 15,
+ 18,
+ 22
+ ],
+ "name": "b_Hip_01",
+ "rotation": [
+ 0.12769094176175547,
+ -0.6954820192393762,
+ -0.12769022650601444,
+ 0.695481840425441
+ ],
+ "translation": [
+ 0,
+ 26.748403549194336,
+ 42.93817138671875
+ ]
+ },
+ {
+ "children": [
+ 6
+ ],
+ "name": "b_Spine01_02",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.5904157638238317,
+ 0.8070992664030376
+ ],
+ "translation": [
+ 12.850601196289062,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 7,
+ 9,
+ 12
+ ],
+ "name": "b_Spine02_03",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.017411952404281082,
+ 0.9998484004655261
+ ],
+ "translation": [
+ 21.65575408935547,
+ -0.000118255615234375,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 8
+ ],
+ "name": "b_Neck_04",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.30337914028264346,
+ 0.9528699267168443
+ ],
+ "translation": [
+ 25.64914321899414,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_Head_05",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.4002854151487349,
+ 0.9163905206947555
+ ],
+ "translation": [
+ 13.376960754394531,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 10
+ ],
+ "name": "b_RightUpperArm_06",
+ "rotation": [
+ 0.0004673273262011562,
+ -0.0004461484692255928,
+ -0.7121792881110691,
+ 0.7019973248825985
+ ],
+ "translation": [
+ 18.677913665771484,
+ -4.297340393066406,
+ 6.9675750732421875
+ ]
+ },
+ {
+ "children": [
+ 11
+ ],
+ "name": "b_RightForeArm_07",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.03712589977348744,
+ 0.9993105961441663
+ ],
+ "translation": [
+ 23.04512596130371,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_RightHand_08",
+ "rotation": [
+ -0.012037406914797018,
+ -0.00782221012465276,
+ 0.4605623277185148,
+ 0.8875112709988741
+ ],
+ "translation": [
+ 19.350055694580078,
+ -0.14598655700683594,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 13
+ ],
+ "name": "b_LeftUpperArm_09",
+ "rotation": [
+ 0.0004972619220940174,
+ -0.0008821923166442875,
+ -0.7120874929914663,
+ 0.7020900061903927
+ ],
+ "translation": [
+ 18.67791748046875,
+ -4.297344207763672,
+ -6.967987060546875
+ ]
+ },
+ {
+ "children": [
+ 14
+ ],
+ "name": "b_LeftForeArm_010",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.03712589977348744,
+ 0.9993105961441663
+ ],
+ "translation": [
+ 23.045124053955078,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_LeftHand_011",
+ "rotation": [
+ 0.01651791440721507,
+ 0.014013739873997781,
+ 0.46007557521271,
+ 0.8876154790736099
+ ],
+ "translation": [
+ 19.350051879882812,
+ -0.14599037170410156,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 16
+ ],
+ "name": "b_Tail01_012",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.9818928940656295,
+ 0.1894369145214904
+ ],
+ "translation": [
+ 4.2603759765625,
+ 15.958770751953125,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 17
+ ],
+ "name": "b_Tail02_013",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.0696171663387466,
+ 0.9975737818081244
+ ],
+ "translation": [
+ 12.411918640136719,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_Tail03_014",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.05383274484207684,
+ 0.9985499664927979
+ ],
+ "translation": [
+ 24.24032211303711,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 19
+ ],
+ "name": "b_LeftLeg01_015",
+ "rotation": [
+ 0.0,
+ -0.0001717522536559936,
+ 0.9700158834020681,
+ -0.2430414706359161
+ ],
+ "translation": [
+ 4.813770294189453,
+ 5.154018402099609,
+ -6.968006134033203
+ ]
+ },
+ {
+ "children": [
+ 20
+ ],
+ "name": "b_LeftLeg02_016",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.36804378855511655,
+ 0.9298084586117706
+ ],
+ "translation": [
+ 18.944175720214844,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 21
+ ],
+ "name": "b_LeftFoot01_017",
+ "rotation": [
+ 0.0002484105929664666,
+ 0.0,
+ 0.4584841122585099,
+ 0.888702569535333
+ ],
+ "translation": [
+ 17.942811965942383,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_LeftFoot02_018",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.5472882949090243,
+ 0.8369441571906533
+ ],
+ "translation": [
+ 15.779938697814941,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 23
+ ],
+ "name": "b_RightLeg01_019",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.9699585942054535,
+ -0.24327006705918533
+ ],
+ "translation": [
+ 4.813777923583984,
+ 5.154026031494141,
+ 6.967563629150391
+ ]
+ },
+ {
+ "children": [
+ 24
+ ],
+ "name": "b_RightLeg02_020",
+ "rotation": [
+ 0.0,
+ 0.0,
+ -0.36804381432052885,
+ 0.9298084484131106
+ ],
+ "translation": [
+ 18.944183349609375,
+ 0,
+ 0
+ ]
+ },
+ {
+ "children": [
+ 25
+ ],
+ "name": "b_RightFoot01_021",
+ "rotation": [
+ -0.00015345455876803163,
+ 0.0,
+ 0.4579093746168346,
+ 0.888998864504178
+ ],
+ "translation": [
+ 17.94281005859375,
+ 0,
+ 0
+ ]
+ },
+ {
+ "name": "b_RightFoot02_022",
+ "rotation": [
+ 0.0,
+ 0.0,
+ 0.5472882949090243,
+ 0.8369441571906533
+ ],
+ "translation": [
+ 15.779935836791992,
+ 0,
+ 0
+ ]
+ }
+ ],
+ "samplers": [
+ {
+ "magFilter": 9729,
+ "minFilter": 9987
+ }
+ ],
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0,
+ 1
+ ]
+ }
+ ],
+ "skins": [
+ {
+ "inverseBindMatrices": 4,
+ "joints": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25
+ ],
+ "skeleton": 2
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ }
+ ]
+}
diff --git a/scenes/gltf/lamp/LightsPunctualLamp.data.bin b/scenes/gltf/lamp/LightsPunctualLamp.data.bin
new file mode 100644
index 00000000..0c5589d1
Binary files /dev/null and b/scenes/gltf/lamp/LightsPunctualLamp.data.bin differ
diff --git a/scenes/gltf/lamp/LightsPunctualLamp.gltf b/scenes/gltf/lamp/LightsPunctualLamp.gltf
new file mode 100644
index 00000000..8634ad9e
--- /dev/null
+++ b/scenes/gltf/lamp/LightsPunctualLamp.gltf
@@ -0,0 +1,731 @@
+{
+ "accessors": [
+ {
+ "bufferView": 0,
+ "componentType": 5123,
+ "count": 12210,
+ "max": [
+ 3211
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 3212,
+ "max": [
+ 0.81497824192047119,
+ 1.8746249675750732,
+ 0.32295516133308411
+ ],
+ "min": [
+ -0.12269512563943863,
+ 0.013025385327637196,
+ -0.32393229007720947
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "componentType": 5126,
+ "count": 3212,
+ "max": [
+ 0.99944537878036499,
+ 0.99852299690246582
+ ],
+ "min": [
+ 0.00055464135948568583,
+ 0.0014770264970138669
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 3,
+ "componentType": 5126,
+ "count": 3212,
+ "max": [
+ 0.99723184108734131,
+ 0.99999505281448364,
+ 0.99979680776596069
+ ],
+ "min": [
+ -0.9996182918548584,
+ -0.99999970197677612,
+ -0.99995344877243042
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "componentType": 5126,
+ "count": 3212,
+ "max": [
+ 0.99976259469985962,
+ 0.99905240535736084,
+ 0.99983519315719604,
+ 1
+ ],
+ "min": [
+ -0.99952447414398193,
+ -0.99995177984237671,
+ -0.99992561340332031,
+ 1
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "componentType": 5123,
+ "count": 42,
+ "max": [
+ 17
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 6,
+ "componentType": 5126,
+ "count": 18,
+ "max": [
+ 0.31587070226669312,
+ 0.01179451122879982,
+ 0.17449036240577698
+ ],
+ "min": [
+ 0.098838590085506439,
+ 0.011062321253120899,
+ -0.041274931281805038
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 7,
+ "componentType": 5126,
+ "count": 18,
+ "max": [
+ 0.99839240312576294,
+ 0.99922639131546021
+ ],
+ "min": [
+ 0.001607581740245223,
+ 0.00077362521551549435
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 8,
+ "componentType": 5126,
+ "count": 18,
+ "max": [
+ 0.00083804933819919825,
+ 0.99999737739562988,
+ 0.0043188082054257393
+ ],
+ "min": [
+ -0.0010681741405278444,
+ -0.99999678134918213,
+ -0.0038908792193979025
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 9,
+ "componentType": 5126,
+ "count": 18,
+ "max": [
+ 0.59758806228637695,
+ 0.0040022819302976131,
+ 0.82126879692077637,
+ 1
+ ],
+ "min": [
+ -0.92424499988555908,
+ 0.00036004511639475822,
+ 0.38179951906204224,
+ 1
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 10,
+ "componentType": 5123,
+ "count": 5748,
+ "max": [
+ 1324
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 11,
+ "componentType": 5126,
+ "count": 1325,
+ "max": [
+ 0.40340703725814819,
+ 1.4182039499282837,
+ 0.35968679189682007
+ ],
+ "min": [
+ -0.31200858950614929,
+ 0.97981822490692139,
+ -0.36191719770431519
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 12,
+ "componentType": 5126,
+ "count": 1325,
+ "max": [
+ 0.9974830150604248,
+ 0.99556893110275269
+ ],
+ "min": [
+ 0.0016639239620417356,
+ 0.046032872051000595
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 13,
+ "componentType": 5126,
+ "count": 1325,
+ "max": [
+ 0.99768662452697754,
+ 0.99961179494857788,
+ 0.99848830699920654
+ ],
+ "min": [
+ -0.99937206506729126,
+ -0.23119865357875824,
+ -0.99885374307632446
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 14,
+ "componentType": 5126,
+ "count": 1325,
+ "max": [
+ 0.99987584352493286,
+ 0.90486729145050049,
+ 0.99609410762786865,
+ 1
+ ],
+ "min": [
+ -0.99875664710998535,
+ -0.99989378452301025,
+ -0.99945849180221558,
+ 1
+ ],
+ "type": "VEC4"
+ }
+ ],
+ "asset": {
+ "generator": "Created by RapidCompact v5.4.0-rc4 | www.rapidcompact.com",
+ "version": "2.0"
+ },
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteLength": 24420,
+ "byteOffset": 0,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteLength": 38544,
+ "byteOffset": 24420,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 25696,
+ "byteOffset": 62964,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 38544,
+ "byteOffset": 88660,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 51392,
+ "byteOffset": 127204,
+ "byteStride": 16,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 84,
+ "byteOffset": 178596,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteLength": 216,
+ "byteOffset": 178680,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 144,
+ "byteOffset": 178896,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 216,
+ "byteOffset": 179040,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 288,
+ "byteOffset": 179256,
+ "byteStride": 16,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 11496,
+ "byteOffset": 179544,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteLength": 15900,
+ "byteOffset": 191040,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 10600,
+ "byteOffset": 206940,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 15900,
+ "byteOffset": 217540,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 21200,
+ "byteOffset": 233440,
+ "byteStride": 16,
+ "target": 34962
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 254640,
+ "uri": "LightsPunctualLamp.data.bin"
+ }
+ ],
+ "extensions": {
+ "KHR_lights_punctual": {
+ "lights": [
+ {
+ "color": [
+ 1,
+ 0.63187497854232788,
+ 0.23909975588321689
+ ],
+ "intensity": 15,
+ "name": "Point",
+ "type": "point"
+ },
+ {
+ "intensity": 1.5,
+ "name": "Point.002",
+ "type": "point"
+ },
+ {
+ "color": [
+ 0.21223080158233645,
+ 0.59061902761459351,
+ 0.55834054946899414
+ ],
+ "intensity": 80,
+ "name": "Point.003",
+ "type": "point"
+ },
+ {
+ "color": [
+ 0.21223080158233645,
+ 0.59061902761459351,
+ 0.55834054946899414
+ ],
+ "intensity": 80,
+ "name": "Point.001",
+ "type": "point"
+ },
+ {
+ "color": [
+ 1,
+ 0.62783652544021606,
+ 0.50124037265777588
+ ],
+ "intensity": 180,
+ "name": "Point.004",
+ "type": "point"
+ }
+ ]
+ }
+ },
+ "extensionsUsed": [
+ "KHR_materials_transmission",
+ "KHR_lights_punctual"
+ ],
+ "images": [
+ {
+ "uri": "material0_basecolor.jpeg"
+ },
+ {
+ "uri": "material0_normal.png"
+ },
+ {
+ "uri": "material0_emissive.jpeg"
+ },
+ {
+ "uri": "material0_metallic_roughness.jpeg"
+ },
+ {
+ "uri": "material1_basecolor.png"
+ },
+ {
+ "uri": "material1_normal.png"
+ },
+ {
+ "uri": "material2_transmission.jpeg"
+ }
+ ],
+ "materials": [
+ {
+ "doubleSided": true,
+ "emissiveFactor": [
+ 1,
+ 1,
+ 1
+ ],
+ "emissiveTexture": {
+ "index": 2
+ },
+ "normalTexture": {
+ "index": 1
+ },
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicRoughnessTexture": {
+ "index": 3
+ }
+ }
+ },
+ {
+ "alphaMode": "BLEND",
+ "doubleSided": true,
+ "normalTexture": {
+ "index": 5
+ },
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 4
+ },
+ "metallicFactor": 0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "emissiveFactor": [
+ 1,
+ 1,
+ 1
+ ],
+ "emissiveTexture": {
+ "index": 2
+ },
+ "extensions": {
+ "KHR_materials_transmission": {
+ "transmissionFactor": 1,
+ "transmissionTexture": {
+ "index": 6
+ }
+ }
+ },
+ "normalTexture": {
+ "index": 1
+ },
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicRoughnessTexture": {
+ "index": 3
+ }
+ }
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 3,
+ "POSITION": 1,
+ "TANGENT": 4,
+ "TEXCOORD_0": 2
+ },
+ "indices": 0,
+ "material": 0,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 8,
+ "POSITION": 6,
+ "TANGENT": 9,
+ "TEXCOORD_0": 7
+ },
+ "indices": 5,
+ "material": 1,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 13,
+ "POSITION": 11,
+ "TANGENT": 14,
+ "TEXCOORD_0": 12
+ },
+ "indices": 10,
+ "material": 2,
+ "mode": 4
+ }
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "mesh": 0
+ },
+ {
+ "mesh": 1
+ },
+ {
+ "mesh": 2
+ },
+ {
+ "extensions": {
+ "KHR_lights_punctual": {
+ "light": 0
+ }
+ },
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 3.4228541778702493e-08,
+ -0.99999996577145822,
+ 0,
+ 0,
+ 0.99999996577145822,
+ 3.4228541778702493e-08,
+ 0,
+ 0.046223554760217667,
+ 0.90779733657836925,
+ 0.0066966293379664421,
+ 1
+ ],
+ "name": "Point_Orientation"
+ },
+ {
+ "extensions": {
+ "KHR_lights_punctual": {
+ "light": 1
+ }
+ },
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 3.4228541778702493e-08,
+ -0.99999996577145822,
+ 0,
+ 0,
+ 0.99999996577145822,
+ 3.4228541778702493e-08,
+ 0,
+ 0.17545622587203979,
+ -0.76421988010406494,
+ -0.0057040825486183167,
+ 1
+ ],
+ "name": "Point.002_Orientation"
+ },
+ {
+ "extensions": {
+ "KHR_lights_punctual": {
+ "light": 2
+ }
+ },
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 3.4228541778702493e-08,
+ -0.99999996577145822,
+ 0,
+ 0,
+ 0.99999996577145822,
+ 3.4228541778702493e-08,
+ 0,
+ 0.13761821389198303,
+ 2.066983699798584,
+ -1.1789864301681521,
+ 1
+ ],
+ "name": "Point.001_Orientation"
+ },
+ {
+ "extensions": {
+ "KHR_lights_punctual": {
+ "light": 3
+ }
+ },
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 3.4228541778702493e-08,
+ -0.99999996577145822,
+ 0,
+ 0,
+ 0.99999996577145822,
+ 3.4228541778702493e-08,
+ 0,
+ 0.044289000332355499,
+ 0.25436437129974365,
+ -1.209032416343689,
+ 1
+ ],
+ "name": "Point.003_Orientation"
+ },
+ {
+ "extensions": {
+ "KHR_lights_punctual": {
+ "light": 4
+ }
+ },
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 3.4228541778702493e-08,
+ -0.99999996577145822,
+ 0,
+ 0,
+ 0.99999996577145822,
+ 3.4228541778702493e-08,
+ 0,
+ 0.29202103614807129,
+ 1.0323998928070068,
+ 1.5589159727096558,
+ 1
+ ],
+ "name": "Point.004_Orientation"
+ }
+ ],
+ "samplers": [
+ {
+ "wrapS": 33071,
+ "wrapT": 33071
+ }
+ ],
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7
+ ]
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ },
+ {
+ "sampler": 0,
+ "source": 1
+ },
+ {
+ "sampler": 0,
+ "source": 2
+ },
+ {
+ "sampler": 0,
+ "source": 3
+ },
+ {
+ "sampler": 0,
+ "source": 4
+ },
+ {
+ "sampler": 0,
+ "source": 5
+ },
+ {
+ "sampler": 0,
+ "source": 6
+ }
+ ]
+}
diff --git a/scenes/gltf/lamp/material0_basecolor.jpeg b/scenes/gltf/lamp/material0_basecolor.jpeg
new file mode 100644
index 00000000..911d777d
Binary files /dev/null and b/scenes/gltf/lamp/material0_basecolor.jpeg differ
diff --git a/scenes/gltf/lamp/material0_emissive.jpeg b/scenes/gltf/lamp/material0_emissive.jpeg
new file mode 100644
index 00000000..59176273
Binary files /dev/null and b/scenes/gltf/lamp/material0_emissive.jpeg differ
diff --git a/scenes/gltf/lamp/material0_metallic_roughness.jpeg b/scenes/gltf/lamp/material0_metallic_roughness.jpeg
new file mode 100644
index 00000000..4d934723
Binary files /dev/null and b/scenes/gltf/lamp/material0_metallic_roughness.jpeg differ
diff --git a/scenes/gltf/lamp/material0_normal.png b/scenes/gltf/lamp/material0_normal.png
new file mode 100644
index 00000000..dc7153e9
Binary files /dev/null and b/scenes/gltf/lamp/material0_normal.png differ
diff --git a/scenes/gltf/lamp/material1_basecolor.png b/scenes/gltf/lamp/material1_basecolor.png
new file mode 100644
index 00000000..82991e0b
Binary files /dev/null and b/scenes/gltf/lamp/material1_basecolor.png differ
diff --git a/scenes/gltf/lamp/material1_normal.png b/scenes/gltf/lamp/material1_normal.png
new file mode 100644
index 00000000..42b01678
Binary files /dev/null and b/scenes/gltf/lamp/material1_normal.png differ
diff --git a/scenes/gltf/lamp/material2_transmission.jpeg b/scenes/gltf/lamp/material2_transmission.jpeg
new file mode 100644
index 00000000..91ec6a11
Binary files /dev/null and b/scenes/gltf/lamp/material2_transmission.jpeg differ
diff --git a/scenes/gltf/mario/license.txt b/scenes/gltf/mario/license.txt
new file mode 100644
index 00000000..ed19eaa4
--- /dev/null
+++ b/scenes/gltf/mario/license.txt
@@ -0,0 +1,11 @@
+Model Information:
+* title: Mario obj
+* source: https://sketchfab.com/3d-models/mario-obj-c549d24b60f74d8f85c7a5cbd2f55d0f
+* author: MatiasH290 (https://sketchfab.com/matias029)
+
+Model License:
+* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
+* requirements: Author must be credited. Commercial use is allowed.
+
+If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
+This work is based on "Mario obj" (https://sketchfab.com/3d-models/mario-obj-c549d24b60f74d8f85c7a5cbd2f55d0f) by MatiasH290 (https://sketchfab.com/matias029) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
\ No newline at end of file
diff --git a/scenes/gltf/mario/mario.gltf b/scenes/gltf/mario/mario.gltf
new file mode 100644
index 00000000..109f0392
--- /dev/null
+++ b/scenes/gltf/mario/mario.gltf
@@ -0,0 +1,849 @@
+{
+ "accessors": [
+ {
+ "bufferView": 2,
+ "componentType": 5126,
+ "count": 1801,
+ "max": [
+ 1.304658055305481,
+ 1.3772929906845093,
+ 7.133938789367676
+ ],
+ "min": [
+ -1.3046640157699585,
+ -1.8155169486999512,
+ 5.089290142059326
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 21612,
+ "componentType": 5126,
+ "count": 1801,
+ "max": [
+ 0.9987840056419373,
+ 0.9999406337738037,
+ 0.999742329120636
+ ],
+ "min": [
+ -0.9987840056419373,
+ -0.9999831914901733,
+ -0.9999796152114868
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 1801,
+ "max": [
+ 2.9803199768066406,
+ -0.028661999851465225
+ ],
+ "min": [
+ 2.005929946899414,
+ -0.9838730096817017
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "componentType": 5125,
+ "count": 9966,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 43224,
+ "componentType": 5126,
+ "count": 3496,
+ "max": [
+ 1.1239500045776367,
+ 1.080275058746338,
+ 6.65172004699707
+ ],
+ "min": [
+ -1.1239559650421143,
+ -1.4659210443496704,
+ 4.176641941070557
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 85176,
+ "componentType": 5126,
+ "count": 3496,
+ "max": [
+ 0.9999619722366333,
+ 0.9995006918907166,
+ 0.9996505379676819
+ ],
+ "min": [
+ -0.9999619722366333,
+ -0.9994617104530334,
+ -0.9998437762260437
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 14408,
+ "componentType": 5126,
+ "count": 3496,
+ "max": [
+ 1.971019983291626,
+ -0.01157000008970499
+ ],
+ "min": [
+ 1.0228500366210938,
+ -0.983680009841919
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 39864,
+ "componentType": 5125,
+ "count": 19848,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 127128,
+ "componentType": 5126,
+ "count": 3738,
+ "max": [
+ 3.8504459857940674,
+ 0.6166549921035767,
+ 4.39661979675293
+ ],
+ "min": [
+ -3.850451946258545,
+ -0.8523430228233337,
+ 3.436295986175537
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 171984,
+ "componentType": 5126,
+ "count": 3738,
+ "max": [
+ 0.999826967716217,
+ 1.0,
+ 0.9999966621398926
+ ],
+ "min": [
+ -0.999826967716217,
+ -1.0,
+ -0.9999880790710449
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 42376,
+ "componentType": 5126,
+ "count": 3738,
+ "max": [
+ 5.962289810180664,
+ -0.008159000426530838
+ ],
+ "min": [
+ 5.034639835357666,
+ -0.9876030087471008
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 119256,
+ "componentType": 5125,
+ "count": 19140,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 216840,
+ "componentType": 5126,
+ "count": 3204,
+ "max": [
+ 0.6801720261573792,
+ -0.3235569894313812,
+ 5.886648178100586
+ ],
+ "min": [
+ -0.6801720261573792,
+ -1.0760530233383179,
+ 4.770545959472656
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 255288,
+ "componentType": 5126,
+ "count": 3204,
+ "max": [
+ 0.9996541142463684,
+ 0.9996848702430725,
+ 0.9985623359680176
+ ],
+ "min": [
+ -0.9996541142463684,
+ -0.999473512172699,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 72280,
+ "componentType": 5126,
+ "count": 3204,
+ "max": [
+ 8.001779556274414,
+ 0.11507999897003174
+ ],
+ "min": [
+ 7.051559925079346,
+ -1.0975899696350098
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 195816,
+ "componentType": 5125,
+ "count": 18432,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 293736,
+ "componentType": 5126,
+ "count": 2641,
+ "max": [
+ 1.1255639791488647,
+ 0.6881939768791199,
+ 4.30217981338501
+ ],
+ "min": [
+ -1.1254500150680542,
+ -1.1645519733428955,
+ 0.4016039967536926
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 325428,
+ "componentType": 5126,
+ "count": 2641,
+ "max": [
+ 0.999964714050293,
+ 0.9999994039535522,
+ 0.999232292175293
+ ],
+ "min": [
+ -0.9999969005584717,
+ -0.9994460344314575,
+ -0.9999744892120361
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 97912,
+ "componentType": 5126,
+ "count": 2641,
+ "max": [
+ 3.9873299598693848,
+ -0.01583000086247921
+ ],
+ "min": [
+ 3.020819902420044,
+ -0.9781339764595032
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 269544,
+ "componentType": 5125,
+ "count": 13668,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 357120,
+ "componentType": 5126,
+ "count": 1079,
+ "max": [
+ 2.2276980876922607,
+ 0.5805230140686035,
+ 4.70088005065918
+ ],
+ "min": [
+ -2.2276980876922607,
+ -1.1104329824447632,
+ 2.987159013748169
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 370068,
+ "componentType": 5126,
+ "count": 1079,
+ "max": [
+ 0.9979742169380188,
+ 0.999998927116394,
+ 0.9998829364776611
+ ],
+ "min": [
+ -0.9973999857902527,
+ -0.9999973773956299,
+ -0.9954727292060852
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 119040,
+ "componentType": 5126,
+ "count": 1079,
+ "max": [
+ 4.983570098876953,
+ -0.03678999841213226
+ ],
+ "min": [
+ 4.023210048675537,
+ -0.9035599827766418
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 324216,
+ "componentType": 5125,
+ "count": 5772,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 383016,
+ "componentType": 5126,
+ "count": 1157,
+ "max": [
+ 1.1252100467681885,
+ 0.8102390170097351,
+ 6.513539791107178
+ ],
+ "min": [
+ -1.125216007232666,
+ -1.2390539646148682,
+ -0.00031800000579096377
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 396900,
+ "componentType": 5126,
+ "count": 1157,
+ "max": [
+ 0.9993094205856323,
+ 0.9986732602119446,
+ 0.9992129802703857
+ ],
+ "min": [
+ -0.9993094205856323,
+ -0.9999758005142212,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 127672,
+ "componentType": 5126,
+ "count": 1157,
+ "max": [
+ 6.96042013168335,
+ -0.004468000028282404
+ ],
+ "min": [
+ 1.7079499959945679,
+ -0.987080991268158
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 347304,
+ "componentType": 5125,
+ "count": 6078,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 410784,
+ "componentType": 5126,
+ "count": 2987,
+ "max": [
+ 1.4201099872589111,
+ 0.3898490071296692,
+ 6.199379920959473
+ ],
+ "min": [
+ -1.4201099872589111,
+ -1.914085030555725,
+ 4.042374134063721
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 446628,
+ "componentType": 5126,
+ "count": 2987,
+ "max": [
+ 0.9998717904090881,
+ 0.9999167919158936,
+ 0.9998118281364441
+ ],
+ "min": [
+ -0.9998099207878113,
+ -0.9999927282333374,
+ -0.9998568892478943
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 136928,
+ "componentType": 5126,
+ "count": 2987,
+ "max": [
+ 0.987978994846344,
+ -0.02379000000655651
+ ],
+ "min": [
+ 0.016839999705553055,
+ -0.985040009021759
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 371616,
+ "componentType": 5125,
+ "count": 16542,
+ "type": "SCALAR"
+ }
+ ],
+ "asset": {
+ "extras": {
+ "author": "MatiasH290 (https://sketchfab.com/matias029)",
+ "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
+ "source": "https://sketchfab.com/3d-models/mario-obj-c549d24b60f74d8f85c7a5cbd2f55d0f",
+ "title": "Mario obj"
+ },
+ "generator": "Sketchfab-12.66.0",
+ "version": "2.0"
+ },
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteLength": 437784,
+ "name": "floatBufferViews",
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteLength": 160824,
+ "byteOffset": 437784,
+ "byteStride": 8,
+ "name": "floatBufferViews",
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteLength": 482472,
+ "byteOffset": 598608,
+ "byteStride": 12,
+ "name": "floatBufferViews",
+ "target": 34962
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 1081080,
+ "uri": "scene.bin"
+ }
+ ],
+ "images": [
+ {
+ "uri": "textures/submesh_0_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_1_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_2_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_3_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_4_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_5_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_6_baseColor.png"
+ },
+ {
+ "uri": "textures/submesh_7_baseColor.png"
+ }
+ ],
+ "materials": [
+ {
+ "doubleSided": true,
+ "name": "submesh_0",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_1",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 1
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_2",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 2
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_3",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 3
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_4",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 4
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_5",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 5
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_6",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 6
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ },
+ {
+ "doubleSided": true,
+ "name": "submesh_7",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 7
+ },
+ "metallicFactor": 0.0,
+ "roughnessFactor": 0.5
+ }
+ }
+ ],
+ "meshes": [
+ {
+ "name": "Object_0",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 1,
+ "POSITION": 0,
+ "TEXCOORD_0": 2
+ },
+ "indices": 3,
+ "material": 0,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_1",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 5,
+ "POSITION": 4,
+ "TEXCOORD_0": 6
+ },
+ "indices": 7,
+ "material": 1,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_2",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 9,
+ "POSITION": 8,
+ "TEXCOORD_0": 10
+ },
+ "indices": 11,
+ "material": 2,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_3",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 13,
+ "POSITION": 12,
+ "TEXCOORD_0": 14
+ },
+ "indices": 15,
+ "material": 3,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_4",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 17,
+ "POSITION": 16,
+ "TEXCOORD_0": 18
+ },
+ "indices": 19,
+ "material": 4,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_5",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 21,
+ "POSITION": 20,
+ "TEXCOORD_0": 22
+ },
+ "indices": 23,
+ "material": 5,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_6",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 25,
+ "POSITION": 24,
+ "TEXCOORD_0": 26
+ },
+ "indices": 27,
+ "material": 6,
+ "mode": 4
+ }
+ ]
+ },
+ {
+ "name": "Object_7",
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 29,
+ "POSITION": 28,
+ "TEXCOORD_0": 30
+ },
+ "indices": 31,
+ "material": 7,
+ "mode": 4
+ }
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 1
+ ],
+ "matrix": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 2.220446049250313e-16,
+ -1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 2.220446049250313e-16,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ],
+ "name": "Sketchfab_model"
+ },
+ {
+ "children": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9
+ ],
+ "name": "Mario.obj.cleaner.materialmerger.gles"
+ },
+ {
+ "mesh": 0,
+ "name": "Object_2"
+ },
+ {
+ "mesh": 1,
+ "name": "Object_3"
+ },
+ {
+ "mesh": 2,
+ "name": "Object_4"
+ },
+ {
+ "mesh": 3,
+ "name": "Object_5"
+ },
+ {
+ "mesh": 4,
+ "name": "Object_6"
+ },
+ {
+ "mesh": 5,
+ "name": "Object_7"
+ },
+ {
+ "mesh": 6,
+ "name": "Object_8"
+ },
+ {
+ "mesh": 7,
+ "name": "Object_9"
+ }
+ ],
+ "samplers": [
+ {
+ "magFilter": 9729,
+ "minFilter": 9987,
+ "wrapS": 10497,
+ "wrapT": 10497
+ }
+ ],
+ "scene": 0,
+ "scenes": [
+ {
+ "name": "Sketchfab_Scene",
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ },
+ {
+ "sampler": 0,
+ "source": 1
+ },
+ {
+ "sampler": 0,
+ "source": 2
+ },
+ {
+ "sampler": 0,
+ "source": 3
+ },
+ {
+ "sampler": 0,
+ "source": 4
+ },
+ {
+ "sampler": 0,
+ "source": 5
+ },
+ {
+ "sampler": 0,
+ "source": 6
+ },
+ {
+ "sampler": 0,
+ "source": 7
+ }
+ ]
+}
diff --git a/scenes/gltf/mario/scene.bin b/scenes/gltf/mario/scene.bin
new file mode 100644
index 00000000..dd9f5ca6
Binary files /dev/null and b/scenes/gltf/mario/scene.bin differ
diff --git a/scenes/gltf/mario/textures/submesh_0_baseColor.png b/scenes/gltf/mario/textures/submesh_0_baseColor.png
new file mode 100644
index 00000000..3dc03411
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_0_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_1_baseColor.png b/scenes/gltf/mario/textures/submesh_1_baseColor.png
new file mode 100644
index 00000000..e33226a2
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_1_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_2_baseColor.png b/scenes/gltf/mario/textures/submesh_2_baseColor.png
new file mode 100644
index 00000000..a1a756d5
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_2_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_3_baseColor.png b/scenes/gltf/mario/textures/submesh_3_baseColor.png
new file mode 100644
index 00000000..f2caf8d9
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_3_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_4_baseColor.png b/scenes/gltf/mario/textures/submesh_4_baseColor.png
new file mode 100644
index 00000000..5b4ff535
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_4_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_5_baseColor.png b/scenes/gltf/mario/textures/submesh_5_baseColor.png
new file mode 100644
index 00000000..c623738d
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_5_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_6_baseColor.png b/scenes/gltf/mario/textures/submesh_6_baseColor.png
new file mode 100644
index 00000000..0d8df0cf
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_6_baseColor.png differ
diff --git a/scenes/gltf/mario/textures/submesh_7_baseColor.png b/scenes/gltf/mario/textures/submesh_7_baseColor.png
new file mode 100644
index 00000000..34d39a4f
Binary files /dev/null and b/scenes/gltf/mario/textures/submesh_7_baseColor.png differ
diff --git a/scenes/gltf/monkey.gltf b/scenes/gltf/monkey.gltf
new file mode 100644
index 00000000..13167520
--- /dev/null
+++ b/scenes/gltf/monkey.gltf
@@ -0,0 +1,108 @@
+{
+ "asset":{
+ "generator":"Khronos glTF Blender I/O v3.5.30",
+ "version":"2.0"
+ },
+ "scene":0,
+ "scenes":[
+ {
+ "name":"Scene",
+ "nodes":[
+ 0,
+ 1
+ ]
+ }
+ ],
+ "nodes":[
+ {
+ "name":"previs guy"
+ },
+ {
+ "mesh":0,
+ "name":"Suzanne"
+ }
+ ],
+ "meshes":[
+ {
+ "name":"Suzanne",
+ "primitives":[
+ {
+ "attributes":{
+ "POSITION":0,
+ "TEXCOORD_0":1,
+ "NORMAL":2
+ },
+ "indices":3
+ }
+ ]
+ }
+ ],
+ "accessors":[
+ {
+ "bufferView":0,
+ "componentType":5126,
+ "count":1966,
+ "max":[
+ 1.3671875,
+ 0.984375,
+ 0.8515625
+ ],
+ "min":[
+ -1.3671875,
+ -0.984375,
+ -0.8515625
+ ],
+ "type":"VEC3"
+ },
+ {
+ "bufferView":1,
+ "componentType":5126,
+ "count":1966,
+ "type":"VEC2"
+ },
+ {
+ "bufferView":2,
+ "componentType":5126,
+ "count":1966,
+ "type":"VEC3"
+ },
+ {
+ "bufferView":3,
+ "componentType":5123,
+ "count":2904,
+ "type":"SCALAR"
+ }
+ ],
+ "bufferViews":[
+ {
+ "buffer":0,
+ "byteLength":23592,
+ "byteOffset":0,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":15728,
+ "byteOffset":23592,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":23592,
+ "byteOffset":39320,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":5808,
+ "byteOffset":62912,
+ "target":34963
+ }
+ ],
+ "buffers":[
+ {
+ "byteLength":68720,
+ "uri":"data:application/octet-stream;base64,AADgPgAAKD4AAEQ/AADgPgAAKD4AAEQ/AADgPgAAKD4AAEQ/AADgPgAAKD4AAEQ/AADgvgAAKD4AAEQ/AADgvgAAKD4AAEQ/AADgvgAAKD4AAEQ/AADgvgAAKD4AAEQ/AAAAPwAAwD0AADA/AAAAPwAAwD0AADA/AAAAPwAAwD0AADA/AAAAPwAAwD0AADA/AAAAvwAAwD0AADA/AAAAvwAAwD0AADA/AAAAvwAAwD0AADA/AAAAvwAAwD0AADA/AAAMPwAAYD0AABQ/AAAMPwAAYD0AABQ/AAAMvwAAYD0AABQ/AAAMvwAAYD0AABQ/AAC0PgAAwLwAAB4/AAC0PgAAwLwAAB4/AAC0vgAAwLwAAB4/AAC0vgAAwLwAAB4/AAC0PgAAAD0AADg/AAC0PgAAAD0AADg/AAC0PgAAAD0AADg/AAC0PgAAAD0AADg/AAC0vgAAAD0AADg/AAC0vgAAAD0AADg/AAC0vgAAAD0AADg/AAC0vgAAAD0AADg/AAC0PgAACD4AAEg/AAC0PgAACD4AAEg/AAC0PgAACD4AAEg/AAC0PgAACD4AAEg/AAC0vgAACD4AAEg/AAC0vgAACD4AAEg/AAC0vgAACD4AAEg/AAC0vgAACD4AAEg/AACMPgAAKD4AAEw/AACMPgAAKD4AAEw/AACMPgAAKD4AAEw/AACMPgAAKD4AAEw/AACMvgAAKD4AAEw/AACMvgAAKD4AAEw/AACMvgAAKD4AAEw/AACMvgAAKD4AAEw/AABQPgAAwD0AAD4/AABQPgAAwD0AAD4/AABQPgAAwD0AAD4/AABQPgAAwD0AAD4/AABQvgAAwD0AAD4/AABQvgAAwD0AAD4/AABQvgAAwD0AAD4/AABQvgAAwD0AAD4/AAAgPgAAYD0AACY/AAAgPgAAYD0AACY/AAAgvgAAYD0AACY/AAAgvgAAYD0AACY/A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D4AACY/AAAkPwAAmD4AACY/AAAkPwAAmD4AACY/AAAkPwAAmD4AACY/AAAkvwAAmD4AACY/AAAkvwAAmD4AACY/AAAkvwAAmD4AACY/AAAkvwAAmD4AACY/AAAaPwAAwD4AACo/AAAaPwAAwD4AACo/AAAaPwAAwD4AACo/AAAaPwAAwD4AACo/AAAavwAAwD4AACo/AAAavwAAwD4AACo/AAAavwAAwD4AACo/AAAavwAAwD4AACo/AADcPgAA4D4AADg/AADcPgAA4D4AADg/AADcPgAA4D4AADg/AADcPgAA4D4AADg/AADcvgAA4D4AADg/AADcvgAA4D4AADg/AADcvgAA4D4AADg/AADcvgAA4D4AADg/AACAPgAA8D4AAEI/AACAPgAA8D4AAEI/AACAPgAA8D4AAEI/AACAPgAA8D4AAEI/AACAvgAA8D4AAEI/AACAvgAA8D4AAEI/AACAvgAA8D4AAEI/AACAvgAA8D4AAEI/AAAAAAAARL8AADw/AAAAAAAARL8AADw/AAAAAAAARL8AADw/AADgPQAAOL8AADw/AADgPQAAOL8AADw/AADgPQAAOL8AADw/AADgPQAAOL8AADw/AADgPQAAOL8AADw/AADgvQAAOL8AADw/AADgvQAAOL8AADw/AADgvQAAOL8AADw/AADgvQAAOL8AADw/AADgvQAAOL8AADw/AADwPQAAVr8AADY/AADwPQAAVr8AADY/AADwPQAAVr8AADY/AADwPQAAVr8AADY/AADwvQAAVr8AADY/AADwvQAAVr8AADY/AADwvQAAVr8AADY/AADwvQAAVr8AADY/AACAPQAAYr8AADI/AACAPQAAYr8AADI/AACAPQAAYr8AADI/AACAPQAAYr8AADI/AACAvQAAYr8AADI/AACAvQAAYr8AADI/AACAvQAAYr8AADI/AACAvQAAYr8AADI/AAAAAAAAZL8AADA/AAAAAAAAZL8AADA/AAAAAAAAZL8AADA/AAAAAAAAZL8AADA/AAAAAAAASL4AAEA/AAAAAAAASL4AAEA/AAAAAAAAEL4AAD4/AAAAAAAAEL4AAD4/AAAAAAAAEL4AAD4/AAAAAAAAEL4AAD4/AAAAA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ADgPgAADD8AAEw/AADgPgAADD8AAEw/AADgPgAADD8AAEw/AADgvgAADD8AAEw/AADgvgAADD8AAEw/AADgvgAADD8AAEw/AADgvgAADD8AAEw/AACgPgAAJD8AAFY/AACgPgAAJD8AAFY/AACgPgAAJD8AAFY/AACgPgAAJD8AAFY/AACgvgAAJD8AAFY/AACgvgAAJD8AAFY/AACgvgAAJD8AAFY/AACgvgAAJD8AAFY/AABQPgAAHj8AAFo/AABQPgAAHj8AAFo/AABQPgAAHj8AAFo/AABQPgAAHj8AAFo/AABQvgAAHj8AAFo/AABQvgAAHj8AAFo/AABQvgAAHj8AAFo/AABQvgAAHj8AAFo/AADQPQAA3D4AAFg/AADQPQAA3D4AAFg/AADQPQAA3D4AAFg/AADQPQAA3D4AAFg/AADQvQAA3D4AAFg/AADQvQAA3D4AAFg/AADQvQAA3D4AAFg/AADQvQAA3D4AAFg/AAAAPgAA0L0AAFA/AAAAPgAA0L0AAFA/AAAAPgAA0L0AAFA/AAAAPgAA0L0AAFA/AAAAPgAA0L0AAFA/AAAAPgAA0L0AAFA/AAAAvgAA0L0AAFA/AAAAvgAA0L0AAFA/AAAAvgAA0L0AAFA/AAAAvgAA0L0AAFA/AAAAvgAA0L0AAFA/AAAAvgAA0L0AAFA/AABYPgAA5L4AADY/AABYPgAA5L4AADY/AABYPgAA5L4AADY/AABYPgAA5L4AADY/AABYvgAA5L4AADY/AABYvgAA5L4AADY/AABYvgAA5L4AADY/AABYvgAA5L4AADY/AACAPgAANL8AADA/AACAPgAANL8AADA/AACAPgAANL8AADA/AACAPgAANL8AADA/AACAvgAANL8AADA/AACAvgAANL8AADA/AACAvgAANL8AADA/AACAvgAANL8AADA/AACIPgAAUr8AACo/AACIPgAAUr8AACo/AACIPgAAUr8AACo/AACIPgAAUr8AACo/AACIvgAAUr8AACo/AACIvgAAUr8AACo/AACIvgAAUr8AACo/AACIvgAAUr8AACo/AABwPgAAar8AACI/AABwPgAAar8AACI/AABwPgAAar8AACI/AABwPgAAar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AEi+AAAkvwAAQD8AAEi+AAAkvwAAQD8AAEi+AAAkPwAALj8AAOS+AAAkPwAALj8AAOS+AAAkPwAALj8AAOS+AAAkPwAALj8AAOS+AAAkvwAALj8AAOS+AAAkvwAALj8AAOS+AAAkvwAALj8AAOS+AAAkvwAALj8AAOS+AABMPwAACj8AALi+AABMPwAACj8AALi+AABMPwAACj8AALi+AABMvwAACj8AALi+AABMvwAACj8AALi+AABMvwAACj8AALi+AAAePwAAqD4AABa/AAAePwAAqD4AABa/AAAePwAAqD4AABa/AAAePwAAqD4AABa/AAAevwAAqD4AABa/AAAevwAAqD4AABa/AAAevwAAqD4AABa/AAAevwAAqD4AABa/AAD4PgAAwDwAAAy/AAD4PgAAwDwAAAy/AAD4PgAAwDwAAAy/AAD4PgAAwDwAAAy/AAD4PgAAwDwAAAy/AAD4vgAAwDwAAAy/AAD4vgAAwDwAAAy/AAD4vgAAwDwAAAy/AAD4vgAAwDwAAAy/AAD4vgAAwDwAAAy/AABSPwAAqD4AAFC+AABSPwAAqD4AAFC+AABSPwAAqD4AAFC+AABSPwAAqD4AAFC+AABSPwAAqD4AAFC+AABSvwAAqD4AAFC+AABSvwAAqD4AAFC+AABSvwAAqD4AAFC+AABSvwAAqD4AAFC+AABSvwAAqD4AAFC+AADQPgAAML4AABg+AADQPgAAML4AABg+AADQPgAAML4AABg+AADQPgAAML4AABg+AADQPgAAML4AABg+AADQvgAAML4AABg+AADQvgAAML4AABg+AADQvgAAML4AABg+AADQvgAAML4AABg+AADQvgAAML4AABg+AADcPgAASL4AAFi+AADcPgAASL4AAFi+AADcPgAASL4AAFi+AADcPgAASL4AAFi+AADcvgAASL4AAFi+AADcvgAASL4AAFi+AADcvgAASL4AAFi+AADcvgAASL4AAFi+AABkPwAA0D4AAHC+AABkPwAA0D4AAHC+AABkPwAA0D4AAHC+AABkPwAA0D4AAHC+AABkvwAA0D4AAHC+AABkvwAA0D4AAHC+AABkvwAA0D4AAHC+AABkvwAA0D4AAHC+AABGPwAAEL4AAAC+AABGPwAAEL4AAAC+AABGPwAAEL4AAAC+AABGPwAAEL4AAAC+AABGvwAAEL4AAAC+AABGvwAAEL4AAAC+AABGvwAAEL4AAAC+AABGvwAAEL4AAAC+AACFPwAA0L0AAKi+AACFPwAA0L0AAKi+AACFPwAA0L0AAKi+AACFPwAA0L0AAKi+AACFvwAA0L0AAKi+AACFvwAA0L0AAKi+AACFvwAA0L0AAKi+AACFvwAA0L0AAKi+AACkPwAAYD0AANy+AACkPwAAYD0AANy+AACkPwAAYD0AANy+AACkPwAAYD0AANy+AACkvwAAYD0AANy+AACkvwAAYD0AANy+AACkvwAAYD0AANy+AACkvwAAYD0AANy+AACtPwAApD4AANi+AACtPwAApD4AANi+AACtPwAApD4AANi+AACtPwAApD4AANi+AACtvwAApD4AANi+AACtvwAApD4AANi+AACtvwAApD4AANi+AACtvwAApD4AANi+AACePwAAAj8AANi+AACePwAAAj8AANi+AACePwAAAj8AANi+AACePwAAAj8AANi+AACevwAAAj8AANi+AACevwAAAj8AANi+AACevwAAAj8AANi+AACevwAAAj8AANi+AACDPwAA9D4AAKC+AACDPwAA9D4AAKC+AACDPwAA9D4AAKC+AACDPwAA9D4AAKC+AACDvwAA9D4AAKC+AACDvwAA9D4AAKC+AACDvwAA9D4AAKC+AACDvwAA9D4AAKC+AACCPwAA1D4AAJS+AACCPwAA1D4AAJS+AACCPwAA1D4AAJS+AACCPwAA1D4AAJS+AACCvwAA1D4AAJS+AACCvwAA1D4AAJS+AACCvwAA1D4AAJS+AACCvwAA1D4AAJS+AACYPwAA4D4AAMi+AACYPwAA4D4AAMi+AACYPwAA4D4AAMi+AACYPwAA4D4AAMi+AACYvwAA4D4AAMi+AACYvwAA4D4AAMi+AACYvwAA4D4AAMi+AACYvwAA4D4AAMi+AACiPwAAlD4AANC+AACiPwAAlD4AANC+AACiPwAAlD4AANC+AACiPwAAlD4AANC+AACivwAAlD4AANC+AACivwAAlD4AANC+AACivwAAlD4AANC+AACivwAAlD4AANC+AAC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HWwdoB1EHWAdoB1gHYAdaB2IHagdaB2oHcAdvB2kHYQdvB2EHdwcEBzIHXAcEB1wHcgdfBzkHBwdfBwcHdQfXBlUHXQfXBl0HMwdeB1YH3AZeB9wGOAfWBvsGPAfWBjwHUgc/BwAH3QY/B90GWQfsBjoH+gbsBvoG9AYBB0EH8wYBB/MG+QbeBioH5AYqB0IH5AZJBzEH6wYxB+MG6wYlB00HRQclB0UHLQdGB04HJgdGByYHLgccB2QHTAccB0wHJAdPB2cHHwdPBx8HJwcUB2sHZQcUB2UHHQdmB24HFwdmBxcHHgcNB3MHbAcNB2wHFQdtB3QHDgdtBw4HFgcDB3EHDAcPB3YHCAfkBd4FoAfkBaAHmAejB+EF6wWjB+sFmwfuBeYFmQfuBZkHkAeaB+kF8QWaB/EFkwf3Be8FkQf3BZEHigeSB/AF+AWSB/gFiwf/BfYFiQf/BYkHgweMB/kFAAaMBwAGhAcHBv4FgAcHBoAHegeHBwEGCAaHBwgGfQfWBQYGeQfWBXkHpwd+BwkG2AV+B9gFqwd4B5YHngd4B54HpgelB50HfwelB38HrAd7B4EHjgd7B44HlweVB4YHfAeVB3wHnAeCB4gHjweUB40HhQejBLkF1wWjBNcFqQfZBb0FqATZBagErQeiBKgHoQeiBKEHyQSiB6oHpwSiB6cEzgS+BMgEnwe+BJ8H3AWkB88ExwSkB8cE4wU="
+ }
+ ]
+}
diff --git a/scenes/gltf/robot/BrainStem.gltf b/scenes/gltf/robot/BrainStem.gltf
new file mode 100644
index 00000000..b0a768a2
--- /dev/null
+++ b/scenes/gltf/robot/BrainStem.gltf
@@ -0,0 +1,9162 @@
+{
+ "asset": {
+ "generator": "COLLADA2GLTF",
+ "version": "2.0"
+ },
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 21,
+ 1
+ ],
+ "matrix": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ -1.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ]
+ },
+ {
+ "mesh": 0,
+ "skin": 0
+ },
+ {
+ "children": [
+ 3
+ ],
+ "rotation": [
+ -0.7071066498756409,
+ 0.00048056046944111586,
+ 0.0004805605276487768,
+ -0.7071065306663513
+ ]
+ },
+ {
+ "children": [
+ 12,
+ 8,
+ 4
+ ],
+ "translation": [
+ 0.0,
+ 0.9148268103599548,
+ 0.0
+ ],
+ "rotation": [
+ 1.4210853021136108e-14,
+ -0.0006796148954890668,
+ -0.0,
+ -0.9999997615814208
+ ],
+ "scale": [
+ 1.0,
+ 0.9999998807907105,
+ 0.9999998807907105
+ ]
+ },
+ {
+ "children": [
+ 5
+ ],
+ "translation": [
+ 0.1415490955114365,
+ -0.03931922093033791,
+ -1.2286400341565697e-8
+ ],
+ "rotation": [
+ 0.7388415336608887,
+ 1.436989833791813e-7,
+ -0.6716854572296143,
+ -0.054411567747592929
+ ],
+ "scale": [
+ 1.0000085830688477,
+ 1.0000001192092896,
+ 1.000010371208191
+ ]
+ },
+ {
+ "children": [
+ 6
+ ],
+ "translation": [
+ -7.450580152834618e-9,
+ 0.3586178123950958,
+ 0.0
+ ],
+ "rotation": [
+ 0.026200557127594949,
+ -0.5283005833625794,
+ 0.015088041312992573,
+ -0.848518967628479
+ ],
+ "scale": [
+ 1.0,
+ 1.0000001192092896,
+ 1.0
+ ]
+ },
+ {
+ "children": [
+ 7
+ ],
+ "translation": [
+ -7.450580152834618e-9,
+ 0.39689669013023379,
+ -5.5879398885849708e-9
+ ],
+ "rotation": [
+ 0.455043375492096,
+ -0.16150842607021333,
+ -0.07667787373065949,
+ -0.8723365664482117
+ ],
+ "scale": [
+ 0.9999998807907105,
+ 1.0,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ 7.450580152834618e-9,
+ 0.12854869663715366,
+ 0.0
+ ],
+ "rotation": [
+ 0.9033632874488832,
+ 5.500013600112653e-8,
+ 8.110696114727035e-8,
+ -0.4288763403892517
+ ],
+ "scale": [
+ 1.0,
+ 1.0,
+ 1.0000003576278689
+ ]
+ },
+ {
+ "children": [
+ 9
+ ],
+ "translation": [
+ -0.1415490955114365,
+ -0.03931922093033791,
+ -1.2220500167359204e-8
+ ],
+ "rotation": [
+ 0.7388415336608887,
+ -1.436989833791813e-7,
+ 0.6716854572296143,
+ -0.054411567747592929
+ ],
+ "scale": [
+ 1.0000085830688477,
+ 1.0000001192092896,
+ 1.000010371208191
+ ]
+ },
+ {
+ "children": [
+ 10
+ ],
+ "translation": [
+ 7.450580152834618e-9,
+ 0.3586178123950958,
+ 0.0
+ ],
+ "rotation": [
+ 0.026200557127594949,
+ 0.5283005833625794,
+ -0.015088041312992573,
+ -0.848518967628479
+ ],
+ "scale": [
+ 1.0,
+ 1.0000001192092896,
+ 1.0
+ ]
+ },
+ {
+ "children": [
+ 11
+ ],
+ "translation": [
+ 7.450580152834618e-9,
+ 0.39689669013023379,
+ -5.5879398885849708e-9
+ ],
+ "rotation": [
+ 0.455043375492096,
+ 0.16150842607021333,
+ 0.07667787373065949,
+ -0.8723365664482117
+ ],
+ "scale": [
+ 0.9999998807907105,
+ 1.0,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ -7.450580152834618e-9,
+ 0.12854869663715366,
+ 0.0
+ ],
+ "rotation": [
+ 0.9033632874488832,
+ -5.500013600112653e-8,
+ -8.110696114727035e-8,
+ -0.4288763403892517
+ ],
+ "scale": [
+ 1.0,
+ 1.0,
+ 1.0000003576278689
+ ]
+ },
+ {
+ "children": [
+ 20,
+ 18,
+ 13
+ ],
+ "translation": [
+ -5.492820174396451e-12,
+ 0.10747220367193222,
+ -0.02359149046242237
+ ],
+ "rotation": [
+ -1.6928350277112263e-8,
+ -1.1641550223817632e-10,
+ -0.0,
+ -1.0
+ ]
+ },
+ {
+ "children": [
+ 14
+ ],
+ "translation": [
+ 0.4194048047065735,
+ 0.3407667875289917,
+ -0.0131063899025321
+ ],
+ "rotation": [
+ 0.0097780404612422,
+ 4.91621790388308e-7,
+ 0.6920724511146545,
+ -0.72176194190979
+ ],
+ "scale": [
+ 1.0000001192092896,
+ 1.0000001192092896,
+ 1.0
+ ]
+ },
+ {
+ "children": [
+ 17,
+ 16,
+ 15
+ ],
+ "translation": [
+ 1.1920899822825962e-7,
+ 0.1857225000858307,
+ 2.7939699442924854e-9
+ ],
+ "rotation": [
+ -0.009778017178177834,
+ -4.709763175014814e-7,
+ -0.6920723915100098,
+ -0.7217618823051453
+ ],
+ "scale": [
+ 1.0,
+ 0.9999998807907105,
+ 0.9999999403953552
+ ]
+ },
+ {
+ "translation": [
+ 0.41257110238075259,
+ -0.021677140146493913,
+ 0.055014971643686298
+ ],
+ "rotation": [
+ -0.0,
+ -0.0,
+ -3.165049888842475e-10,
+ -1.0
+ ],
+ "scale": [
+ 0.9999998807907105,
+ 1.0,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ 0.411934107542038,
+ 0.02158582024276257,
+ 0.05764370039105415
+ ],
+ "rotation": [
+ -1.69283520534691e-8,
+ -0.0,
+ -3.1650501663982308e-10,
+ -0.9999999403953552
+ ],
+ "scale": [
+ 0.9999998807907105,
+ 0.9999998807907105,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ 0.4094892144203186,
+ 0.0027067658957093956,
+ 0.015727709978818898
+ ],
+ "rotation": [
+ -0.0,
+ -0.0,
+ -3.1650501663982308e-10,
+ -0.9999999403953552
+ ],
+ "scale": [
+ 0.9999998807907105,
+ 0.9999998807907105,
+ 1.0
+ ]
+ },
+ {
+ "children": [
+ 19
+ ],
+ "translation": [
+ -0.41940489411354067,
+ 0.3407664895057678,
+ -0.013106339611113072
+ ],
+ "rotation": [
+ 0.009349151514470578,
+ -4.459962354985692e-8,
+ -0.6824582815170288,
+ -0.7308647036552429
+ ],
+ "scale": [
+ 0.9999999403953552,
+ 0.9999999403953552,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ 1.1920899822825962e-7,
+ 0.1918196976184845,
+ 9.313230187046884e-10
+ ],
+ "rotation": [
+ -0.009349144995212557,
+ 3.408685245176457e-8,
+ 0.6824582815170288,
+ -0.7308647036552429
+ ],
+ "scale": [
+ 0.9999999403953552,
+ 0.9999999403953552,
+ 1.0
+ ]
+ },
+ {
+ "translation": [
+ 0.0,
+ 0.5242561101913452,
+ -0.015727709978818898
+ ],
+ "rotation": [
+ 1.66283751212859e-8,
+ -0.0,
+ -0.0,
+ -1.0
+ ]
+ },
+ {
+ "children": [
+ 2
+ ]
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "JOINTS_0": 1,
+ "NORMAL": 2,
+ "POSITION": 3,
+ "WEIGHTS_0": 4
+ },
+ "indices": 0,
+ "mode": 4,
+ "material": 0
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 6,
+ "NORMAL": 7,
+ "POSITION": 8,
+ "WEIGHTS_0": 9
+ },
+ "indices": 5,
+ "mode": 4,
+ "material": 1
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 11,
+ "NORMAL": 12,
+ "POSITION": 13,
+ "WEIGHTS_0": 14
+ },
+ "indices": 10,
+ "mode": 4,
+ "material": 2
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 16,
+ "NORMAL": 17,
+ "POSITION": 18,
+ "WEIGHTS_0": 19
+ },
+ "indices": 15,
+ "mode": 4,
+ "material": 3
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 21,
+ "NORMAL": 22,
+ "POSITION": 23,
+ "WEIGHTS_0": 24
+ },
+ "indices": 20,
+ "mode": 4,
+ "material": 4
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 26,
+ "NORMAL": 27,
+ "POSITION": 28,
+ "WEIGHTS_0": 29
+ },
+ "indices": 25,
+ "mode": 4,
+ "material": 5
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 31,
+ "NORMAL": 32,
+ "POSITION": 33,
+ "WEIGHTS_0": 34
+ },
+ "indices": 30,
+ "mode": 4,
+ "material": 6
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 36,
+ "NORMAL": 37,
+ "POSITION": 38,
+ "WEIGHTS_0": 39
+ },
+ "indices": 35,
+ "mode": 4,
+ "material": 7
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 41,
+ "NORMAL": 42,
+ "POSITION": 43,
+ "WEIGHTS_0": 44
+ },
+ "indices": 40,
+ "mode": 4,
+ "material": 8
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 46,
+ "NORMAL": 47,
+ "POSITION": 48,
+ "WEIGHTS_0": 49
+ },
+ "indices": 45,
+ "mode": 4,
+ "material": 9
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 51,
+ "NORMAL": 52,
+ "POSITION": 53,
+ "WEIGHTS_0": 54
+ },
+ "indices": 50,
+ "mode": 4,
+ "material": 10
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 56,
+ "NORMAL": 57,
+ "POSITION": 58,
+ "WEIGHTS_0": 59
+ },
+ "indices": 55,
+ "mode": 4,
+ "material": 11
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 61,
+ "NORMAL": 62,
+ "POSITION": 63,
+ "WEIGHTS_0": 64
+ },
+ "indices": 60,
+ "mode": 4,
+ "material": 12
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 66,
+ "NORMAL": 67,
+ "POSITION": 68,
+ "WEIGHTS_0": 69
+ },
+ "indices": 65,
+ "mode": 4,
+ "material": 13
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 71,
+ "NORMAL": 72,
+ "POSITION": 73,
+ "WEIGHTS_0": 74
+ },
+ "indices": 70,
+ "mode": 4,
+ "material": 14
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 76,
+ "NORMAL": 77,
+ "POSITION": 78,
+ "WEIGHTS_0": 79
+ },
+ "indices": 75,
+ "mode": 4,
+ "material": 15
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 81,
+ "NORMAL": 82,
+ "POSITION": 83,
+ "WEIGHTS_0": 84
+ },
+ "indices": 80,
+ "mode": 4,
+ "material": 16
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 86,
+ "NORMAL": 87,
+ "POSITION": 88,
+ "WEIGHTS_0": 89
+ },
+ "indices": 85,
+ "mode": 4,
+ "material": 17
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 91,
+ "NORMAL": 92,
+ "POSITION": 93,
+ "WEIGHTS_0": 94
+ },
+ "indices": 90,
+ "mode": 4,
+ "material": 18
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 96,
+ "NORMAL": 97,
+ "POSITION": 98,
+ "WEIGHTS_0": 99
+ },
+ "indices": 95,
+ "mode": 4,
+ "material": 19
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 101,
+ "NORMAL": 102,
+ "POSITION": 103,
+ "WEIGHTS_0": 104
+ },
+ "indices": 100,
+ "mode": 4,
+ "material": 20
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 106,
+ "NORMAL": 107,
+ "POSITION": 108,
+ "WEIGHTS_0": 109
+ },
+ "indices": 105,
+ "mode": 4,
+ "material": 21
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 111,
+ "NORMAL": 112,
+ "POSITION": 113,
+ "WEIGHTS_0": 114
+ },
+ "indices": 110,
+ "mode": 4,
+ "material": 22
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 116,
+ "NORMAL": 117,
+ "POSITION": 118,
+ "WEIGHTS_0": 119
+ },
+ "indices": 115,
+ "mode": 4,
+ "material": 23
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 121,
+ "NORMAL": 122,
+ "POSITION": 123,
+ "WEIGHTS_0": 124
+ },
+ "indices": 120,
+ "mode": 4,
+ "material": 24
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 126,
+ "NORMAL": 127,
+ "POSITION": 128,
+ "WEIGHTS_0": 129
+ },
+ "indices": 125,
+ "mode": 4,
+ "material": 25
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 131,
+ "NORMAL": 132,
+ "POSITION": 133,
+ "WEIGHTS_0": 134
+ },
+ "indices": 130,
+ "mode": 4,
+ "material": 26
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 136,
+ "NORMAL": 137,
+ "POSITION": 138,
+ "WEIGHTS_0": 139
+ },
+ "indices": 135,
+ "mode": 4,
+ "material": 27
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 141,
+ "NORMAL": 142,
+ "POSITION": 143,
+ "WEIGHTS_0": 144
+ },
+ "indices": 140,
+ "mode": 4,
+ "material": 28
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 146,
+ "NORMAL": 147,
+ "POSITION": 148,
+ "WEIGHTS_0": 149
+ },
+ "indices": 145,
+ "mode": 4,
+ "material": 29
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 151,
+ "NORMAL": 152,
+ "POSITION": 153,
+ "WEIGHTS_0": 154
+ },
+ "indices": 150,
+ "mode": 4,
+ "material": 30
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 156,
+ "NORMAL": 157,
+ "POSITION": 158,
+ "WEIGHTS_0": 159
+ },
+ "indices": 155,
+ "mode": 4,
+ "material": 31
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 161,
+ "NORMAL": 162,
+ "POSITION": 163,
+ "WEIGHTS_0": 164
+ },
+ "indices": 160,
+ "mode": 4,
+ "material": 32
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 166,
+ "NORMAL": 167,
+ "POSITION": 168,
+ "WEIGHTS_0": 169
+ },
+ "indices": 165,
+ "mode": 4,
+ "material": 33
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 171,
+ "NORMAL": 172,
+ "POSITION": 173,
+ "WEIGHTS_0": 174
+ },
+ "indices": 170,
+ "mode": 4,
+ "material": 34
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 176,
+ "NORMAL": 177,
+ "POSITION": 178,
+ "WEIGHTS_0": 179
+ },
+ "indices": 175,
+ "mode": 4,
+ "material": 35
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 181,
+ "NORMAL": 182,
+ "POSITION": 183,
+ "WEIGHTS_0": 184
+ },
+ "indices": 180,
+ "mode": 4,
+ "material": 36
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 186,
+ "NORMAL": 187,
+ "POSITION": 188,
+ "WEIGHTS_0": 189
+ },
+ "indices": 185,
+ "mode": 4,
+ "material": 37
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 191,
+ "NORMAL": 192,
+ "POSITION": 193,
+ "WEIGHTS_0": 194
+ },
+ "indices": 190,
+ "mode": 4,
+ "material": 38
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 196,
+ "NORMAL": 197,
+ "POSITION": 198,
+ "WEIGHTS_0": 199
+ },
+ "indices": 195,
+ "mode": 4,
+ "material": 39
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 201,
+ "NORMAL": 202,
+ "POSITION": 203,
+ "WEIGHTS_0": 204
+ },
+ "indices": 200,
+ "mode": 4,
+ "material": 40
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 206,
+ "NORMAL": 207,
+ "POSITION": 208,
+ "WEIGHTS_0": 209
+ },
+ "indices": 205,
+ "mode": 4,
+ "material": 41
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 211,
+ "NORMAL": 212,
+ "POSITION": 213,
+ "WEIGHTS_0": 214
+ },
+ "indices": 210,
+ "mode": 4,
+ "material": 42
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 216,
+ "NORMAL": 217,
+ "POSITION": 218,
+ "WEIGHTS_0": 219
+ },
+ "indices": 215,
+ "mode": 4,
+ "material": 43
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 221,
+ "NORMAL": 222,
+ "POSITION": 223,
+ "WEIGHTS_0": 224
+ },
+ "indices": 220,
+ "mode": 4,
+ "material": 44
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 226,
+ "NORMAL": 227,
+ "POSITION": 228,
+ "WEIGHTS_0": 229
+ },
+ "indices": 225,
+ "mode": 4,
+ "material": 45
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 231,
+ "NORMAL": 232,
+ "POSITION": 233,
+ "WEIGHTS_0": 234
+ },
+ "indices": 230,
+ "mode": 4,
+ "material": 46
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 236,
+ "NORMAL": 237,
+ "POSITION": 238,
+ "WEIGHTS_0": 239
+ },
+ "indices": 235,
+ "mode": 4,
+ "material": 47
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 241,
+ "NORMAL": 242,
+ "POSITION": 243,
+ "WEIGHTS_0": 244
+ },
+ "indices": 240,
+ "mode": 4,
+ "material": 48
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 246,
+ "NORMAL": 247,
+ "POSITION": 248,
+ "WEIGHTS_0": 249
+ },
+ "indices": 245,
+ "mode": 4,
+ "material": 49
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 251,
+ "NORMAL": 252,
+ "POSITION": 253,
+ "WEIGHTS_0": 254
+ },
+ "indices": 250,
+ "mode": 4,
+ "material": 50
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 256,
+ "NORMAL": 257,
+ "POSITION": 258,
+ "WEIGHTS_0": 259
+ },
+ "indices": 255,
+ "mode": 4,
+ "material": 51
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 261,
+ "NORMAL": 262,
+ "POSITION": 263,
+ "WEIGHTS_0": 264
+ },
+ "indices": 260,
+ "mode": 4,
+ "material": 52
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 266,
+ "NORMAL": 267,
+ "POSITION": 268,
+ "WEIGHTS_0": 269
+ },
+ "indices": 265,
+ "mode": 4,
+ "material": 53
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 271,
+ "NORMAL": 272,
+ "POSITION": 273,
+ "WEIGHTS_0": 274
+ },
+ "indices": 270,
+ "mode": 4,
+ "material": 54
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 276,
+ "NORMAL": 277,
+ "POSITION": 278,
+ "WEIGHTS_0": 279
+ },
+ "indices": 275,
+ "mode": 4,
+ "material": 55
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 281,
+ "NORMAL": 282,
+ "POSITION": 283,
+ "WEIGHTS_0": 284
+ },
+ "indices": 280,
+ "mode": 4,
+ "material": 56
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 286,
+ "NORMAL": 287,
+ "POSITION": 288,
+ "WEIGHTS_0": 289
+ },
+ "indices": 285,
+ "mode": 4,
+ "material": 57
+ },
+ {
+ "attributes": {
+ "JOINTS_0": 291,
+ "NORMAL": 292,
+ "POSITION": 293,
+ "WEIGHTS_0": 294
+ },
+ "indices": 290,
+ "mode": 4,
+ "material": 58
+ }
+ ],
+ "name": "Figure_2_geometry"
+ }
+ ],
+ "animations": [
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 2,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 2,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 2,
+ "target": {
+ "node": 2,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 3,
+ "target": {
+ "node": 3,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 4,
+ "target": {
+ "node": 3,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 5,
+ "target": {
+ "node": 3,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 6,
+ "target": {
+ "node": 12,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 7,
+ "target": {
+ "node": 12,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 8,
+ "target": {
+ "node": 12,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 9,
+ "target": {
+ "node": 20,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 10,
+ "target": {
+ "node": 20,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 11,
+ "target": {
+ "node": 20,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 12,
+ "target": {
+ "node": 18,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 13,
+ "target": {
+ "node": 18,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 14,
+ "target": {
+ "node": 18,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 15,
+ "target": {
+ "node": 19,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 16,
+ "target": {
+ "node": 19,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 17,
+ "target": {
+ "node": 19,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 18,
+ "target": {
+ "node": 13,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 19,
+ "target": {
+ "node": 13,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 20,
+ "target": {
+ "node": 13,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 21,
+ "target": {
+ "node": 14,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 22,
+ "target": {
+ "node": 14,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 23,
+ "target": {
+ "node": 14,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 24,
+ "target": {
+ "node": 17,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 25,
+ "target": {
+ "node": 17,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 26,
+ "target": {
+ "node": 17,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 27,
+ "target": {
+ "node": 16,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 28,
+ "target": {
+ "node": 16,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 29,
+ "target": {
+ "node": 16,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 30,
+ "target": {
+ "node": 15,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 31,
+ "target": {
+ "node": 15,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 32,
+ "target": {
+ "node": 15,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 33,
+ "target": {
+ "node": 8,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 34,
+ "target": {
+ "node": 8,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 35,
+ "target": {
+ "node": 8,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 36,
+ "target": {
+ "node": 9,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 37,
+ "target": {
+ "node": 9,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 38,
+ "target": {
+ "node": 9,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 39,
+ "target": {
+ "node": 10,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 40,
+ "target": {
+ "node": 10,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 41,
+ "target": {
+ "node": 10,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 42,
+ "target": {
+ "node": 11,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 43,
+ "target": {
+ "node": 11,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 44,
+ "target": {
+ "node": 11,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 45,
+ "target": {
+ "node": 4,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 46,
+ "target": {
+ "node": 4,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 47,
+ "target": {
+ "node": 4,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 48,
+ "target": {
+ "node": 5,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 49,
+ "target": {
+ "node": 5,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 50,
+ "target": {
+ "node": 5,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 51,
+ "target": {
+ "node": 6,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 52,
+ "target": {
+ "node": 6,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 53,
+ "target": {
+ "node": 6,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 54,
+ "target": {
+ "node": 7,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 55,
+ "target": {
+ "node": 7,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 56,
+ "target": {
+ "node": 7,
+ "path": "scale"
+ }
+ }
+ ],
+ "samplers": [
+ {
+ "input": 295,
+ "interpolation": "LINEAR",
+ "output": 296
+ },
+ {
+ "input": 295,
+ "interpolation": "LINEAR",
+ "output": 297
+ },
+ {
+ "input": 295,
+ "interpolation": "LINEAR",
+ "output": 298
+ },
+ {
+ "input": 299,
+ "interpolation": "LINEAR",
+ "output": 300
+ },
+ {
+ "input": 299,
+ "interpolation": "LINEAR",
+ "output": 301
+ },
+ {
+ "input": 299,
+ "interpolation": "LINEAR",
+ "output": 302
+ },
+ {
+ "input": 303,
+ "interpolation": "LINEAR",
+ "output": 304
+ },
+ {
+ "input": 303,
+ "interpolation": "LINEAR",
+ "output": 305
+ },
+ {
+ "input": 303,
+ "interpolation": "LINEAR",
+ "output": 306
+ },
+ {
+ "input": 307,
+ "interpolation": "LINEAR",
+ "output": 308
+ },
+ {
+ "input": 307,
+ "interpolation": "LINEAR",
+ "output": 309
+ },
+ {
+ "input": 307,
+ "interpolation": "LINEAR",
+ "output": 310
+ },
+ {
+ "input": 311,
+ "interpolation": "LINEAR",
+ "output": 312
+ },
+ {
+ "input": 311,
+ "interpolation": "LINEAR",
+ "output": 313
+ },
+ {
+ "input": 311,
+ "interpolation": "LINEAR",
+ "output": 314
+ },
+ {
+ "input": 315,
+ "interpolation": "LINEAR",
+ "output": 316
+ },
+ {
+ "input": 315,
+ "interpolation": "LINEAR",
+ "output": 317
+ },
+ {
+ "input": 315,
+ "interpolation": "LINEAR",
+ "output": 318
+ },
+ {
+ "input": 319,
+ "interpolation": "LINEAR",
+ "output": 320
+ },
+ {
+ "input": 319,
+ "interpolation": "LINEAR",
+ "output": 321
+ },
+ {
+ "input": 319,
+ "interpolation": "LINEAR",
+ "output": 322
+ },
+ {
+ "input": 323,
+ "interpolation": "LINEAR",
+ "output": 324
+ },
+ {
+ "input": 323,
+ "interpolation": "LINEAR",
+ "output": 325
+ },
+ {
+ "input": 323,
+ "interpolation": "LINEAR",
+ "output": 326
+ },
+ {
+ "input": 327,
+ "interpolation": "LINEAR",
+ "output": 328
+ },
+ {
+ "input": 327,
+ "interpolation": "LINEAR",
+ "output": 329
+ },
+ {
+ "input": 327,
+ "interpolation": "LINEAR",
+ "output": 330
+ },
+ {
+ "input": 331,
+ "interpolation": "LINEAR",
+ "output": 332
+ },
+ {
+ "input": 331,
+ "interpolation": "LINEAR",
+ "output": 333
+ },
+ {
+ "input": 331,
+ "interpolation": "LINEAR",
+ "output": 334
+ },
+ {
+ "input": 335,
+ "interpolation": "LINEAR",
+ "output": 336
+ },
+ {
+ "input": 335,
+ "interpolation": "LINEAR",
+ "output": 337
+ },
+ {
+ "input": 335,
+ "interpolation": "LINEAR",
+ "output": 338
+ },
+ {
+ "input": 339,
+ "interpolation": "LINEAR",
+ "output": 340
+ },
+ {
+ "input": 339,
+ "interpolation": "LINEAR",
+ "output": 341
+ },
+ {
+ "input": 339,
+ "interpolation": "LINEAR",
+ "output": 342
+ },
+ {
+ "input": 343,
+ "interpolation": "LINEAR",
+ "output": 344
+ },
+ {
+ "input": 343,
+ "interpolation": "LINEAR",
+ "output": 345
+ },
+ {
+ "input": 343,
+ "interpolation": "LINEAR",
+ "output": 346
+ },
+ {
+ "input": 347,
+ "interpolation": "LINEAR",
+ "output": 348
+ },
+ {
+ "input": 347,
+ "interpolation": "LINEAR",
+ "output": 349
+ },
+ {
+ "input": 347,
+ "interpolation": "LINEAR",
+ "output": 350
+ },
+ {
+ "input": 351,
+ "interpolation": "LINEAR",
+ "output": 352
+ },
+ {
+ "input": 351,
+ "interpolation": "LINEAR",
+ "output": 353
+ },
+ {
+ "input": 351,
+ "interpolation": "LINEAR",
+ "output": 354
+ },
+ {
+ "input": 355,
+ "interpolation": "LINEAR",
+ "output": 356
+ },
+ {
+ "input": 355,
+ "interpolation": "LINEAR",
+ "output": 357
+ },
+ {
+ "input": 355,
+ "interpolation": "LINEAR",
+ "output": 358
+ },
+ {
+ "input": 359,
+ "interpolation": "LINEAR",
+ "output": 360
+ },
+ {
+ "input": 359,
+ "interpolation": "LINEAR",
+ "output": 361
+ },
+ {
+ "input": 359,
+ "interpolation": "LINEAR",
+ "output": 362
+ },
+ {
+ "input": 363,
+ "interpolation": "LINEAR",
+ "output": 364
+ },
+ {
+ "input": 363,
+ "interpolation": "LINEAR",
+ "output": 365
+ },
+ {
+ "input": 363,
+ "interpolation": "LINEAR",
+ "output": 366
+ },
+ {
+ "input": 367,
+ "interpolation": "LINEAR",
+ "output": 368
+ },
+ {
+ "input": 367,
+ "interpolation": "LINEAR",
+ "output": 369
+ },
+ {
+ "input": 367,
+ "interpolation": "LINEAR",
+ "output": 370
+ }
+ ]
+ }
+ ],
+ "skins": [
+ {
+ "inverseBindMatrices": 371,
+ "skeleton": 2,
+ "joints": [
+ 3,
+ 12,
+ 20,
+ 18,
+ 19,
+ 13,
+ 14,
+ 17,
+ 16,
+ 15,
+ 8,
+ 9,
+ 10,
+ 11,
+ 4,
+ 5,
+ 6,
+ 7
+ ],
+ "name": "Poser_scene_root"
+ }
+ ],
+ "accessors": [
+ {
+ "bufferView": 0,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 2778,
+ "max": [
+ 537
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 538,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 538,
+ "max": [
+ 0.999993622303009,
+ 0.9999939203262328,
+ 0.999158501625061
+ ],
+ "min": [
+ -0.9999936819076538,
+ -0.9994093775749208,
+ -0.9991332292556764
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 6456,
+ "componentType": 5126,
+ "count": 538,
+ "max": [
+ 0.27433979511260989,
+ -0.03274767845869064,
+ 1.4563469886779786
+ ],
+ "min": [
+ -0.27433979511260989,
+ -0.15003690123558045,
+ 1.0480209589004517
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 538,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 5556,
+ "componentType": 5123,
+ "count": 5928,
+ "max": [
+ 1018
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 4304,
+ "componentType": 5123,
+ "count": 1019,
+ "max": [
+ 9,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 12912,
+ "componentType": 5126,
+ "count": 1019,
+ "max": [
+ 0.9997758865356444,
+ 1.0,
+ 0.9999942779541016
+ ],
+ "min": [
+ -0.998135507106781,
+ -1.0,
+ -0.9999982118606569
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 25140,
+ "componentType": 5126,
+ "count": 1019,
+ "max": [
+ 1.0657269954681397,
+ 0.18310239911079408,
+ 1.477118968963623
+ ],
+ "min": [
+ -0.6080120205879211,
+ -0.06099873036146164,
+ 1.2819770574569705
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 8608,
+ "componentType": 5126,
+ "count": 1019,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 17412,
+ "componentType": 5123,
+ "count": 1134,
+ "max": [
+ 194
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 12456,
+ "componentType": 5123,
+ "count": 195,
+ "max": [
+ 9,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 7,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 37368,
+ "componentType": 5126,
+ "count": 195,
+ "max": [
+ 0.9890540838241576,
+ 0.9962993264198304,
+ 0.9998664855957032
+ ],
+ "min": [
+ -0.9995861053466796,
+ -0.999724507331848,
+ -0.9998739957809448
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 39708,
+ "componentType": 5126,
+ "count": 195,
+ "max": [
+ 1.1625219583511353,
+ 0.07000333070755005,
+ 1.4373669624328614
+ ],
+ "min": [
+ 1.05805504322052,
+ -0.0497577115893364,
+ 1.3069430589675904
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 24912,
+ "componentType": 5126,
+ "count": 195,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 19680,
+ "componentType": 5123,
+ "count": 6240,
+ "max": [
+ 1063
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 14016,
+ "componentType": 5123,
+ "count": 1064,
+ "max": [
+ 17,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 42048,
+ "componentType": 5126,
+ "count": 1064,
+ "max": [
+ 0.9828354716300964,
+ 0.9910786151885986,
+ 0.9789444208145142
+ ],
+ "min": [
+ -0.9828354716300964,
+ -0.9889308214187622,
+ -0.9869906902313232
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 54816,
+ "componentType": 5126,
+ "count": 1064,
+ "max": [
+ 0.29972508549690249,
+ 0.15624010562896729,
+ 1.0176169872283936
+ ],
+ "min": [
+ -0.29972508549690249,
+ -0.18406230211257938,
+ -0.0005402960232459009
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 28032,
+ "componentType": 5126,
+ "count": 1064,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 32160,
+ "componentType": 5123,
+ "count": 312,
+ "max": [
+ 55
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 22528,
+ "componentType": 5123,
+ "count": 56,
+ "max": [
+ 17,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 13,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 67584,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 0.9857615232467653,
+ 0.8871999979019165,
+ 0.9572769999504088
+ ],
+ "min": [
+ -0.9857615232467653,
+ -0.9230722188949584,
+ -0.8607563972473145
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 68256,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 0.13851790130138398,
+ -0.009335458278656006,
+ 0.0813794732093811
+ ],
+ "min": [
+ -0.13851790130138398,
+ -0.1495622992515564,
+ 0.009157179854810238
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 45056,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 32784,
+ "componentType": 5123,
+ "count": 1512,
+ "max": [
+ 255
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 22976,
+ "componentType": 5123,
+ "count": 256,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 68928,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 0.9439724087715148,
+ 0.8987488150596619,
+ 0.8993107080459595
+ ],
+ "min": [
+ -0.9439724087715148,
+ -0.8987488150596619,
+ -0.8987488150596619
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 72000,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 0.19411979615688325,
+ 0.11213520169258118,
+ 0.590918779373169
+ ],
+ "min": [
+ -0.19411979615688325,
+ -0.04480987042188645,
+ 0.43397119641304018
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 45952,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 35808,
+ "componentType": 5123,
+ "count": 4740,
+ "max": [
+ 801
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 25024,
+ "componentType": 5123,
+ "count": 802,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 75072,
+ "componentType": 5126,
+ "count": 802,
+ "max": [
+ 1.0,
+ 0.9724298715591432,
+ 1.0
+ ],
+ "min": [
+ -1.0,
+ -0.9724298715591432,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 84696,
+ "componentType": 5126,
+ "count": 802,
+ "max": [
+ 0.2310234010219574,
+ 0.08274096250534058,
+ 0.9715561270713806
+ ],
+ "min": [
+ -0.2310234010219574,
+ -0.08323144167661667,
+ 0.7902671098709106
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 50048,
+ "componentType": 5126,
+ "count": 802,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 45288,
+ "componentType": 5123,
+ "count": 912,
+ "max": [
+ 255
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 31440,
+ "componentType": 5123,
+ "count": 256,
+ "max": [
+ 16,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 94320,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 0.9600872993469238,
+ 0.9742028713226318,
+ 0.8843736052513123
+ ],
+ "min": [
+ -0.9600872993469238,
+ -0.9742028713226318,
+ -0.8074885010719299
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 97392,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 0.21291349828243257,
+ 0.13475050032138825,
+ 0.9194201231002808
+ ],
+ "min": [
+ -0.21291349828243257,
+ -0.07738721370697022,
+ 0.028027350082993509
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 62880,
+ "componentType": 5126,
+ "count": 256,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 47112,
+ "componentType": 5123,
+ "count": 216,
+ "max": [
+ 39
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 33488,
+ "componentType": 5123,
+ "count": 40,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 100464,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 0.8866037130355835,
+ 0.9289718866348268,
+ 0.8427919745445252
+ ],
+ "min": [
+ -0.8866037130355835,
+ -0.8696268200874329,
+ -0.886997401714325
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 100944,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 0.2023569941520691,
+ 0.0949479267001152,
+ 0.7937266230583191
+ ],
+ "min": [
+ -0.2023569941520691,
+ -0.09374946355819702,
+ 0.5446745157241821
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 66976,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 47544,
+ "componentType": 5123,
+ "count": 2136,
+ "max": [
+ 359
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 33808,
+ "componentType": 5123,
+ "count": 360,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 101424,
+ "componentType": 5126,
+ "count": 360,
+ "max": [
+ 0.9960393905639648,
+ 0.9997833967208862,
+ 0.9787524938583374
+ ],
+ "min": [
+ -0.9960393905639648,
+ -0.998805820941925,
+ -0.9636300802230836
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 105744,
+ "componentType": 5126,
+ "count": 360,
+ "max": [
+ 0.211068794131279,
+ -0.008979082107543946,
+ 0.8112161159515381
+ ],
+ "min": [
+ -0.211068794131279,
+ -0.13384099304676057,
+ 0.5610147714614868
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 67616,
+ "componentType": 5126,
+ "count": 360,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 51816,
+ "componentType": 5123,
+ "count": 3696,
+ "max": [
+ 751
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 36688,
+ "componentType": 5123,
+ "count": 752,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 110064,
+ "componentType": 5126,
+ "count": 752,
+ "max": [
+ 0.9693763852119446,
+ 0.8814008235931397,
+ 0.9578943848609924
+ ],
+ "min": [
+ -0.9693763852119446,
+ -0.8814032077789307,
+ -0.9575083255767822
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 119088,
+ "componentType": 5126,
+ "count": 752,
+ "max": [
+ 0.23553599417209626,
+ 0.11558250337839128,
+ 0.9121201038360596
+ ],
+ "min": [
+ -0.23553599417209626,
+ -0.07996975630521774,
+ 0.7004975080490112
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 73376,
+ "componentType": 5126,
+ "count": 752,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 59208,
+ "componentType": 5123,
+ "count": 2286,
+ "max": [
+ 844
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 42704,
+ "componentType": 5123,
+ "count": 845,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 128112,
+ "componentType": 5126,
+ "count": 845,
+ "max": [
+ 0.9470654129981996,
+ 0.9950131773948668,
+ 0.8914204239845276
+ ],
+ "min": [
+ -0.9470654129981996,
+ -1.0,
+ -0.8969339728355408
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 138252,
+ "componentType": 5126,
+ "count": 845,
+ "max": [
+ 0.9558497071266174,
+ 0.11391989886760712,
+ 1.7040820121765137
+ ],
+ "min": [
+ -0.48123040795326235,
+ -0.15868650376796726,
+ 0.8420313000679016
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 85408,
+ "componentType": 5126,
+ "count": 845,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 63780,
+ "componentType": 5123,
+ "count": 2160,
+ "max": [
+ 383
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 49464,
+ "componentType": 5123,
+ "count": 384,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 148392,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 0.9981030225753784,
+ 0.9971495270729064,
+ 0.9903702139854432
+ ],
+ "min": [
+ -0.9981030225753784,
+ -0.996716320514679,
+ -0.988967776298523
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 153000,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 0.23765680193901066,
+ 0.07498443126678467,
+ 0.66653972864151
+ ],
+ "min": [
+ -0.23765680193901066,
+ 0.009939253330230712,
+ 0.4954768121242523
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 98928,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 68100,
+ "componentType": 5123,
+ "count": 2400,
+ "max": [
+ 415
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 52536,
+ "componentType": 5123,
+ "count": 416,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 157608,
+ "componentType": 5126,
+ "count": 416,
+ "max": [
+ 0.9137194156646729,
+ 0.9571294784545898,
+ 0.9627177715301514
+ ],
+ "min": [
+ -0.9137194156646729,
+ -0.9602304100990297,
+ -0.956984519958496
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 162600,
+ "componentType": 5126,
+ "count": 416,
+ "max": [
+ 0.22231070697307588,
+ 0.1638278067111969,
+ 0.8088477253913879
+ ],
+ "min": [
+ -0.22231070697307588,
+ -0.023381469771265985,
+ 0.26134440302848818
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 105072,
+ "componentType": 5126,
+ "count": 416,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 72900,
+ "componentType": 5123,
+ "count": 192,
+ "max": [
+ 39
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 55864,
+ "componentType": 5123,
+ "count": 40,
+ "max": [
+ 14,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 10,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 167592,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 0.5957040786743164,
+ 0.8023154735565186,
+ 0.7747489809989929
+ ],
+ "min": [
+ -0.5957040786743164,
+ -0.763891875743866,
+ -0.8032039999961853
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 168072,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 0.20008769631385804,
+ 0.06951904296875,
+ 0.6722120046615601
+ ],
+ "min": [
+ -0.20008769631385804,
+ -0.0024563069455325605,
+ 0.4808647036552429
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 111728,
+ "componentType": 5126,
+ "count": 40,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 73284,
+ "componentType": 5123,
+ "count": 2772,
+ "max": [
+ 451
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 56184,
+ "componentType": 5123,
+ "count": 452,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 11,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 168552,
+ "componentType": 5126,
+ "count": 452,
+ "max": [
+ 0.8853335976600647,
+ 0.9719336032867432,
+ 0.9429377913475036
+ ],
+ "min": [
+ -0.8853335976600647,
+ -0.9943298101425172,
+ -0.9822759032249452
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 173976,
+ "componentType": 5126,
+ "count": 452,
+ "max": [
+ 0.2163134962320328,
+ -0.05576251819729805,
+ 0.5708295106887817
+ ],
+ "min": [
+ -0.2163134962320328,
+ -0.10501089692115784,
+ 0.3875563144683838
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 112368,
+ "componentType": 5126,
+ "count": 452,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 78828,
+ "componentType": 5123,
+ "count": 312,
+ "max": [
+ 55
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 59800,
+ "componentType": 5123,
+ "count": 56,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 11,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 179400,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 0.957885205745697,
+ 0.91736102104187,
+ 0.9233493208885192
+ ],
+ "min": [
+ -0.957885205745697,
+ -0.8525092005729675,
+ -0.7849010229110718
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 180072,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 0.1761814057826996,
+ 0.15912020206451417,
+ 0.3996171951293946
+ ],
+ "min": [
+ -0.1761814057826996,
+ 0.010912589728832244,
+ 0.23135539889335633
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 119600,
+ "componentType": 5126,
+ "count": 56,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 79452,
+ "componentType": 5123,
+ "count": 2280,
+ "max": [
+ 383
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 60248,
+ "componentType": 5123,
+ "count": 384,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 11,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 180744,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 0.9248775243759156,
+ 0.9958348274230956,
+ 0.9056941866874696
+ ],
+ "min": [
+ -0.9248775243759156,
+ -0.9664828181266784,
+ -0.9603514075279236
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 185352,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 0.1790281981229782,
+ 0.11717420071363448,
+ 0.21458619832992557
+ ],
+ "min": [
+ -0.1790281981229782,
+ 0.01100200042128563,
+ 0.09651278704404833
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 120496,
+ "componentType": 5126,
+ "count": 384,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 84012,
+ "componentType": 5123,
+ "count": 1680,
+ "max": [
+ 283
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 63320,
+ "componentType": 5123,
+ "count": 284,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 11,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 189960,
+ "componentType": 5126,
+ "count": 284,
+ "max": [
+ 1.0,
+ 0.9999998807907105,
+ 0.9999998807907105
+ ],
+ "min": [
+ -1.0,
+ -0.9999998807907105,
+ -0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 193368,
+ "componentType": 5126,
+ "count": 284,
+ "max": [
+ 0.14629970490932465,
+ 0.11732079833745957,
+ 0.18243469297885896
+ ],
+ "min": [
+ -0.14629970490932465,
+ -0.0004646930028684438,
+ 0.06464897841215134
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 126640,
+ "componentType": 5126,
+ "count": 284,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 87372,
+ "componentType": 5123,
+ "count": 1080,
+ "max": [
+ 183
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 65592,
+ "componentType": 5123,
+ "count": 184,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 11,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 196776,
+ "componentType": 5126,
+ "count": 184,
+ "max": [
+ 0.994773805141449,
+ 0.8861510753631592,
+ 0.8839060068130493
+ ],
+ "min": [
+ -0.994773805141449,
+ -0.946777880191803,
+ -0.9507442116737366
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 198984,
+ "componentType": 5126,
+ "count": 184,
+ "max": [
+ 0.19786760210990909,
+ 0.08225148171186447,
+ 0.4101054072380066
+ ],
+ "min": [
+ -0.19786760210990909,
+ -0.04774051159620285,
+ 0.26395460963249209
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 131184,
+ "componentType": 5126,
+ "count": 184,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 89532,
+ "componentType": 5123,
+ "count": 1296,
+ "max": [
+ 205
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 67064,
+ "componentType": 5123,
+ "count": 206,
+ "max": [
+ 15,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 201192,
+ "componentType": 5126,
+ "count": 206,
+ "max": [
+ 0.9693763852119446,
+ 0.9059634804725648,
+ 0.957452118396759
+ ],
+ "min": [
+ -0.9693763852119446,
+ -0.9059634804725648,
+ -0.9059612154960632
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 203664,
+ "componentType": 5126,
+ "count": 206,
+ "max": [
+ 0.1905521005392075,
+ 0.11099349707365036,
+ 1.0104299783706666
+ ],
+ "min": [
+ -0.1905521005392075,
+ -0.15254150331020356,
+ 0.3594444990158081
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 134128,
+ "componentType": 5126,
+ "count": 206,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 92124,
+ "componentType": 5123,
+ "count": 3456,
+ "max": [
+ 605
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 68712,
+ "componentType": 5123,
+ "count": 606,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 206136,
+ "componentType": 5126,
+ "count": 606,
+ "max": [
+ 0.9994738101959229,
+ 1.0,
+ 0.999590277671814
+ ],
+ "min": [
+ -0.9994738101959229,
+ -1.0,
+ -0.9999163150787354
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 213408,
+ "componentType": 5126,
+ "count": 606,
+ "max": [
+ 0.11763300001621248,
+ 0.12999069690704349,
+ 1.507748007774353
+ ],
+ "min": [
+ -0.11763300001621248,
+ -0.15254150331020356,
+ 0.788148820400238
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 137424,
+ "componentType": 5126,
+ "count": 606,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 99036,
+ "componentType": 5123,
+ "count": 6996,
+ "max": [
+ 1213
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 73560,
+ "componentType": 5123,
+ "count": 1214,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 220680,
+ "componentType": 5126,
+ "count": 1214,
+ "max": [
+ 0.9999105930328368,
+ 0.9989426136016846,
+ 0.9997345209121704
+ ],
+ "min": [
+ -0.9999105930328368,
+ -0.9954121112823486,
+ -0.9995654225349426
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 235248,
+ "componentType": 5126,
+ "count": 1214,
+ "max": [
+ 0.3850386142730713,
+ 0.17256119847297669,
+ 1.5223779678344729
+ ],
+ "min": [
+ -0.7090775966644287,
+ -0.19458280503749848,
+ 0.8746052980422974
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 147120,
+ "componentType": 5126,
+ "count": 1214,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 113028,
+ "componentType": 5123,
+ "count": 9453,
+ "max": [
+ 1693
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 83272,
+ "componentType": 5123,
+ "count": 1694,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 249816,
+ "componentType": 5126,
+ "count": 1694,
+ "max": [
+ 0.997044324874878,
+ 0.9997971057891846,
+ 0.9955812096595764
+ ],
+ "min": [
+ -0.997044324874878,
+ -0.9997332096099854,
+ -0.995496928691864
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 270144,
+ "componentType": 5126,
+ "count": 1694,
+ "max": [
+ 0.39696240425109866,
+ 0.1524769961833954,
+ 1.5549310445785525
+ ],
+ "min": [
+ -0.3173973858356476,
+ -0.25572049617767336,
+ 0.8218048214912415
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 166544,
+ "componentType": 5126,
+ "count": 1694,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 131934,
+ "componentType": 5123,
+ "count": 7077,
+ "max": [
+ 1235
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 96824,
+ "componentType": 5123,
+ "count": 1236,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 290472,
+ "componentType": 5126,
+ "count": 1236,
+ "max": [
+ 0.9987723231315612,
+ 0.991940975189209,
+ 0.9963619112968444
+ ],
+ "min": [
+ -0.9987723231315612,
+ -0.99470192193985,
+ -0.9995126128196716
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 305304,
+ "componentType": 5126,
+ "count": 1236,
+ "max": [
+ 0.4361900985240937,
+ 0.18784199655056,
+ 1.624858021736145
+ ],
+ "min": [
+ -0.4361900985240937,
+ -0.0925891324877739,
+ 1.1335359811782838
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 193648,
+ "componentType": 5126,
+ "count": 1236,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 146088,
+ "componentType": 5123,
+ "count": 19842,
+ "max": [
+ 3349
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 106712,
+ "componentType": 5123,
+ "count": 3350,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 320136,
+ "componentType": 5126,
+ "count": 3350,
+ "max": [
+ 0.99986732006073,
+ 0.9998542070388794,
+ 0.993185579776764
+ ],
+ "min": [
+ -0.99986732006073,
+ -0.9979618191719056,
+ -0.9952840805053712
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 360336,
+ "componentType": 5126,
+ "count": 3350,
+ "max": [
+ 0.20052820444107057,
+ 0.13036410510540009,
+ 1.5314489603042605
+ ],
+ "min": [
+ -0.20052820444107057,
+ -0.06539397686719895,
+ 1.017976999282837
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 213424,
+ "componentType": 5126,
+ "count": 3350,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 185772,
+ "componentType": 5123,
+ "count": 8064,
+ "max": [
+ 1353
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 133512,
+ "componentType": 5123,
+ "count": 1354,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 400536,
+ "componentType": 5126,
+ "count": 1354,
+ "max": [
+ 0.9974765777587892,
+ 0.9980245232582092,
+ 0.971380889415741
+ ],
+ "min": [
+ -0.9974765777587892,
+ -0.9980245232582092,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 416784,
+ "componentType": 5126,
+ "count": 1354,
+ "max": [
+ 0.165345698595047,
+ 0.145689994096756,
+ 1.5680040121078492
+ ],
+ "min": [
+ -0.07679343223571778,
+ -0.06932251900434494,
+ 1.478713035583496
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 267024,
+ "componentType": 5126,
+ "count": 1354,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 201900,
+ "componentType": 5123,
+ "count": 5736,
+ "max": [
+ 1082
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 144344,
+ "componentType": 5123,
+ "count": 1083,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 433032,
+ "componentType": 5126,
+ "count": 1083,
+ "max": [
+ 0.9896860122680664,
+ 0.9514285922050476,
+ 0.9746636152267456
+ ],
+ "min": [
+ -0.9896860122680664,
+ -0.951424479484558,
+ -0.9957829117774965
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 446028,
+ "componentType": 5126,
+ "count": 1083,
+ "max": [
+ 0.4518538117408753,
+ 0.15092650055885316,
+ 1.5663119554519654
+ ],
+ "min": [
+ -0.44873571395874026,
+ -0.03955334052443504,
+ 1.235440015792847
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 288688,
+ "componentType": 5126,
+ "count": 1083,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 213372,
+ "componentType": 5123,
+ "count": 3318,
+ "max": [
+ 760
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 153008,
+ "componentType": 5123,
+ "count": 761,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 459024,
+ "componentType": 5126,
+ "count": 761,
+ "max": [
+ 0.972135603427887,
+ 0.9999951124191284,
+ 0.999996781349182
+ ],
+ "min": [
+ -0.972135603427887,
+ -0.9999951124191284,
+ -0.999996781349182
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 468156,
+ "componentType": 5126,
+ "count": 761,
+ "max": [
+ 0.9396100044250488,
+ 0.14587870240211488,
+ 1.5722160339355469
+ ],
+ "min": [
+ -0.7408316135406494,
+ -0.03310345858335495,
+ 1.2442729473114014
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 306016,
+ "componentType": 5126,
+ "count": 761,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 220008,
+ "componentType": 5123,
+ "count": 2928,
+ "max": [
+ 660
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 159096,
+ "componentType": 5123,
+ "count": 661,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 477288,
+ "componentType": 5126,
+ "count": 661,
+ "max": [
+ 0.9413095712661744,
+ 0.8966817259788513,
+ 0.941277027130127
+ ],
+ "min": [
+ -0.9413095712661744,
+ -0.8911949992179871,
+ -0.9413095712661744
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 485220,
+ "componentType": 5126,
+ "count": 661,
+ "max": [
+ 0.4716292023658753,
+ 0.20401230454444889,
+ 1.5722160339355469
+ ],
+ "min": [
+ -0.4716292023658753,
+ -0.010853170417249205,
+ 1.3943560123443604
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 318192,
+ "componentType": 5126,
+ "count": 661,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 225864,
+ "componentType": 5123,
+ "count": 1584,
+ "max": [
+ 439
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 164384,
+ "componentType": 5123,
+ "count": 440,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 493152,
+ "componentType": 5126,
+ "count": 440,
+ "max": [
+ 1.0,
+ 0.948270618915558,
+ 1.0
+ ],
+ "min": [
+ -1.0,
+ -0.9523791074752808,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 498432,
+ "componentType": 5126,
+ "count": 440,
+ "max": [
+ 0.05540227144956589,
+ 0.3284950852394104,
+ 1.7050449848175049
+ ],
+ "min": [
+ -0.05540227144956589,
+ -0.0619271881878376,
+ 1.0184400081634522
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 328768,
+ "componentType": 5126,
+ "count": 440,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 229032,
+ "componentType": 5123,
+ "count": 7209,
+ "max": [
+ 1262
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 167904,
+ "componentType": 5123,
+ "count": 1263,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 503712,
+ "componentType": 5126,
+ "count": 1263,
+ "max": [
+ 0.9470654129981996,
+ 0.9975249767303468,
+ 0.998879075050354
+ ],
+ "min": [
+ -0.9470654129981996,
+ -0.9992849230766296,
+ -0.9998152256011964
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 518868,
+ "componentType": 5126,
+ "count": 1263,
+ "max": [
+ 0.15658919513225556,
+ 0.3413881063461304,
+ 1.7174659967422486
+ ],
+ "min": [
+ -0.08176165074110031,
+ -0.07656610012054444,
+ 1.005632996559143
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 335808,
+ "componentType": 5126,
+ "count": 1263,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 243450,
+ "componentType": 5123,
+ "count": 3531,
+ "max": [
+ 597
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 178008,
+ "componentType": 5123,
+ "count": 598,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 534024,
+ "componentType": 5126,
+ "count": 598,
+ "max": [
+ 0.995135486125946,
+ 0.999998927116394,
+ 0.9990856051445008
+ ],
+ "min": [
+ -0.9951385855674744,
+ -0.9292241930961608,
+ -0.9992175102233888
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 541200,
+ "componentType": 5126,
+ "count": 598,
+ "max": [
+ 0.248561292886734,
+ 0.1261782944202423,
+ 1.447119951248169
+ ],
+ "min": [
+ -0.248561292886734,
+ -0.05304466933012009,
+ 1.144036054611206
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 356016,
+ "componentType": 5126,
+ "count": 598,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 250512,
+ "componentType": 5123,
+ "count": 1344,
+ "max": [
+ 246
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 182792,
+ "componentType": 5123,
+ "count": 247,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 548376,
+ "componentType": 5126,
+ "count": 247,
+ "max": [
+ 0.9998924136161804,
+ 0.999998927116394,
+ 0.8407031893730164
+ ],
+ "min": [
+ -0.9998924136161804,
+ -0.999998927116394,
+ -0.8353595733642578
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 551340,
+ "componentType": 5126,
+ "count": 247,
+ "max": [
+ 0.1736883968114853,
+ 0.1293901950120926,
+ 1.4685169458389285
+ ],
+ "min": [
+ -0.1736883968114853,
+ 0.04755692929029465,
+ 1.20933997631073
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 365584,
+ "componentType": 5126,
+ "count": 247,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 253200,
+ "componentType": 5123,
+ "count": 5406,
+ "max": [
+ 1198
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 184768,
+ "componentType": 5123,
+ "count": 1199,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 554304,
+ "componentType": 5126,
+ "count": 1199,
+ "max": [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "min": [
+ -1.0,
+ -1.0,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 568692,
+ "componentType": 5126,
+ "count": 1199,
+ "max": [
+ 0.7159690856933594,
+ 0.20757029950618745,
+ 1.5593960285186768
+ ],
+ "min": [
+ -1.0704269409179688,
+ -0.12992410361766816,
+ 1.0169960260391236
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 369536,
+ "componentType": 5126,
+ "count": 1199,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 264012,
+ "componentType": 5123,
+ "count": 1098,
+ "max": [
+ 286
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 194360,
+ "componentType": 5123,
+ "count": 287,
+ "max": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 583080,
+ "componentType": 5126,
+ "count": 287,
+ "max": [
+ 0.966027021408081,
+ 0.7357422709465027,
+ 0.97013521194458
+ ],
+ "min": [
+ -0.966027021408081,
+ -0.9892848134040833,
+ -0.9731298089027404
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 586524,
+ "componentType": 5126,
+ "count": 287,
+ "max": [
+ 0.16099749505519868,
+ 0.12307389825582504,
+ 1.2675410509109498
+ ],
+ "min": [
+ -0.16099749505519868,
+ -0.12992410361766816,
+ 1.010509967803955
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 388720,
+ "componentType": 5126,
+ "count": 287,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 266208,
+ "componentType": 5123,
+ "count": 954,
+ "max": [
+ 245
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 196656,
+ "componentType": 5123,
+ "count": 246,
+ "max": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 1,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 589968,
+ "componentType": 5126,
+ "count": 246,
+ "max": [
+ 0.9659118056297302,
+ 0.9892848134040833,
+ 0.9731361269950868
+ ],
+ "min": [
+ -0.9659118056297302,
+ -0.9892848134040833,
+ -0.9731298089027404
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 592920,
+ "componentType": 5126,
+ "count": 246,
+ "max": [
+ 0.2753584086894989,
+ 0.16562490165233613,
+ 1.391832947731018
+ ],
+ "min": [
+ -0.5011065006256104,
+ -0.07527010887861252,
+ 1.0902940034866334
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 393312,
+ "componentType": 5126,
+ "count": 246,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 268116,
+ "componentType": 5123,
+ "count": 1842,
+ "max": [
+ 321
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 198624,
+ "componentType": 5123,
+ "count": 322,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 595872,
+ "componentType": 5126,
+ "count": 322,
+ "max": [
+ 0.9493690729141237,
+ 0.9867743849754334,
+ 0.9510694146156312
+ ],
+ "min": [
+ -0.9492442011833192,
+ -0.9867743849754334,
+ -0.9572867155075072
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 599736,
+ "componentType": 5126,
+ "count": 322,
+ "max": [
+ 0.9843820929527284,
+ 0.1260865032672882,
+ 1.4702060222625733
+ ],
+ "min": [
+ -0.567354679107666,
+ -0.039101891219615939,
+ 1.28860604763031
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 397248,
+ "componentType": 5126,
+ "count": 322,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 271800,
+ "componentType": 5123,
+ "count": 1260,
+ "max": [
+ 241
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 201200,
+ "componentType": 5123,
+ "count": 242,
+ "max": [
+ 5,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 603600,
+ "componentType": 5126,
+ "count": 242,
+ "max": [
+ 0.997563898563385,
+ 0.9884750843048096,
+ 0.9362738132476808
+ ],
+ "min": [
+ -0.9979519248008728,
+ -0.9884750843048096,
+ -0.8944498896598816
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 606504,
+ "componentType": 5126,
+ "count": 242,
+ "max": [
+ 0.48613470792770388,
+ 0.1001529023051262,
+ 1.5124479532241822
+ ],
+ "min": [
+ -0.5208178758621216,
+ -0.02368699945509434,
+ 1.3411530256271365
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 402400,
+ "componentType": 5126,
+ "count": 242,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 274320,
+ "componentType": 5123,
+ "count": 471,
+ "max": [
+ 112
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 203136,
+ "componentType": 5123,
+ "count": 113,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 609408,
+ "componentType": 5126,
+ "count": 113,
+ "max": [
+ 0.8414818048477173,
+ 0.8090065717697144,
+ 0.8426756262779236
+ ],
+ "min": [
+ -0.8380299210548401,
+ -0.8201435208320618,
+ -0.775584876537323
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 610764,
+ "componentType": 5126,
+ "count": 113,
+ "max": [
+ 0.9788712859153748,
+ 0.1334728002548218,
+ 1.470574975013733
+ ],
+ "min": [
+ -0.6134709119796753,
+ -0.007822394371032715,
+ 1.317214012145996
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 406272,
+ "componentType": 5126,
+ "count": 113,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 275262,
+ "componentType": 5123,
+ "count": 5925,
+ "max": [
+ 1039
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 204040,
+ "componentType": 5123,
+ "count": 1040,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 612120,
+ "componentType": 5126,
+ "count": 1040,
+ "max": [
+ 0.9999998211860656,
+ 1.0,
+ 0.9999998211860656
+ ],
+ "min": [
+ -0.999999701976776,
+ -1.0,
+ -0.9999998211860656
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 624600,
+ "componentType": 5126,
+ "count": 1040,
+ "max": [
+ 1.058205008506775,
+ 0.09346406906843186,
+ 1.4305419921875
+ ],
+ "min": [
+ -0.6562740206718445,
+ -0.05892974138259888,
+ 1.3109229803085328
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 408080,
+ "componentType": 5126,
+ "count": 1040,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 287112,
+ "componentType": 5123,
+ "count": 1482,
+ "max": [
+ 325
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 212360,
+ "componentType": 5123,
+ "count": 326,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 637080,
+ "componentType": 5126,
+ "count": 326,
+ "max": [
+ 0.9999998807907105,
+ 0.9986323714256288,
+ 0.9999998211860656
+ ],
+ "min": [
+ -0.9999995231628418,
+ -0.9986323714256288,
+ -0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 640992,
+ "componentType": 5126,
+ "count": 326,
+ "max": [
+ 0.9615707993507384,
+ 0.15384900569915772,
+ 1.4929410219192505
+ ],
+ "min": [
+ -0.5483198761940002,
+ -0.066353440284729,
+ 1.3013219833374024
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 424720,
+ "componentType": 5126,
+ "count": 326,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 290076,
+ "componentType": 5123,
+ "count": 8688,
+ "max": [
+ 1561
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 214968,
+ "componentType": 5123,
+ "count": 1562,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 3,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 644904,
+ "componentType": 5126,
+ "count": 1562,
+ "max": [
+ 0.9996929168701172,
+ 1.0,
+ 0.998135507106781
+ ],
+ "min": [
+ -0.9996951818466188,
+ -1.0,
+ -0.998135507106781
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 663648,
+ "componentType": 5126,
+ "count": 1562,
+ "max": [
+ 0.9054449796676636,
+ 0.11726199835538864,
+ 1.4562920331954957
+ ],
+ "min": [
+ -0.5032492280006409,
+ -0.04048173874616623,
+ 1.2914799451828004
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 429936,
+ "componentType": 5126,
+ "count": 1562,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 307452,
+ "componentType": 5123,
+ "count": 768,
+ "max": [
+ 125
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 227464,
+ "componentType": 5123,
+ "count": 126,
+ "max": [
+ 6,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 682392,
+ "componentType": 5126,
+ "count": 126,
+ "max": [
+ 0.9429373741149902,
+ 1.0,
+ 0.9134336709976196
+ ],
+ "min": [
+ -0.8100183010101318,
+ -0.8090602159500122,
+ -0.9120928049087524
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 683904,
+ "componentType": 5126,
+ "count": 126,
+ "max": [
+ 0.9176735877990724,
+ 0.08572155237197876,
+ 1.4267810583114625
+ ],
+ "min": [
+ -0.6102675199508667,
+ -0.013260840438306332,
+ 1.2632529735565186
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 454928,
+ "componentType": 5126,
+ "count": 126,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 308988,
+ "componentType": 5123,
+ "count": 294,
+ "max": [
+ 76
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 228472,
+ "componentType": 5123,
+ "count": 77,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 685416,
+ "componentType": 5126,
+ "count": 77,
+ "max": [
+ 0.9530711770057678,
+ 1.0,
+ 0.9004359245300293
+ ],
+ "min": [
+ -0.9791612029075624,
+ -0.9940124750137328,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 686340,
+ "componentType": 5126,
+ "count": 77,
+ "max": [
+ -0.5946403741836548,
+ 0.15986140072345737,
+ 1.3914480209350589
+ ],
+ "min": [
+ -1.1321640014648438,
+ -0.0661965012550354,
+ 1.2588269710540772
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 456944,
+ "componentType": 5126,
+ "count": 77,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 309576,
+ "componentType": 5123,
+ "count": 2286,
+ "max": [
+ 377
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 229088,
+ "componentType": 5123,
+ "count": 378,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 687264,
+ "componentType": 5126,
+ "count": 378,
+ "max": [
+ 0.9702684283256532,
+ 0.9188218712806702,
+ 0.9276834726333618
+ ],
+ "min": [
+ -0.9520750045776368,
+ -0.9273015260696412,
+ -0.9261720180511476
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 691800,
+ "componentType": 5126,
+ "count": 378,
+ "max": [
+ -0.7963600754737854,
+ 0.2099802941083908,
+ 1.4468669891357422
+ ],
+ "min": [
+ -1.1696269512176514,
+ -0.04968822002410889,
+ 1.3078479766845704
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 458176,
+ "componentType": 5126,
+ "count": 378,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 314148,
+ "componentType": 5123,
+ "count": 231,
+ "max": [
+ 46
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 232112,
+ "componentType": 5123,
+ "count": 47,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 696336,
+ "componentType": 5126,
+ "count": 47,
+ "max": [
+ 0.9702684283256532,
+ 0.932125210762024,
+ 0.9276834726333618
+ ],
+ "min": [
+ -0.9956300258636476,
+ -0.8618587255477905,
+ -0.9294881224632264
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 696900,
+ "componentType": 5126,
+ "count": 47,
+ "max": [
+ -0.7963600754737854,
+ 0.21611559391021729,
+ 1.444216012954712
+ ],
+ "min": [
+ -1.1216360330581666,
+ 0.11564770340919496,
+ 1.3355180025100709
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 464224,
+ "componentType": 5126,
+ "count": 47,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 314610,
+ "componentType": 5123,
+ "count": 249,
+ "max": [
+ 67
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 232488,
+ "componentType": 5123,
+ "count": 68,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 697464,
+ "componentType": 5126,
+ "count": 68,
+ "max": [
+ 0.979600429534912,
+ 0.9092206954956056,
+ 0.9101498126983644
+ ],
+ "min": [
+ -0.9340090751647948,
+ -0.8941423892974854,
+ -0.9166219234466552
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 698280,
+ "componentType": 5126,
+ "count": 68,
+ "max": [
+ -0.6847363114356995,
+ 0.1307168006896973,
+ 1.4486229419708253
+ ],
+ "min": [
+ -1.2521400451660157,
+ 0.006106494925916195,
+ 1.343232035636902
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 464976,
+ "componentType": 5126,
+ "count": 68,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 315108,
+ "componentType": 5123,
+ "count": 132,
+ "max": [
+ 45
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 233032,
+ "componentType": 5123,
+ "count": 46,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 699096,
+ "componentType": 5126,
+ "count": 46,
+ "max": [
+ 0.9443762898445128,
+ 0.7415639758110046,
+ 0.7409393787384033
+ ],
+ "min": [
+ -0.6767988204956055,
+ -0.932136595249176,
+ -0.7409104704856873
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 699648,
+ "componentType": 5126,
+ "count": 46,
+ "max": [
+ -0.6847363114356995,
+ 0.07232499122619629,
+ 1.4092979431152344
+ ],
+ "min": [
+ -0.8665341734886169,
+ -0.02334159053862095,
+ 1.343232035636902
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 466064,
+ "componentType": 5126,
+ "count": 46,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 315372,
+ "componentType": 5123,
+ "count": 903,
+ "max": [
+ 162
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 233400,
+ "componentType": 5123,
+ "count": 163,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 700200,
+ "componentType": 5126,
+ "count": 163,
+ "max": [
+ 0.9525938034057616,
+ 0.936968207359314,
+ 0.9392325282096864
+ ],
+ "min": [
+ -0.9564805030822754,
+ -0.936968207359314,
+ -0.9374333024024965
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 702156,
+ "componentType": 5126,
+ "count": 163,
+ "max": [
+ -0.7181820273399353,
+ 0.10177289694547652,
+ 1.535765051841736
+ ],
+ "min": [
+ -1.1228649616241456,
+ -0.02334159053862095,
+ 1.313663959503174
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 466800,
+ "componentType": 5126,
+ "count": 163,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 317178,
+ "componentType": 5123,
+ "count": 4497,
+ "max": [
+ 773
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 234704,
+ "componentType": 5123,
+ "count": 774,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 704112,
+ "componentType": 5126,
+ "count": 774,
+ "max": [
+ 0.9245858192443848,
+ 0.9239841103553772,
+ 0.9341924786567688
+ ],
+ "min": [
+ -0.9265702962875366,
+ -1.0,
+ -0.9213665127754213
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 713400,
+ "componentType": 5126,
+ "count": 774,
+ "max": [
+ -0.8169127702713013,
+ 0.07056719064712525,
+ 1.547258973121643
+ ],
+ "min": [
+ -1.0789309740066529,
+ 0.005068360827863216,
+ 1.4588580131530762
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 469408,
+ "componentType": 5126,
+ "count": 774,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 326172,
+ "componentType": 5123,
+ "count": 480,
+ "max": [
+ 163
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 240896,
+ "componentType": 5123,
+ "count": 164,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 722688,
+ "componentType": 5126,
+ "count": 164,
+ "max": [
+ 0.999996781349182,
+ 1.0,
+ 0.00271618296392262
+ ],
+ "min": [
+ -0.9999970197677612,
+ -1.0,
+ -0.9999967217445374
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 724656,
+ "componentType": 5126,
+ "count": 164,
+ "max": [
+ -0.8253496289253235,
+ 0.1354945003986359,
+ 1.5393890142440797
+ ],
+ "min": [
+ -1.0636450052261353,
+ 0.013495259918272496,
+ 1.3687069416046145
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 481792,
+ "componentType": 5126,
+ "count": 164,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 327132,
+ "componentType": 5123,
+ "count": 426,
+ "max": [
+ 98
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 242208,
+ "componentType": 5123,
+ "count": 99,
+ "max": [
+ 4,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 726624,
+ "componentType": 5126,
+ "count": 99,
+ "max": [
+ 0.9999973177909852,
+ 0.7071207761764526,
+ 0.999997079372406
+ ],
+ "min": [
+ -0.9999967217445374,
+ -0.7071971297264099,
+ -0.99999737739563
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 727812,
+ "componentType": 5126,
+ "count": 99,
+ "max": [
+ 0.06597024202346802,
+ 0.1354945003986359,
+ 1.6286100149154664
+ ],
+ "min": [
+ -1.0531970262527466,
+ -0.03212349861860275,
+ 1.3687069416046145
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 484416,
+ "componentType": 5126,
+ "count": 99,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 327984,
+ "componentType": 5123,
+ "count": 3156,
+ "max": [
+ 587
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 243000,
+ "componentType": 5123,
+ "count": 588,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 729000,
+ "componentType": 5126,
+ "count": 588,
+ "max": [
+ 1.0,
+ 0.9369086027145386,
+ 1.0
+ ],
+ "min": [
+ -1.0,
+ -0.998504877090454,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 736056,
+ "componentType": 5126,
+ "count": 588,
+ "max": [
+ 0.09145306795835497,
+ 0.0839543268084526,
+ 1.7335740327835084
+ ],
+ "min": [
+ -0.0850815698504448,
+ -0.14359410107135774,
+ 1.5252469778060914
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 486000,
+ "componentType": 5126,
+ "count": 588,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 334296,
+ "componentType": 5123,
+ "count": 4626,
+ "max": [
+ 815
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 247704,
+ "componentType": 5123,
+ "count": 816,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 743112,
+ "componentType": 5126,
+ "count": 816,
+ "max": [
+ 0.9999879002571106,
+ 0.9998570084571838,
+ 0.9971525073051452
+ ],
+ "min": [
+ -0.9995089769363404,
+ -0.9996163249015808,
+ -0.9977017045021056
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 752904,
+ "componentType": 5126,
+ "count": 816,
+ "max": [
+ 0.09229648113250733,
+ 0.11866279691457749,
+ 1.7180629968643189
+ ],
+ "min": [
+ -0.09001719206571579,
+ -0.1618012934923172,
+ 1.507802963256836
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 495408,
+ "componentType": 5126,
+ "count": 816,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 343548,
+ "componentType": 5123,
+ "count": 8925,
+ "max": [
+ 1594
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 254232,
+ "componentType": 5123,
+ "count": 1595,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 762696,
+ "componentType": 5126,
+ "count": 1595,
+ "max": [
+ 1.0,
+ 0.9877163767814636,
+ 1.0
+ ],
+ "min": [
+ -1.0,
+ -0.9851924777030944,
+ -1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 781836,
+ "componentType": 5126,
+ "count": 1595,
+ "max": [
+ 0.09438984841108322,
+ 0.08314906805753708,
+ 1.7181910276412964
+ ],
+ "min": [
+ -0.07793670147657395,
+ -0.14839039742946626,
+ 1.4954860210418702
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 508464,
+ "componentType": 5126,
+ "count": 1595,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 361398,
+ "componentType": 5123,
+ "count": 3069,
+ "max": [
+ 526
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 266992,
+ "componentType": 5123,
+ "count": 527,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 800976,
+ "componentType": 5126,
+ "count": 527,
+ "max": [
+ 0.9981486201286316,
+ 0.9988293051719666,
+ 0.9999873042106628
+ ],
+ "min": [
+ -0.9993758797645568,
+ -0.9997822046279908,
+ -0.9988669157028198
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 807300,
+ "componentType": 5126,
+ "count": 527,
+ "max": [
+ 0.11259949952363968,
+ 0.06453794240951538,
+ 1.834357023239136
+ ],
+ "min": [
+ -0.06100171059370041,
+ -0.14748820662498478,
+ 1.6202499866485596
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 533984,
+ "componentType": 5126,
+ "count": 527,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 367536,
+ "componentType": 5123,
+ "count": 576,
+ "max": [
+ 130
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 271208,
+ "componentType": 5123,
+ "count": 131,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 813624,
+ "componentType": 5126,
+ "count": 131,
+ "max": [
+ 0.822087824344635,
+ -0.28944340348243716,
+ 0.9565367102622986
+ ],
+ "min": [
+ -0.822087824344635,
+ -0.968376100063324,
+ -0.822275698184967
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 815196,
+ "componentType": 5126,
+ "count": 131,
+ "max": [
+ -0.02897715009748936,
+ -0.1409249007701874,
+ 1.652659058570862
+ ],
+ "min": [
+ -0.09302645176649094,
+ -0.15744230151176454,
+ 1.5877209901809693
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 542416,
+ "componentType": 5126,
+ "count": 131,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 0,
+ "byteOffset": 368688,
+ "componentType": 5123,
+ "count": 654,
+ "max": [
+ 126
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 272256,
+ "componentType": 5123,
+ "count": 127,
+ "max": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "min": [
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 816768,
+ "componentType": 5126,
+ "count": 127,
+ "max": [
+ 0.9626206755638124,
+ 0.861091673374176,
+ 0.9625502228736876
+ ],
+ "min": [
+ -0.9626104831695556,
+ -0.5693606734275818,
+ -0.9629446864128112
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 818292,
+ "componentType": 5126,
+ "count": 127,
+ "max": [
+ -0.02808832935988903,
+ -0.1387781947851181,
+ 1.652659058570862
+ ],
+ "min": [
+ -0.09391528367996216,
+ -0.1422078013420105,
+ 1.586830973625183
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 544512,
+ "componentType": 5126,
+ "count": 127,
+ "max": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "min": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -0.7071066498756409,
+ 0.00048056046944111586,
+ 0.0004805605276487768,
+ -0.7071065306663513
+ ],
+ "min": [
+ -0.7071066498756409,
+ 0.00048056046944111586,
+ 0.0004805605276487768,
+ -0.7071065306663513
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 15708,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "min": [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 5236,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 31416,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.0,
+ 0.9148268103599548,
+ 0.0
+ ],
+ "min": [
+ 0.0,
+ 0.9148268103599548,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 20944,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.22994717955589298,
+ 0.99963116645813,
+ 0.24422451853752137,
+ 0.999263107776642
+ ],
+ "min": [
+ -0.21882909536361698,
+ -0.9982082843780518,
+ -0.2034148871898651,
+ -0.9998023509979248
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 47124,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000009536743165,
+ 1.000000238418579,
+ 1.000001072883606
+ ],
+ "min": [
+ 0.9999996423721314,
+ 0.999999701976776,
+ 0.9999995231628418
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 10472,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 62832,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 2.980229965032777e-7,
+ 0.10747259855270386,
+ -0.023591449484229089
+ ],
+ "min": [
+ -2.38419005427204e-7,
+ 0.10747189819812776,
+ -0.023591849952936177
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 41888,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.08071999251842499,
+ 0.4829065203666687,
+ 0.23370222747325898,
+ -0.875069797039032
+ ],
+ "min": [
+ -0.2940012216567993,
+ -0.4205382764339447,
+ -0.3637002110481262,
+ -0.9999121427536012
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 78540,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.000000238418579,
+ 1.000000238418579,
+ 1.000000238418579
+ ],
+ "min": [
+ 0.9999996423721314,
+ 0.9999995827674866,
+ 0.9999995827674866
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 15708,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 94248,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 2.682209867543861e-7,
+ 0.5242568254470825,
+ -0.015727100893855096
+ ],
+ "min": [
+ -2.682209867543861e-7,
+ 0.5242558121681213,
+ -0.015728000551462178
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 62832,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.46409425139427187,
+ 0.5351784229278565,
+ 0.1608593612909317,
+ -0.7751519680023193
+ ],
+ "min": [
+ -0.29117903113365176,
+ -0.5687214732170105,
+ -0.2105143815279007,
+ -0.9996994137763976
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 109956,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.000000238418579,
+ 1.0000003576278689,
+ 1.0000003576278689
+ ],
+ "min": [
+ 0.9999996423721314,
+ 0.9999997615814208,
+ 0.999999701976776
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 20944,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 125664,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -0.4194045960903168,
+ 0.3407667875289917,
+ -0.01310619991272688
+ ],
+ "min": [
+ -0.41940510272979739,
+ 0.3407663106918335,
+ -0.013106689788401129
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 83776,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.2547066807746887,
+ 0.3725568354129791,
+ -0.10216578841209412,
+ 0.02369661815464497
+ ],
+ "min": [
+ -0.7071006298065186,
+ -0.538973331451416,
+ -0.9599624872207642,
+ -0.9599091410636902
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 141372,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.000000238418579,
+ 1.0000003576278689,
+ 1.0000004768371585
+ ],
+ "min": [
+ 0.9999995231628418,
+ 0.9999993443489076,
+ 0.9999996423721314
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 26180,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 157080,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 4.842879874900064e-8,
+ 0.1918196976184845,
+ 0.0
+ ],
+ "min": [
+ 4.842879874900064e-8,
+ 0.1918196976184845,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 104720,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.10535851866006853,
+ 0.008949832059442997,
+ 0.9193236827850342,
+ 0.20621219277381898
+ ],
+ "min": [
+ -0.540235698223114,
+ -0.5158300995826721,
+ 0.5870917439460754,
+ -0.7372239232063294
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 172788,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000005960464478,
+ 1.0000003576278689,
+ 1.0000007152557374
+ ],
+ "min": [
+ 0.9999995231628418,
+ 0.999999463558197,
+ 0.999999701976776
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 31416,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 188496,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.4194050133228302,
+ 0.3407658040523529,
+ -0.013106119818985464
+ ],
+ "min": [
+ 0.4194045066833496,
+ 0.34076550602912905,
+ -0.013106719590723517
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 125664,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.16515624523162845,
+ 0.749225914478302,
+ 0.9655215740203856,
+ 0.0222143717110157
+ ],
+ "min": [
+ -0.7774010896682739,
+ -0.5799198746681213,
+ 0.1723635494709015,
+ -0.9414708614349364
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 204204,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000009536743165,
+ 1.000001072883606,
+ 1.0000008344650269
+ ],
+ "min": [
+ 1.0,
+ 1.000000238418579,
+ 0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 36652,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 219912,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.4901200273698124e-8,
+ 0.18572239577770234,
+ 0.0
+ ],
+ "min": [
+ 1.4901200273698124e-8,
+ 0.18572239577770234,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 146608,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.1826249808073044,
+ 0.6476022005081177,
+ -0.6235807538032532,
+ 0.1337534636259079
+ ],
+ "min": [
+ -0.500301718711853,
+ -0.03818349167704582,
+ -0.8916640877723694,
+ -0.7264519929885864
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 235620,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000003576278689,
+ 1.0,
+ 1.0000001192092896
+ ],
+ "min": [
+ 0.9999993443489076,
+ 0.9999993443489076,
+ 0.9999993443489076
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 41888,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 251328,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.4094895124435425,
+ 0.0027066469192504884,
+ 0.015727730467915536
+ ],
+ "min": [
+ 0.4094895124435425,
+ 0.0027066469192504884,
+ 0.015727730467915536
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 167552,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 5.587948326279957e-9,
+ -3.7253005125137418e-9,
+ -0.0,
+ -0.9999999403953552
+ ],
+ "min": [
+ 5.587948326279957e-9,
+ -3.7253005125137418e-9,
+ -0.0,
+ -0.9999999403953552
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 267036,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0,
+ 0.9999998807907105,
+ 0.9999998807907105
+ ],
+ "min": [
+ 1.0,
+ 0.9999998807907105,
+ 0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 47124,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 282744,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.4119338095188141,
+ 0.02158593945205212,
+ 0.05764375999569893
+ ],
+ "min": [
+ 0.4119338095188141,
+ 0.02158593945205212,
+ 0.05764375999569893
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 188496,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -1.3969826184734302e-8,
+ -0.0,
+ -0.0,
+ -0.9999999403953552
+ ],
+ "min": [
+ -1.3969826184734302e-8,
+ -0.0,
+ -0.0,
+ -0.9999999403953552
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 298452,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.9999998807907105,
+ 1.0,
+ 0.9999998807907105
+ ],
+ "min": [
+ 0.9999998807907105,
+ 1.0,
+ 0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 52360,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 314160,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.41257110238075259,
+ -0.021677669137716298,
+ 0.05501500889658928
+ ],
+ "min": [
+ 0.41257110238075259,
+ -0.021677669137716298,
+ 0.05501500889658928
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 209440,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.8626450382086542e-9,
+ -3.725300068424531e-9,
+ -2.98022992950564e-8,
+ -1.0
+ ],
+ "min": [
+ 1.8626450382086542e-9,
+ -3.725300068424531e-9,
+ -2.98022992950564e-8,
+ -1.0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 329868,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0,
+ 1.0,
+ 0.9999998807907105
+ ],
+ "min": [
+ 1.0,
+ 1.0,
+ 0.9999998807907105
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 57596,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 345576,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -0.1415490061044693,
+ -0.039318621158599856,
+ 4.991890136807342e-7
+ ],
+ "min": [
+ -0.14154960215091706,
+ -0.03931945934891701,
+ -1.1175900027637909e-7
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 230384,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.8133829236030579,
+ 0.5989649295806885,
+ 0.8436978459358215,
+ 0.6449698805809021
+ ],
+ "min": [
+ 0.3702203333377838,
+ -0.06241266801953316,
+ 0.3116881549358368,
+ -0.13473054766654969
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 361284,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.000016689300537,
+ 1.0000189542770386,
+ 1.0000169277191165
+ ],
+ "min": [
+ 0.9999995827674866,
+ 0.9999997615814208,
+ 0.9999993443489076
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 62832,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 376992,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 2.98022992950564e-8,
+ 0.3586176931858063,
+ 0.0
+ ],
+ "min": [
+ 2.98022992950564e-8,
+ 0.3586176931858063,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 251328,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.008941872045397759,
+ 0.6418942213058472,
+ -0.04780912771821022,
+ -0.17511217296123506
+ ],
+ "min": [
+ -0.5697520971298218,
+ 0.0517999567091465,
+ -0.8109263181686401,
+ -0.8936039209365845
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 392700,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000007152557374,
+ 1.0000009536743165,
+ 1.0
+ ],
+ "min": [
+ 0.9999998807907105,
+ 0.999999701976776,
+ 0.999998927116394
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 68068,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 408408,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.0,
+ 0.3968968093395233,
+ 0.0
+ ],
+ "min": [
+ 0.0,
+ 0.3968968093395233,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 272272,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.8207381367683411,
+ 0.3076615631580353,
+ 0.3662434220314026,
+ -0.5708383917808533
+ ],
+ "min": [
+ 0.08248570561408997,
+ -0.08690406382083893,
+ -0.289207935333252,
+ -0.9902410507202148
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 424116,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000003576278689,
+ 1.0000007152557374,
+ 1.0000005960464478
+ ],
+ "min": [
+ 0.9999994039535524,
+ 0.9999994039535524,
+ 0.9999994039535524
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 73304,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 439824,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -2.98022992950564e-8,
+ 0.12854869663715366,
+ 0.0
+ ],
+ "min": [
+ -2.98022992950564e-8,
+ 0.12854869663715366,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 293216,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.9033632278442384,
+ -7.4743859102e-8,
+ -1.0567234198788357e-7,
+ -0.4288764894008637
+ ],
+ "min": [
+ 0.9033632278442384,
+ -7.4743859102e-8,
+ -1.0567234198788357e-7,
+ -0.4288764894008637
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 455532,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0,
+ 1.0000001192092896,
+ 1.0000003576278689
+ ],
+ "min": [
+ 1.0,
+ 1.0000001192092896,
+ 1.0000003576278689
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 78540,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 471240,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.1415494978427887,
+ -0.03931879997253418,
+ 4.842880230171431e-7
+ ],
+ "min": [
+ 0.14154890179634098,
+ -0.03931939974427223,
+ -1.1920899822825962e-7
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 314160,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.8340531587600708,
+ 0.21584154665470124,
+ -0.3745410144329071,
+ 0.719398558139801
+ ],
+ "min": [
+ 0.20705875754356385,
+ -0.5725383162498474,
+ -0.8548761010169983,
+ -0.18284621834754945
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 486948,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.000017762184143,
+ 1.0000197887420657,
+ 1.0000158548355105
+ ],
+ "min": [
+ 0.9999998211860656,
+ 0.9999998211860656,
+ 0.9999992847442628
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 83776,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 502656,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.0,
+ 0.3586178123950958,
+ 0.0
+ ],
+ "min": [
+ 0.0,
+ 0.3586178123950958,
+ 0.0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 335104,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -0.018084827810525899,
+ -0.04664610326290131,
+ 0.7690947651863098,
+ -0.22867438197135929
+ ],
+ "min": [
+ -0.6566932797431946,
+ -0.6220959424972534,
+ -0.05792725831270218,
+ -0.9092845916748048
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 518364,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000009536743165,
+ 1.0000008344650269,
+ 1.0
+ ],
+ "min": [
+ 0.9999998807907105,
+ 0.9999998807907105,
+ 0.9999991655349731
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 89012,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 534072,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ -2.98022992950564e-8,
+ 0.3968968093395233,
+ -1.8626499453944239e-8
+ ],
+ "min": [
+ -2.98022992950564e-8,
+ 0.3968968093395233,
+ -1.8626499453944239e-8
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 356048,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.7374019622802734,
+ 0.1331629455089569,
+ 0.04225348681211472,
+ -0.6565166115760803
+ ],
+ "min": [
+ 0.1277473121881485,
+ -0.36822667717933657,
+ -0.3809806108474732,
+ -0.9684229493141174
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 549780,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0000003576278689,
+ 1.0000005960464478,
+ 1.0000004768371585
+ ],
+ "min": [
+ 0.9999994039535524,
+ 0.999999463558197,
+ 0.999999225139618
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 94248,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 34.880001068115237
+ ],
+ "min": [
+ 0.0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 565488,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.4901200273698124e-8,
+ 0.128548800945282,
+ 7.450580152834618e-9
+ ],
+ "min": [
+ 1.4901200273698124e-8,
+ 0.128548800945282,
+ 7.450580152834618e-9
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 376992,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 0.9033632278442384,
+ 5.67022482300672e-8,
+ 1.0154858642863475e-7,
+ -0.42887642979621889
+ ],
+ "min": [
+ 0.9033632278442384,
+ 5.67022482300672e-8,
+ 1.0154858642863475e-7,
+ -0.42887642979621889
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 581196,
+ "componentType": 5126,
+ "count": 1309,
+ "max": [
+ 1.0,
+ 1.0,
+ 1.0000003576278689
+ ],
+ "min": [
+ 1.0,
+ 1.0,
+ 1.0000003576278689
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 7,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 18,
+ "max": [
+ 1.0,
+ 0.9990230202674866,
+ 0.9925193190574646,
+ 0.0,
+ 0.992519199848175,
+ 0.0804019495844841,
+ 0.9333313703536988,
+ 0.0,
+ 0.997569501399994,
+ 1.0,
+ 0.08040130138397217,
+ 0.0,
+ 1.3445860147476197,
+ 0.880669891834259,
+ 0.07009822130203247,
+ 1.0
+ ],
+ "min": [
+ 0.042071811854839328,
+ -0.997569501399994,
+ -0.9925193190574646,
+ 0.0,
+ -0.992519199848175,
+ -0.7748532295227051,
+ -1.0,
+ 0.0,
+ -0.999022901058197,
+ -0.9972699284553528,
+ -0.7748619914054871,
+ 0.0,
+ -1.331490993499756,
+ -1.5465550422668458,
+ -0.04193788021802902,
+ 1.0
+ ],
+ "type": "MAT4"
+ }
+ ],
+ "materials": [
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.16862699389457704,
+ 0.1411760002374649,
+ 0.10980399698019028,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "frameInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.7450979948043823,
+ 0.45097988843917849,
+ 0.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "componentsStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.5411760210990906,
+ 0.5411760210990906,
+ 0.5411760210990906,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "Stem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.019607799127697946,
+ 0.1450980007648468,
+ 0.17647099494934086,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "footStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.9686279892921448,
+ 0.9686279892921448,
+ 0.9686279892921448,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "footFlangeStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4823530018329621,
+ 0.4352940022945404,
+ 0.36078399419784548,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "kneeStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.2627449929714203,
+ 0.2627449929714203,
+ 0.2627449929714203,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "hipSphereStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "filletStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.8980389833450317,
+ 0.8980389833450317,
+ 0.8980389833450317,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "thighStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4980390071868897,
+ 0.45097988843917849,
+ 0.3803919851779938,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "thighPadStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4588240087032318,
+ 0.4588240087032318,
+ 0.4588240087032318,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "plugStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4627450108528137,
+ 0.4078429937362671,
+ 0.3294120132923126,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "discInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.0784313976764679,
+ 0.18431399762630464,
+ 0.20784300565719605,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "TubeStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.521569013595581,
+ 0.4627450108528137,
+ 0.37647101283073428,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "componentStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.243137001991272,
+ 0.19607800245285038,
+ 0.1568630039691925,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "hexStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4980390071868897,
+ 0.45097988843917849,
+ 0.3803919851779938,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "kneeGuardStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.6823530197143555,
+ 0.6352940201759338,
+ 0.5333330035209656,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "calfStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4823530018329621,
+ 0.4352940022945404,
+ 0.36078399419784548,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "ankleBracketStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "ankleStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.35686299204826357,
+ 0.3254899978637696,
+ 0.2784309983253479,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "calfCoverStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "knee2Stem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.0,
+ 0.2705880105495453,
+ 0.243137001991272,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "skeletonStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.38431400060653689,
+ 0.34902000427246096,
+ 0.282353013753891,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "bracketStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4823530018329621,
+ 0.4352940022945404,
+ 0.36078399419784548,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "coverStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.0,
+ 0.19215700030326844,
+ 0.243137001991272,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "barStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4313730001449585,
+ 0.20000000298023225,
+ 0.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "intestineOutStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.9176470041275024,
+ 0.6862750053405762,
+ 0.2705880105495453,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "neckSinkStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.0,
+ 0.2666670083999634,
+ 0.3372550010681153,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "shockOutStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.0,
+ 0.4823530018329621,
+ 0.8705880045890808,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "shockInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.18823499977588657,
+ 0.1568630039691925,
+ 0.12156900018453598,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "discStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4980390071868897,
+ 0.4980390071868897,
+ 0.4980390071868897,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "canisterInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.5372549891471863,
+ 0.5372549891471863,
+ 0.5372549891471863,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "canisterOutStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.36078399419784548,
+ 0.36078399419784548,
+ 0.36078399419784548,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "canInnerStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4549019932746887,
+ 0.21960799396038056,
+ 0.019607799127697946,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "pipeStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.6705880165100098,
+ 0.4078429937362671,
+ 0.05882349982857704,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "off-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.2901960015296936,
+ 0.2901960015296936,
+ 0.2901960015296936,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "boltStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.20729400217533112,
+ 0.19880999624729157,
+ 0.7099869847297669,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "intestineInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.5098040103912354,
+ 0.4588240087032318,
+ 0.37647101283073428,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "armPlateStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "shoulderPodStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "armFilletStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.019607799127697946,
+ 0.1647060066461563,
+ 0.20000000298023225,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "bStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.20000000298023225,
+ 0.20000000298023225,
+ 0.20000000298023225,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "armBoltStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.02352939918637276,
+ 0.11764699965715409,
+ 0.1411760002374649,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "shoulderBStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.513725996017456,
+ 0.4549019932746887,
+ 0.3725489974021912,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "armTrussStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.268193006515503,
+ 0.2585029900074005,
+ 0.549996018409729,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "pinStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.764706015586853,
+ 0.48627498745918276,
+ 0.0784313976764679,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "radiatorStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "rpgStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "bayonetStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.1254899948835373,
+ 0.1254899948835373,
+ 0.1254899948835373,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "barrel2Stem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.3529410064220429,
+ 0.3529410064220429,
+ 0.3529410064220429,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "barrel1Stem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.4196079969406128,
+ 0.4196079969406128,
+ 0.4117650091648102,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "filterOutStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.35999101400375368,
+ 0.35999101400375368,
+ 0.35999101400375368,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "filterInStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.5058820247650147,
+ 0.5058820247650147,
+ 0.5058820247650147,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "exhaustGunStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.2549020051956177,
+ 0.2549020051956177,
+ 0.2549020051956177,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "headFilletStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.8627449870109558,
+ 0.6509799957275391,
+ 0.243137001991272,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "headCaseStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.7098039984703064,
+ 0.5411760210990906,
+ 0.2549020051956177,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "headGrillStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.8274509906768799,
+ 0.5176470279693604,
+ 0.062745101749897,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "headHornStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 0.9882349967956544,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "eyeStem-effect"
+ },
+ {
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "eyeRimStem-effect"
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteOffset": 2735108,
+ "byteLength": 369996,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 2362352,
+ "byteLength": 273272,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 1542536,
+ "byteLength": 819816,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 399088,
+ "byteLength": 546544,
+ "byteStride": 16,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 2635624,
+ "byteLength": 99484
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 945632,
+ "byteLength": 596904
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 1152,
+ "byteLength": 397936
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 0,
+ "byteLength": 1152
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 3105104,
+ "uri": "BrainStem0.bin"
+ }
+ ]
+}
diff --git a/scenes/gltf/robot/BrainStem0.bin b/scenes/gltf/robot/BrainStem0.bin
new file mode 100644
index 00000000..a684a8f3
Binary files /dev/null and b/scenes/gltf/robot/BrainStem0.bin differ
diff --git a/scenes/gltf/teapot.gltf b/scenes/gltf/teapot.gltf
new file mode 100644
index 00000000..88bfb7a2
--- /dev/null
+++ b/scenes/gltf/teapot.gltf
@@ -0,0 +1,95 @@
+{
+ "asset":{
+ "generator":"Khronos glTF Blender I/O v3.5.30",
+ "version":"2.0"
+ },
+ "scene":0,
+ "scenes":[
+ {
+ "name":"Scene",
+ "nodes":[
+ 0,
+ 1
+ ]
+ }
+ ],
+ "nodes":[
+ {
+ "name":"previs guy"
+ },
+ {
+ "mesh":0,
+ "name":"Teapot"
+ }
+ ],
+ "meshes":[
+ {
+ "name":"Teapot",
+ "primitives":[
+ {
+ "attributes":{
+ "POSITION":0,
+ "NORMAL":1
+ },
+ "indices":2
+ }
+ ]
+ }
+ ],
+ "accessors":[
+ {
+ "bufferView":0,
+ "componentType":5126,
+ "count":3084,
+ "max":[
+ 3.434000015258789,
+ 3.1500000953674316,
+ 2
+ ],
+ "min":[
+ -3,
+ 0,
+ -2
+ ],
+ "type":"VEC3"
+ },
+ {
+ "bufferView":1,
+ "componentType":5126,
+ "count":3084,
+ "type":"VEC3"
+ },
+ {
+ "bufferView":2,
+ "componentType":5123,
+ "count":4680,
+ "type":"SCALAR"
+ }
+ ],
+ "bufferViews":[
+ {
+ "buffer":0,
+ "byteLength":37008,
+ "byteOffset":0,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":37008,
+ "byteOffset":37008,
+ "target":34962
+ },
+ {
+ "buffer":0,
+ "byteLength":9360,
+ "byteOffset":74016,
+ "target":34963
+ }
+ ],
+ "buffers":[
+ {
+ "byteLength":83376,
+ "uri":"data:application/octet-stream;base64,0AX1PpqZGUCaWrY/0AX1PpqZGUCaWrY/0AX1PpqZGUCaWrY/0AX1PpqZGUCaWrY/Z2zuPsuhHUBJcbE/Z2zuPsuhHUBJcbE/Z2zuPsuhHUBJcbE/Z2zuPsuhHUBJcbE/AAAAAMuhHUAs1Lo/AAAAAMuhHUAs1Lo/AAAAAMuhHUAs1Lo/AAAAAMuhHUAs1Lo/AAAAAJqZGUAAAMA/AAAAAJqZGUAAAMA/AAAAAJqZGUAAAMA/AAAAAJqZGUAAAMA/FOznPuOlH0Ckmqw/FOznPuOlH0Ckmqw/FOznPuOlH0Ckmqw/AAAAAOOlH0ABvLU/AAAAAOOlH0ABvLU/AAAAAOOlH0ABvLU/ShbjPuOlH0BwAak/ShbjPuOlH0BwAak/ShbjPuOlH0BwAak/AAAAAOOlH0AS8rE/AAAAAOOlH0AS8rE/AAAAAOOlH0AS8rE/enzhPsuhHUBy0Kc/enzhPsuhHUBy0Kc/enzhPsuhHUBy0Kc/enzhPsuhHUBy0Kc/AAAAAMuhHUDzsLA/AAAAAMuhHUDzsLA/AAAAAMuhHUDzsLA/AAAAAMuhHUDzsLA/GLDkPpqZGUBuMqo/GLDkPpqZGUBuMqo/AAAAAJqZGUAzM7M/AAAAAJqZGUAzM7M/thBkP5qZGUC7YZs/thBkP5qZGUC7YZs/thBkP5qZGUC7YZs/thBkP5qZGUC7YZs/OOxdP8uhHUBiMpc/OOxdP8uhHUBiMpc/OOxdP8uhHUBiMpc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+v274AkC9dBM+A3jLv/0YA0C9dBM+A3jLv/0YA0C9dBM+zcwswGZm5j8AAACAzcwswGZm5j8AAACAzcwswGZm5j8AAACAzcwswGZm5j8AAACAescpwFR09D8AAACAescpwFR09D8AAACAescpwFR09D8AAACAescpwFR09D8AAACA7usgwK76/D8AAACA7usgwK76/D8AAACA7usgwK76/D8AAACA7usgwK76/D8AAACAz4gSwKytAEAAAACAz4gSwKytAEAAAACAz4gSwKytAEAAAACAz4gSwKytAEAAAACAf9n9vx18AUAAAACAf9n9vx18AUAAAACAf9n9vx18AUAAAACAf9n9vx18AUAAAACAzczMv5qZAUAAAACAzczMv5qZAUAAAACA+8suwGZm5j+9dBO++8suwGZm5j+9dBO++8suwGZm5j+9dBO++8suwGZm5j+9dBO+2LArwITq9T++dBO+2LArwITq9T++dBO+2LArwITq9T++dBO+2LArwITq9T++dBO+a44iwNVT/z+9dBO+a44iwNVT/z+9dBO+a44iwNVT/z+9dBO+a44iwNVT/z+9dBO+KasTwIYUAkC9dBO+KasTwIYUAkC9dBO+KasTwIYUAkC9dBO+KasTwIYUAkC9dBO+Epv+v274AkC9dBO+Epv+v274AkC9dBO+Epv+v274AkC9dBO+Epv+v274AkC9dBO+BHjLv/0YA0C9dBO+BHjLv/0YA0C9dBO+9I4zwGZm5j8bL12+9I4zwGZm5j8bL12+9I4zwGZm5j8bL12+0D8wwMxm+T8cL12+0D8wwMxm+T8cL12+0D8wwMxm+T8cL12+WXQmwKt2AkAbL12+WXQmwKt2AkAbL12+WXQmwKt2AkAbL12+iV8WwD1sBUAbL12+iV8WwD1sBUAbL12+iV8WwD1sBUAbL12+UzQAwFiDBkAcL12+UzQAwFiDBkAcL12+UzQAwFiDBkAcL12+XkvIvzerBkAbL12+XkvIvzerBkAbL12+2j05wGZm5j8bL12+2j05wGZm5j8bL12+2j05wGZm5j8bL12+orA1wMiP/T8cL12+orA1wMiP/T8cL12+orA1wMiP/T8cL12+bRsrwCXOBUAbL12+bRsrwCXOBUAbL12+b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KHUBViwg+VmxCQOiKHUBViwg+B8hBQFZ7HUAkXh4+B8hBQFZ7HUAkXh4+B8hBQFZ7HUAkXh4+B8hBQFZ7HUAkXh4+2P0+QLclHED9pjA+2P0+QLclHED9pjA+2P0+QLclHED9pjA+2P0+QLclHED9pjA+xtw1QJuZGUC9dJM9xtw1QJuZGUC9dJM92t44QAgDHED8rZ092t44QAgDHED8rZ092t44QAgDHED8rZ092t44QAgDHED8rZ09bFs5QCQzHUAcD7Y9bFs5QCQzHUAcD7Y9bFs5QCQzHUAcD7Y9bFs5QCQzHUAcD7Y9MdU3QIouHUAxKNM9MdU3QIouHUAxKNM9MdU3QIouHUAxKNM9MdU3QIouHUAxKNM93840QNT5G0BRies93840QNT5G0BRies93840QNT5G0BRies93840QNT5G0BRies9MzMzQJqZGUAAAACAMzMzQJqZGUAAAACAPps1QG3nG0AAAACAPps1QG3nG0AAAACAPps1QG3nG0AAAACAPps1QG3nG0AAAACAIo41QFYOHUAAAACAIo41QFYOHUAAAACAIo41QFYOHUAAAACAIo41QFYOHUAAAACAKqkzQFYOHUAAAACAKqkzQFYOHUAAAACAKqkzQFYOHUAAAACAKqkzQFYOHUAAAACAoIkwQG7nG0AAAACAoIkwQG7nG0AAAACAoIkwQG7nG0AAAACAoIkwQG7nG0AAAACAxtw1QJqZGUC9dJO9xtw1QJqZGUC9dJO92t44QAcDHED8rZ292t44QAcDHED8rZ292t44QAcDHED8rZ292t44QAcDHED8rZ29bFs5QCQzHUAcD7a9bFs5QCQzHUAcD7a9bFs5QCQzHUAcD7a9bFs5QCQzHUAcD7a9MdU3QIouHUAxKNO9MdU3QIouHUAxKNO9MdU3QIouHUAxKNO9MdU3QIouHUAxKNO94M40QNT5G0BRieu94M40QNT5G0BRieu94M40QNT5G0BRieu94M40QNT5G0BRieu9ETY8QJqZGUAbL929ETY8QJqZGUAbL929dadAQNtEHED6hOy9dadAQNtEHED6hOy9dadAQNtEHED6hOy9dadAQNtEHED6hOy9VmxCQOmKHUBViwi+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w+1XhpPbIubj8QWLk+6NmsPTqSez/5Dyk+jEoqPulIbj/wp6Y+1XhpvbIubj8QWLk+sb/svKyLez/aGzw+sb/sPKyLez/aGzw+1XhpPbIubj8QWLk+F0iQPt4CST+NKA0/AADgPhUdST8AAOA+qaTOPSegeT86I0o+iUEgPrWmeT+JQSA+F0iQPt4CST+NKA0/AADgPhUdST8AAOA+4L6OPa36fD9xrAs+qaTOPSegeT86I0o+9pfdPa36fD/2l909iUEgPrWmeT+JQSA+4L6OPa36fD9xrAs+6NmsPTqSez/5Dyk+9pfdPa36fD/2l909pgoGPjqSez+mCgY+6NmsPTqSez/5Dyk+pgoGPjqSez+mCgY+jEoqPulIbj/wp6Y+yjKEPgRWbj/KMoQ+AADgPhUdST8AAOA+jSgNP94CST8XSJA+iUEgPrWmeT+JQSA+OiNKPiegeT+ppM49AADgPhUdST8AAOA+jSgNP94CST8XSJA+9pfdPa36fD/2l909cawLPq36fD/gvo49iUEgPrWmeT+JQSA+OiNKPiegeT+ppM499pfdPa36fD/2l909pgoGPjqSez+mCgY+cawLPq36fD/gvo49+Q8pPjqSez/o2aw9pgoGPjqSez+mCgY++Q8pPjqSez/o2aw9yjKEPgRWbj/KMoQ+8KemPulIbj+MSio+jSgNP94CST8XSJA+BOccP1XBSD/LocU9OiNKPiegeT+ppM49095gPpqZeT+7uA09jSgNP94CST8XSJA+BOccP1XBSD/LocU9cawLPq36fD/gvo49dnEbPh/0fD/vycM8OiNKPiegeT+ppM49095gPpqZeT+7uA09cawLPq36fD/gvo49dnEbPh/0fD/vycM8+Q8pPjqSez/o2aw92hs8PqyLez+xv+w8+Q8pPjqSez/o2aw92hs8PqyLez+xv+w88KemPulIbj+MSio+EFi5PrIubj/VeGk9BOccP1XBSD/LocW9BOccP1XBSD/LocU9095gPpqZeT+7uA29095gPpqZeT+7uA09BOccP1XBSD/LocW9BOccP1XBSD/LocU9dnEbPh/0fD/vycO8dnEbPh/0fD/vycM8095gPpqZeT+7uA29095gPpqZeT+7uA09dnEbPh/0fD/vycO8dnEbPh/0fD/vycM82hs8PqyLez+xv+y82hs8PqyLez+xv+w82hs8PqyLez+xv+y82hs8PqyLez+xv+w8EFi5PrIubj/VeGm9EFi5PrIubj/VeGk9BOccv1XBSD/LocU9jSgNv94CST8XSJA+BOccv1XBSD/LocU9jSgNv94CST8XSJA+095gvpqZeT+7uA09OiNKviegeT+ppM49BOccv1XBSD/LocW9BOccv1XBSD/LocU9095gvpqZeT+7uA29095gvpqZeT+7uA09BOccv1XBSD/LocW9BOccv1XBSD/LocU9095gvpqZeT+7uA09OiNKviegeT+ppM49dnEbvh/0fD/vycM8cawLvq36fD/gvo49095gvpqZeT+7uA29095gvpqZeT+7uA09dnEbvh/0fD/vycO8dnEbvh/0fD/vycM82hs8vqyLez+xv+w8+Q8pvjqSez/o2aw9dnEbvh/0fD/vycM8cawLvq36fD/gvo492hs8vqyLez+xv+y82hs8vqyLez+xv+w8dnEbvh/0fD/vycO8dnEbvh/0fD/vycM8EFi5vrIubj/VeGk98KemvulIbj+MSio+2hs8vqyLez+xv+w8+Q8pvjqSez/o2aw9EFi5vrIubj/VeGm9EFi5vrIubj/VeGk92hs8vqyLez+xv+y82hs8vqyLez+xv+w8jSgNv94CST8XSJA+AADgvhUdST8AAOA+jSgNv94CST8XSJA+AADgvhUdST8AAOA+OiNKviegeT+ppM49iUEgvrWmeT+JQSA+OiNKviegeT+ppM49iUEgvrWmeT+JQSA+cawLvq36fD/gvo499pfdva36fD/2l909+Q8pvjqSez/o2aw9cawLvq36fD/gvo49pgoGvjqSez+mCgY+9pfdva36fD/2l9098KemvulIbj+MSio+yjKEvgRWbj/KMoQ++Q8pvjqSez/o2aw9pgoGvjqSez+mCgY+AADgvhUdST8AAOA+F0iQvt4CST+NKA0/AADgvhUdST8AAOA+F0iQvt4CST+NKA0/iUEgvrWmeT+JQSA+qaTOvSegeT86I0o+iUEgvrWmeT+JQSA+9pfdva36fD/2l909qaTOvSegeT86I0o+4L6Ova36fD9xrAs+p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vrWmeT+JQSC+9pfdva36fD/2l929qaTOvSegeT86I0q+4L6Ova36fD9xrAu+pgoGvjqSez+mCga+9pfdva36fD/2l9296NmsvTqSez/5Dym+4L6Ova36fD9xrAu+yjKEvgRWbj/KMoS+jEoqvulIbj/wp6a+pgoGvjqSez+mCga+6NmsvTqSez/5Dym+jSgNv94CST8XSJC+AADgvhUdST8AAOC+jSgNv94CST8XSJC+AADgvhUdST8AAOC+OiNKviegeT+ppM69iUEgvrWmeT+JQSC+OiNKviegeT+ppM69iUEgvrWmeT+JQSC+cawLvq36fD/gvo699pfdva36fD/2l929+Q8pvjqSez/o2ay9cawLvq36fD/gvo69pgoGvjqSez+mCga+9pfdva36fD/2l9298KemvulIbj+MSiq+yjKEvgRWbj/KMoS++Q8pvjqSez/o2ay9pgoGvjqSez+mCga+BOccv1XBSD/LocW9jSgNv94CST8XSJC+BOccv1XBSD/LocW9jSgNv94CST8XSJC+095gvpqZeT+7uA29OiNKviegeT+ppM69095gvpqZeT+7uA29OiNKviegeT+ppM69dnEbvh/0fD/vycO8cawLvq36fD/gvo692hs8vqyLez+xv+y8+Q8pvjqSez/o2ay9dnEbvh/0fD/vycO8cawLvq36fD/gvo69EFi5vrIubj/VeGm98KemvulIbj+MSiq+2hs8vqyLez+xv+y8+Q8pvjqSez/o2ay9jSgNP94CST8XSJC+BOccP1XBSD/LocW9OiNKPiegeT+ppM69095gPpqZeT+7uA29jSgNP94CST8XSJC+BOccP1XBSD/LocW9cawLPq36fD/gvo69dnEbPh/0fD/vycO8OiNKPiegeT+ppM69095gPpqZeT+7uA29cawLPq36fD/gvo69dnEbPh/0fD/vycO8+Q8pPjqSez/o2ay92hs8PqyLez+xv+y8+Q8pPjqSez/o2ay92hs8PqyLez+xv+y88KemPulIbj+MSiq+EFi5PrIubj/VeGm9AADgPhUdST8AAOC+jSgNP94CST8XSJC+iUEgPrWmeT+JQSC+OiNKPiegeT+ppM69AADgPhUdST8AAOC+jSgNP94CST8XSJC+9pfdPa36fD/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wuKC4wLgwuMC4ULiwuRC5QLiwuUC40LkwvZCpUL1AOZC3gL1AN4C+YDmwudC4ALmwuAC3kLnwuhC4gLnwuIC4ELowulC5ALowuQC4kLpwvXCpILwAOpC5gLwAOYC9IDqwutC5wLqwucC5oLrwuxC6ALrwugC54Lswu1C6QLswukC6ILtwvVCqYLlwO5C6gLlwOoC74Duwu9C6wLuwusC6oLvwvBC7ALvwuwC64LwwvFC7QLwwu0C7ILxwvTCrYLowMtC7gLowO4C5YDLws1C7wLLwu8C7oLNws9C8ALNwvAC74LPwtFC8QLPwvEC8ILRwvRCsYLcQPLCxcLcQMXC4UDyQvPCxsLyQsbCxULzQvTCx8LzQsfCxkL0QvXCyML0QsjCx0L1QvjCiELXQPbC8oLXQPKC3AD2QvfC84L2QvOC8gL3QvjC9IL3QvSC8wL4QvnC9YL4QvWC9AL5QvhCtQLSQPrC9oLSQPaC1sD6QvvC94L6QveC9gL7QvzC+IL7QviC9wL8Qv3C+YL8QvmC+AL9QvfCuQL+wv/C+oL+wvqC0cD/gsDDO4L/gvuC+gLAgwHDPILAgzyC+wLBgwLDPYLBgz2C/ALCQzdCvQLLQN/C/0LLQP9C/kLfguHCwEMfgsBDPwLhguPCwUMhgsFDAAMjguXCwoMjgsKDAQMlgvbCggM"
+ }
+ ]
+}
diff --git a/scenes/obj.txt b/scenes/obj.txt
new file mode 100644
index 00000000..ffc1b407
--- /dev/null
+++ b/scenes/obj.txt
@@ -0,0 +1,198 @@
+// Emissive material (light)
+MATERIAL 0
+RGB 1 1 1
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 5
+TRANS 0
+
+// Diffuse white
+MATERIAL 1
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse red
+MATERIAL 2
+RGB .85 .35 .35
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Diffuse green
+MATERIAL 3
+RGB .35 .85 .35
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Specular white
+MATERIAL 4
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 0
+
+// Refractive white
+MATERIAL 5
+RGB 0 0 0
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 0
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Transmissive purple
+MATERIAL 6
+RGB .3 .1 .7
+SPECEX 0
+SPECRGB 0 0 0
+REFL 0
+REFR 0
+REFRIOR 0
+EMITTANCE 0
+TRANS 1
+
+// Glass white
+MATERIAL 7
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 1
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Plastic white
+MATERIAL 8
+RGB .98 .98 .98
+SPECEX 0
+SPECRGB .98 .98 .98
+REFL 1
+REFR 0
+REFRIOR 1.55
+EMITTANCE 0
+TRANS 0
+
+// Camera--------------------------------------------
+CAMERA
+RES 800 800
+FOVY 45
+ITERATIONS 5000
+DEPTH 8
+FILE obj
+EYE 0.0 5 10.5
+LOOKAT 0 5 0
+UP 0 1 0
+
+
+// Ceiling light
+OBJECT 0
+cube
+material 0
+TRANS 0 10 0
+ROTAT 0 0 0
+SCALE 5 .1 5
+VEL 0 0 0
+
+// Floor
+OBJECT 1
+cube
+material 1
+TRANS 0 0 0
+ROTAT 0 0 0
+SCALE 10 .01 10
+VEL 0 0 0
+
+// Ceiling
+OBJECT 2
+cube
+material 1
+TRANS 0 10 0
+ROTAT 0 0 90
+SCALE .01 10 10
+VEL 0 0 0
+
+// Back wall
+OBJECT 3
+cube
+material 1
+TRANS 0 5 -5
+ROTAT 0 90 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Left wall
+OBJECT 4
+cube
+material 2
+TRANS -5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+// Right wall
+OBJECT 5
+cube
+material 3
+TRANS 5 5 0
+ROTAT 0 0 0
+SCALE .01 10 10
+VEL 0 0 0
+
+//OBJECT 6
+//gltf gltf/teapot.gltf
+//material 1
+//TRANS 0 1 0
+//ROTAT 0 0 0
+//SCALE 1 1 1
+//VEL 0 0 0
+
+// Mesh
+//OBJECT 6
+//gltf gltf/mario/mario.gltf
+//material 1
+//TRANS 0 0 0
+//ROTAT -90 0 0
+//SCALE 1 1 1
+//VEL 0 0 0
+
+//OBJECT 6
+//obj obj/bunny_10s.obj
+//material 1
+//TRANS 0 2 0
+//ROTAT 0 0 0
+//SCALE 30 30 30
+//VEL 0 0 0
+
+
+OBJECT 6
+gltf gltf/dragon/dragon.gltf
+material 1
+TRANS 0 3 0
+ROTAT 90 0 -90
+SCALE 8 8 8
+VEL 0 0 0
\ No newline at end of file
diff --git a/scenes/sphere.txt b/scenes/sphere.txt
index a74b5458..426e38a5 100644
--- a/scenes/sphere.txt
+++ b/scenes/sphere.txt
@@ -7,6 +7,7 @@ REFL 0
REFR 0
REFRIOR 0
EMITTANCE 5
+TRANS 0
// Camera
CAMERA
diff --git a/src/gltf/json.hpp b/src/gltf/json.hpp
new file mode 100644
index 00000000..87475ab3
--- /dev/null
+++ b/src/gltf/json.hpp
@@ -0,0 +1,26753 @@
+/*
+ __ _____ _____ _____
+ __| | __| | | | JSON for Modern C++
+| | |__ | | | | | | version 3.10.4
+|_____|_____|_____|_|___| https://github.com/nlohmann/json
+
+Licensed under the MIT License .
+SPDX-License-Identifier: MIT
+Copyright (c) 2013-2019 Niels Lohmann .
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+#ifndef INCLUDE_NLOHMANN_JSON_HPP_
+#define INCLUDE_NLOHMANN_JSON_HPP_
+
+#define NLOHMANN_JSON_VERSION_MAJOR 3
+#define NLOHMANN_JSON_VERSION_MINOR 10
+#define NLOHMANN_JSON_VERSION_PATCH 4
+
+#include // all_of, find, for_each
+#include // nullptr_t, ptrdiff_t, size_t
+#include // hash, less
+#include // initializer_list
+#ifndef JSON_NO_IO
+ #include // istream, ostream
+#endif // JSON_NO_IO
+#include // random_access_iterator_tag
+#include // unique_ptr
+#include // accumulate
+#include // string, stoi, to_string
+#include // declval, forward, move, pair, swap
+#include // vector
+
+// #include
+
+
+#include
+#include
+
+// #include
+
+
+#include // transform
+#include // array
+#include // forward_list
+#include // inserter, front_inserter, end
+#include