J2C stream length estimation back to old
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "apr_dso.h"
|
||||
|
||||
#include "lldir.h"
|
||||
#include "../llxml/llcontrol.h"
|
||||
#include "llimagej2c.h"
|
||||
#include "llmemtype.h"
|
||||
|
||||
@@ -382,6 +383,12 @@ S32 LLImageJ2C::calcHeaderSize()
|
||||
// to load discard_level (including header and higher discard levels)
|
||||
S32 LLImageJ2C::calcDataSize(S32 discard_level)
|
||||
{
|
||||
static const LLCachedControl<bool> legacy_size("SianaLegacyJ2CSize", false);
|
||||
|
||||
if (legacy_size) {
|
||||
return calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), discard_level, mRate);
|
||||
}
|
||||
|
||||
discard_level = llclamp(discard_level, 0, MAX_DISCARD_LEVEL);
|
||||
|
||||
if ( mAreaUsedForDataSizeCalcs != (getHeight() * getWidth())
|
||||
|
||||
@@ -9,6 +9,18 @@
|
||||
<string>settings_rlv.xml</string>
|
||||
</array>
|
||||
|
||||
<key>SianaLegacyJ2CSize</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use older JPEG2000 size estimation method</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
|
||||
<key>SpellDownloadURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
Reference in New Issue
Block a user