Merge branch 'master' into moveSel2CCObject
|
@ -22,7 +22,12 @@
|
|||
#include <Box2D/Collision/Shapes/b2CircleShape.h>
|
||||
#include <Box2D/Collision/Shapes/b2PolygonShape.h>
|
||||
|
||||
#ifdef SHP
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;
|
||||
|
|
|
@ -17,11 +17,15 @@
|
|||
*/
|
||||
|
||||
#include <Box2D/Common/b2Settings.h>
|
||||
#ifdef SHP
|
||||
#include <FBaseSys.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
#ifdef SHP
|
||||
#include <FBaseSys.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1279009838" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1137403177" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1388652374" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1768946738" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -44,9 +44,7 @@
|
|||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.638003594" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.29808765" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.29808765" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1136434176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1824882157" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
|
@ -56,6 +54,12 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Collision"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Common"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Dynamics"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Rope"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
@ -88,7 +92,7 @@
|
|||
<option id="gnu.cpp.compiler.lib.release.option.optimization.level.401070766" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.lib.release.option.debugging.level.1515853804" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.315343143" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../.."/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.811835144" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -98,9 +102,7 @@
|
|||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.514457469" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1198096657" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../.."/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1198096657" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.624842426" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1478061636" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
|
@ -110,6 +112,12 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Collision"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Common"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Dynamics"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Rope"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
|
|
@ -81,25 +81,30 @@
|
|||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>Box2D.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Box2D.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Collision</name>
|
||||
<type>2</type>
|
||||
<location>/home/xm/workspace/cocos2d-x/Box2D/Collision</location>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Collision</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Common</name>
|
||||
<type>2</type>
|
||||
<location>/home/xm/workspace/cocos2d-x/Box2D/Common</location>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Dynamics</name>
|
||||
<type>2</type>
|
||||
<location>/home/xm/workspace/cocos2d-x/Box2D/Dynamics</location>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Dynamics</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Rope</name>
|
||||
<type>2</type>
|
||||
<location>/home/xm/workspace/cocos2d-x/Box2D/Rope</location>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Rope</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
|
72
CHANGELOG
|
@ -1,23 +1,69 @@
|
|||
cocos2d-1.0.1-x-0.11.0 @ Jan.13 2012
|
||||
[blackberry]
|
||||
Feature #907: support blackberry playbook
|
||||
[all platforms]
|
||||
Bug #752: fix a bug that enable and disable touch more times in touch handler callback function may cause memory leak
|
||||
Bug #911: fix a bug that TextureCache::addUIImage() cannot create texture when key is null
|
||||
Bug #920: export export functions in CCAffineTransform with CC_DLL
|
||||
Bug #922: make CCTexture2D::setPVRImagesHavePremultipliedAlpha() to be a static function
|
||||
Bug #926: fix a crash caused by RTTI when running TouchesTest
|
||||
Bug #936: fix a bug that touch menu item may crash when selector is null
|
||||
Feature #892: use RTTI to simplify the codes
|
||||
Feature #903: add touch index for CCTouch
|
||||
Refactor #934: add 'isEqual' function for CCString, make CCObject::isEqual to a virtual function
|
||||
Refactor #940: use new icons and new background pictures with new logo of cocos2d-x
|
||||
[android]
|
||||
Bug #923: fix a bug that CCTextureCache::addImageAsync() crashes when a game enters foreground from background
|
||||
Bug #906: remove unneeded codes in CCImage_android.cpp
|
||||
Bug #910: fix a bug that create-android-project.bat may erase exist folder with appointed name
|
||||
Bug #884: fix a crash error caused by CocosDenshion on android simulator
|
||||
Bug #921: fix a bug that accelerometer axes inverted in Motorola Xoom tablet
|
||||
Bug #928: fix a bug that 16-bit texture is changed to 32-bit after application enter foreground
|
||||
Bug #935: fix a bug that terminateProcessJNI() invoke wrong jni function
|
||||
Bug #937: fix a compiling error on android x86
|
||||
Bug #941: fix a bug that volume of background music may not in [0, 1.0]
|
||||
Feature #887: define GL_GLEXT_PROTOTYPES = 1 automatically when compile on ndk r7
|
||||
Feature #919: improve build_native.sh and create-android-project.sh
|
||||
Refactor #924: make loading music resources thread safe
|
||||
Document #837: Write a document describes how to use jni
|
||||
Document #914: update document to fit android r5~r7
|
||||
[iOS]
|
||||
Bug #917: implement CCFileUtils::getFileDataFromZip()
|
||||
Feature #893: remove cached data when receiving memory warning on iOS
|
||||
[bada]
|
||||
Bug #918: fix a compiling error after renaming airplay to marmalade
|
||||
Bug #927: fix a crash caused by invoking unloadEffect after invoking stopEffect
|
||||
Bug #938: fix a bug that glGenFramebuffersOES isn't supported on wave m device
|
||||
Bug #943: fix a bug that box2d can't be compiled successfully on bada sdk 1.2.1
|
||||
Refactor #904: Recreate bada 2.0 projects
|
||||
[win32]
|
||||
Bug #915: fix a bug that msvc template uses old version of .cpp files
|
||||
[linux]
|
||||
Bug #888: fix compiling error with eclipse
|
||||
Bug #930: fix a crash caused by load jpg format files
|
||||
[marmalade]
|
||||
Refactor #908: merge marmalade to latest cocos2d-x source
|
||||
|
||||
cocos2d-1.0.1-x-0.10.0 @ Dec.2 2011
|
||||
[bada]
|
||||
Feature #223 integrate cocos2d-bada branch to master
|
||||
Bug #852 fix a bug that CCSpriteBatchNode cannot be drawn correctly
|
||||
[all platforms]
|
||||
Feature #854 integrate pthread and write a test case on all platforms
|
||||
Feature #465 implement CCTextureCache::addImageAsync()
|
||||
Feature #850 upgrade box2d from 2.1.2 to last 2.2.1
|
||||
Feature #781 add functions for effects
|
||||
Feature #760 add methods to get/set CCDirector::m_pNotificationNode
|
||||
Bug #883 fix the crash of SpriteTest
|
||||
Refactor #879 use CCAssert() instead of assert()
|
||||
Feature #854 integrate pthread and write a test case on all platforms
|
||||
Feature #465 implement CCTextureCache::addImageAsync()
|
||||
Feature #850 upgrade box2d from 2.1.2 to last 2.2.1
|
||||
Feature #781 add functions for effects
|
||||
Feature #760 add methods to get/set CCDirector::m_pNotificationNode
|
||||
Bug #883 fix the crash of SpriteTest
|
||||
Refactor #879 use CCAssert() instead of assert()
|
||||
Document #882 Write a document describes some cautions about using pthread
|
||||
[android]
|
||||
Feature #838 support android x86 platform
|
||||
Bug #758 fix a bug that custom TTF fonts causing low memory
|
||||
Bug #848 fix a bug that accelerometer values are wrong if the content is scaled
|
||||
Bug #885 fix a bug that SimpleAudioEngine::setEffectVolume() don't take effect immediately
|
||||
Document #864 write a describe how to build on sdk 4.0 & ndk-r7
|
||||
Document #878 write a document describe how to build project for x86 android
|
||||
Feature #838 support android x86 platform
|
||||
Bug #758 fix a bug that custom TTF fonts causing low memory
|
||||
Bug #848 fix a bug that accelerometer values are wrong if the content is scaled
|
||||
Bug #885 fix a bug that SimpleAudioEngine::setEffectVolume() don't take effect immediately
|
||||
Document #864 write a describe how to build on sdk 4.0 & ndk-r7
|
||||
Document #878 write a document describe how to build project for x86 android
|
||||
Document #881 write a document describes building android ndk project with ndk-r7
|
||||
[linux]
|
||||
Bug #780 fix build error on ubuntu 11.0
|
||||
|
|
|
@ -397,7 +397,7 @@ void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
|||
|
||||
if (s_pBackPlayer != NULL)
|
||||
{
|
||||
s_pBackPlayer->SetVolume(ceil(volume));
|
||||
s_pBackPlayer->SetVolume(ceil(volume*99));
|
||||
}
|
||||
s_fBackgroundMusicVolume = volume;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ void SimpleAudioEngine::setEffectsVolume(float volume)
|
|||
{
|
||||
if (it->second != NULL)
|
||||
{
|
||||
it->second->SetVolume(ceil(volume));
|
||||
it->second->SetVolume(ceil(volume*99));
|
||||
}
|
||||
}
|
||||
s_fEffectsVolume = volume;
|
||||
|
@ -446,13 +446,7 @@ unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop/*
|
|||
AppLog("CCAudioOut instance must not be NULL, id = %d", p->first);
|
||||
return 0;
|
||||
}
|
||||
p->second->SetVolume((int) (s_fEffectsVolume * 99));
|
||||
int volume = p->second->GetVolume();
|
||||
|
||||
if (s_fEffectsVolume > 0.0f && volume == 0)
|
||||
{
|
||||
p->second->SetVolume(1);
|
||||
}
|
||||
p->second->SetVolume(ceil(s_fEffectsVolume * 99));
|
||||
|
||||
if (AUDIOOUT_STATE_PLAYING == p->second->GetState())
|
||||
{
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.2020537008" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.886209200" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1002280254" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1604049990" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -41,8 +41,8 @@
|
|||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.206236808" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.828037565" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.985313341" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.370598124" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -55,7 +55,7 @@
|
|||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.430688089" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1630974641" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/lib}""/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1207468004" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -68,7 +68,9 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="android|third_party/fmod/tools|third_party/fmod/fmoddesignerapi|third_party/fmod/examples|third_party/fmod/documentation|wophone|win32|proj.wophone|proj.win32|proj.airplay|iphone|airplay" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -104,8 +106,8 @@
|
|||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1962013303" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.2015755429" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1414683978" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1557365568" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -113,8 +115,8 @@
|
|||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1295172282" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.1006696632" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.92938039" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/inc}""/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.757092405" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -127,7 +129,7 @@
|
|||
</option>
|
||||
<option defaultValue="true" id="gnu.cpp.link.option.shared.1840009551" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
|
||||
<option id="gnu.cpp.link.option.paths.1502506408" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/third_party/fmod/api/lib}""/>
|
||||
<listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1952243970" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -140,7 +142,9 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="android|third_party/fmod/tools|third_party/fmod/fmoddesignerapi|third_party/fmod/examples|third_party/fmod/documentation|wophone|win32|proj.wophone|proj.win32|proj.airplay|iphone|airplay" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Linux"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -86,11 +86,6 @@
|
|||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Linux</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>android</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/android</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>include</name>
|
||||
<type>2</type>
|
||||
|
|
|
@ -93,20 +93,13 @@ spriteDog:setPosition(cocos2d.CCPoint(0, winSize.height/4*3))
|
|||
layerFarm:addChild(spriteDog)
|
||||
|
||||
animation = cocos2d.CCAnimation:animation()
|
||||
animation:addFrame(frame0)
|
||||
animation:addFrame(frame1)
|
||||
animation:setDelay(0.5)
|
||||
animation:setName('wait')
|
||||
|
||||
animFrames = cocos2d.CCMutableArray_CCSpriteFrame__:new(2)
|
||||
animFrames:addObject(frame0)
|
||||
animFrames:addObject(frame1)
|
||||
--animation = cocos2d.CCAnimation:animationWithName("wait", 0.5, animFrames)
|
||||
|
||||
animation = cocos2d.CCAnimation:animationWithFrames(animFrames,0.5)
|
||||
|
||||
|
||||
animation = cocos2d.CCAnimation:animationWithFrames(animFrames, 0.5)
|
||||
|
||||
animate = cocos2d.CCAnimate:actionWithAnimation(animation, false);
|
||||
spriteDog:runAction(cocos2d.CCRepeatForever:actionWithAction(animate))
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="8"/>
|
||||
|
||||
<application android:label="@string/app_name"
|
||||
android:debuggable="true">
|
||||
android:debuggable="true" android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name=".HelloLua"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -1,11 +1,2 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "build.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-8
|
||||
target=android-7
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package org.cocos2dx.hellolua;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int icon=0x7f020000;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int test_demo_gl_surfaceview=0x7f050001;
|
||||
public static final int textField=0x7f050000;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int game_demo=0x7f030000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040000;
|
||||
}
|
||||
}
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package org.cocos2dx.hellolua;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int icon=0x7f020000;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int test_demo_gl_surfaceview=0x7f050001;
|
||||
public static final int textField=0x7f050000;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int game_demo=0x7f030000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040000;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,6 +175,14 @@ public class Cocos2dxMusic {
|
|||
}
|
||||
|
||||
public void setBackgroundVolume(float volume){
|
||||
if (volume < 0.0f){
|
||||
volume = 0.0f;
|
||||
}
|
||||
|
||||
if (volume > 1.0f){
|
||||
volume = 1.0f;
|
||||
}
|
||||
|
||||
this.mLeftVolume = this.mRightVolume = volume;
|
||||
if (this.mBackgroundMediaPlayer != null){
|
||||
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
|
||||
|
|
|
@ -64,7 +64,7 @@ bool AppDelegate::initInstance() {
|
|||
// The HelloWorld is designed as HVGA.
|
||||
CCEGLView * pMainWnd = new CCEGLView();
|
||||
CC_BREAK_IF(! pMainWnd
|
||||
|| ! pMainWnd->Create("cocos2d: Hello World", 800, 480,480, 320));
|
||||
|| ! pMainWnd->Create("cocos2d: Hello World", 480, 320 ,480, 320));
|
||||
|
||||
CCFileUtils::setResourcePath("../Resource/");
|
||||
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1378309016">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1378309016" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<macros>
|
||||
<stringMacro name="cocos2dx_loc" type="VALUE_TEXT" value="../../../"/>
|
||||
<stringMacro name="lib_name" type="VALUE_TEXT" value="helloworld"/>
|
||||
</macros>
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
@ -30,11 +26,14 @@
|
|||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.513215504" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.354795965" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.577331571" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/cocos2dx""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Classes}""/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/qnx"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.753894218" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -44,13 +43,7 @@
|
|||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1846873676" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.624794682" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.141168982" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Classes}""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/include""/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.141168982" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1586206751" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
|
@ -65,9 +58,9 @@
|
|||
<listOptionValue builtIn="false" value="cocosdenshion"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1730426040" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/cocos2dx/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/third_party/fmod/api/lib""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.338357910" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -80,7 +73,8 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="wophone|win32|airplay|ios|android|android/jni" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -89,10 +83,6 @@
|
|||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1261731462">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1261731462" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<macros>
|
||||
<stringMacro name="cocos2dx_loc" type="VALUE_TEXT" value="../../../"/>
|
||||
<stringMacro name="lib_name" type="VALUE_TEXT" value="helloworld"/>
|
||||
</macros>
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
@ -114,11 +104,14 @@
|
|||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1579660092" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.67257659" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1175073911" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/cocos2dx""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Classes}""/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/qnx"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1649765609" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -128,13 +121,7 @@
|
|||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1992070152" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.925598500" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.1434439101" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.92708570" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Classes}""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/include""/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.92708570" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1314682529" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
|
@ -149,9 +136,9 @@
|
|||
<listOptionValue builtIn="false" value="cocosdenshion"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.510724007" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/cocos2dx/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/third_party/fmod/api/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${cocos2dx_loc}/CocosDenshion/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.970027608" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -164,7 +151,8 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="wophone|win32|airplay|ios|android|android/jni" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -184,18 +172,18 @@
|
|||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1116079203;cdt.managedbuild.tool.gnu.c.compiler.input.1941427790">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1818259119;cdt.managedbuild.tool.gnu.cpp.compiler.input.810275929">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1261731462;cdt.managedbuild.config.gnu.exe.release.1261731462.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1347395052;cdt.managedbuild.tool.gnu.cpp.compiler.input.627062533">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.175957853;cdt.managedbuild.tool.gnu.c.compiler.input.838160662">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1818259119;cdt.managedbuild.tool.gnu.cpp.compiler.input.810275929">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016;cdt.managedbuild.config.gnu.exe.debug.1378309016.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975;cdt.managedbuild.tool.gnu.c.compiler.input.1184297872">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.175957853;cdt.managedbuild.tool.gnu.c.compiler.input.838160662">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.942164708;cdt.managedbuild.tool.gnu.cpp.compiler.input.1074068007">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
|
|
|
@ -88,10 +88,5 @@
|
|||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Classes</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>android</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/android</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -1,11 +1,2 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "build.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-7
|
||||
target=android-15
|
||||
|
|
|
@ -175,6 +175,14 @@ public class Cocos2dxMusic {
|
|||
}
|
||||
|
||||
public void setBackgroundVolume(float volume){
|
||||
if (volume < 0.0f){
|
||||
volume = 0.0f;
|
||||
}
|
||||
|
||||
if (volume > 1.0f){
|
||||
volume = 1.0f;
|
||||
}
|
||||
|
||||
this.mLeftVolume = this.mRightVolume = volume;
|
||||
if (this.mBackgroundMediaPlayer != null){
|
||||
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15
|
|
@ -0,0 +1 @@
|
|||
a9cf0424744f0676e91af84a9ba593790d18ccc4
|
|
@ -0,0 +1 @@
|
|||
9ba2234125d78810b9358b4af48cba1c8cfe523e
|
|
@ -0,0 +1 @@
|
|||
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15
|
|
@ -49,16 +49,31 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.670245200" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1760958269" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1794064552" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1757627798" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Debug"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Debug"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1363839882" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Debug/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Debug/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.697035559" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -121,8 +136,18 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.1928031496" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1701813567" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1061945690" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.pie.2077677263" name="Position Independent Executable (-pie)" superClass="com.qnx.qcc.option.linker.pie" value="true" valueType="boolean"/>
|
||||
|
@ -130,8 +155,13 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Release"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Release"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.2141259757" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Release/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Release/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1321710093" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -197,16 +227,31 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.1232550377" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1289108024" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.29518400" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.150600101" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Profile"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Profile"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1370019185" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Profile/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Profile/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1078171597" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -272,16 +317,31 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.1160718760" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1736864271" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1670627205" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.322375874" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Coverage"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Coverage"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.619637072" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Coverage/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Coverage/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1438498440" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -344,17 +404,32 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.550638471" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1179286572" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.2014666509" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.927694704" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.objectFiles.1451516298" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.526534847" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.439307041" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -419,16 +494,31 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.1840561937" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1031790004" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.931994389" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.681434121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Profile"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator-Profile"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.536840311" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator-Profile/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator-Profile/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.2044213175" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -493,16 +583,31 @@
|
|||
<option id="com.qnx.qcc.option.linker.langcpp.769428310" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1325336223" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="GLESv1_CM"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="mmrndclient"/>
|
||||
<listOptionValue builtIn="false" value="strm"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.2136296969" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1115848281" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Coverage"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator-Coverage"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.259366688" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator-Coverage/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator-Coverage/libchipmunk.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.780133405" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
<name>HelloWorld</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>Box2D</project>
|
||||
<project>chipmunk</project>
|
||||
<project>cocos2dx</project>
|
||||
<project>CocosDenshion</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
|
|
|
@ -52,48 +52,57 @@
|
|||
<category>core.games</category>
|
||||
<asset path="icon.png">icon.png</asset>
|
||||
<asset path="${workspace_loc:/HelloWorld/Resource}">Resource</asset>
|
||||
<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset>
|
||||
<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset>
|
||||
<asset path="${QNX_TARGET}\..\target-override\${CPUVARDIR}/usr/lib/libOpenAL.so" type="Qnx/Elf">lib/libOpenAL.so.1</asset>
|
||||
<asset path="${QNX_TARGET}\..\target-override\${CPUVARDIR}/usr/lib/libalut.so" type="Qnx/Elf">lib/libalut.so.1</asset>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.debug.446234419" name="Device-Debug">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="Device-Debug/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Device-Debug/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Device-Debug/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.release.1265921422" name="Device-Release">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="Device-Release/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Device-Release/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Device-Release/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.1761000041" name="Device-Profile">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="Device-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Device-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Device-Profile/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" name="Device-Coverage">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="Device-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Device-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Device-Coverage/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.debug.660208940" name="Simulator">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="Simulator/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Simulator/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Simulator/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.1237484173" name="Simulator-Profile">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="Simulator-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Simulator-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Simulator-Profile/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" name="Simulator-Coverage">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="Simulator-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="${workspace_loc:/cocos2dx/Simulator-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
|
||||
<asset path="${workspace_loc:/CocosDenshion/Simulator-Coverage/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
</configuration>
|
||||
|
||||
<!-- The icon for the application, which should be 86x86. -->
|
||||
|
|
|
@ -30,16 +30,14 @@
|
|||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug.1477393222" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug">
|
||||
<option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1727235052" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1409960395" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1711056444" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include/chipmunk}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1711056444" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.429805574" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.debug.1368062983" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.lib.debug.option.optimization.level.720444868" name="Optimization Level" superClass="gnu.c.compiler.lib.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.lib.debug.option.debugging.level.342607594" name="Debug Level" superClass="gnu.c.compiler.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.141295110" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include/chipmunk}""/>
|
||||
<listOptionValue builtIn="false" value="../../include/chipmunk/"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.552898382" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -50,6 +48,10 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
@ -81,16 +83,14 @@
|
|||
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release.1020683973" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release">
|
||||
<option id="gnu.cpp.compiler.lib.release.option.optimization.level.800559143" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.lib.release.option.debugging.level.1914202641" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1955575364" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include/chipmunk}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1955575364" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.489464204" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.release.1654590301" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.lib.release.option.optimization.level.577613930" name="Optimization Level" superClass="gnu.c.compiler.lib.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.lib.release.option.debugging.level.692648692" name="Debug Level" superClass="gnu.c.compiler.lib.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1483798947" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include/chipmunk}""/>
|
||||
<listOptionValue builtIn="false" value="../../include/chipmunk/"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1759525822" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -101,6 +101,10 @@
|
|||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace cocos2d {
|
|||
|
||||
const char* cocos2dVersion()
|
||||
{
|
||||
return "cocos2d-1.0.1-x-0.10.0";
|
||||
return "cocos2d-1.0.1-x-0.11.0";
|
||||
}
|
||||
|
||||
}//namespace cocos2d
|
||||
|
|
|
@ -419,6 +419,6 @@ public:
|
|||
static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
|
||||
};
|
||||
|
||||
#endif // __ACTION_CCEASE_ACTION_H__
|
||||
|
||||
}
|
||||
|
||||
#endif // __ACTION_CCEASE_ACTION_H__
|
||||
|
|
|
@ -78,6 +78,9 @@ public:
|
|||
*/
|
||||
virtual void registerWithTouchDispatcher(void);
|
||||
|
||||
virtual void touchDelegateRetain();
|
||||
virtual void touchDelegateRelease();
|
||||
|
||||
/** whether or not it will receive Touch events.
|
||||
You can enable / disable touch events with this property.
|
||||
Only the touches of this node will be affected. This "method" is not propagated to it's children.
|
||||
|
|
|
@ -70,12 +70,12 @@ public:
|
|||
* In TouchesTest, class Padle inherits from CCSprite and CCTargetedTouchDelegate.
|
||||
* When it invoke CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true),
|
||||
* it will crash in CCTouchHandler::initWithDelegate() because of dynamic_cast() on android.
|
||||
* I don't know why, so add these functions for the subclass to invoke it's know retain() and
|
||||
* I don't know why, so add these functions for the subclass to invoke it's own retain() and
|
||||
* release().
|
||||
* More detain info please refer issue #926(cocos2d-x).
|
||||
*/
|
||||
virtual void touchDelegateRetain(){}
|
||||
virtual void touchDelegateRelease(){}
|
||||
virtual void touchDelegateRetain() = 0;
|
||||
virtual void touchDelegateRelease() = 0;
|
||||
|
||||
// functions for script call back
|
||||
inline void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName)
|
||||
|
|
|
@ -221,6 +221,16 @@ void CCLayer::onEnterTransitionDidFinish()
|
|||
CCNode::onEnterTransitionDidFinish();
|
||||
}
|
||||
|
||||
void CCLayer::touchDelegateRetain()
|
||||
{
|
||||
retain();
|
||||
}
|
||||
|
||||
void CCLayer::touchDelegateRelease()
|
||||
{
|
||||
release();
|
||||
}
|
||||
|
||||
bool CCLayer::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent)
|
||||
{
|
||||
CC_UNUSED_PARAM(pTouch);
|
||||
|
|
|
@ -384,4 +384,8 @@ NS_CC_END;
|
|||
#include "qnx/CCFileUtils_qnx.cpp"
|
||||
#endif
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
#include "Linux/CCFileUtils_Linux.cpp"
|
||||
#endif
|
||||
|
||||
#endif // (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
||||
|
|
|
@ -152,17 +152,7 @@ bool CCImage::_initWithJpgData(void * data, int nSize)
|
|||
/* setup decompression process and source, then read JPEG header */
|
||||
jpeg_create_decompress( &cinfo );
|
||||
|
||||
/* this makes the library read from infile */
|
||||
//TODO in some linux release it use libjpeg62 which does not support jpeg_mem_src instead of libjpeg8
|
||||
// load memory data as stream
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
FILE * source = fmemopen(data, nSize, "rb");
|
||||
CC_BREAK_IF(!source);
|
||||
jpeg_stdio_src(&cinfo, source);
|
||||
fclose(source);
|
||||
#else
|
||||
jpeg_mem_src( &cinfo, (unsigned char *) data, nSize );
|
||||
#endif
|
||||
|
||||
/* reading the image header which contains image information */
|
||||
jpeg_read_header( &cinfo, true );
|
||||
|
@ -351,12 +341,12 @@ bool CCImage::saveToFile(const char *pszFilePath, bool bIsToRGB)
|
|||
std::string strFilePath(pszFilePath);
|
||||
CC_BREAK_IF(strFilePath.size() <= 4);
|
||||
|
||||
std::string strLowerCasePath(strFilePath);
|
||||
for (unsigned int i = 0; i < strLowerCasePath.length(); ++i)
|
||||
{
|
||||
strLowerCasePath[i] = tolower(strFilePath[i]);
|
||||
}
|
||||
|
||||
std::string strLowerCasePath(strFilePath);
|
||||
for (unsigned int i = 0; i < strLowerCasePath.length(); ++i)
|
||||
{
|
||||
strLowerCasePath[i] = tolower(strFilePath[i]);
|
||||
}
|
||||
|
||||
if (std::string::npos != strLowerCasePath.find(".png"))
|
||||
{
|
||||
CC_BREAK_IF(!_saveImageToPNG(pszFilePath, bIsToRGB));
|
||||
|
@ -562,6 +552,7 @@ bool CCImage::_saveImageToJPG(const char * pszFilePath)
|
|||
for (int i = 0; i < m_nHeight; ++i)
|
||||
{
|
||||
for (int j = 0; j < m_nWidth; ++j)
|
||||
|
||||
{
|
||||
pTempData[(i * m_nWidth + j) * 3] = m_pData[(i * m_nWidth + j) * 4];
|
||||
pTempData[(i * m_nWidth + j) * 3 + 1] = m_pData[(i * m_nWidth + j) * 4 + 1];
|
||||
|
@ -619,3 +610,7 @@ NS_CC_END;
|
|||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX)
|
||||
#include "qnx/CCImage_qnx.cpp"
|
||||
#endif
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
#include "Linux/CCImage_Linux.cpp"
|
||||
#endif
|
||||
|
|
|
@ -282,6 +282,7 @@ void CCEGLView::release()
|
|||
{
|
||||
/* Exits from GLFW */
|
||||
glfwTerminate();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void CCEGLView::setTouchDelegate(EGLTouchDelegate * pDelegate) {
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* jchuff.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains declarations for Huffman entropy encoding routines
|
||||
* that are shared between the sequential encoder (jchuff.c) and the
|
||||
* progressive encoder (jcphuff.c). No other modules need to see these.
|
||||
*/
|
||||
|
||||
/* The legal range of a DCT coefficient is
|
||||
* -1024 .. +1023 for 8-bit data;
|
||||
* -16384 .. +16383 for 12-bit data.
|
||||
* Hence the magnitude should always fit in 10 or 14 bits respectively.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
#define MAX_COEF_BITS 10
|
||||
#else
|
||||
#define MAX_COEF_BITS 14
|
||||
#endif
|
||||
|
||||
/* Derived data constructed for each Huffman table */
|
||||
|
||||
typedef struct {
|
||||
unsigned int ehufco[256]; /* code for each symbol */
|
||||
char ehufsi[256]; /* length of code for each symbol */
|
||||
/* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
|
||||
} c_derived_tbl;
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_make_c_derived_tbl jMkCDerived
|
||||
#define jpeg_gen_optimal_table jGenOptTbl
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
/* Expand a Huffman table definition into the derived format */
|
||||
EXTERN(void) jpeg_make_c_derived_tbl
|
||||
JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
|
||||
c_derived_tbl ** pdtbl));
|
||||
|
||||
/* Generate an optimal table definition given the specified counts */
|
||||
EXTERN(void) jpeg_gen_optimal_table
|
||||
JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));
|
|
@ -1,38 +1,23 @@
|
|||
/* jconfig.h. Generated from jconfig.cfg by configure. */
|
||||
/* jconfig.cfg --- source file edited by configure script */
|
||||
/* see jconfig.txt for explanations */
|
||||
/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */
|
||||
/* see jconfig.doc for explanations */
|
||||
|
||||
#define HAVE_PROTOTYPES 1
|
||||
#define HAVE_UNSIGNED_CHAR 1
|
||||
#define HAVE_UNSIGNED_SHORT 1
|
||||
/* #undef void */
|
||||
/* #undef const */
|
||||
/* #undef CHAR_IS_UNSIGNED */
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
/* #undef NEED_BSD_STRINGS */
|
||||
/* #undef NEED_SYS_TYPES_H */
|
||||
/* #undef NEED_FAR_POINTERS */
|
||||
/* #undef NEED_SHORT_EXTERNAL_NAMES */
|
||||
/* Define this if you get warnings about undefined structures. */
|
||||
/* #undef INCOMPLETE_TYPES_BROKEN */
|
||||
|
||||
/* Define "boolean" as unsigned char, not int, on Windows systems. */
|
||||
#ifdef _WIN32
|
||||
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
||||
typedef unsigned char boolean;
|
||||
#endif
|
||||
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
||||
#endif
|
||||
#define HAVE_PROTOTYPES
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
/* #define void char */
|
||||
/* #define const */
|
||||
#undef CHAR_IS_UNSIGNED
|
||||
#define HAVE_STDDEF_H
|
||||
#define HAVE_STDLIB_H
|
||||
#undef NEED_BSD_STRINGS
|
||||
#undef NEED_SYS_TYPES_H
|
||||
#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
|
||||
/* #undef RIGHT_SHIFT_IS_UNSIGNED */
|
||||
#define INLINE __inline__
|
||||
/* These are for configuring the JPEG memory manager. */
|
||||
/* #undef DEFAULT_MAX_MEM */
|
||||
/* #undef NO_MKTEMP */
|
||||
#undef RIGHT_SHIFT_IS_UNSIGNED
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
|
@ -41,14 +26,13 @@ typedef unsigned char boolean;
|
|||
#define BMP_SUPPORTED /* BMP image file format */
|
||||
#define GIF_SUPPORTED /* GIF image file format */
|
||||
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
|
||||
/* #undef RLE_SUPPORTED */
|
||||
#undef RLE_SUPPORTED /* Utah RLE image file format */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
|
||||
/* #undef TWO_FILE_COMMANDLINE */
|
||||
/* #undef NEED_SIGNAL_CATCHER */
|
||||
/* #undef DONT_USE_B_MODE */
|
||||
|
||||
/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
|
||||
/* #undef PROGRESS_REPORT */
|
||||
#undef TWO_FILE_COMMANDLINE /* optional */
|
||||
#define USE_SETMODE /* Needed to make one-file style work in DJGPP */
|
||||
#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
|
||||
#undef DONT_USE_B_MODE
|
||||
#undef PROGRESS_REPORT /* optional */
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
||||
|
|
|
@ -1,393 +1,393 @@
|
|||
/*
|
||||
* jdct.h
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This include file contains common declarations for the forward and
|
||||
* inverse DCT modules. These declarations are private to the DCT managers
|
||||
* (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
|
||||
* The individual DCT algorithms are kept in separate files to ease
|
||||
* machine-dependent tuning (e.g., assembly coding).
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* A forward DCT routine is given a pointer to an input sample array and
|
||||
* a pointer to a work area of type DCTELEM[]; the DCT is to be performed
|
||||
* in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32
|
||||
* for 12-bit samples. (NOTE: Floating-point DCT implementations use an
|
||||
* array of type FAST_FLOAT, instead.)
|
||||
* The input data is to be fetched from the sample array starting at a
|
||||
* specified column. (Any row offset needed will be applied to the array
|
||||
* pointer before it is passed to the FDCT code.)
|
||||
* Note that the number of samples fetched by the FDCT routine is
|
||||
* DCT_h_scaled_size * DCT_v_scaled_size.
|
||||
* The DCT outputs are returned scaled up by a factor of 8; they therefore
|
||||
* have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
|
||||
* convention improves accuracy in integer implementations and saves some
|
||||
* work in floating-point ones.
|
||||
* Quantization of the output coefficients is done by jcdctmgr.c.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
typedef int DCTELEM; /* 16 or 32 bits is fine */
|
||||
#else
|
||||
typedef INT32 DCTELEM; /* must have 32 bits */
|
||||
#endif
|
||||
|
||||
typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
|
||||
JSAMPARRAY sample_data,
|
||||
JDIMENSION start_col));
|
||||
typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
|
||||
JSAMPARRAY sample_data,
|
||||
JDIMENSION start_col));
|
||||
|
||||
|
||||
/*
|
||||
* An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
|
||||
* to an output sample array. The routine must dequantize the input data as
|
||||
* well as perform the IDCT; for dequantization, it uses the multiplier table
|
||||
* pointed to by compptr->dct_table. The output data is to be placed into the
|
||||
* sample array starting at a specified column. (Any row offset needed will
|
||||
* be applied to the array pointer before it is passed to the IDCT code.)
|
||||
* Note that the number of samples emitted by the IDCT routine is
|
||||
* DCT_h_scaled_size * DCT_v_scaled_size.
|
||||
*/
|
||||
|
||||
/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
|
||||
|
||||
/*
|
||||
* Each IDCT routine has its own ideas about the best dct_table element type.
|
||||
*/
|
||||
|
||||
typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
|
||||
#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
|
||||
#else
|
||||
typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
|
||||
#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
|
||||
#endif
|
||||
typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
|
||||
|
||||
|
||||
/*
|
||||
* Each IDCT routine is responsible for range-limiting its results and
|
||||
* converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
|
||||
* be quite far out of range if the input data is corrupt, so a bulletproof
|
||||
* range-limiting step is required. We use a mask-and-table-lookup method
|
||||
* to do the combined operations quickly. See the comments with
|
||||
* prepare_range_limit_table (in jdmaster.c) for more info.
|
||||
*/
|
||||
|
||||
#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE)
|
||||
|
||||
#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_fdct_islow jFDislow
|
||||
#define jpeg_fdct_ifast jFDifast
|
||||
#define jpeg_fdct_float jFDfloat
|
||||
#define jpeg_fdct_7x7 jFD7x7
|
||||
#define jpeg_fdct_6x6 jFD6x6
|
||||
#define jpeg_fdct_5x5 jFD5x5
|
||||
#define jpeg_fdct_4x4 jFD4x4
|
||||
#define jpeg_fdct_3x3 jFD3x3
|
||||
#define jpeg_fdct_2x2 jFD2x2
|
||||
#define jpeg_fdct_1x1 jFD1x1
|
||||
#define jpeg_fdct_9x9 jFD9x9
|
||||
#define jpeg_fdct_10x10 jFD10x10
|
||||
#define jpeg_fdct_11x11 jFD11x11
|
||||
#define jpeg_fdct_12x12 jFD12x12
|
||||
#define jpeg_fdct_13x13 jFD13x13
|
||||
#define jpeg_fdct_14x14 jFD14x14
|
||||
#define jpeg_fdct_15x15 jFD15x15
|
||||
#define jpeg_fdct_16x16 jFD16x16
|
||||
#define jpeg_fdct_16x8 jFD16x8
|
||||
#define jpeg_fdct_14x7 jFD14x7
|
||||
#define jpeg_fdct_12x6 jFD12x6
|
||||
#define jpeg_fdct_10x5 jFD10x5
|
||||
#define jpeg_fdct_8x4 jFD8x4
|
||||
#define jpeg_fdct_6x3 jFD6x3
|
||||
#define jpeg_fdct_4x2 jFD4x2
|
||||
#define jpeg_fdct_2x1 jFD2x1
|
||||
#define jpeg_fdct_8x16 jFD8x16
|
||||
#define jpeg_fdct_7x14 jFD7x14
|
||||
#define jpeg_fdct_6x12 jFD6x12
|
||||
#define jpeg_fdct_5x10 jFD5x10
|
||||
#define jpeg_fdct_4x8 jFD4x8
|
||||
#define jpeg_fdct_3x6 jFD3x6
|
||||
#define jpeg_fdct_2x4 jFD2x4
|
||||
#define jpeg_fdct_1x2 jFD1x2
|
||||
#define jpeg_idct_islow jRDislow
|
||||
#define jpeg_idct_ifast jRDifast
|
||||
#define jpeg_idct_float jRDfloat
|
||||
#define jpeg_idct_7x7 jRD7x7
|
||||
#define jpeg_idct_6x6 jRD6x6
|
||||
#define jpeg_idct_5x5 jRD5x5
|
||||
#define jpeg_idct_4x4 jRD4x4
|
||||
#define jpeg_idct_3x3 jRD3x3
|
||||
#define jpeg_idct_2x2 jRD2x2
|
||||
#define jpeg_idct_1x1 jRD1x1
|
||||
#define jpeg_idct_9x9 jRD9x9
|
||||
#define jpeg_idct_10x10 jRD10x10
|
||||
#define jpeg_idct_11x11 jRD11x11
|
||||
#define jpeg_idct_12x12 jRD12x12
|
||||
#define jpeg_idct_13x13 jRD13x13
|
||||
#define jpeg_idct_14x14 jRD14x14
|
||||
#define jpeg_idct_15x15 jRD15x15
|
||||
#define jpeg_idct_16x16 jRD16x16
|
||||
#define jpeg_idct_16x8 jRD16x8
|
||||
#define jpeg_idct_14x7 jRD14x7
|
||||
#define jpeg_idct_12x6 jRD12x6
|
||||
#define jpeg_idct_10x5 jRD10x5
|
||||
#define jpeg_idct_8x4 jRD8x4
|
||||
#define jpeg_idct_6x3 jRD6x3
|
||||
#define jpeg_idct_4x2 jRD4x2
|
||||
#define jpeg_idct_2x1 jRD2x1
|
||||
#define jpeg_idct_8x16 jRD8x16
|
||||
#define jpeg_idct_7x14 jRD7x14
|
||||
#define jpeg_idct_6x12 jRD6x12
|
||||
#define jpeg_idct_5x10 jRD5x10
|
||||
#define jpeg_idct_4x8 jRD4x8
|
||||
#define jpeg_idct_3x6 jRD3x8
|
||||
#define jpeg_idct_2x4 jRD2x4
|
||||
#define jpeg_idct_1x2 jRD1x2
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
/* Extern declarations for the forward and inverse DCT routines. */
|
||||
|
||||
EXTERN(void) jpeg_fdct_islow
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_ifast
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_float
|
||||
JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_7x7
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_5x5
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_3x3
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_1x1
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_9x9
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_10x10
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_11x11
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_12x12
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_13x13
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_14x14
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_15x15
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_16x16
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_16x8
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_14x7
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_12x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_10x5
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_8x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x3
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x1
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_8x16
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_7x14
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x12
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_5x10
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x8
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_3x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_1x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
|
||||
EXTERN(void) jpeg_idct_islow
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_ifast
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_float
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_7x7
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_5x5
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_3x3
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_1x1
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_9x9
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_10x10
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_11x11
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_12x12
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_13x13
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_14x14
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_15x15
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_16x16
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_16x8
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_14x7
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_12x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_10x5
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_8x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x3
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x1
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_8x16
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_7x14
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x12
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_5x10
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x8
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_3x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_1x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
|
||||
|
||||
/*
|
||||
* Macros for handling fixed-point arithmetic; these are used by many
|
||||
* but not all of the DCT/IDCT modules.
|
||||
*
|
||||
* All values are expected to be of type INT32.
|
||||
* Fractional constants are scaled left by CONST_BITS bits.
|
||||
* CONST_BITS is defined within each module using these macros,
|
||||
* and may differ from one module to the next.
|
||||
*/
|
||||
|
||||
#define ONE ((INT32) 1)
|
||||
#define CONST_SCALE (ONE << CONST_BITS)
|
||||
|
||||
/* Convert a positive real constant to an integer scaled by CONST_SCALE.
|
||||
* Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
|
||||
* thus causing a lot of useless floating-point operations at run time.
|
||||
*/
|
||||
|
||||
#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5))
|
||||
|
||||
/* Descale and correctly round an INT32 value that's scaled by N bits.
|
||||
* We assume RIGHT_SHIFT rounds towards minus infinity, so adding
|
||||
* the fudge factor is correct for either sign of X.
|
||||
*/
|
||||
|
||||
#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
|
||||
|
||||
/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
|
||||
* This macro is used only when the two inputs will actually be no more than
|
||||
* 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
|
||||
* full 32x32 multiply. This provides a useful speedup on many machines.
|
||||
* Unfortunately there is no way to specify a 16x16->32 multiply portably
|
||||
* in C, but some C compilers will do the right thing if you provide the
|
||||
* correct combination of casts.
|
||||
*/
|
||||
|
||||
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
|
||||
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const)))
|
||||
#endif
|
||||
#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
|
||||
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const)))
|
||||
#endif
|
||||
|
||||
#ifndef MULTIPLY16C16 /* default definition */
|
||||
#define MULTIPLY16C16(var,const) ((var) * (const))
|
||||
#endif
|
||||
|
||||
/* Same except both inputs are variables. */
|
||||
|
||||
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
|
||||
#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2)))
|
||||
#endif
|
||||
|
||||
#ifndef MULTIPLY16V16 /* default definition */
|
||||
#define MULTIPLY16V16(var1,var2) ((var1) * (var2))
|
||||
#endif
|
||||
/*
|
||||
* jdct.h
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This include file contains common declarations for the forward and
|
||||
* inverse DCT modules. These declarations are private to the DCT managers
|
||||
* (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
|
||||
* The individual DCT algorithms are kept in separate files to ease
|
||||
* machine-dependent tuning (e.g., assembly coding).
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* A forward DCT routine is given a pointer to an input sample array and
|
||||
* a pointer to a work area of type DCTELEM[]; the DCT is to be performed
|
||||
* in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32
|
||||
* for 12-bit samples. (NOTE: Floating-point DCT implementations use an
|
||||
* array of type FAST_FLOAT, instead.)
|
||||
* The input data is to be fetched from the sample array starting at a
|
||||
* specified column. (Any row offset needed will be applied to the array
|
||||
* pointer before it is passed to the FDCT code.)
|
||||
* Note that the number of samples fetched by the FDCT routine is
|
||||
* DCT_h_scaled_size * DCT_v_scaled_size.
|
||||
* The DCT outputs are returned scaled up by a factor of 8; they therefore
|
||||
* have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
|
||||
* convention improves accuracy in integer implementations and saves some
|
||||
* work in floating-point ones.
|
||||
* Quantization of the output coefficients is done by jcdctmgr.c.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
typedef int DCTELEM; /* 16 or 32 bits is fine */
|
||||
#else
|
||||
typedef INT32 DCTELEM; /* must have 32 bits */
|
||||
#endif
|
||||
|
||||
typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
|
||||
JSAMPARRAY sample_data,
|
||||
JDIMENSION start_col));
|
||||
typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
|
||||
JSAMPARRAY sample_data,
|
||||
JDIMENSION start_col));
|
||||
|
||||
|
||||
/*
|
||||
* An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
|
||||
* to an output sample array. The routine must dequantize the input data as
|
||||
* well as perform the IDCT; for dequantization, it uses the multiplier table
|
||||
* pointed to by compptr->dct_table. The output data is to be placed into the
|
||||
* sample array starting at a specified column. (Any row offset needed will
|
||||
* be applied to the array pointer before it is passed to the IDCT code.)
|
||||
* Note that the number of samples emitted by the IDCT routine is
|
||||
* DCT_h_scaled_size * DCT_v_scaled_size.
|
||||
*/
|
||||
|
||||
/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
|
||||
|
||||
/*
|
||||
* Each IDCT routine has its own ideas about the best dct_table element type.
|
||||
*/
|
||||
|
||||
typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
|
||||
#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
|
||||
#else
|
||||
typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
|
||||
#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
|
||||
#endif
|
||||
typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
|
||||
|
||||
|
||||
/*
|
||||
* Each IDCT routine is responsible for range-limiting its results and
|
||||
* converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
|
||||
* be quite far out of range if the input data is corrupt, so a bulletproof
|
||||
* range-limiting step is required. We use a mask-and-table-lookup method
|
||||
* to do the combined operations quickly. See the comments with
|
||||
* prepare_range_limit_table (in jdmaster.c) for more info.
|
||||
*/
|
||||
|
||||
#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE)
|
||||
|
||||
#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_fdct_islow jFDislow
|
||||
#define jpeg_fdct_ifast jFDifast
|
||||
#define jpeg_fdct_float jFDfloat
|
||||
#define jpeg_fdct_7x7 jFD7x7
|
||||
#define jpeg_fdct_6x6 jFD6x6
|
||||
#define jpeg_fdct_5x5 jFD5x5
|
||||
#define jpeg_fdct_4x4 jFD4x4
|
||||
#define jpeg_fdct_3x3 jFD3x3
|
||||
#define jpeg_fdct_2x2 jFD2x2
|
||||
#define jpeg_fdct_1x1 jFD1x1
|
||||
#define jpeg_fdct_9x9 jFD9x9
|
||||
#define jpeg_fdct_10x10 jFD10x10
|
||||
#define jpeg_fdct_11x11 jFD11x11
|
||||
#define jpeg_fdct_12x12 jFD12x12
|
||||
#define jpeg_fdct_13x13 jFD13x13
|
||||
#define jpeg_fdct_14x14 jFD14x14
|
||||
#define jpeg_fdct_15x15 jFD15x15
|
||||
#define jpeg_fdct_16x16 jFD16x16
|
||||
#define jpeg_fdct_16x8 jFD16x8
|
||||
#define jpeg_fdct_14x7 jFD14x7
|
||||
#define jpeg_fdct_12x6 jFD12x6
|
||||
#define jpeg_fdct_10x5 jFD10x5
|
||||
#define jpeg_fdct_8x4 jFD8x4
|
||||
#define jpeg_fdct_6x3 jFD6x3
|
||||
#define jpeg_fdct_4x2 jFD4x2
|
||||
#define jpeg_fdct_2x1 jFD2x1
|
||||
#define jpeg_fdct_8x16 jFD8x16
|
||||
#define jpeg_fdct_7x14 jFD7x14
|
||||
#define jpeg_fdct_6x12 jFD6x12
|
||||
#define jpeg_fdct_5x10 jFD5x10
|
||||
#define jpeg_fdct_4x8 jFD4x8
|
||||
#define jpeg_fdct_3x6 jFD3x6
|
||||
#define jpeg_fdct_2x4 jFD2x4
|
||||
#define jpeg_fdct_1x2 jFD1x2
|
||||
#define jpeg_idct_islow jRDislow
|
||||
#define jpeg_idct_ifast jRDifast
|
||||
#define jpeg_idct_float jRDfloat
|
||||
#define jpeg_idct_7x7 jRD7x7
|
||||
#define jpeg_idct_6x6 jRD6x6
|
||||
#define jpeg_idct_5x5 jRD5x5
|
||||
#define jpeg_idct_4x4 jRD4x4
|
||||
#define jpeg_idct_3x3 jRD3x3
|
||||
#define jpeg_idct_2x2 jRD2x2
|
||||
#define jpeg_idct_1x1 jRD1x1
|
||||
#define jpeg_idct_9x9 jRD9x9
|
||||
#define jpeg_idct_10x10 jRD10x10
|
||||
#define jpeg_idct_11x11 jRD11x11
|
||||
#define jpeg_idct_12x12 jRD12x12
|
||||
#define jpeg_idct_13x13 jRD13x13
|
||||
#define jpeg_idct_14x14 jRD14x14
|
||||
#define jpeg_idct_15x15 jRD15x15
|
||||
#define jpeg_idct_16x16 jRD16x16
|
||||
#define jpeg_idct_16x8 jRD16x8
|
||||
#define jpeg_idct_14x7 jRD14x7
|
||||
#define jpeg_idct_12x6 jRD12x6
|
||||
#define jpeg_idct_10x5 jRD10x5
|
||||
#define jpeg_idct_8x4 jRD8x4
|
||||
#define jpeg_idct_6x3 jRD6x3
|
||||
#define jpeg_idct_4x2 jRD4x2
|
||||
#define jpeg_idct_2x1 jRD2x1
|
||||
#define jpeg_idct_8x16 jRD8x16
|
||||
#define jpeg_idct_7x14 jRD7x14
|
||||
#define jpeg_idct_6x12 jRD6x12
|
||||
#define jpeg_idct_5x10 jRD5x10
|
||||
#define jpeg_idct_4x8 jRD4x8
|
||||
#define jpeg_idct_3x6 jRD3x8
|
||||
#define jpeg_idct_2x4 jRD2x4
|
||||
#define jpeg_idct_1x2 jRD1x2
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
/* Extern declarations for the forward and inverse DCT routines. */
|
||||
|
||||
EXTERN(void) jpeg_fdct_islow
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_ifast
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_float
|
||||
JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_7x7
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_5x5
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_3x3
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_1x1
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_9x9
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_10x10
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_11x11
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_12x12
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_13x13
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_14x14
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_15x15
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_16x16
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_16x8
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_14x7
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_12x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_10x5
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_8x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x3
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x1
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_8x16
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_7x14
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_6x12
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_5x10
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_4x8
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_3x6
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_2x4
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
EXTERN(void) jpeg_fdct_1x2
|
||||
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
|
||||
|
||||
EXTERN(void) jpeg_idct_islow
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_ifast
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_float
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_7x7
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_5x5
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_3x3
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_1x1
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_9x9
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_10x10
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_11x11
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_12x12
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_13x13
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_14x14
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_15x15
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_16x16
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_16x8
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_14x7
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_12x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_10x5
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_8x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x3
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x1
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_8x16
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_7x14
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_6x12
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_5x10
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_4x8
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_3x6
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_2x4
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
EXTERN(void) jpeg_idct_1x2
|
||||
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
|
||||
|
||||
/*
|
||||
* Macros for handling fixed-point arithmetic; these are used by many
|
||||
* but not all of the DCT/IDCT modules.
|
||||
*
|
||||
* All values are expected to be of type INT32.
|
||||
* Fractional constants are scaled left by CONST_BITS bits.
|
||||
* CONST_BITS is defined within each module using these macros,
|
||||
* and may differ from one module to the next.
|
||||
*/
|
||||
|
||||
#define ONE ((INT32) 1)
|
||||
#define CONST_SCALE (ONE << CONST_BITS)
|
||||
|
||||
/* Convert a positive real constant to an integer scaled by CONST_SCALE.
|
||||
* Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
|
||||
* thus causing a lot of useless floating-point operations at run time.
|
||||
*/
|
||||
|
||||
#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5))
|
||||
|
||||
/* Descale and correctly round an INT32 value that's scaled by N bits.
|
||||
* We assume RIGHT_SHIFT rounds towards minus infinity, so adding
|
||||
* the fudge factor is correct for either sign of X.
|
||||
*/
|
||||
|
||||
#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
|
||||
|
||||
/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
|
||||
* This macro is used only when the two inputs will actually be no more than
|
||||
* 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
|
||||
* full 32x32 multiply. This provides a useful speedup on many machines.
|
||||
* Unfortunately there is no way to specify a 16x16->32 multiply portably
|
||||
* in C, but some C compilers will do the right thing if you provide the
|
||||
* correct combination of casts.
|
||||
*/
|
||||
|
||||
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
|
||||
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const)))
|
||||
#endif
|
||||
#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
|
||||
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const)))
|
||||
#endif
|
||||
|
||||
#ifndef MULTIPLY16C16 /* default definition */
|
||||
#define MULTIPLY16C16(var,const) ((var) * (const))
|
||||
#endif
|
||||
|
||||
/* Same except both inputs are variables. */
|
||||
|
||||
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
|
||||
#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2)))
|
||||
#endif
|
||||
|
||||
#ifndef MULTIPLY16V16 /* default definition */
|
||||
#define MULTIPLY16V16(var1,var2) ((var1) * (var2))
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
/*
|
||||
* jdhuff.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains declarations for Huffman entropy decoding routines
|
||||
* that are shared between the sequential decoder (jdhuff.c) and the
|
||||
* progressive decoder (jdphuff.c). No other modules need to see these.
|
||||
*/
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_make_d_derived_tbl jMkDDerived
|
||||
#define jpeg_fill_bit_buffer jFilBitBuf
|
||||
#define jpeg_huff_decode jHufDecode
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/* Derived data constructed for each Huffman table */
|
||||
|
||||
#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
|
||||
|
||||
typedef struct {
|
||||
/* Basic tables: (element [0] of each array is unused) */
|
||||
INT32 maxcode[18]; /* largest code of length k (-1 if none) */
|
||||
/* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
|
||||
INT32 valoffset[17]; /* huffval[] offset for codes of length k */
|
||||
/* valoffset[k] = huffval[] index of 1st symbol of code length k, less
|
||||
* the smallest code of length k; so given a code of length k, the
|
||||
* corresponding symbol is huffval[code + valoffset[k]]
|
||||
*/
|
||||
|
||||
/* Link to public Huffman table (needed only in jpeg_huff_decode) */
|
||||
JHUFF_TBL *pub;
|
||||
|
||||
/* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
|
||||
* the input data stream. If the next Huffman code is no more
|
||||
* than HUFF_LOOKAHEAD bits long, we can obtain its length and
|
||||
* the corresponding symbol directly from these tables.
|
||||
*/
|
||||
int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
|
||||
UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
|
||||
} d_derived_tbl;
|
||||
|
||||
/* Expand a Huffman table definition into the derived format */
|
||||
EXTERN(void) jpeg_make_d_derived_tbl
|
||||
JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
|
||||
d_derived_tbl ** pdtbl));
|
||||
|
||||
|
||||
/*
|
||||
* Fetching the next N bits from the input stream is a time-critical operation
|
||||
* for the Huffman decoders. We implement it with a combination of inline
|
||||
* macros and out-of-line subroutines. Note that N (the number of bits
|
||||
* demanded at one time) never exceeds 15 for JPEG use.
|
||||
*
|
||||
* We read source bytes into get_buffer and dole out bits as needed.
|
||||
* If get_buffer already contains enough bits, they are fetched in-line
|
||||
* by the macros CHECK_BIT_BUFFER and GET_BITS. When there aren't enough
|
||||
* bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
|
||||
* as full as possible (not just to the number of bits needed; this
|
||||
* prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
|
||||
* Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
|
||||
* On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
|
||||
* at least the requested number of bits --- dummy zeroes are inserted if
|
||||
* necessary.
|
||||
*/
|
||||
|
||||
typedef INT32 bit_buf_type; /* type of bit-extraction buffer */
|
||||
#define BIT_BUF_SIZE 32 /* size of buffer in bits */
|
||||
|
||||
/* If long is > 32 bits on your machine, and shifting/masking longs is
|
||||
* reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
|
||||
* appropriately should be a win. Unfortunately we can't define the size
|
||||
* with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
|
||||
* because not all machines measure sizeof in 8-bit bytes.
|
||||
*/
|
||||
|
||||
typedef struct { /* Bitreading state saved across MCUs */
|
||||
bit_buf_type get_buffer; /* current bit-extraction buffer */
|
||||
int bits_left; /* # of unused bits in it */
|
||||
} bitread_perm_state;
|
||||
|
||||
typedef struct { /* Bitreading working state within an MCU */
|
||||
/* Current data source location */
|
||||
/* We need a copy, rather than munging the original, in case of suspension */
|
||||
const JOCTET * next_input_byte; /* => next byte to read from source */
|
||||
size_t bytes_in_buffer; /* # of bytes remaining in source buffer */
|
||||
/* Bit input buffer --- note these values are kept in register variables,
|
||||
* not in this struct, inside the inner loops.
|
||||
*/
|
||||
bit_buf_type get_buffer; /* current bit-extraction buffer */
|
||||
int bits_left; /* # of unused bits in it */
|
||||
/* Pointer needed by jpeg_fill_bit_buffer. */
|
||||
j_decompress_ptr cinfo; /* back link to decompress master record */
|
||||
} bitread_working_state;
|
||||
|
||||
/* Macros to declare and load/save bitread local variables. */
|
||||
#define BITREAD_STATE_VARS \
|
||||
register bit_buf_type get_buffer; \
|
||||
register int bits_left; \
|
||||
bitread_working_state br_state
|
||||
|
||||
#define BITREAD_LOAD_STATE(cinfop,permstate) \
|
||||
br_state.cinfo = cinfop; \
|
||||
br_state.next_input_byte = cinfop->src->next_input_byte; \
|
||||
br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
|
||||
get_buffer = permstate.get_buffer; \
|
||||
bits_left = permstate.bits_left;
|
||||
|
||||
#define BITREAD_SAVE_STATE(cinfop,permstate) \
|
||||
cinfop->src->next_input_byte = br_state.next_input_byte; \
|
||||
cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
|
||||
permstate.get_buffer = get_buffer; \
|
||||
permstate.bits_left = bits_left
|
||||
|
||||
/*
|
||||
* These macros provide the in-line portion of bit fetching.
|
||||
* Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
|
||||
* before using GET_BITS, PEEK_BITS, or DROP_BITS.
|
||||
* The variables get_buffer and bits_left are assumed to be locals,
|
||||
* but the state struct might not be (jpeg_huff_decode needs this).
|
||||
* CHECK_BIT_BUFFER(state,n,action);
|
||||
* Ensure there are N bits in get_buffer; if suspend, take action.
|
||||
* val = GET_BITS(n);
|
||||
* Fetch next N bits.
|
||||
* val = PEEK_BITS(n);
|
||||
* Fetch next N bits without removing them from the buffer.
|
||||
* DROP_BITS(n);
|
||||
* Discard next N bits.
|
||||
* The value N should be a simple variable, not an expression, because it
|
||||
* is evaluated multiple times.
|
||||
*/
|
||||
|
||||
#define CHECK_BIT_BUFFER(state,nbits,action) \
|
||||
{ if (bits_left < (nbits)) { \
|
||||
if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \
|
||||
{ action; } \
|
||||
get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
|
||||
|
||||
#define GET_BITS(nbits) \
|
||||
(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
|
||||
|
||||
#define PEEK_BITS(nbits) \
|
||||
(((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))
|
||||
|
||||
#define DROP_BITS(nbits) \
|
||||
(bits_left -= (nbits))
|
||||
|
||||
/* Load up the bit buffer to a depth of at least nbits */
|
||||
EXTERN(boolean) jpeg_fill_bit_buffer
|
||||
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
||||
register int bits_left, int nbits));
|
||||
|
||||
|
||||
/*
|
||||
* Code for extracting next Huffman-coded symbol from input bit stream.
|
||||
* Again, this is time-critical and we make the main paths be macros.
|
||||
*
|
||||
* We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
|
||||
* without looping. Usually, more than 95% of the Huffman codes will be 8
|
||||
* or fewer bits long. The few overlength codes are handled with a loop,
|
||||
* which need not be inline code.
|
||||
*
|
||||
* Notes about the HUFF_DECODE macro:
|
||||
* 1. Near the end of the data segment, we may fail to get enough bits
|
||||
* for a lookahead. In that case, we do it the hard way.
|
||||
* 2. If the lookahead table contains no entry, the next code must be
|
||||
* more than HUFF_LOOKAHEAD bits long.
|
||||
* 3. jpeg_huff_decode returns -1 if forced to suspend.
|
||||
*/
|
||||
|
||||
#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
|
||||
{ register int nb, look; \
|
||||
if (bits_left < HUFF_LOOKAHEAD) { \
|
||||
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
|
||||
get_buffer = state.get_buffer; bits_left = state.bits_left; \
|
||||
if (bits_left < HUFF_LOOKAHEAD) { \
|
||||
nb = 1; goto slowlabel; \
|
||||
} \
|
||||
} \
|
||||
look = PEEK_BITS(HUFF_LOOKAHEAD); \
|
||||
if ((nb = htbl->look_nbits[look]) != 0) { \
|
||||
DROP_BITS(nb); \
|
||||
result = htbl->look_sym[look]; \
|
||||
} else { \
|
||||
nb = HUFF_LOOKAHEAD+1; \
|
||||
slowlabel: \
|
||||
if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
|
||||
{ failaction; } \
|
||||
get_buffer = state.get_buffer; bits_left = state.bits_left; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Out-of-line case for Huffman code fetching */
|
||||
EXTERN(int) jpeg_huff_decode
|
||||
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
||||
register int bits_left, d_derived_tbl * htbl, int min_bits));
|
|
@ -1,304 +1,304 @@
|
|||
/*
|
||||
* jerror.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file defines the error and message codes for the JPEG library.
|
||||
* Edit this file to add new codes, or to translate the message strings to
|
||||
* some other language.
|
||||
* A set of error-reporting macros are defined too. Some applications using
|
||||
* the JPEG library may wish to include this file to get the error codes
|
||||
* and/or the macros.
|
||||
*/
|
||||
|
||||
/*
|
||||
* To define the enum list of message codes, include this file without
|
||||
* defining macro JMESSAGE. To create a message string table, include it
|
||||
* again with a suitable JMESSAGE definition (see jerror.c for an example).
|
||||
*/
|
||||
#ifndef JMESSAGE
|
||||
#ifndef JERROR_H
|
||||
/* First time through, define the enum list */
|
||||
#define JMAKE_ENUM_LIST
|
||||
#else
|
||||
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
|
||||
#define JMESSAGE(code,string)
|
||||
#endif /* JERROR_H */
|
||||
#endif /* JMESSAGE */
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
typedef enum {
|
||||
|
||||
#define JMESSAGE(code,string) code ,
|
||||
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
|
||||
|
||||
/* For maintenance convenience, list is alphabetical by message code name */
|
||||
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
|
||||
JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
|
||||
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
|
||||
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
|
||||
JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
|
||||
JMESSAGE(JERR_BAD_DROP_SAMPLING,
|
||||
"Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
|
||||
JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
|
||||
JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
|
||||
JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
|
||||
JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
|
||||
JMESSAGE(JERR_BAD_LIB_VERSION,
|
||||
"Wrong JPEG library version: library is %d, caller expects %d")
|
||||
JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
|
||||
JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
|
||||
JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
|
||||
JMESSAGE(JERR_BAD_PROGRESSION,
|
||||
"Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
|
||||
JMESSAGE(JERR_BAD_PROG_SCRIPT,
|
||||
"Invalid progressive parameters at scan script entry %d")
|
||||
JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
|
||||
JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
|
||||
JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
|
||||
JMESSAGE(JERR_BAD_STRUCT_SIZE,
|
||||
"JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
|
||||
JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
|
||||
JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
|
||||
JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
|
||||
JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
|
||||
JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
|
||||
JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
|
||||
JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
|
||||
JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
|
||||
JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
|
||||
JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
|
||||
JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
|
||||
JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
|
||||
JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
|
||||
JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
|
||||
JMESSAGE(JERR_FILE_READ, "Input file read error")
|
||||
JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
|
||||
JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
|
||||
JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
|
||||
JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
|
||||
JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
|
||||
JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
|
||||
JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
|
||||
JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
|
||||
"Cannot transcode due to multiple use of quantization table %d")
|
||||
JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
|
||||
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
|
||||
JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
|
||||
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
|
||||
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
|
||||
JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
|
||||
JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
|
||||
JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
|
||||
JMESSAGE(JERR_QUANT_COMPONENTS,
|
||||
"Cannot quantize more than %d color components")
|
||||
JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
|
||||
JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
|
||||
JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
|
||||
JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
|
||||
JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
|
||||
JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
|
||||
JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
|
||||
JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
|
||||
JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_WRITE,
|
||||
"Write failed on temporary file --- out of disk space?")
|
||||
JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
|
||||
JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
|
||||
JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
|
||||
JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
|
||||
JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
|
||||
JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
|
||||
JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
|
||||
JMESSAGE(JMSG_VERSION, JVERSION)
|
||||
JMESSAGE(JTRC_16BIT_TABLES,
|
||||
"Caution: quantization tables are too coarse for baseline JPEG")
|
||||
JMESSAGE(JTRC_ADOBE,
|
||||
"Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
|
||||
JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
|
||||
JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
|
||||
JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
|
||||
JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
|
||||
JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d")
|
||||
JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
|
||||
JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
|
||||
JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
|
||||
JMESSAGE(JTRC_EOI, "End Of Image")
|
||||
JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d")
|
||||
JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d")
|
||||
JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
|
||||
"Warning: thumbnail image size does not match data length %u")
|
||||
JMESSAGE(JTRC_JFIF_EXTENSION,
|
||||
"JFIF extension marker: type 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image")
|
||||
JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
|
||||
JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u")
|
||||
JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
|
||||
JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
|
||||
JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
|
||||
JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
|
||||
JMESSAGE(JTRC_RST, "RST%d")
|
||||
JMESSAGE(JTRC_SMOOTH_NOTIMPL,
|
||||
"Smoothing not supported with nonstandard sampling ratios")
|
||||
JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
|
||||
JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d")
|
||||
JMESSAGE(JTRC_SOI, "Start of Image")
|
||||
JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
|
||||
JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d")
|
||||
JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d")
|
||||
JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
|
||||
JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
|
||||
JMESSAGE(JTRC_THUMB_JPEG,
|
||||
"JFIF extension marker: JPEG-compressed thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_PALETTE,
|
||||
"JFIF extension marker: palette thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_RGB,
|
||||
"JFIF extension marker: RGB thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_UNKNOWN_IDS,
|
||||
"Unrecognized component IDs %d %d %d, assuming YCbCr")
|
||||
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
|
||||
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
|
||||
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
|
||||
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
|
||||
JMESSAGE(JWRN_BOGUS_PROGRESSION,
|
||||
"Inconsistent progression sequence for component %d coefficient %d")
|
||||
JMESSAGE(JWRN_EXTRANEOUS_DATA,
|
||||
"Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
|
||||
JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
|
||||
JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
|
||||
JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
|
||||
JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
|
||||
JMESSAGE(JWRN_MUST_RESYNC,
|
||||
"Corrupt JPEG data: found marker 0x%02x instead of RST%d")
|
||||
JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
|
||||
JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
JMSG_LASTMSGCODE
|
||||
} J_MESSAGE_CODE;
|
||||
|
||||
#undef JMAKE_ENUM_LIST
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
|
||||
#undef JMESSAGE
|
||||
|
||||
|
||||
#ifndef JERROR_H
|
||||
#define JERROR_H
|
||||
|
||||
/* Macros to simplify using the error and trace message stuff */
|
||||
/* The first parameter is either type of cinfo pointer */
|
||||
|
||||
/* Fatal errors (print message and exit) */
|
||||
#define ERREXIT(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT3(cinfo,code,p1,p2,p3) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(cinfo)->err->msg_parm.i[4] = (p5), \
|
||||
(cinfo)->err->msg_parm.i[5] = (p6), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXITS(cinfo,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
|
||||
#define MAKESTMT(stuff) do { stuff } while (0)
|
||||
|
||||
/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
|
||||
#define WARNMS(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
|
||||
/* Informational/debugging messages */
|
||||
#define TRACEMS(cinfo,lvl,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS1(cinfo,lvl,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS2(cinfo,lvl,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMSS(cinfo,lvl,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
|
||||
#endif /* JERROR_H */
|
||||
/*
|
||||
* jerror.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file defines the error and message codes for the JPEG library.
|
||||
* Edit this file to add new codes, or to translate the message strings to
|
||||
* some other language.
|
||||
* A set of error-reporting macros are defined too. Some applications using
|
||||
* the JPEG library may wish to include this file to get the error codes
|
||||
* and/or the macros.
|
||||
*/
|
||||
|
||||
/*
|
||||
* To define the enum list of message codes, include this file without
|
||||
* defining macro JMESSAGE. To create a message string table, include it
|
||||
* again with a suitable JMESSAGE definition (see jerror.c for an example).
|
||||
*/
|
||||
#ifndef JMESSAGE
|
||||
#ifndef JERROR_H
|
||||
/* First time through, define the enum list */
|
||||
#define JMAKE_ENUM_LIST
|
||||
#else
|
||||
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
|
||||
#define JMESSAGE(code,string)
|
||||
#endif /* JERROR_H */
|
||||
#endif /* JMESSAGE */
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
typedef enum {
|
||||
|
||||
#define JMESSAGE(code,string) code ,
|
||||
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
|
||||
|
||||
/* For maintenance convenience, list is alphabetical by message code name */
|
||||
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
|
||||
JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
|
||||
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
|
||||
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
|
||||
JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
|
||||
JMESSAGE(JERR_BAD_DROP_SAMPLING,
|
||||
"Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
|
||||
JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
|
||||
JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
|
||||
JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
|
||||
JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
|
||||
JMESSAGE(JERR_BAD_LIB_VERSION,
|
||||
"Wrong JPEG library version: library is %d, caller expects %d")
|
||||
JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
|
||||
JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
|
||||
JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
|
||||
JMESSAGE(JERR_BAD_PROGRESSION,
|
||||
"Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
|
||||
JMESSAGE(JERR_BAD_PROG_SCRIPT,
|
||||
"Invalid progressive parameters at scan script entry %d")
|
||||
JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
|
||||
JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
|
||||
JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
|
||||
JMESSAGE(JERR_BAD_STRUCT_SIZE,
|
||||
"JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
|
||||
JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
|
||||
JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
|
||||
JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
|
||||
JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
|
||||
JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
|
||||
JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
|
||||
JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
|
||||
JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
|
||||
JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
|
||||
JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
|
||||
JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
|
||||
JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
|
||||
JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
|
||||
JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
|
||||
JMESSAGE(JERR_FILE_READ, "Input file read error")
|
||||
JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
|
||||
JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
|
||||
JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
|
||||
JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
|
||||
JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
|
||||
JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
|
||||
JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
|
||||
JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
|
||||
"Cannot transcode due to multiple use of quantization table %d")
|
||||
JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
|
||||
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
|
||||
JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
|
||||
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
|
||||
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
|
||||
JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
|
||||
JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
|
||||
JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
|
||||
JMESSAGE(JERR_QUANT_COMPONENTS,
|
||||
"Cannot quantize more than %d color components")
|
||||
JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
|
||||
JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
|
||||
JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
|
||||
JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
|
||||
JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
|
||||
JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
|
||||
JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
|
||||
JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
|
||||
JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_WRITE,
|
||||
"Write failed on temporary file --- out of disk space?")
|
||||
JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
|
||||
JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
|
||||
JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
|
||||
JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
|
||||
JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
|
||||
JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
|
||||
JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
|
||||
JMESSAGE(JMSG_VERSION, JVERSION)
|
||||
JMESSAGE(JTRC_16BIT_TABLES,
|
||||
"Caution: quantization tables are too coarse for baseline JPEG")
|
||||
JMESSAGE(JTRC_ADOBE,
|
||||
"Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
|
||||
JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
|
||||
JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
|
||||
JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
|
||||
JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
|
||||
JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d")
|
||||
JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
|
||||
JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
|
||||
JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
|
||||
JMESSAGE(JTRC_EOI, "End Of Image")
|
||||
JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d")
|
||||
JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d")
|
||||
JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
|
||||
"Warning: thumbnail image size does not match data length %u")
|
||||
JMESSAGE(JTRC_JFIF_EXTENSION,
|
||||
"JFIF extension marker: type 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image")
|
||||
JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
|
||||
JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u")
|
||||
JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
|
||||
JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
|
||||
JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
|
||||
JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
|
||||
JMESSAGE(JTRC_RST, "RST%d")
|
||||
JMESSAGE(JTRC_SMOOTH_NOTIMPL,
|
||||
"Smoothing not supported with nonstandard sampling ratios")
|
||||
JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
|
||||
JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d")
|
||||
JMESSAGE(JTRC_SOI, "Start of Image")
|
||||
JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
|
||||
JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d")
|
||||
JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d")
|
||||
JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
|
||||
JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
|
||||
JMESSAGE(JTRC_THUMB_JPEG,
|
||||
"JFIF extension marker: JPEG-compressed thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_PALETTE,
|
||||
"JFIF extension marker: palette thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_RGB,
|
||||
"JFIF extension marker: RGB thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_UNKNOWN_IDS,
|
||||
"Unrecognized component IDs %d %d %d, assuming YCbCr")
|
||||
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
|
||||
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
|
||||
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
|
||||
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
|
||||
JMESSAGE(JWRN_BOGUS_PROGRESSION,
|
||||
"Inconsistent progression sequence for component %d coefficient %d")
|
||||
JMESSAGE(JWRN_EXTRANEOUS_DATA,
|
||||
"Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
|
||||
JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
|
||||
JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
|
||||
JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
|
||||
JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
|
||||
JMESSAGE(JWRN_MUST_RESYNC,
|
||||
"Corrupt JPEG data: found marker 0x%02x instead of RST%d")
|
||||
JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
|
||||
JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
JMSG_LASTMSGCODE
|
||||
} J_MESSAGE_CODE;
|
||||
|
||||
#undef JMAKE_ENUM_LIST
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
|
||||
#undef JMESSAGE
|
||||
|
||||
|
||||
#ifndef JERROR_H
|
||||
#define JERROR_H
|
||||
|
||||
/* Macros to simplify using the error and trace message stuff */
|
||||
/* The first parameter is either type of cinfo pointer */
|
||||
|
||||
/* Fatal errors (print message and exit) */
|
||||
#define ERREXIT(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT3(cinfo,code,p1,p2,p3) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(cinfo)->err->msg_parm.i[4] = (p5), \
|
||||
(cinfo)->err->msg_parm.i[5] = (p6), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXITS(cinfo,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
|
||||
#define MAKESTMT(stuff) do { stuff } while (0)
|
||||
|
||||
/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
|
||||
#define WARNMS(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
|
||||
/* Informational/debugging messages */
|
||||
#define TRACEMS(cinfo,lvl,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS1(cinfo,lvl,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS2(cinfo,lvl,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMSS(cinfo,lvl,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
|
||||
#endif /* JERROR_H */
|
||||
|
|
|
@ -1,91 +1,91 @@
|
|||
/*
|
||||
* jinclude.h
|
||||
*
|
||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file exists to provide a single place to fix any problems with
|
||||
* including the wrong system include files. (Common problems are taken
|
||||
* care of by the standard jconfig symbols, but on really weird systems
|
||||
* you may have to edit this file.)
|
||||
*
|
||||
* NOTE: this file is NOT intended to be included by applications using the
|
||||
* JPEG library. Most applications need only include jpeglib.h.
|
||||
*/
|
||||
|
||||
|
||||
/* Include auto-config file to find out which system include files we need. */
|
||||
|
||||
#include "jconfig.h" /* auto configuration options */
|
||||
#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
|
||||
|
||||
/*
|
||||
* We need the NULL macro and size_t typedef.
|
||||
* On an ANSI-conforming system it is sufficient to include <stddef.h>.
|
||||
* Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
|
||||
* pull in <sys/types.h> as well.
|
||||
* Note that the core JPEG library does not require <stdio.h>;
|
||||
* only the default error handler and data source/destination modules do.
|
||||
* But we must pull it in because of the references to FILE in jpeglib.h.
|
||||
* You can remove those references if you want to compile without <stdio.h>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* We need memory copying and zeroing functions, plus strncpy().
|
||||
* ANSI and System V implementations declare these in <string.h>.
|
||||
* BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
|
||||
* Some systems may declare memset and memcpy in <memory.h>.
|
||||
*
|
||||
* NOTE: we assume the size parameters to these functions are of type size_t.
|
||||
* Change the casts in these macros if not!
|
||||
*/
|
||||
|
||||
#ifdef NEED_BSD_STRINGS
|
||||
|
||||
#include <strings.h>
|
||||
#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size))
|
||||
#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size))
|
||||
|
||||
#else /* not BSD, assume ANSI/SysV string lib */
|
||||
|
||||
#include <string.h>
|
||||
#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size))
|
||||
#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size))
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* In ANSI C, and indeed any rational implementation, size_t is also the
|
||||
* type returned by sizeof(). However, it seems there are some irrational
|
||||
* implementations out there, in which sizeof() returns an int even though
|
||||
* size_t is defined as long or unsigned long. To ensure consistent results
|
||||
* we always use this SIZEOF() macro in place of using sizeof() directly.
|
||||
*/
|
||||
|
||||
#define SIZEOF(object) ((size_t) sizeof(object))
|
||||
|
||||
/*
|
||||
* The modules that use fread() and fwrite() always invoke them through
|
||||
* these macros. On some systems you may need to twiddle the argument casts.
|
||||
* CAUTION: argument order is different from underlying functions!
|
||||
*/
|
||||
|
||||
#define JFREAD(file,buf,sizeofbuf) \
|
||||
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
|
||||
#define JFWRITE(file,buf,sizeofbuf) \
|
||||
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
|
||||
/*
|
||||
* jinclude.h
|
||||
*
|
||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file exists to provide a single place to fix any problems with
|
||||
* including the wrong system include files. (Common problems are taken
|
||||
* care of by the standard jconfig symbols, but on really weird systems
|
||||
* you may have to edit this file.)
|
||||
*
|
||||
* NOTE: this file is NOT intended to be included by applications using the
|
||||
* JPEG library. Most applications need only include jpeglib.h.
|
||||
*/
|
||||
|
||||
|
||||
/* Include auto-config file to find out which system include files we need. */
|
||||
|
||||
#include "jconfig.h" /* auto configuration options */
|
||||
#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
|
||||
|
||||
/*
|
||||
* We need the NULL macro and size_t typedef.
|
||||
* On an ANSI-conforming system it is sufficient to include <stddef.h>.
|
||||
* Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
|
||||
* pull in <sys/types.h> as well.
|
||||
* Note that the core JPEG library does not require <stdio.h>;
|
||||
* only the default error handler and data source/destination modules do.
|
||||
* But we must pull it in because of the references to FILE in jpeglib.h.
|
||||
* You can remove those references if you want to compile without <stdio.h>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* We need memory copying and zeroing functions, plus strncpy().
|
||||
* ANSI and System V implementations declare these in <string.h>.
|
||||
* BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
|
||||
* Some systems may declare memset and memcpy in <memory.h>.
|
||||
*
|
||||
* NOTE: we assume the size parameters to these functions are of type size_t.
|
||||
* Change the casts in these macros if not!
|
||||
*/
|
||||
|
||||
#ifdef NEED_BSD_STRINGS
|
||||
|
||||
#include <strings.h>
|
||||
#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size))
|
||||
#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size))
|
||||
|
||||
#else /* not BSD, assume ANSI/SysV string lib */
|
||||
|
||||
#include <string.h>
|
||||
#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size))
|
||||
#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size))
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* In ANSI C, and indeed any rational implementation, size_t is also the
|
||||
* type returned by sizeof(). However, it seems there are some irrational
|
||||
* implementations out there, in which sizeof() returns an int even though
|
||||
* size_t is defined as long or unsigned long. To ensure consistent results
|
||||
* we always use this SIZEOF() macro in place of using sizeof() directly.
|
||||
*/
|
||||
|
||||
#define SIZEOF(object) ((size_t) sizeof(object))
|
||||
|
||||
/*
|
||||
* The modules that use fread() and fwrite() always invoke them through
|
||||
* these macros. On some systems you may need to twiddle the argument casts.
|
||||
* CAUTION: argument order is different from underlying functions!
|
||||
*/
|
||||
|
||||
#define JFREAD(file,buf,sizeofbuf) \
|
||||
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
|
||||
#define JFWRITE(file,buf,sizeofbuf) \
|
||||
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
|
||||
|
|
|
@ -1,198 +1,198 @@
|
|||
/*
|
||||
* jmemsys.h
|
||||
*
|
||||
* Copyright (C) 1992-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This include file defines the interface between the system-independent
|
||||
* and system-dependent portions of the JPEG memory manager. No other
|
||||
* modules need include it. (The system-independent portion is jmemmgr.c;
|
||||
* there are several different versions of the system-dependent portion.)
|
||||
*
|
||||
* This file works as-is for the system-dependent memory managers supplied
|
||||
* in the IJG distribution. You may need to modify it if you write a
|
||||
* custom memory manager. If system-dependent changes are needed in
|
||||
* this file, the best method is to #ifdef them based on a configuration
|
||||
* symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
|
||||
* and USE_MAC_MEMMGR.
|
||||
*/
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_get_small jGetSmall
|
||||
#define jpeg_free_small jFreeSmall
|
||||
#define jpeg_get_large jGetLarge
|
||||
#define jpeg_free_large jFreeLarge
|
||||
#define jpeg_mem_available jMemAvail
|
||||
#define jpeg_open_backing_store jOpenBackStore
|
||||
#define jpeg_mem_init jMemInit
|
||||
#define jpeg_mem_term jMemTerm
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/*
|
||||
* These two functions are used to allocate and release small chunks of
|
||||
* memory. (Typically the total amount requested through jpeg_get_small is
|
||||
* no more than 20K or so; this will be requested in chunks of a few K each.)
|
||||
* Behavior should be the same as for the standard library functions malloc
|
||||
* and free; in particular, jpeg_get_small must return NULL on failure.
|
||||
* On most systems, these ARE malloc and free. jpeg_free_small is passed the
|
||||
* size of the object being freed, just in case it's needed.
|
||||
* On an 80x86 machine using small-data memory model, these manage near heap.
|
||||
*/
|
||||
|
||||
EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
|
||||
EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
|
||||
size_t sizeofobject));
|
||||
|
||||
/*
|
||||
* These two functions are used to allocate and release large chunks of
|
||||
* memory (up to the total free space designated by jpeg_mem_available).
|
||||
* The interface is the same as above, except that on an 80x86 machine,
|
||||
* far pointers are used. On most other machines these are identical to
|
||||
* the jpeg_get/free_small routines; but we keep them separate anyway,
|
||||
* in case a different allocation strategy is desirable for large chunks.
|
||||
*/
|
||||
|
||||
EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
|
||||
size_t sizeofobject));
|
||||
EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
|
||||
size_t sizeofobject));
|
||||
|
||||
/*
|
||||
* The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
|
||||
* be requested in a single call to jpeg_get_large (and jpeg_get_small for that
|
||||
* matter, but that case should never come into play). This macro is needed
|
||||
* to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
|
||||
* On those machines, we expect that jconfig.h will provide a proper value.
|
||||
* On machines with 32-bit flat address spaces, any large constant may be used.
|
||||
*
|
||||
* NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
|
||||
* size_t and will be a multiple of sizeof(align_type).
|
||||
*/
|
||||
|
||||
#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */
|
||||
#define MAX_ALLOC_CHUNK 1000000000L
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This routine computes the total space still available for allocation by
|
||||
* jpeg_get_large. If more space than this is needed, backing store will be
|
||||
* used. NOTE: any memory already allocated must not be counted.
|
||||
*
|
||||
* There is a minimum space requirement, corresponding to the minimum
|
||||
* feasible buffer sizes; jmemmgr.c will request that much space even if
|
||||
* jpeg_mem_available returns zero. The maximum space needed, enough to hold
|
||||
* all working storage in memory, is also passed in case it is useful.
|
||||
* Finally, the total space already allocated is passed. If no better
|
||||
* method is available, cinfo->mem->max_memory_to_use - already_allocated
|
||||
* is often a suitable calculation.
|
||||
*
|
||||
* It is OK for jpeg_mem_available to underestimate the space available
|
||||
* (that'll just lead to more backing-store access than is really necessary).
|
||||
* However, an overestimate will lead to failure. Hence it's wise to subtract
|
||||
* a slop factor from the true available space. 5% should be enough.
|
||||
*
|
||||
* On machines with lots of virtual memory, any large constant may be returned.
|
||||
* Conversely, zero may be returned to always use the minimum amount of memory.
|
||||
*/
|
||||
|
||||
EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
|
||||
long min_bytes_needed,
|
||||
long max_bytes_needed,
|
||||
long already_allocated));
|
||||
|
||||
|
||||
/*
|
||||
* This structure holds whatever state is needed to access a single
|
||||
* backing-store object. The read/write/close method pointers are called
|
||||
* by jmemmgr.c to manipulate the backing-store object; all other fields
|
||||
* are private to the system-dependent backing store routines.
|
||||
*/
|
||||
|
||||
#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */
|
||||
|
||||
|
||||
#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */
|
||||
|
||||
typedef unsigned short XMSH; /* type of extended-memory handles */
|
||||
typedef unsigned short EMSH; /* type of expanded-memory handles */
|
||||
|
||||
typedef union {
|
||||
short file_handle; /* DOS file handle if it's a temp file */
|
||||
XMSH xms_handle; /* handle if it's a chunk of XMS */
|
||||
EMSH ems_handle; /* handle if it's a chunk of EMS */
|
||||
} handle_union;
|
||||
|
||||
#endif /* USE_MSDOS_MEMMGR */
|
||||
|
||||
#ifdef USE_MAC_MEMMGR /* Mac-specific junk */
|
||||
#include <Files.h>
|
||||
#endif /* USE_MAC_MEMMGR */
|
||||
|
||||
|
||||
typedef struct backing_store_struct * backing_store_ptr;
|
||||
|
||||
typedef struct backing_store_struct {
|
||||
/* Methods for reading/writing/closing this backing-store object */
|
||||
JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
void FAR * buffer_address,
|
||||
long file_offset, long byte_count));
|
||||
JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
void FAR * buffer_address,
|
||||
long file_offset, long byte_count));
|
||||
JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info));
|
||||
|
||||
/* Private fields for system-dependent backing-store management */
|
||||
#ifdef USE_MSDOS_MEMMGR
|
||||
/* For the MS-DOS manager (jmemdos.c), we need: */
|
||||
handle_union handle; /* reference to backing-store storage object */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
|
||||
#else
|
||||
#ifdef USE_MAC_MEMMGR
|
||||
/* For the Mac manager (jmemmac.c), we need: */
|
||||
short temp_file; /* file reference number to temp file */
|
||||
FSSpec tempSpec; /* the FSSpec for the temp file */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
|
||||
#else
|
||||
/* For a typical implementation with temp files, we need: */
|
||||
FILE * temp_file; /* stdio reference to temp file */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
|
||||
#endif
|
||||
#endif
|
||||
} backing_store_info;
|
||||
|
||||
|
||||
/*
|
||||
* Initial opening of a backing-store object. This must fill in the
|
||||
* read/write/close pointers in the object. The read/write routines
|
||||
* may take an error exit if the specified maximum file size is exceeded.
|
||||
* (If jpeg_mem_available always returns a large value, this routine can
|
||||
* just take an error exit.)
|
||||
*/
|
||||
|
||||
EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
long total_bytes_needed));
|
||||
|
||||
|
||||
/*
|
||||
* These routines take care of any system-dependent initialization and
|
||||
* cleanup required. jpeg_mem_init will be called before anything is
|
||||
* allocated (and, therefore, nothing in cinfo is of use except the error
|
||||
* manager pointer). It should return a suitable default value for
|
||||
* max_memory_to_use; this may subsequently be overridden by the surrounding
|
||||
* application. (Note that max_memory_to_use is only important if
|
||||
* jpeg_mem_available chooses to consult it ... no one else will.)
|
||||
* jpeg_mem_term may assume that all requested memory has been freed and that
|
||||
* all opened backing-store objects have been closed.
|
||||
*/
|
||||
|
||||
EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
|
||||
/*
|
||||
* jmemsys.h
|
||||
*
|
||||
* Copyright (C) 1992-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This include file defines the interface between the system-independent
|
||||
* and system-dependent portions of the JPEG memory manager. No other
|
||||
* modules need include it. (The system-independent portion is jmemmgr.c;
|
||||
* there are several different versions of the system-dependent portion.)
|
||||
*
|
||||
* This file works as-is for the system-dependent memory managers supplied
|
||||
* in the IJG distribution. You may need to modify it if you write a
|
||||
* custom memory manager. If system-dependent changes are needed in
|
||||
* this file, the best method is to #ifdef them based on a configuration
|
||||
* symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
|
||||
* and USE_MAC_MEMMGR.
|
||||
*/
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_get_small jGetSmall
|
||||
#define jpeg_free_small jFreeSmall
|
||||
#define jpeg_get_large jGetLarge
|
||||
#define jpeg_free_large jFreeLarge
|
||||
#define jpeg_mem_available jMemAvail
|
||||
#define jpeg_open_backing_store jOpenBackStore
|
||||
#define jpeg_mem_init jMemInit
|
||||
#define jpeg_mem_term jMemTerm
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/*
|
||||
* These two functions are used to allocate and release small chunks of
|
||||
* memory. (Typically the total amount requested through jpeg_get_small is
|
||||
* no more than 20K or so; this will be requested in chunks of a few K each.)
|
||||
* Behavior should be the same as for the standard library functions malloc
|
||||
* and free; in particular, jpeg_get_small must return NULL on failure.
|
||||
* On most systems, these ARE malloc and free. jpeg_free_small is passed the
|
||||
* size of the object being freed, just in case it's needed.
|
||||
* On an 80x86 machine using small-data memory model, these manage near heap.
|
||||
*/
|
||||
|
||||
EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
|
||||
EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
|
||||
size_t sizeofobject));
|
||||
|
||||
/*
|
||||
* These two functions are used to allocate and release large chunks of
|
||||
* memory (up to the total free space designated by jpeg_mem_available).
|
||||
* The interface is the same as above, except that on an 80x86 machine,
|
||||
* far pointers are used. On most other machines these are identical to
|
||||
* the jpeg_get/free_small routines; but we keep them separate anyway,
|
||||
* in case a different allocation strategy is desirable for large chunks.
|
||||
*/
|
||||
|
||||
EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
|
||||
size_t sizeofobject));
|
||||
EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
|
||||
size_t sizeofobject));
|
||||
|
||||
/*
|
||||
* The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
|
||||
* be requested in a single call to jpeg_get_large (and jpeg_get_small for that
|
||||
* matter, but that case should never come into play). This macro is needed
|
||||
* to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
|
||||
* On those machines, we expect that jconfig.h will provide a proper value.
|
||||
* On machines with 32-bit flat address spaces, any large constant may be used.
|
||||
*
|
||||
* NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
|
||||
* size_t and will be a multiple of sizeof(align_type).
|
||||
*/
|
||||
|
||||
#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */
|
||||
#define MAX_ALLOC_CHUNK 1000000000L
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This routine computes the total space still available for allocation by
|
||||
* jpeg_get_large. If more space than this is needed, backing store will be
|
||||
* used. NOTE: any memory already allocated must not be counted.
|
||||
*
|
||||
* There is a minimum space requirement, corresponding to the minimum
|
||||
* feasible buffer sizes; jmemmgr.c will request that much space even if
|
||||
* jpeg_mem_available returns zero. The maximum space needed, enough to hold
|
||||
* all working storage in memory, is also passed in case it is useful.
|
||||
* Finally, the total space already allocated is passed. If no better
|
||||
* method is available, cinfo->mem->max_memory_to_use - already_allocated
|
||||
* is often a suitable calculation.
|
||||
*
|
||||
* It is OK for jpeg_mem_available to underestimate the space available
|
||||
* (that'll just lead to more backing-store access than is really necessary).
|
||||
* However, an overestimate will lead to failure. Hence it's wise to subtract
|
||||
* a slop factor from the true available space. 5% should be enough.
|
||||
*
|
||||
* On machines with lots of virtual memory, any large constant may be returned.
|
||||
* Conversely, zero may be returned to always use the minimum amount of memory.
|
||||
*/
|
||||
|
||||
EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
|
||||
long min_bytes_needed,
|
||||
long max_bytes_needed,
|
||||
long already_allocated));
|
||||
|
||||
|
||||
/*
|
||||
* This structure holds whatever state is needed to access a single
|
||||
* backing-store object. The read/write/close method pointers are called
|
||||
* by jmemmgr.c to manipulate the backing-store object; all other fields
|
||||
* are private to the system-dependent backing store routines.
|
||||
*/
|
||||
|
||||
#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */
|
||||
|
||||
|
||||
#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */
|
||||
|
||||
typedef unsigned short XMSH; /* type of extended-memory handles */
|
||||
typedef unsigned short EMSH; /* type of expanded-memory handles */
|
||||
|
||||
typedef union {
|
||||
short file_handle; /* DOS file handle if it's a temp file */
|
||||
XMSH xms_handle; /* handle if it's a chunk of XMS */
|
||||
EMSH ems_handle; /* handle if it's a chunk of EMS */
|
||||
} handle_union;
|
||||
|
||||
#endif /* USE_MSDOS_MEMMGR */
|
||||
|
||||
#ifdef USE_MAC_MEMMGR /* Mac-specific junk */
|
||||
#include <Files.h>
|
||||
#endif /* USE_MAC_MEMMGR */
|
||||
|
||||
|
||||
typedef struct backing_store_struct * backing_store_ptr;
|
||||
|
||||
typedef struct backing_store_struct {
|
||||
/* Methods for reading/writing/closing this backing-store object */
|
||||
JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
void FAR * buffer_address,
|
||||
long file_offset, long byte_count));
|
||||
JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
void FAR * buffer_address,
|
||||
long file_offset, long byte_count));
|
||||
JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
|
||||
backing_store_ptr info));
|
||||
|
||||
/* Private fields for system-dependent backing-store management */
|
||||
#ifdef USE_MSDOS_MEMMGR
|
||||
/* For the MS-DOS manager (jmemdos.c), we need: */
|
||||
handle_union handle; /* reference to backing-store storage object */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
|
||||
#else
|
||||
#ifdef USE_MAC_MEMMGR
|
||||
/* For the Mac manager (jmemmac.c), we need: */
|
||||
short temp_file; /* file reference number to temp file */
|
||||
FSSpec tempSpec; /* the FSSpec for the temp file */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
|
||||
#else
|
||||
/* For a typical implementation with temp files, we need: */
|
||||
FILE * temp_file; /* stdio reference to temp file */
|
||||
char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
|
||||
#endif
|
||||
#endif
|
||||
} backing_store_info;
|
||||
|
||||
|
||||
/*
|
||||
* Initial opening of a backing-store object. This must fill in the
|
||||
* read/write/close pointers in the object. The read/write routines
|
||||
* may take an error exit if the specified maximum file size is exceeded.
|
||||
* (If jpeg_mem_available always returns a large value, this routine can
|
||||
* just take an error exit.)
|
||||
*/
|
||||
|
||||
EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
|
||||
backing_store_ptr info,
|
||||
long total_bytes_needed));
|
||||
|
||||
|
||||
/*
|
||||
* These routines take care of any system-dependent initialization and
|
||||
* cleanup required. jpeg_mem_init will be called before anything is
|
||||
* allocated (and, therefore, nothing in cinfo is of use except the error
|
||||
* manager pointer). It should return a suitable default value for
|
||||
* max_memory_to_use; this may subsequently be overridden by the surrounding
|
||||
* application. (Note that max_memory_to_use is only important if
|
||||
* jpeg_mem_available chooses to consult it ... no one else will.)
|
||||
* jpeg_mem_term may assume that all requested memory has been freed and that
|
||||
* all opened backing-store objects have been closed.
|
||||
*/
|
||||
|
||||
EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
|
||||
|
|
|
@ -1,371 +1,371 @@
|
|||
/*
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains additional configuration options that customize the
|
||||
* JPEG software for special applications or support machine-dependent
|
||||
* optimizations. Most users will not need to touch this file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
|
||||
* JPEG standard, and the IJG code does not support anything else!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
|
||||
/*
|
||||
* Maximum number of components (color channels) allowed in JPEG image.
|
||||
* To meet the letter of the JPEG spec, set this to 255. However, darn
|
||||
* few applications need more than 4 channels (maybe 5 for CMYK + alpha
|
||||
* mask). We recommend 10 as a reasonable compromise; use 4 if you are
|
||||
* really short on memory. (Each allowed component costs a hundred or so
|
||||
* bytes of storage, whether actually used in an image or not.)
|
||||
*/
|
||||
|
||||
#define MAX_COMPONENTS 10 /* maximum number of image components */
|
||||
|
||||
|
||||
/*
|
||||
* Basic data types.
|
||||
* You may need to change these if you have a machine with unusual data
|
||||
* type sizes; for example, "char" not 8 bits, "short" not 16 bits,
|
||||
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
|
||||
* but it had better be at least 16.
|
||||
*/
|
||||
|
||||
/* Representation of a single sample (pixel element value).
|
||||
* We frequently allocate large arrays of these, so it's important to keep
|
||||
* them small. But if you have memory to burn and access to char or short
|
||||
* arrays is very slow on your hardware, you might want to change these.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..255.
|
||||
* You can use a signed char by having GETJSAMPLE mask it with 0xFF.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JSAMPLE;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
#else
|
||||
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
#define MAXJSAMPLE 255
|
||||
#define CENTERJSAMPLE 128
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 8 */
|
||||
|
||||
|
||||
#if BITS_IN_JSAMPLE == 12
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
||||
* On nearly all machines "short" will do nicely.
|
||||
*/
|
||||
|
||||
typedef short JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#define MAXJSAMPLE 4095
|
||||
#define CENTERJSAMPLE 2048
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 12 */
|
||||
|
||||
|
||||
/* Representation of a DCT frequency coefficient.
|
||||
* This should be a signed value of at least 16 bits; "short" is usually OK.
|
||||
* Again, we allocate large arrays of these, but you can change to int
|
||||
* if you have memory to burn and "short" is really slow.
|
||||
*/
|
||||
|
||||
typedef short JCOEF;
|
||||
|
||||
|
||||
/* Compressed datastreams are represented as arrays of JOCTET.
|
||||
* These must be EXACTLY 8 bits wide, at least once they are written to
|
||||
* external storage. Note that when using the stdio data source/destination
|
||||
* managers, this is also the data type passed to fread/fwrite.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JOCTET;
|
||||
#define GETJOCTET(value) (value)
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JOCTET;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJOCTET(value) (value)
|
||||
#else
|
||||
#define GETJOCTET(value) ((value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
|
||||
/* These typedefs are used for various table entries and so forth.
|
||||
* They must be at least as wide as specified; but making them too big
|
||||
* won't cost a huge amount of memory, so we don't provide special
|
||||
* extraction code like we did for JSAMPLE. (In other words, these
|
||||
* typedefs live at a different point on the speed/space tradeoff curve.)
|
||||
*/
|
||||
|
||||
/* UINT8 must hold at least the values 0..255. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
typedef unsigned char UINT8;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
typedef short UINT8;
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
/* UINT16 must hold at least the values 0..65535. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
typedef unsigned short UINT16;
|
||||
#else /* not HAVE_UNSIGNED_SHORT */
|
||||
typedef unsigned int UINT16;
|
||||
#endif /* HAVE_UNSIGNED_SHORT */
|
||||
|
||||
/* INT16 must hold at least the values -32768..32767. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
|
||||
typedef short INT16;
|
||||
#endif
|
||||
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
|
||||
#ifndef _BASETSD_H /* MinGW is slightly different */
|
||||
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
||||
* "unsigned int" is sufficient on all machines. However, if you need to
|
||||
* handle larger images and you don't mind deviating from the spec, you
|
||||
* can change this datatype.
|
||||
*/
|
||||
|
||||
typedef unsigned int JDIMENSION;
|
||||
|
||||
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
|
||||
|
||||
|
||||
/* These macros are used in all function definitions and extern declarations.
|
||||
* You could modify them if you need to change function linkage conventions;
|
||||
* in particular, you'll need to do that to make the library a Windows DLL.
|
||||
* Another application is to make all functions global for use with debuggers
|
||||
* or code profilers that require it.
|
||||
*/
|
||||
|
||||
/* a function called through method pointers: */
|
||||
#define METHODDEF(type) static type
|
||||
/* a function used only in its module: */
|
||||
#define LOCAL(type) static type
|
||||
/* a function referenced thru EXTERNs: */
|
||||
#define GLOBAL(type) type
|
||||
/* a reference to a GLOBAL function: */
|
||||
#define EXTERN(type) extern type
|
||||
|
||||
|
||||
/* This macro is used to declare a "method", that is, a function pointer.
|
||||
* We want to supply prototype parameters if the compiler can cope.
|
||||
* Note that the arglist parameter must be parenthesized!
|
||||
* Again, you can customize this if you need special linkage keywords.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Here is the pseudo-keyword for declaring pointers that must be "far"
|
||||
* on 80x86 machines. Most of the specialized coding for 80x86 is handled
|
||||
* by just saying "FAR *" where such a pointer is needed. In a few places
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
*/
|
||||
|
||||
#ifndef FAR
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#define FAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* On a few systems, type boolean and/or its values FALSE, TRUE may appear
|
||||
* in standard header files. Or you may have conflicts with application-
|
||||
* specific header files that you want to include together with these files.
|
||||
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_BOOLEAN
|
||||
typedef int boolean;
|
||||
#endif
|
||||
#ifndef FALSE /* in case these macros already exist */
|
||||
#define FALSE 0 /* values of boolean */
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The remaining options affect code selection within the JPEG library,
|
||||
* but they don't need to be visible to most applications using the library.
|
||||
* To minimize application namespace pollution, the symbols won't be
|
||||
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
#define JPEG_INTERNAL_OPTIONS
|
||||
#endif
|
||||
|
||||
#ifdef JPEG_INTERNAL_OPTIONS
|
||||
|
||||
|
||||
/*
|
||||
* These defines indicate whether to include various optional functions.
|
||||
* Undefining some of these symbols will produce a smaller but less capable
|
||||
* library. Note that you can leave certain source files out of the
|
||||
* compilation/linking process if you've #undef'd the corresponding symbols.
|
||||
* (You may HAVE to do that if your compiler doesn't like null source files.)
|
||||
*/
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
|
||||
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
||||
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
|
||||
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
|
||||
* precision, so jchuff.c normally uses entropy optimization to compute
|
||||
* usable tables for higher precision. If you don't want to do optimization,
|
||||
* you'll have to supply different default Huffman tables.
|
||||
* The exact same statements apply for progressive JPEG: the default tables
|
||||
* don't work for progressive mode. (This may get fixed, however.)
|
||||
*/
|
||||
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
||||
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
||||
|
||||
/* more capability options later, no doubt */
|
||||
|
||||
|
||||
/*
|
||||
* Ordering of RGB data in scanlines passed to or from the application.
|
||||
* If your application wants to deal with data in the order B,G,R, just
|
||||
* change these macros. You can also deal with formats such as R,G,B,X
|
||||
* (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
|
||||
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
|
||||
* useful if you are using JPEG color spaces other than YCbCr or grayscale.
|
||||
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
||||
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
#define RGB_GREEN 1 /* Offset of Green */
|
||||
#define RGB_BLUE 2 /* Offset of Blue */
|
||||
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
|
||||
|
||||
/* If your compiler supports inline functions, define INLINE
|
||||
* as the inline keyword; otherwise define it as empty.
|
||||
*/
|
||||
|
||||
#ifndef INLINE
|
||||
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
|
||||
#define INLINE __inline__
|
||||
#endif
|
||||
#ifndef INLINE
|
||||
#define INLINE /* default is to define it as empty */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
||||
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
|
||||
* as short on such a machine. MULTIPLIER must be at least 16 bits wide.
|
||||
*/
|
||||
|
||||
#ifndef MULTIPLIER
|
||||
#define MULTIPLIER int /* type for fastest integer multiply */
|
||||
#endif
|
||||
|
||||
|
||||
/* FAST_FLOAT should be either float or double, whichever is done faster
|
||||
* by your compiler. (Note that this type is only used in the floating point
|
||||
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
|
||||
* Typically, float is faster in ANSI C compilers, while double is faster in
|
||||
* pre-ANSI compilers (because they insist on converting to double anyway).
|
||||
* The code below therefore chooses float if we have ANSI-style prototypes.
|
||||
*/
|
||||
|
||||
#ifndef FAST_FLOAT
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define FAST_FLOAT float
|
||||
#else
|
||||
#define FAST_FLOAT double
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEG_INTERNAL_OPTIONS */
|
||||
/*
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains additional configuration options that customize the
|
||||
* JPEG software for special applications or support machine-dependent
|
||||
* optimizations. Most users will not need to touch this file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
|
||||
* JPEG standard, and the IJG code does not support anything else!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
|
||||
/*
|
||||
* Maximum number of components (color channels) allowed in JPEG image.
|
||||
* To meet the letter of the JPEG spec, set this to 255. However, darn
|
||||
* few applications need more than 4 channels (maybe 5 for CMYK + alpha
|
||||
* mask). We recommend 10 as a reasonable compromise; use 4 if you are
|
||||
* really short on memory. (Each allowed component costs a hundred or so
|
||||
* bytes of storage, whether actually used in an image or not.)
|
||||
*/
|
||||
|
||||
#define MAX_COMPONENTS 10 /* maximum number of image components */
|
||||
|
||||
|
||||
/*
|
||||
* Basic data types.
|
||||
* You may need to change these if you have a machine with unusual data
|
||||
* type sizes; for example, "char" not 8 bits, "short" not 16 bits,
|
||||
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
|
||||
* but it had better be at least 16.
|
||||
*/
|
||||
|
||||
/* Representation of a single sample (pixel element value).
|
||||
* We frequently allocate large arrays of these, so it's important to keep
|
||||
* them small. But if you have memory to burn and access to char or short
|
||||
* arrays is very slow on your hardware, you might want to change these.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..255.
|
||||
* You can use a signed char by having GETJSAMPLE mask it with 0xFF.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JSAMPLE;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
#else
|
||||
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
#define MAXJSAMPLE 255
|
||||
#define CENTERJSAMPLE 128
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 8 */
|
||||
|
||||
|
||||
#if BITS_IN_JSAMPLE == 12
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
||||
* On nearly all machines "short" will do nicely.
|
||||
*/
|
||||
|
||||
typedef short JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#define MAXJSAMPLE 4095
|
||||
#define CENTERJSAMPLE 2048
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 12 */
|
||||
|
||||
|
||||
/* Representation of a DCT frequency coefficient.
|
||||
* This should be a signed value of at least 16 bits; "short" is usually OK.
|
||||
* Again, we allocate large arrays of these, but you can change to int
|
||||
* if you have memory to burn and "short" is really slow.
|
||||
*/
|
||||
|
||||
typedef short JCOEF;
|
||||
|
||||
|
||||
/* Compressed datastreams are represented as arrays of JOCTET.
|
||||
* These must be EXACTLY 8 bits wide, at least once they are written to
|
||||
* external storage. Note that when using the stdio data source/destination
|
||||
* managers, this is also the data type passed to fread/fwrite.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JOCTET;
|
||||
#define GETJOCTET(value) (value)
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JOCTET;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJOCTET(value) (value)
|
||||
#else
|
||||
#define GETJOCTET(value) ((value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
|
||||
/* These typedefs are used for various table entries and so forth.
|
||||
* They must be at least as wide as specified; but making them too big
|
||||
* won't cost a huge amount of memory, so we don't provide special
|
||||
* extraction code like we did for JSAMPLE. (In other words, these
|
||||
* typedefs live at a different point on the speed/space tradeoff curve.)
|
||||
*/
|
||||
|
||||
/* UINT8 must hold at least the values 0..255. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
typedef unsigned char UINT8;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
typedef short UINT8;
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
/* UINT16 must hold at least the values 0..65535. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
typedef unsigned short UINT16;
|
||||
#else /* not HAVE_UNSIGNED_SHORT */
|
||||
typedef unsigned int UINT16;
|
||||
#endif /* HAVE_UNSIGNED_SHORT */
|
||||
|
||||
/* INT16 must hold at least the values -32768..32767. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
|
||||
typedef short INT16;
|
||||
#endif
|
||||
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
|
||||
#ifndef _BASETSD_H /* MinGW is slightly different */
|
||||
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
||||
* "unsigned int" is sufficient on all machines. However, if you need to
|
||||
* handle larger images and you don't mind deviating from the spec, you
|
||||
* can change this datatype.
|
||||
*/
|
||||
|
||||
typedef unsigned int JDIMENSION;
|
||||
|
||||
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
|
||||
|
||||
|
||||
/* These macros are used in all function definitions and extern declarations.
|
||||
* You could modify them if you need to change function linkage conventions;
|
||||
* in particular, you'll need to do that to make the library a Windows DLL.
|
||||
* Another application is to make all functions global for use with debuggers
|
||||
* or code profilers that require it.
|
||||
*/
|
||||
|
||||
/* a function called through method pointers: */
|
||||
#define METHODDEF(type) static type
|
||||
/* a function used only in its module: */
|
||||
#define LOCAL(type) static type
|
||||
/* a function referenced thru EXTERNs: */
|
||||
#define GLOBAL(type) type
|
||||
/* a reference to a GLOBAL function: */
|
||||
#define EXTERN(type) extern type
|
||||
|
||||
|
||||
/* This macro is used to declare a "method", that is, a function pointer.
|
||||
* We want to supply prototype parameters if the compiler can cope.
|
||||
* Note that the arglist parameter must be parenthesized!
|
||||
* Again, you can customize this if you need special linkage keywords.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Here is the pseudo-keyword for declaring pointers that must be "far"
|
||||
* on 80x86 machines. Most of the specialized coding for 80x86 is handled
|
||||
* by just saying "FAR *" where such a pointer is needed. In a few places
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
*/
|
||||
|
||||
#ifndef FAR
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#define FAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* On a few systems, type boolean and/or its values FALSE, TRUE may appear
|
||||
* in standard header files. Or you may have conflicts with application-
|
||||
* specific header files that you want to include together with these files.
|
||||
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_BOOLEAN
|
||||
typedef int boolean;
|
||||
#endif
|
||||
#ifndef FALSE /* in case these macros already exist */
|
||||
#define FALSE 0 /* values of boolean */
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The remaining options affect code selection within the JPEG library,
|
||||
* but they don't need to be visible to most applications using the library.
|
||||
* To minimize application namespace pollution, the symbols won't be
|
||||
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
#define JPEG_INTERNAL_OPTIONS
|
||||
#endif
|
||||
|
||||
#ifdef JPEG_INTERNAL_OPTIONS
|
||||
|
||||
|
||||
/*
|
||||
* These defines indicate whether to include various optional functions.
|
||||
* Undefining some of these symbols will produce a smaller but less capable
|
||||
* library. Note that you can leave certain source files out of the
|
||||
* compilation/linking process if you've #undef'd the corresponding symbols.
|
||||
* (You may HAVE to do that if your compiler doesn't like null source files.)
|
||||
*/
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
|
||||
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
||||
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
|
||||
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
|
||||
* precision, so jchuff.c normally uses entropy optimization to compute
|
||||
* usable tables for higher precision. If you don't want to do optimization,
|
||||
* you'll have to supply different default Huffman tables.
|
||||
* The exact same statements apply for progressive JPEG: the default tables
|
||||
* don't work for progressive mode. (This may get fixed, however.)
|
||||
*/
|
||||
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
||||
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
||||
|
||||
/* more capability options later, no doubt */
|
||||
|
||||
|
||||
/*
|
||||
* Ordering of RGB data in scanlines passed to or from the application.
|
||||
* If your application wants to deal with data in the order B,G,R, just
|
||||
* change these macros. You can also deal with formats such as R,G,B,X
|
||||
* (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
|
||||
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
|
||||
* useful if you are using JPEG color spaces other than YCbCr or grayscale.
|
||||
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
||||
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
#define RGB_GREEN 1 /* Offset of Green */
|
||||
#define RGB_BLUE 2 /* Offset of Blue */
|
||||
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
|
||||
|
||||
/* If your compiler supports inline functions, define INLINE
|
||||
* as the inline keyword; otherwise define it as empty.
|
||||
*/
|
||||
|
||||
#ifndef INLINE
|
||||
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
|
||||
#define INLINE __inline__
|
||||
#endif
|
||||
#ifndef INLINE
|
||||
#define INLINE /* default is to define it as empty */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
||||
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
|
||||
* as short on such a machine. MULTIPLIER must be at least 16 bits wide.
|
||||
*/
|
||||
|
||||
#ifndef MULTIPLIER
|
||||
#define MULTIPLIER int /* type for fastest integer multiply */
|
||||
#endif
|
||||
|
||||
|
||||
/* FAST_FLOAT should be either float or double, whichever is done faster
|
||||
* by your compiler. (Note that this type is only used in the floating point
|
||||
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
|
||||
* Typically, float is faster in ANSI C compilers, while double is faster in
|
||||
* pre-ANSI compilers (because they insist on converting to double anyway).
|
||||
* The code below therefore chooses float if we have ANSI-style prototypes.
|
||||
*/
|
||||
|
||||
#ifndef FAST_FLOAT
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define FAST_FLOAT float
|
||||
#else
|
||||
#define FAST_FLOAT double
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEG_INTERNAL_OPTIONS */
|
||||
|
|
|
@ -1,407 +1,407 @@
|
|||
/*
|
||||
* jpegint.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file provides common declarations for the various JPEG modules.
|
||||
* These declarations are considered internal to the JPEG library; most
|
||||
* applications using the library shouldn't need to include this file.
|
||||
*/
|
||||
|
||||
|
||||
/* Declarations for both compression & decompression */
|
||||
|
||||
typedef enum { /* Operating modes for buffer controllers */
|
||||
JBUF_PASS_THRU, /* Plain stripwise operation */
|
||||
/* Remaining modes require a full-image buffer to have been created */
|
||||
JBUF_SAVE_SOURCE, /* Run source subobject only, save output */
|
||||
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
|
||||
JBUF_SAVE_AND_PASS /* Run both subobjects, save output */
|
||||
} J_BUF_MODE;
|
||||
|
||||
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
|
||||
#define CSTATE_START 100 /* after create_compress */
|
||||
#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */
|
||||
#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */
|
||||
#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */
|
||||
#define DSTATE_START 200 /* after create_decompress */
|
||||
#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */
|
||||
#define DSTATE_READY 202 /* found SOS, ready for start_decompress */
|
||||
#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/
|
||||
#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */
|
||||
#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */
|
||||
#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */
|
||||
#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */
|
||||
#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */
|
||||
#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */
|
||||
#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */
|
||||
|
||||
|
||||
/* Declarations for compression modules */
|
||||
|
||||
/* Master control module */
|
||||
struct jpeg_comp_master {
|
||||
JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean call_pass_startup; /* True if pass_startup must be called */
|
||||
boolean is_last_pass; /* True during last pass */
|
||||
};
|
||||
|
||||
/* Main buffer control (downsampled-data buffer) */
|
||||
struct jpeg_c_main_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, process_data, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
|
||||
JDIMENSION in_rows_avail));
|
||||
};
|
||||
|
||||
/* Compression preprocessing (downsampling input buffer control) */
|
||||
struct jpeg_c_prep_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf,
|
||||
JDIMENSION *in_row_ctr,
|
||||
JDIMENSION in_rows_avail,
|
||||
JSAMPIMAGE output_buf,
|
||||
JDIMENSION *out_row_group_ctr,
|
||||
JDIMENSION out_row_groups_avail));
|
||||
};
|
||||
|
||||
/* Coefficient buffer control */
|
||||
struct jpeg_c_coef_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf));
|
||||
};
|
||||
|
||||
/* Colorspace conversion */
|
||||
struct jpeg_color_converter {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, color_convert, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
|
||||
JDIMENSION output_row, int num_rows));
|
||||
};
|
||||
|
||||
/* Downsampling */
|
||||
struct jpeg_downsampler {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, downsample, (j_compress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION in_row_index,
|
||||
JSAMPIMAGE output_buf,
|
||||
JDIMENSION out_row_group_index));
|
||||
|
||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
||||
};
|
||||
|
||||
/* Forward DCT (also controls coefficient quantization) */
|
||||
typedef JMETHOD(void, forward_DCT_ptr,
|
||||
(j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
||||
JDIMENSION start_row, JDIMENSION start_col,
|
||||
JDIMENSION num_blocks));
|
||||
|
||||
struct jpeg_forward_dct {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
/* It is useful to allow each component to have a separate FDCT method. */
|
||||
forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
|
||||
};
|
||||
|
||||
/* Entropy encoding */
|
||||
struct jpeg_entropy_encoder {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
|
||||
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||
};
|
||||
|
||||
/* Marker writing */
|
||||
struct jpeg_marker_writer {
|
||||
JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
|
||||
/* These routines are exported to allow insertion of extra markers */
|
||||
/* Probably only COM and APPn markers should be written this way */
|
||||
JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
|
||||
unsigned int datalen));
|
||||
JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
|
||||
};
|
||||
|
||||
|
||||
/* Declarations for decompression modules */
|
||||
|
||||
/* Master control module */
|
||||
struct jpeg_decomp_master {
|
||||
JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
|
||||
};
|
||||
|
||||
/* Input control module */
|
||||
struct jpeg_input_controller {
|
||||
JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean has_multiple_scans; /* True if file has multiple scans */
|
||||
boolean eoi_reached; /* True when EOI has been consumed */
|
||||
};
|
||||
|
||||
/* Main buffer control (downsampled-data buffer) */
|
||||
struct jpeg_d_main_controller {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, process_data, (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
};
|
||||
|
||||
/* Coefficient buffer control */
|
||||
struct jpeg_d_coef_controller {
|
||||
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE output_buf));
|
||||
/* Pointer to array of coefficient virtual arrays, or NULL if none */
|
||||
jvirt_barray_ptr *coef_arrays;
|
||||
};
|
||||
|
||||
/* Decompression postprocessing (color quantization buffer control) */
|
||||
struct jpeg_d_post_controller {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION *in_row_group_ctr,
|
||||
JDIMENSION in_row_groups_avail,
|
||||
JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
};
|
||||
|
||||
/* Marker reading & parsing */
|
||||
struct jpeg_marker_reader {
|
||||
JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
|
||||
/* Read markers until SOS or EOI.
|
||||
* Returns same codes as are defined for jpeg_consume_input:
|
||||
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
|
||||
*/
|
||||
JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
|
||||
/* Read a restart marker --- exported for use by entropy decoder only */
|
||||
jpeg_marker_parser_method read_restart_marker;
|
||||
|
||||
/* State of marker reader --- nominally internal, but applications
|
||||
* supplying COM or APPn handlers might like to know the state.
|
||||
*/
|
||||
boolean saw_SOI; /* found SOI? */
|
||||
boolean saw_SOF; /* found SOF? */
|
||||
int next_restart_num; /* next restart number expected (0-7) */
|
||||
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
|
||||
};
|
||||
|
||||
/* Entropy decoding */
|
||||
struct jpeg_entropy_decoder {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
|
||||
JBLOCKROW *MCU_data));
|
||||
};
|
||||
|
||||
/* Inverse DCT (also performs dequantization) */
|
||||
typedef JMETHOD(void, inverse_DCT_method_ptr,
|
||||
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block,
|
||||
JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
|
||||
struct jpeg_inverse_dct {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
/* It is useful to allow each component to have a separate IDCT method. */
|
||||
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
|
||||
};
|
||||
|
||||
/* Upsampling (note that upsampler must also call color converter) */
|
||||
struct jpeg_upsampler {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, upsample, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION *in_row_group_ctr,
|
||||
JDIMENSION in_row_groups_avail,
|
||||
JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
|
||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
||||
};
|
||||
|
||||
/* Colorspace conversion */
|
||||
struct jpeg_color_deconverter {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows));
|
||||
};
|
||||
|
||||
/* Color quantization or color precision reduction */
|
||||
struct jpeg_color_quantizer {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
|
||||
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
|
||||
int num_rows));
|
||||
JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
|
||||
};
|
||||
|
||||
|
||||
/* Miscellaneous useful macros */
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#undef MIN
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
||||
/* We assume that right shift corresponds to signed division by 2 with
|
||||
* rounding towards minus infinity. This is correct for typical "arithmetic
|
||||
* shift" instructions that shift in copies of the sign bit. But some
|
||||
* C compilers implement >> with an unsigned shift. For these machines you
|
||||
* must define RIGHT_SHIFT_IS_UNSIGNED.
|
||||
* RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
|
||||
* It is only applied with constant shift counts. SHIFT_TEMPS must be
|
||||
* included in the variables of any routine using RIGHT_SHIFT.
|
||||
*/
|
||||
|
||||
#ifdef RIGHT_SHIFT_IS_UNSIGNED
|
||||
#define SHIFT_TEMPS INT32 shift_temp;
|
||||
#define RIGHT_SHIFT(x,shft) \
|
||||
((shift_temp = (x)) < 0 ? \
|
||||
(shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
|
||||
(shift_temp >> (shft)))
|
||||
#else
|
||||
#define SHIFT_TEMPS
|
||||
#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
|
||||
#endif
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jinit_compress_master jICompress
|
||||
#define jinit_c_master_control jICMaster
|
||||
#define jinit_c_main_controller jICMainC
|
||||
#define jinit_c_prep_controller jICPrepC
|
||||
#define jinit_c_coef_controller jICCoefC
|
||||
#define jinit_color_converter jICColor
|
||||
#define jinit_downsampler jIDownsampler
|
||||
#define jinit_forward_dct jIFDCT
|
||||
#define jinit_huff_encoder jIHEncoder
|
||||
#define jinit_arith_encoder jIAEncoder
|
||||
#define jinit_marker_writer jIMWriter
|
||||
#define jinit_master_decompress jIDMaster
|
||||
#define jinit_d_main_controller jIDMainC
|
||||
#define jinit_d_coef_controller jIDCoefC
|
||||
#define jinit_d_post_controller jIDPostC
|
||||
#define jinit_input_controller jIInCtlr
|
||||
#define jinit_marker_reader jIMReader
|
||||
#define jinit_huff_decoder jIHDecoder
|
||||
#define jinit_arith_decoder jIADecoder
|
||||
#define jinit_inverse_dct jIIDCT
|
||||
#define jinit_upsampler jIUpsampler
|
||||
#define jinit_color_deconverter jIDColor
|
||||
#define jinit_1pass_quantizer jI1Quant
|
||||
#define jinit_2pass_quantizer jI2Quant
|
||||
#define jinit_merged_upsampler jIMUpsampler
|
||||
#define jinit_memory_mgr jIMemMgr
|
||||
#define jdiv_round_up jDivRound
|
||||
#define jround_up jRound
|
||||
#define jcopy_sample_rows jCopySamples
|
||||
#define jcopy_block_row jCopyBlocks
|
||||
#define jzero_far jZeroFar
|
||||
#define jpeg_zigzag_order jZIGTable
|
||||
#define jpeg_natural_order jZAGTable
|
||||
#define jpeg_natural_order7 jZAGTable7
|
||||
#define jpeg_natural_order6 jZAGTable6
|
||||
#define jpeg_natural_order5 jZAGTable5
|
||||
#define jpeg_natural_order4 jZAGTable4
|
||||
#define jpeg_natural_order3 jZAGTable3
|
||||
#define jpeg_natural_order2 jZAGTable2
|
||||
#define jpeg_aritab jAriTab
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/* Compression module initialization routines */
|
||||
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
|
||||
boolean transcode_only));
|
||||
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
|
||||
/* Decompression module initialization routines */
|
||||
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
|
||||
/* Memory manager initialization */
|
||||
EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
||||
|
||||
/* Utility routines in jutils.c */
|
||||
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
||||
EXTERN(long) jround_up JPP((long a, long b));
|
||||
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
||||
JSAMPARRAY output_array, int dest_row,
|
||||
int num_rows, JDIMENSION num_cols));
|
||||
EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
|
||||
JDIMENSION num_blocks));
|
||||
EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
|
||||
/* Constant tables in jutils.c */
|
||||
#if 0 /* This table is not actually needed in v6a */
|
||||
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
|
||||
#endif
|
||||
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
|
||||
extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
|
||||
extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
|
||||
extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
|
||||
extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
|
||||
extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
|
||||
extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
|
||||
|
||||
/* Arithmetic coding probability estimation tables in jaricom.c */
|
||||
extern const INT32 jpeg_aritab[];
|
||||
|
||||
/* Suppress undefined-structure complaints if necessary. */
|
||||
|
||||
#ifdef INCOMPLETE_TYPES_BROKEN
|
||||
#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */
|
||||
struct jvirt_sarray_control { long dummy; };
|
||||
struct jvirt_barray_control { long dummy; };
|
||||
#endif
|
||||
#endif /* INCOMPLETE_TYPES_BROKEN */
|
||||
/*
|
||||
* jpegint.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file provides common declarations for the various JPEG modules.
|
||||
* These declarations are considered internal to the JPEG library; most
|
||||
* applications using the library shouldn't need to include this file.
|
||||
*/
|
||||
|
||||
|
||||
/* Declarations for both compression & decompression */
|
||||
|
||||
typedef enum { /* Operating modes for buffer controllers */
|
||||
JBUF_PASS_THRU, /* Plain stripwise operation */
|
||||
/* Remaining modes require a full-image buffer to have been created */
|
||||
JBUF_SAVE_SOURCE, /* Run source subobject only, save output */
|
||||
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
|
||||
JBUF_SAVE_AND_PASS /* Run both subobjects, save output */
|
||||
} J_BUF_MODE;
|
||||
|
||||
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
|
||||
#define CSTATE_START 100 /* after create_compress */
|
||||
#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */
|
||||
#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */
|
||||
#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */
|
||||
#define DSTATE_START 200 /* after create_decompress */
|
||||
#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */
|
||||
#define DSTATE_READY 202 /* found SOS, ready for start_decompress */
|
||||
#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/
|
||||
#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */
|
||||
#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */
|
||||
#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */
|
||||
#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */
|
||||
#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */
|
||||
#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */
|
||||
#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */
|
||||
|
||||
|
||||
/* Declarations for compression modules */
|
||||
|
||||
/* Master control module */
|
||||
struct jpeg_comp_master {
|
||||
JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean call_pass_startup; /* True if pass_startup must be called */
|
||||
boolean is_last_pass; /* True during last pass */
|
||||
};
|
||||
|
||||
/* Main buffer control (downsampled-data buffer) */
|
||||
struct jpeg_c_main_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, process_data, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
|
||||
JDIMENSION in_rows_avail));
|
||||
};
|
||||
|
||||
/* Compression preprocessing (downsampling input buffer control) */
|
||||
struct jpeg_c_prep_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf,
|
||||
JDIMENSION *in_row_ctr,
|
||||
JDIMENSION in_rows_avail,
|
||||
JSAMPIMAGE output_buf,
|
||||
JDIMENSION *out_row_group_ctr,
|
||||
JDIMENSION out_row_groups_avail));
|
||||
};
|
||||
|
||||
/* Coefficient buffer control */
|
||||
struct jpeg_c_coef_controller {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf));
|
||||
};
|
||||
|
||||
/* Colorspace conversion */
|
||||
struct jpeg_color_converter {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, color_convert, (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
|
||||
JDIMENSION output_row, int num_rows));
|
||||
};
|
||||
|
||||
/* Downsampling */
|
||||
struct jpeg_downsampler {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, downsample, (j_compress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION in_row_index,
|
||||
JSAMPIMAGE output_buf,
|
||||
JDIMENSION out_row_group_index));
|
||||
|
||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
||||
};
|
||||
|
||||
/* Forward DCT (also controls coefficient quantization) */
|
||||
typedef JMETHOD(void, forward_DCT_ptr,
|
||||
(j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
||||
JDIMENSION start_row, JDIMENSION start_col,
|
||||
JDIMENSION num_blocks));
|
||||
|
||||
struct jpeg_forward_dct {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
/* It is useful to allow each component to have a separate FDCT method. */
|
||||
forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
|
||||
};
|
||||
|
||||
/* Entropy encoding */
|
||||
struct jpeg_entropy_encoder {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
|
||||
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||
};
|
||||
|
||||
/* Marker writing */
|
||||
struct jpeg_marker_writer {
|
||||
JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
|
||||
/* These routines are exported to allow insertion of extra markers */
|
||||
/* Probably only COM and APPn markers should be written this way */
|
||||
JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
|
||||
unsigned int datalen));
|
||||
JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
|
||||
};
|
||||
|
||||
|
||||
/* Declarations for decompression modules */
|
||||
|
||||
/* Master control module */
|
||||
struct jpeg_decomp_master {
|
||||
JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
|
||||
};
|
||||
|
||||
/* Input control module */
|
||||
struct jpeg_input_controller {
|
||||
JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
|
||||
|
||||
/* State variables made visible to other modules */
|
||||
boolean has_multiple_scans; /* True if file has multiple scans */
|
||||
boolean eoi_reached; /* True when EOI has been consumed */
|
||||
};
|
||||
|
||||
/* Main buffer control (downsampled-data buffer) */
|
||||
struct jpeg_d_main_controller {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, process_data, (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
};
|
||||
|
||||
/* Coefficient buffer control */
|
||||
struct jpeg_d_coef_controller {
|
||||
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE output_buf));
|
||||
/* Pointer to array of coefficient virtual arrays, or NULL if none */
|
||||
jvirt_barray_ptr *coef_arrays;
|
||||
};
|
||||
|
||||
/* Decompression postprocessing (color quantization buffer control) */
|
||||
struct jpeg_d_post_controller {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||
JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION *in_row_group_ctr,
|
||||
JDIMENSION in_row_groups_avail,
|
||||
JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
};
|
||||
|
||||
/* Marker reading & parsing */
|
||||
struct jpeg_marker_reader {
|
||||
JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
|
||||
/* Read markers until SOS or EOI.
|
||||
* Returns same codes as are defined for jpeg_consume_input:
|
||||
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
|
||||
*/
|
||||
JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
|
||||
/* Read a restart marker --- exported for use by entropy decoder only */
|
||||
jpeg_marker_parser_method read_restart_marker;
|
||||
|
||||
/* State of marker reader --- nominally internal, but applications
|
||||
* supplying COM or APPn handlers might like to know the state.
|
||||
*/
|
||||
boolean saw_SOI; /* found SOI? */
|
||||
boolean saw_SOF; /* found SOF? */
|
||||
int next_restart_num; /* next restart number expected (0-7) */
|
||||
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
|
||||
};
|
||||
|
||||
/* Entropy decoding */
|
||||
struct jpeg_entropy_decoder {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
|
||||
JBLOCKROW *MCU_data));
|
||||
};
|
||||
|
||||
/* Inverse DCT (also performs dequantization) */
|
||||
typedef JMETHOD(void, inverse_DCT_method_ptr,
|
||||
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block,
|
||||
JSAMPARRAY output_buf, JDIMENSION output_col));
|
||||
|
||||
struct jpeg_inverse_dct {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
/* It is useful to allow each component to have a separate IDCT method. */
|
||||
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
|
||||
};
|
||||
|
||||
/* Upsampling (note that upsampler must also call color converter) */
|
||||
struct jpeg_upsampler {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, upsample, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION *in_row_group_ctr,
|
||||
JDIMENSION in_row_groups_avail,
|
||||
JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail));
|
||||
|
||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
||||
};
|
||||
|
||||
/* Colorspace conversion */
|
||||
struct jpeg_color_deconverter {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows));
|
||||
};
|
||||
|
||||
/* Color quantization or color precision reduction */
|
||||
struct jpeg_color_quantizer {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
|
||||
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
|
||||
int num_rows));
|
||||
JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
|
||||
};
|
||||
|
||||
|
||||
/* Miscellaneous useful macros */
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#undef MIN
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
||||
/* We assume that right shift corresponds to signed division by 2 with
|
||||
* rounding towards minus infinity. This is correct for typical "arithmetic
|
||||
* shift" instructions that shift in copies of the sign bit. But some
|
||||
* C compilers implement >> with an unsigned shift. For these machines you
|
||||
* must define RIGHT_SHIFT_IS_UNSIGNED.
|
||||
* RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
|
||||
* It is only applied with constant shift counts. SHIFT_TEMPS must be
|
||||
* included in the variables of any routine using RIGHT_SHIFT.
|
||||
*/
|
||||
|
||||
#ifdef RIGHT_SHIFT_IS_UNSIGNED
|
||||
#define SHIFT_TEMPS INT32 shift_temp;
|
||||
#define RIGHT_SHIFT(x,shft) \
|
||||
((shift_temp = (x)) < 0 ? \
|
||||
(shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
|
||||
(shift_temp >> (shft)))
|
||||
#else
|
||||
#define SHIFT_TEMPS
|
||||
#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
|
||||
#endif
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jinit_compress_master jICompress
|
||||
#define jinit_c_master_control jICMaster
|
||||
#define jinit_c_main_controller jICMainC
|
||||
#define jinit_c_prep_controller jICPrepC
|
||||
#define jinit_c_coef_controller jICCoefC
|
||||
#define jinit_color_converter jICColor
|
||||
#define jinit_downsampler jIDownsampler
|
||||
#define jinit_forward_dct jIFDCT
|
||||
#define jinit_huff_encoder jIHEncoder
|
||||
#define jinit_arith_encoder jIAEncoder
|
||||
#define jinit_marker_writer jIMWriter
|
||||
#define jinit_master_decompress jIDMaster
|
||||
#define jinit_d_main_controller jIDMainC
|
||||
#define jinit_d_coef_controller jIDCoefC
|
||||
#define jinit_d_post_controller jIDPostC
|
||||
#define jinit_input_controller jIInCtlr
|
||||
#define jinit_marker_reader jIMReader
|
||||
#define jinit_huff_decoder jIHDecoder
|
||||
#define jinit_arith_decoder jIADecoder
|
||||
#define jinit_inverse_dct jIIDCT
|
||||
#define jinit_upsampler jIUpsampler
|
||||
#define jinit_color_deconverter jIDColor
|
||||
#define jinit_1pass_quantizer jI1Quant
|
||||
#define jinit_2pass_quantizer jI2Quant
|
||||
#define jinit_merged_upsampler jIMUpsampler
|
||||
#define jinit_memory_mgr jIMemMgr
|
||||
#define jdiv_round_up jDivRound
|
||||
#define jround_up jRound
|
||||
#define jcopy_sample_rows jCopySamples
|
||||
#define jcopy_block_row jCopyBlocks
|
||||
#define jzero_far jZeroFar
|
||||
#define jpeg_zigzag_order jZIGTable
|
||||
#define jpeg_natural_order jZAGTable
|
||||
#define jpeg_natural_order7 jZAGTable7
|
||||
#define jpeg_natural_order6 jZAGTable6
|
||||
#define jpeg_natural_order5 jZAGTable5
|
||||
#define jpeg_natural_order4 jZAGTable4
|
||||
#define jpeg_natural_order3 jZAGTable3
|
||||
#define jpeg_natural_order2 jZAGTable2
|
||||
#define jpeg_aritab jAriTab
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/* Compression module initialization routines */
|
||||
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
|
||||
boolean transcode_only));
|
||||
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
|
||||
/* Decompression module initialization routines */
|
||||
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
|
||||
boolean need_full_buffer));
|
||||
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
|
||||
/* Memory manager initialization */
|
||||
EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
||||
|
||||
/* Utility routines in jutils.c */
|
||||
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
||||
EXTERN(long) jround_up JPP((long a, long b));
|
||||
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
||||
JSAMPARRAY output_array, int dest_row,
|
||||
int num_rows, JDIMENSION num_cols));
|
||||
EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
|
||||
JDIMENSION num_blocks));
|
||||
EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
|
||||
/* Constant tables in jutils.c */
|
||||
#if 0 /* This table is not actually needed in v6a */
|
||||
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
|
||||
#endif
|
||||
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
|
||||
extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
|
||||
extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
|
||||
extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
|
||||
extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
|
||||
extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
|
||||
extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
|
||||
|
||||
/* Arithmetic coding probability estimation tables in jaricom.c */
|
||||
extern const INT32 jpeg_aritab[];
|
||||
|
||||
/* Suppress undefined-structure complaints if necessary. */
|
||||
|
||||
#ifdef INCOMPLETE_TYPES_BROKEN
|
||||
#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */
|
||||
struct jvirt_sarray_control { long dummy; };
|
||||
struct jvirt_barray_control { long dummy; };
|
||||
#endif
|
||||
#endif /* INCOMPLETE_TYPES_BROKEN */
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/*
|
||||
* jversion.h
|
||||
*
|
||||
* Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains software version identification.
|
||||
*/
|
||||
|
||||
|
||||
#define JVERSION "8c 16-Jan-2011"
|
||||
|
||||
#define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"
|
||||
/*
|
||||
* jversion.h
|
||||
*
|
||||
* Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains software version identification.
|
||||
*/
|
||||
|
||||
|
||||
#define JVERSION "8c 16-Jan-2011"
|
||||
|
||||
#define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"
|
||||
|
|
|
@ -1 +1 @@
|
|||
37d0b7101cea5dff8e28a57fe552d2301d6acd23
|
||||
dcd9ca68ab355cd31812a2d804f63d24166079fa
|
|
@ -32,13 +32,15 @@
|
|||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1363689121" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.182720845" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1224978101" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}""/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libfreetype2"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libpng"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libxml2"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libjpeg"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.954744053" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -49,15 +51,7 @@
|
|||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.452615323" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1079128222" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.703039623" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.500257262" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.500257262" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1531770269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
|
||||
<option id="gnu.c.compiler.option.warnings.allwarn.1446204747" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.697502414" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
|
@ -73,11 +67,11 @@
|
|||
</option>
|
||||
<option id="gnu.cpp.link.option.soname.2012475291" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.userobjs.1360463693" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libfreetype.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libcurl.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libxml2.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libpng.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libjpeg.a}""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.620370737" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -90,7 +84,26 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="platform/marmalade|platform (copy)|platform/wophone|particle_nodes/CCParticleSystemPoint.cpp|proj.wophone|platform/ios|proj.win32|platform/android|platform/win32|proj.airplay|platform/third_party|platform/bada|platform/qnx" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="keypad_dispatcher"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="label_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="layers_scenes_transitions_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="menu_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="misc_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="particle_nodes"/>
|
||||
<entry excluding="android/|bada/|ios/|Linux/CCFileUtils_Linux.cpp|Linux/CCImage_Linux.cpp|marmalade/|qnx/|third_party/|win32/|wophone/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="platform"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="script_support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sprite_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="text_input_node"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="textures"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tileMap_parallax_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="touch_dispatcher"/>
|
||||
<entry excluding="actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -127,13 +140,15 @@
|
|||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1498871898" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1985273019" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1571711257" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}""/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libfreetype2"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libpng"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libxml2"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libjpeg"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1432872181" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -144,15 +159,7 @@
|
|||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.984270671" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1465078999" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.519142307" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1095324729" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1095324729" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1479035749" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
|
||||
<option id="gnu.c.compiler.option.warnings.allwarn.2077117046" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.191330176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
|
@ -168,11 +175,11 @@
|
|||
</option>
|
||||
<option id="gnu.cpp.link.option.soname.1066283521" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.userobjs.394630625" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libfreetype.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libcurl.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libxml2.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libpng.a}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libjpeg.a}""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.319060310" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -185,7 +192,26 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="platform/airplay|platform (copy)|platform/wophone|particle_nodes/CCParticleSystemPoint.cpp|proj.wophone|platform/ios|proj.win32|platform/android|platform/win32|proj.airplay|platform/third_party" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="keypad_dispatcher"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="label_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="layers_scenes_transitions_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="menu_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="misc_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="particle_nodes"/>
|
||||
<entry excluding="android/|bada/|ios/|Linux/CCFileUtils_Linux.cpp|Linux/CCImage_Linux.cpp|marmalade/|qnx/|third_party/|win32/|wophone/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="platform"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="script_support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sprite_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="text_input_node"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="textures"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tileMap_parallax_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="touch_dispatcher"/>
|
||||
<entry excluding="actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -67,8 +67,6 @@ OBJECTS = ../actions/CCAction.o \
|
|||
../platform/platform.o \
|
||||
../platform/Linux/CCAplication_linux.o \
|
||||
../platform/Linux/CCEGLView_linux.o \
|
||||
../platform/Linux/CCFileUtils_Linux.o \
|
||||
../platform/Linux/CCImage_Linux.o \
|
||||
../script_support/CCScriptSupport.o \
|
||||
../sprite_nodes/CCAnimation.o \
|
||||
../sprite_nodes/CCAnimationCache.o \
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
@echo off
|
||||
:: This script is used to create an bada project.
|
||||
:: Don't change it until you know what you do.
|
||||
|
||||
setlocal
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set COCOS2DX_ROOT=%cd%
|
||||
|
||||
set /p PROJECT_NAME=please input project name:
|
||||
|
||||
if /i %PROJECT_NAME%==tests (
|
||||
echo can't not use "tests" as a project name, because it is used for cocos2dx tests project.
|
||||
goto END
|
||||
)
|
||||
|
||||
if /i %PROJECT_NAME%==HelloWorld (
|
||||
echo can't not use "HelloWorld" as a project name, because it is used for cocos2dx HelloWorld project.
|
||||
goto END
|
||||
)
|
||||
|
||||
if not exist %PROJECT_NAME% md %PROJECT_NAME%
|
||||
|
||||
cd %PROJECT_NAME%
|
||||
|
||||
set PROJECT_ROOT=%COCOS2DX_ROOT%\%PROJECT_NAME%
|
||||
|
||||
echo project root = %PROJECT_ROOT%
|
||||
|
||||
if not exist bada (
|
||||
md Resource
|
||||
md bada\sdk1.0\Icons
|
||||
md bada\sdk1.0\Res
|
||||
md bada\sdk2.0\Icons
|
||||
md bada\sdk2.0\Res
|
||||
md bada\src
|
||||
) else (
|
||||
echo "bada project exist!"
|
||||
goto END
|
||||
)
|
||||
|
||||
xcopy /y /s %COCOS2DX_ROOT%\HelloWorld\Resource\*.* Resource
|
||||
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\Icons bada\sdk1.0\Icons
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.badaprj bada\sdk1.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.cproject bada\sdk1.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.project bada\sdk1.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\application.xml bada\sdk1.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\manifest.xml bada\sdk1.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\src bada\src
|
||||
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\Icons bada\sdk2.0\Icons
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.badaprj bada\sdk2.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.cproject bada\sdk2.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.project bada\sdk2.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\application.xml bada\sdk2.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\manifest.xml bada\sdk2.0
|
||||
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\src bada\src
|
||||
|
||||
if not exist Classes (
|
||||
md Classes
|
||||
xcopy /y /s %COCOS2DX_ROOT%\HelloWorld\Classes\*.* Classes
|
||||
) else (
|
||||
echo "Classes folder exist, it will not be override!"
|
||||
)
|
||||
|
||||
:: rename HelloWorldEntry.cpp
|
||||
move bada\src\HelloWorldEntry.cpp bada\src\%PROJECT_NAME%Entry.cpp
|
||||
|
||||
cd bada\sdk1.0
|
||||
call :replace .cproject
|
||||
call :replace .project
|
||||
call :replace application.xml
|
||||
|
||||
cd ..\..\bada\sdk2.0
|
||||
call :replace .cproject
|
||||
call :replace .project
|
||||
call :replace application.xml
|
||||
|
||||
echo Congratulations, %PROJECT_NAME% project have been created, please import the project from BadaIDE.
|
||||
|
||||
:END
|
||||
endlocal
|
||||
pause
|
||||
exit
|
||||
|
||||
:replace
|
||||
for /f "tokens=1* delims=:" %%a in ('findstr /n .* "%1"') do (
|
||||
if "%%b"=="" (
|
||||
echo\>>tmp.txt
|
||||
) else (
|
||||
set "var=%%b"
|
||||
set "var=!var:HelloWorld=%PROJECT_NAME%!"
|
||||
echo !var!>>tmp.txt
|
||||
)
|
||||
)
|
||||
move tmp.txt %1
|
|
@ -0,0 +1,81 @@
|
|||
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
dim szPrompt, msgRet
|
||||
szPrompt = "Prompt"
|
||||
|
||||
function ReplaceFileContent(fileName, oldStr, newStr)
|
||||
set f = fso.opentextfile(fileName)
|
||||
s = replace(f.readall, oldStr, newStr)
|
||||
f.close
|
||||
set r = fso.opentextfile(fileName, 2, true)
|
||||
r.write s
|
||||
end function
|
||||
|
||||
function CopyFolder(srcFolder, desFolder)
|
||||
if (fso.FolderExists(desFolder)) then
|
||||
'msgbox("none:"+srcFolder+":"+desFolder)
|
||||
'If the desFolder exist, do nothing.
|
||||
else
|
||||
CopyFolder = fso.CopyFolder(srcFolder, desFolder)
|
||||
end if
|
||||
end function
|
||||
|
||||
function ConfigureProject()
|
||||
dim szProjectName
|
||||
szProjectName = Inputbox("Please Input Project Name:", szPrompt)
|
||||
|
||||
if szProjectName = "" then
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (0 = strcomp(szProjectName, "HelloWorld", 1) or 0 = strcomp(szProjectName, "tests", 1)) then
|
||||
msgRet = msgbox("Can not create a project named with "+szProjectName+", Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (fso.FolderExists(szProjectName)) then
|
||||
else
|
||||
fso.CreateFolder(szProjectName)
|
||||
end if
|
||||
|
||||
dim badaFolder
|
||||
badaFolder = szProjectName + "\bada"
|
||||
if (fso.FolderExists(badaFolder)) then
|
||||
msgRet = msgbox("The '"+szProjectName+"' project exists, can't override! Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wcript.quit
|
||||
end if
|
||||
|
||||
dim szSrcClass, szSrcBada, szSrcResource
|
||||
dim szDesClass, szDesBada, szDesResource
|
||||
|
||||
szSrcClass = "HelloWorld\Classes"
|
||||
szSrcBada = "HelloWorld\bada"
|
||||
szSrcResource = "HelloWorld\Resource"
|
||||
|
||||
szDesClass = szProjectName+"\Classes"
|
||||
szDesBada = szProjectName+"\bada"
|
||||
szDesResource = szProjectName+"\Resource"
|
||||
|
||||
call CopyFolder(szSrcClass, szDesClass)
|
||||
call CopyFolder(szSrcBada, szDesBada)
|
||||
call CopyFolder(szSrcResource, szDesResource)
|
||||
|
||||
dim i
|
||||
for i=1 to 2
|
||||
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\application.xml", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\.project", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\.cproject", "HelloWorld", szProjectName)
|
||||
next
|
||||
|
||||
call msgbox("Congratulations, the '"+szProjectName+"' project have been created successfully, please use Bada IDE to import the project!", 0, szPrompt)
|
||||
|
||||
end function
|
||||
|
||||
call ConfigureProject
|
||||
Wscript.quit
|
|
@ -0,0 +1,83 @@
|
|||
#!/bin/sh
|
||||
|
||||
HELLOWORLD_ROOT=`pwd`/HelloWorld
|
||||
|
||||
# make directory qnx and copy all files and directories into it
|
||||
copy_qnx_folder(){
|
||||
if [ -d $PROJECT_DIR/qnx ]; then
|
||||
echo "The '$PROJECT_NAME' project exists, can't override! Please input again!"
|
||||
create_qnx_project
|
||||
exit
|
||||
fi
|
||||
mkdir $PROJECT_DIR/qnx
|
||||
echo $HELLOWORLD_ROOT
|
||||
for file in `ls -a $HELLOWORLD_ROOT/qnx | grep -E '\.(project|cproject|xml|png|cpp)' `
|
||||
do
|
||||
file=$HELLOWORLD_ROOT/qnx/$file
|
||||
if [ -f $file ];then
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/qnx
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
copy_cpp_h_from_helloworld(){
|
||||
if [ -d $PROJECT_DIR/Classes ]; then
|
||||
echo "Classes folder exists, skip copying Classes folder!"
|
||||
else
|
||||
mkdir $PROJECT_DIR/Classes
|
||||
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.(cpp|h|mk)' `
|
||||
do
|
||||
if [ -f $file ];then
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/Classes
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# copy resources
|
||||
copy_resouces(){
|
||||
if [ -d $PROJECT_DIR/Resource ]; then
|
||||
echo "Resource folder exists, skip copying Resource folder!"
|
||||
else
|
||||
mkdir $PROJECT_DIR/Resource
|
||||
|
||||
for file in $HELLOWORLD_ROOT/Resource/*
|
||||
do
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/Resource
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# replace string
|
||||
modify_file_content(){
|
||||
# here should use # instead of /, why??
|
||||
sed "s#HelloWorld#$PROJECT_NAME#" $PROJECT_DIR/qnx/$1 > $PROJECT_DIR/qnx/tmp.txt
|
||||
rm $PROJECT_DIR/qnx/$1
|
||||
mv $PROJECT_DIR/qnx/tmp.txt $PROJECT_DIR/qnx/$1
|
||||
}
|
||||
|
||||
create_qnx_project(){
|
||||
echo "Please input your project name:"
|
||||
read PROJECT_NAME
|
||||
PROJECT_DIR=`pwd`/$PROJECT_NAME
|
||||
|
||||
# check if PROJECT_DIR is exist
|
||||
if [ -d $PROJECT_DIR ]; then
|
||||
echo ""
|
||||
else
|
||||
mkdir $PROJECT_DIR
|
||||
fi
|
||||
|
||||
copy_qnx_folder
|
||||
modify_file_content .project
|
||||
modify_file_content .cproject
|
||||
modify_file_content bar-descriptor.xml
|
||||
copy_cpp_h_from_helloworld
|
||||
copy_resouces
|
||||
echo "Congratulations, the '$PROJECT_NAME' project have been created successfully, please use QNX IDE to import the project!"
|
||||
}
|
||||
|
||||
create_qnx_project
|
|
@ -0,0 +1,78 @@
|
|||
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
dim szPrompt, msgRet
|
||||
szPrompt = "Prompt"
|
||||
|
||||
function ReplaceFileContent(fileName, oldStr, newStr)
|
||||
set f = fso.opentextfile(fileName)
|
||||
s = replace(f.readall, oldStr, newStr)
|
||||
f.close
|
||||
set r = fso.opentextfile(fileName, 2, true)
|
||||
r.write s
|
||||
end function
|
||||
|
||||
function CopyFolder(srcFolder, desFolder)
|
||||
if (fso.FolderExists(desFolder)) then
|
||||
'msgbox("none:"+srcFolder+":"+desFolder)
|
||||
'If the desFolder exist, do nothing.
|
||||
else
|
||||
CopyFolder = fso.CopyFolder(srcFolder, desFolder)
|
||||
end if
|
||||
end function
|
||||
|
||||
function ConfigureProject()
|
||||
dim szProjectName
|
||||
szProjectName = Inputbox("Please Input Project Name:", szPrompt)
|
||||
|
||||
if szProjectName = "" then
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (0 = strcomp(szProjectName, "HelloWorld", 1) or 0 = strcomp(szProjectName, "tests", 1)) then
|
||||
msgRet = msgbox("Can not create a project named with "+szProjectName+", Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (fso.FolderExists(szProjectName)) then
|
||||
else
|
||||
fso.CreateFolder(szProjectName)
|
||||
end if
|
||||
|
||||
dim qnxFolder
|
||||
qnxFolder = szProjectName + "\qnx"
|
||||
if (fso.FolderExists(qnxFolder)) then
|
||||
msgRet = msgbox("The '"+szProjectName+"' project exists, can't override! Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wcript.quit
|
||||
end if
|
||||
|
||||
dim szSrcClass, szSrcQnx, szSrcResource
|
||||
dim szDesClass, szDesQnx, szDesResource
|
||||
|
||||
szSrcClass = "HelloWorld\Classes"
|
||||
szSrcQnx = "HelloWorld\qnx"
|
||||
szSrcResource = "HelloWorld\Resource"
|
||||
|
||||
szDesClass = szProjectName+"\Classes"
|
||||
szDesQnx = szProjectName+"\qnx"
|
||||
szDesResource = szProjectName+"\Resource"
|
||||
|
||||
call CopyFolder(szSrcClass, szDesClass)
|
||||
call CopyFolder(szSrcQnx, szDesQnx)
|
||||
call CopyFolder(szSrcResource, szDesResource)
|
||||
|
||||
call ReplaceFileContent(szProjectName+"\qnx\bar-descriptor.xml", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\qnx\.project", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\qnx\.cproject", "HelloWorld", szProjectName)
|
||||
|
||||
call msgbox("Congratulations, the '"+szProjectName+"' project have been created successfully, please use QNX IDE to import the project!", 0, szPrompt)
|
||||
|
||||
end function
|
||||
|
||||
call ConfigureProject
|
||||
Wscript.quit
|
|
@ -1,39 +0,0 @@
|
|||
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
function ReplaceFileContent(fileName, oldStr, newStr)
|
||||
set f = fso.opentextfile(fileName)
|
||||
s = replace(f.readall, oldStr, newStr)
|
||||
f.close
|
||||
set r = fso.opentextfile(fileName, 2, true)
|
||||
r.write s
|
||||
end function
|
||||
|
||||
dim szProjectName
|
||||
szProjectName = Inputbox("Please Input Project Name:", "Prompt")
|
||||
|
||||
if (fso.FolderExists(szProjectName)) then
|
||||
else
|
||||
fso.CreateFolder(szProjectName)
|
||||
end if
|
||||
|
||||
dim qnxFolder
|
||||
qnxFolder = szProjectName + "\qnx"
|
||||
if (fso.FolderExists(qnxFolder)) then
|
||||
msgbox("the project exists, can't override!")
|
||||
Wscript.quit
|
||||
else
|
||||
fso.CreateFolder(qnxFolder)
|
||||
end if
|
||||
|
||||
ret = fso.CopyFolder("HelloWorld\Classes", szProjectName+"\Classes")
|
||||
ret = fso.CopyFolder("HelloWorld\qnx", szProjectName+"\qnx")
|
||||
ret = fso.CopyFolder("HelloWorld\Resource", szProjectName+"\Resource")
|
||||
|
||||
|
||||
call ReplaceFileContent(szProjectName+"\qnx\bar-descriptor.xml", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\qnx\.project", "HelloWorld", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\qnx\.cproject", "HelloWorld", szProjectName)
|
||||
|
||||
|
||||
|
||||
Wscript.quit
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
echo 'cocos2d-x template installer'
|
||||
|
||||
COCOS2D_VER='cocos2d-1.0.1-x-0.10.0'
|
||||
COCOS2D_VER='cocos2d-1.0.1-x-0.11.0'
|
||||
BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode"
|
||||
BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
fa585bcfe80466bd38886af03a16751b439570ad
|
||||
9cfad9940e7c5ab477855e3c4364e2df0274e878
|
|
@ -33,7 +33,7 @@ move_files_into_android(){
|
|||
|
||||
copy_cpp_h_from_helloworld(){
|
||||
mkdir $APP_DIR/Classes
|
||||
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.[cpp|h|mk]' `
|
||||
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.(cpp|h|mk)' `
|
||||
do
|
||||
if [ -f $file ];then
|
||||
cp $file $APP_DIR/Classes
|
||||
|
|
|
@ -38,7 +38,7 @@ move_eclipse_configures_into(){
|
|||
|
||||
sed -i "s/HelloWorld/$APP_NAME/" $APP_DIR/Linux/.project
|
||||
|
||||
sed -i "s:\.\./\.\./\.\./:$COCOS2DX_ROOT:;s:helloworld:$APP_NAME:" $APP_DIR/Linux/.cproject
|
||||
sed -i "s/HelloWorld/$APP_NAME/" $APP_DIR/Linux/.cproject
|
||||
}
|
||||
|
||||
move_files_into_linux
|
||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1 @@
|
|||
a09f5a5c10a2c292e53273fe9bb93c1b711a3787
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1 @@
|
|||
a09f5a5c10a2c292e53273fe9bb93c1b711a3787
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -0,0 +1 @@
|
|||
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d
|
|
@ -1,11 +1,2 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "build.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-7
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package org.cocos2dx.tests;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int icon=0x7f020000;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int test_demo_gl_surfaceview=0x7f050001;
|
||||
public static final int textField=0x7f050000;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int test_demo=0x7f030000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040000;
|
||||
}
|
||||
}
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package org.cocos2dx.tests;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int icon=0x7f020000;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int test_demo_gl_surfaceview=0x7f050001;
|
||||
public static final int textField=0x7f050000;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int test_demo=0x7f030000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040000;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,6 +175,14 @@ public class Cocos2dxMusic {
|
|||
}
|
||||
|
||||
public void setBackgroundVolume(float volume){
|
||||
if (volume < 0.0f){
|
||||
volume = 0.0f;
|
||||
}
|
||||
|
||||
if (volume > 1.0f){
|
||||
volume = 1.0f;
|
||||
}
|
||||
|
||||
this.mLeftVolume = this.mRightVolume = volume;
|
||||
if (this.mBackgroundMediaPlayer != null){
|
||||
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15
|
|
@ -0,0 +1 @@
|
|||
a9cf0424744f0676e91af84a9ba593790d18ccc4
|
|
@ -0,0 +1 @@
|
|||
9ba2234125d78810b9358b4af48cba1c8cfe523e
|
|
@ -0,0 +1 @@
|
|||
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15
|
|
@ -20,20 +20,25 @@
|
|||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.699705174." name="/" resourcePath="">
|
||||
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.debug.841204785" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.1771431107" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/cocos2dx-test/Debug}" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.exe.debug.692013632" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/cocos2dx-test/Debug}" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.exe.debug.692013632" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -Wl,-rpath,../../cocos2dx/proj.linux/${ConfigName} -Wl,-rpath,../../CocosDenshion/proj.linux/${ConfigName}" id="cdt.managedbuild.tool.gnu.archiver.base.823571804" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.405614352" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.248343481" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.634257735" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1707443626" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.331369055" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -43,16 +48,7 @@
|
|||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2041247495" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1013157776" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.216261172" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1705967553" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx-base/platform/third_party/linux}""/>
|
||||
<listOptionValue builtIn="false" value="../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/chipmunk/include/chipmunk}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/Box2D}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/tests}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1705967553" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.305684306" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
|
@ -68,13 +64,13 @@
|
|||
<listOptionValue builtIn="false" value="cocosdenshion"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.335055881" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""../../../cocos2dx/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
|
||||
<listOptionValue builtIn="false" value=""../../../CocosDenshion/proj.linux/${ConfigName}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.userobjs.1021852674" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value=""../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a""/>
|
||||
<listOptionValue builtIn="false" value=""../../../Box2D/proj.linux/${ConfigName}/libBox2D.a""/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.linux/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.280033790" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
@ -83,12 +79,23 @@
|
|||
</inputType>
|
||||
</tool>
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.844668943" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<option id="gnu.both.asm.option.include.paths.1555644609" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/tests/"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/platform/third_party/linux"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/chipmunk/include/chipmunk"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1269039546" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tests"/>
|
||||
<entry excluding="tests" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -119,13 +126,13 @@
|
|||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.452676886" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.219173285" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../..//chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.2022262883" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
|
@ -135,16 +142,7 @@
|
|||
<tool errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1494845250" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1213583313" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.222853384" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1626903439" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx-base/platform/third_party/linux}""/>
|
||||
<listOptionValue builtIn="false" value="../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/chipmunk/include/chipmunk}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/Box2D}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2d-x/tests}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.include.paths.1626903439" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.794705780" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="LINUX"/>
|
||||
</option>
|
||||
|
@ -160,13 +158,13 @@
|
|||
<listOptionValue builtIn="false" value="cocosdenshion"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.2032137429" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""../../../cocos2dx/proj.linux/${ConfigName}""/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
|
||||
<listOptionValue builtIn="false" value=""../../../CocosDenshion/proj.linux/${ConfigName}""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.userobjs.1558283777" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value=""../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a""/>
|
||||
<listOptionValue builtIn="false" value=""../../../Box2D/proj.linux/${ConfigName}/libBox2D.a""/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.linux/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1573978538" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
@ -180,7 +178,8 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tests"/>
|
||||
<entry excluding="tests" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?children?</key>
|
||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
|
@ -98,7 +102,7 @@
|
|||
<link>
|
||||
<name>tests</name>
|
||||
<type>2</type>
|
||||
<location>/home/xm/workspace/cocos2d-x/tests/tests</location>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/tests</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
#!/bin/bash
|
||||
#arguments
|
||||
#1 is the config name
|
||||
#2 is the project name
|
||||
#3 is the cocos2d sdk base folder
|
||||
|
||||
if [ $# -lt 3 ];then
|
||||
echo "usage sh postCompiled.sh confi-gname project-name cocos2dx-root"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d "../../test.android/libs" ];then
|
||||
mkdir ../../test.android/libs
|
||||
fi
|
||||
|
||||
if [ ! -d "../../test.android/libs/armeabi" ];then
|
||||
mkdir ../../test.android/libs/armeabi
|
||||
fi
|
||||
|
||||
#move game lib into android/libs/armeabi
|
||||
cp -f lib$2.so ../../test.android/libs/armeabi/
|
||||
|
||||
#move cocos2d lib into android/libs/armeabi
|
||||
cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
|
||||
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
|
||||
cp -f $3/Box2D/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
|
||||
cp -f $3/chipmunk/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
|
||||
|
||||
# copy resources, can not link. because we don't need some file
|
||||
|
||||
COCOS2DX_ROOT=../../..
|
||||
TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android
|
||||
|
||||
# make sure assets is exist
|
||||
if [ -d $TESTS_ROOT/assets ]; then
|
||||
rm -rf $TESTS_ROOT/assets
|
||||
fi
|
||||
|
||||
mkdir $TESTS_ROOT/assets
|
||||
|
||||
# copy resources
|
||||
for file in $COCOS2DX_ROOT/tests/Res/*
|
||||
do
|
||||
if [ -d $file ]; then
|
||||
cp -rf $file $TESTS_ROOT/assets
|
||||
fi
|
||||
|
||||
if [ -f $file ]; then
|
||||
cp $file $TESTS_ROOT/assets
|
||||
fi
|
||||
done
|
||||
|
||||
# remove test_image_rgba4444.pvr.gz
|
||||
rm -f $TESTS_ROOT/assets/Images/test_image_rgba4444.pvr.gz
|
||||
|
|
@ -151,19 +151,19 @@ void CocosDenshionTest::menuCallback(CCObject * pSender)
|
|||
break;
|
||||
// add bakcground music volume
|
||||
case 10:
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() + 0.1);
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() + 0.1f);
|
||||
break;
|
||||
// sub backgroud music volume
|
||||
case 11:
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() - 0.1);
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() - 0.1f);
|
||||
break;
|
||||
// add effects volume
|
||||
case 12:
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() + 0.1);
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() + 0.1f);
|
||||
break;
|
||||
// sub effects volume
|
||||
case 13:
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() - 0.1);
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() - 0.1f);
|
||||
break;
|
||||
case 14:
|
||||
SimpleAudioEngine::sharedEngine()->pauseEffect(m_nSoundId);
|
||||
|
|
|
@ -24,8 +24,6 @@ public:
|
|||
virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
|
||||
virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent);
|
||||
|
||||
CCTouchDelegate();
|
||||
|
||||
void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName);
|
||||
bool isScriptHandlerExist(int eventType);
|
||||
void excuteScriptTouchHandler(int eventType, CCTouch *pTouch);
|
||||
|
@ -48,7 +46,7 @@ public:
|
|||
class CCTargetedTouchDelegate : public CCTouchDelegate
|
||||
{
|
||||
public:
|
||||
CCTargetedTouchDelegate();
|
||||
|
||||
/** Return YES to claim the touch.
|
||||
@since v0
|
||||
*/
|
||||
|
@ -67,7 +65,6 @@ public:
|
|||
class CCStandardTouchDelegate : public CCTouchDelegate
|
||||
{
|
||||
public:
|
||||
CCStandardTouchDelegate();
|
||||
// optional
|
||||
virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
|
||||
virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
|
||||
|
|