Home » Blogs » Introducing Compressonator v4.4 with AVX-512 support for BC1 Encoding

Introducing Compressonator v4.4 with AVX-512 support for BC1 Encoding

Denis Levesque
Denis Levesque

Denis Levesque is a Software Engineer and part of the Developer Tools group at AMD. He currently works primarily on Compressonator.

link to Introducing Compressonator v4.4 with AVX-512 support for BC1 Encoding

Compressonator v4.4 is now available!

The new features included with this release are summarised below, but if you want to jump in and try it for yourself the Compressonator page contains all of the download and documentation links.

CPU SIMD support in Compressonator Core

The performance of BC1 compression on the CPU in Compressonator Core has been improved by up to 50% (depending on the input texture) with no difference in quality through the implementation of SIMD instructions.

Three variations of the SIMD code exist using different instruction set extensions (SSE4, AVX2, and AVX-512). The appropriate variation is automatically chosen by selecting the most modern instruction set extensions supported by the CPU running the code, but a few new functions have also been added to the Compressonator Core interface to allow for manual setting of the instruction set to use if desired.

The five newly added functions to the API are: EnableSSE4(), EnableAVX2(), EnableAVX512(), DisableSIMD(), and GetEnabledSIMDExtension(). The first three allow users to enable the code path for the specified instruction set extension, but only if the CPU supports it. Only one can be enabled at a time. The fourth function, DisableSIMD(), will turn off all SIMD instructions and revert back to the original code. The final function allows users to query the currently enabled code path by returning an integer representing the enabled SIMD extensions (check cmp_core.h for more information). If no manual setting has been done, the return value will correspond to whatever has been automatically detected to be the newest extensions available on the current CPU. Otherwise, the return value will be whatever was manually set (if the manually set instruction set was supported).

Future releases will work on expanding the SIMD support to the rest of the BCn codecs in Compressonator Core.

Mipmap Generation Updates

A new option has been added to Compressonator CLI: FilterGamma. The option allows users to choose a gamma correction level to apply to images while generating mipmaps. This brings the mipmap generation capabilities of Compressonator CLI closer to Compressonator GUI, which already has this functionality. The valid range of values to pass to the FilterGamma option are between 1.0 and 2.6 and can be used like this:

    compressonatorcli -miplevels 5 -FilterGamma 1.6 example.png output.dds

Additionally, the stopping condition for mipmap generation has been updated. Previously, mipmap generation would stop when either the width or height were below the desired size, now it only stops once both the width and height are below the requested minimum size. This update also applies to cases were the minimum size is 1, the lowest mipmap level will always have the size 1×1.

Additional Changes

App Updates

  • Dependency on DirectX 9 and DirectX 10 DLL files has been replaced with the use of DirectXTex

  • Silent option in Compressonator CLI properly disables all output other than fatal errors.

  • Edited documentation to fix typo for “GenGPUMipMaps” option

SDK Updates

  • 16-bit PNG support added to Compressonator Framework.

  • Removed implicit channel swizzling from all codec buffer classes, ensuring more consistent behaviour

  • Improved BC7 codec performance by keeping initialization data in memory rather than freeing it after each call to CMP_ConvertTexture

  • Fixed compilation errors for BC6H core shader

Build Updates

  • The default location of build artifacts has changed to the “build/bin” folder, and build-related scripts have been moved to the “build” folder.

  • Building Compressonator has been slightly changed to standardize how to point to external dependencies, new environment variables have been introduced: QT_DIR, OPENCV_DIR, and VULKAN_DIR (check the documentation for more info).

  • A new CMake project has been added for building the Compressonator SDK in various configurations, it can be found at “build/sdk”.

  • Renamed CMP_TestCore project to CMP_UnitTests and expanded the suite of unit tests

Download Compressonator v4.4 today

The latest release of Compressonator is available on GitHub.

Also, check out the Compressonator documentation to get started.

Denis Levesque
Denis Levesque

Denis Levesque is a Software Engineer and part of the Developer Tools group at AMD. He currently works primarily on Compressonator.

Enjoy this blog post? If you found it useful, why not share it with other game developers?

You may also like...

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

AMD GPUOpen videos

Words not enough? How about pictures? How about moving pictures? We have some amazing videos to share with you!

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

AMD GPUOpen publications

Discover our published publications.