commit | 6eed60043b7b93407982d9fd3f1822aaf46afc17 | [log] [tgz] |
---|---|---|
author | Alexander Böhn <fish2000@users.noreply.github.com> | Fri Jan 25 23:56:45 2019 -0500 |
committer | Jeff McGlynn <jeff@jeffmcglynn.com> | Sat Jan 26 09:49:30 2019 -0800 |
tree | 9b06b171872b63830288e3da53a67d20cfdb2538 | |
parent | 9b150919fd518f0755d6624ddc36163467ced431 [diff] |
Fixed repeated variable name in README.md’s sample … Both the output `std::vector<uint8_t>` and the success/fail `bool` were named `result` – which that wouldn’t work. How about `bool success`?
astc-codec is a software ASTC decoder implementation, which supports the ASTC LDR profile.
Example usage:
#include <astc-codec/astc-codec.h> // ... std::vector<uint8_t> astc = LoadMyASTCData(); const size_t width = 640; const size_t height = 480; std::vector<uint8_t> result; result.resize(width * height * 4); bool success = astc_codec::ASTCDecompressToRGBA( astc.data(), astc.size(), width, height, astc_codec::FootprintType::k4x4, result.data(), result.size(), /* stride */ width * 4);
Install Bazel, and then run:
bazel build :astc_codec -c opt
astc-codec has been tested on Mac and Linux.
bazel test //...
Install CMake, and the run:
mkdir build && cd build && cmake .. && make
Or open the project in your favorite IDE and import CMakeLists.txt.
In the build directory, execute:
ctest
See CONTRIBUTING.md for important contributing requirements.
astc-codec project is licensed under the Apache License Version 2.0. You can find a copy of it in LICENSE.
This is not an officially supported Google product.