From feee683ce53415da912cd7545783da06f522e74b Mon Sep 17 00:00:00 2001 From: Dave Sawyer Date: Fri, 10 Nov 2023 14:08:56 -0800 Subject: [PATCH 1/2] Remove dead code the version is set to 2 above, so it is impossible to take the first branch. Signed-off-by: Dave Sawyer --- src/lib/OpenEXRCore/internal_dwa_compressor.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/OpenEXRCore/internal_dwa_compressor.h b/src/lib/OpenEXRCore/internal_dwa_compressor.h index 219cc3f3e6..efc0f6f682 100644 --- a/src/lib/OpenEXRCore/internal_dwa_compressor.h +++ b/src/lib/OpenEXRCore/internal_dwa_compressor.h @@ -251,20 +251,11 @@ DwaCompressor_compress (DwaCompressor* me) uint8_t* outDataPtr; uint8_t* inDataPtr; - // Starting with 2, we write the channel + // Starting with fileversion 2, we write the channel // classification rules into the file - if (fileVersion < 2) - { - me->_channelRules = sLegacyChannelRules; - me->_channelRuleCount = - sizeof (sLegacyChannelRules) / sizeof (Classifier); - } - else - { - me->_channelRules = sDefaultChannelRules; - me->_channelRuleCount = - sizeof (sDefaultChannelRules) / sizeof (Classifier); - } + me->_channelRules = sDefaultChannelRules; + me->_channelRuleCount = + sizeof (sDefaultChannelRules) / sizeof (Classifier); rv = DwaCompressor_initializeBuffers (me, &outBufferSize); From 2d2e85288020c13373a34a1a07abd1e4323bdc07 Mon Sep 17 00:00:00 2001 From: Dave Sawyer Date: Wed, 6 Dec 2023 16:04:01 -0800 Subject: [PATCH 2/2] update comment to say DWA Signed-off-by: Dave Sawyer --- src/lib/OpenEXRCore/internal_dwa_compressor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/OpenEXRCore/internal_dwa_compressor.h b/src/lib/OpenEXRCore/internal_dwa_compressor.h index efc0f6f682..729b0d7425 100644 --- a/src/lib/OpenEXRCore/internal_dwa_compressor.h +++ b/src/lib/OpenEXRCore/internal_dwa_compressor.h @@ -251,7 +251,7 @@ DwaCompressor_compress (DwaCompressor* me) uint8_t* outDataPtr; uint8_t* inDataPtr; - // Starting with fileversion 2, we write the channel + // Starting with DWA v2, we write the channel // classification rules into the file me->_channelRules = sDefaultChannelRules; me->_channelRuleCount =