Skip to content

Commit

Permalink
Remove some dead code when writing (AcademySoftwareFoundation#1592)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kingsawyer committed Dec 10, 2023
1 parent 231d0e9 commit 9be75dc
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/lib/OpenEXRCore/internal_dwa_compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9be75dc

Please sign in to comment.