Add config option for switching between CSJ2K and BuggyJPEG.
parent
fa38cf3ee8
commit
2362da2ad0
|
@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
|
|
||||||
#region IRegionModule
|
#region IRegionModule
|
||||||
|
|
||||||
|
private bool m_useCSJ2K = true;
|
||||||
|
|
||||||
public string Name { get { return "J2KDecoderModule"; } }
|
public string Name { get { return "J2KDecoderModule"; } }
|
||||||
public bool IsSharedModule { get { return true; } }
|
public bool IsSharedModule { get { return true; } }
|
||||||
|
|
||||||
|
@ -73,6 +75,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
||||||
|
|
||||||
|
IConfig startupConfig = source.Configs["Startup"];
|
||||||
|
if (startupConfig != null)
|
||||||
|
{
|
||||||
|
m_useCSJ2K = startupConfig.GetBoolean("UseCSJ2K", m_useCSJ2K);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -144,15 +152,13 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
/// <param name="j2kData">JPEG2000 data</param>
|
/// <param name="j2kData">JPEG2000 data</param>
|
||||||
private void DoJ2KDecode(UUID assetID, byte[] j2kData)
|
private void DoJ2KDecode(UUID assetID, byte[] j2kData)
|
||||||
{
|
{
|
||||||
bool USE_CSJ2K = true;
|
|
||||||
|
|
||||||
//int DecodeTime = 0;
|
//int DecodeTime = 0;
|
||||||
//DecodeTime = Environment.TickCount;
|
//DecodeTime = Environment.TickCount;
|
||||||
OpenJPEG.J2KLayerInfo[] layers;
|
OpenJPEG.J2KLayerInfo[] layers;
|
||||||
|
|
||||||
if (!TryLoadCacheForAsset(assetID, out layers))
|
if (!TryLoadCacheForAsset(assetID, out layers))
|
||||||
{
|
{
|
||||||
if (USE_CSJ2K)
|
if (m_useCSJ2K)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -257,6 +257,10 @@
|
||||||
; to be enabled from the console if this is set
|
; to be enabled from the console if this is set
|
||||||
; StartDisabled = false
|
; StartDisabled = false
|
||||||
|
|
||||||
|
; Image decoding. Use CSJ2K for layer boundary decoding if true,
|
||||||
|
; OpenJPEG if false
|
||||||
|
; UseCSJ2K = true
|
||||||
|
|
||||||
[SMTP]
|
[SMTP]
|
||||||
enabled=false
|
enabled=false
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue