aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-03-08 20:29:26 +0000
committerMelanie2010-03-08 20:29:26 +0000
commit2362da2ad03d84569da9cf558a84b9942afac852 (patch)
treee862a46b9232cc0ac0dc3a6a4277e397a311f44e
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.
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs12
-rw-r--r--bin/OpenSim.ini.example4
2 files changed, 13 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 {
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 309ce88..74100f5 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -257,6 +257,10 @@
257 ; to be enabled from the console if this is set 257 ; to be enabled from the console if this is set
258 ; StartDisabled = false 258 ; StartDisabled = false
259 259
260 ; Image decoding. Use CSJ2K for layer boundary decoding if true,
261 ; OpenJPEG if false
262 ; UseCSJ2K = true
263
260[SMTP] 264[SMTP]
261 enabled=false 265 enabled=false
262 266