This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// uncompressed png writer & reader | |
// supports only 8-bit and 16-bit formats | |
// Performance comparison for 8192x8192 BGRA8 image (256MB) | |
// Compiled with "clang -O2", AVX2 requires extra "-mavx2" or "/arch:AVX2" argument | |
// | |
// For libpng (compressed) uses default libpng/zlib compression settings | |
// For libpng (uncompressed) case following two functions are used: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define STR2(x) #x | |
#define STR(x) STR2(x) | |
#ifdef _WIN32 | |
#define INCBIN_SECTION ".rdata, \"dr\"" | |
#else | |
#define INCBIN_SECTION ".rodata" | |
#endif |