diff --git a/basisu_tool.cpp b/basisu_tool.cpp index 6751d15c..b065ba9e 100644 --- a/basisu_tool.cpp +++ b/basisu_tool.cpp @@ -1508,11 +1508,13 @@ static bool unpack_and_validate_ktx2_file( printf("DFD hex values:\n"); for (uint32_t i = 0; i < dec.get_dfd().size(); i++) { - if (i) - printf(","); printf("0x%X", dec.get_dfd()[i]); + if ((i + 1) != dec.get_dfd().size()) + printf(","); + if ((i & 3) == 3) + printf("\n"); } - printf("\n\n"); + printf("\n"); printf("Total key values: %u\n", dec.get_key_values().size()); diff --git a/encoder/basisu_comp.cpp b/encoder/basisu_comp.cpp index 5ba66c05..8cf1584d 100644 --- a/encoder/basisu_comp.cpp +++ b/encoder/basisu_comp.cpp @@ -2970,12 +2970,17 @@ namespace basisu // HDR TODO - what is the best Khronos DFD to use for UASTC HDR? static uint8_t g_ktx2_uastc_hdr_nonalpha_dfd[44] = { - 0x2C,0x0,0x0,0x0, 0x0,0x0,0x0,0x0, - 0x2,0x0,0x28,0x0, 0xA7,0x1,0x1,0x0, - 0x3,0x3,0x0,0x0, 0x10,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0, 0x0,0x0,0x7F,0x4, - 0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0, - 0xFF,0xFF,0xFF,0xFF + 0x2C,0x0,0x0,0x0, // 0 totalSize + 0x0,0x0,0x0,0x0, // 1 descriptorType/vendorId + 0x2,0x0,0x28,0x0, // 2 descriptorBlockSize/versionNumber + 0xA7,0x1,0x1,0x0, // 3 flags, transferFunction, colorPrimaries, colorModel + 0x3,0x3,0x0,0x0, // 4 texelBlockDimension0-texelBlockDimension3 + 0x10,0x0,0x0,0x0, // 5 bytesPlane0-bytesPlane3 + 0x0,0x0,0x0,0x0, // 6 bytesPlane4-bytesPlane7 + 0x0,0x0,0x7F,0x80, // 7 bitLength/bitOffset/channelType and Qualifer flags (KHR_DF_SAMPLE_DATATYPE_FLOAT etc.) + 0x0,0x0,0x0,0x0, // 8 samplePosition0-samplePosition3 + 0x0,0x0,0x0,0x0, // 9 sampleLower (0.0) + 0x00, 0x00, 0x80, 0xF3 // 10 sampleHigher (?) }; void basis_compressor::get_dfd(uint8_vec &dfd, const basist::ktx2_header &header)