From 9be75dc78fb942725f1c87a5f4daee41a74942ed Mon Sep 17 00:00:00 2001 From: Dave Sawyer Date: Sat, 9 Dec 2023 22:53:55 -0800 Subject: [PATCH] Remove some dead code when writing (#1592) The file version is set to 2 above for writing files (it is impossible write version 1 data). Please refer to the history of history of ImfDwaCompressor.cpp or look at the reading code for details on the version 1 format. 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..729b0d7425 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 DWA v2, 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);