aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-03-08 20:29:26 +0000
committerMelanie2010-03-08 20:29:26 +0000
commit2362da2ad03d84569da9cf558a84b9942afac852 (patch)
treee862a46b9232cc0ac0dc3a6a4277e397a311f44e /OpenSim/Region
parent* Added code to support either CSJ2K or OpenJPEG texture decoding. Currently ... (diff)
downloadopensim-SC_OLD-2362da2ad03d84569da9cf558a84b9942afac852.zip
opensim-SC_OLD-2362da2ad03d84569da9cf558a84b9942afac852.tar.gz
opensim-SC_OLD-2362da2ad03d84569da9cf558a84b9942afac852.tar.bz2
opensim-SC_OLD-2362da2ad03d84569da9cf558a84b9942afac852.tar.xz
Add config option for switching between CSJ2K and BuggyJPEG.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 5b022ac..1386e86 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
60 60
61 #region IRegionModule 61 #region IRegionModule
62 62
63 private bool m_useCSJ2K = true;
64
63 public string Name { get { return "J2KDecoderModule"; } } 65 public string Name { get { return "J2KDecoderModule"; } }
64 public bool IsSharedModule { get { return true; } } 66 public bool IsSharedModule { get { return true; } }
65 67
@@ -73,6 +75,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
73 m_scene = scene; 75 m_scene = scene;
74 76
75 scene.RegisterModuleInterface<IJ2KDecoder>(this); 77 scene.RegisterModuleInterface<IJ2KDecoder>(this);
78
79 IConfig startupConfig = source.Configs["Startup"];
80 if (startupConfig != null)
81 {
82 m_useCSJ2K = startupConfig.GetBoolean("UseCSJ2K", m_useCSJ2K);
83 }
76 } 84 }
77 85
78 public void PostInitialise() 86 public void PostInitialise()
@@ -144,15 +152,13 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
144 /// <param name="j2kData">JPEG2000 data</param> 152 /// <param name="j2kData">JPEG2000 data</param>
145 private void DoJ2KDecode(UUID assetID, byte[] j2kData) 153 private void DoJ2KDecode(UUID assetID, byte[] j2kData)
146 { 154 {
147 bool USE_CSJ2K = true;
148
149 //int DecodeTime = 0; 155 //int DecodeTime = 0;
150 //DecodeTime = Environment.TickCount; 156 //DecodeTime = Environment.TickCount;
151 OpenJPEG.J2KLayerInfo[] layers; 157 OpenJPEG.J2KLayerInfo[] layers;
152 158
153 if (!TryLoadCacheForAsset(assetID, out layers)) 159 if (!TryLoadCacheForAsset(assetID, out layers))
154 { 160 {
155 if (USE_CSJ2K) 161 if (m_useCSJ2K)
156 { 162 {
157 try 163 try
158 { 164 {