[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15171] branches/soc-2008-quorn: Merged from trunk

Ian Thompson quornian at googlemail.com
Mon Jun 9 16:04:19 CEST 2008


Revision: 15171
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15171
Author:   quorn
Date:     2008-06-09 16:04:19 +0200 (Mon, 09 Jun 2008)

Log Message:
-----------
Merged from trunk
svn merge -r14988:15170 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/soc-2008-quorn/config/linux2-config.py
    branches/soc-2008-quorn/config/win32-vc-config.py
    branches/soc-2008-quorn/extern/SConscript
    branches/soc-2008-quorn/extern/bFTGL/SConscript
    branches/soc-2008-quorn/intern/bsp/SConscript
    branches/soc-2008-quorn/intern/guardedalloc/intern/mmap_win.c
    branches/soc-2008-quorn/release/scripts/import_dxf.py
    branches/soc-2008-quorn/release/scripts/uv_seams_from_islands.py
    branches/soc-2008-quorn/release/scripts/uvcalc_lightmap.py
    branches/soc-2008-quorn/release/windows/installer/00.sconsblender.nsi
    branches/soc-2008-quorn/source/blender/blenkernel/BKE_bmesh.h
    branches/soc-2008-quorn/source/blender/blenkernel/BKE_cloth.h
    branches/soc-2008-quorn/source/blender/blenkernel/BKE_collision.h
    branches/soc-2008-quorn/source/blender/blenkernel/intern/BME_conversions.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/BME_mesh.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/BME_structure.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/BME_tools.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/bmesh_private.h
    branches/soc-2008-quorn/source/blender/blenkernel/intern/cloth.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/collision.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/constraint.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/customdata.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/modifier.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/object.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2008-quorn/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2008-quorn/source/blender/blenlib/intern/bpath.c
    branches/soc-2008-quorn/source/blender/blenlib/intern/util.c
    branches/soc-2008-quorn/source/blender/blenloader/intern/readfile.c
    branches/soc-2008-quorn/source/blender/imbuf/SConscript
    branches/soc-2008-quorn/source/blender/imbuf/intern/IMB_anim.h
    branches/soc-2008-quorn/source/blender/imbuf/intern/anim.c
    branches/soc-2008-quorn/source/blender/imbuf/intern/util.c
    branches/soc-2008-quorn/source/blender/include/BIF_editseq.h
    branches/soc-2008-quorn/source/blender/include/BSE_view.h
    branches/soc-2008-quorn/source/blender/include/transform.h
    branches/soc-2008-quorn/source/blender/makesdna/DNA_modifier_types.h
    branches/soc-2008-quorn/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2008-quorn/source/blender/makesdna/intern/makesdna.c
    branches/soc-2008-quorn/source/blender/python/BPY_interface.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Blender.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Draw.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Material.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Node.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Object.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Particle.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Scene.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/Sys.c
    branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Object.py
    branches/soc-2008-quorn/source/blender/python/api2_2x/sceneRender.c
    branches/soc-2008-quorn/source/blender/render/extern/include/RE_pipeline.h
    branches/soc-2008-quorn/source/blender/render/extern/include/RE_raytrace.h
    branches/soc-2008-quorn/source/blender/render/intern/include/render_types.h
    branches/soc-2008-quorn/source/blender/render/intern/source/convertblender.c
    branches/soc-2008-quorn/source/blender/render/intern/source/envmap.c
    branches/soc-2008-quorn/source/blender/render/intern/source/pipeline.c
    branches/soc-2008-quorn/source/blender/render/intern/source/rayshade.c
    branches/soc-2008-quorn/source/blender/render/intern/source/rendercore.c
    branches/soc-2008-quorn/source/blender/src/buttons_editing.c
    branches/soc-2008-quorn/source/blender/src/buttons_object.c
    branches/soc-2008-quorn/source/blender/src/buttons_scene.c
    branches/soc-2008-quorn/source/blender/src/drawipo.c
    branches/soc-2008-quorn/source/blender/src/drawobject.c
    branches/soc-2008-quorn/source/blender/src/drawseq.c
    branches/soc-2008-quorn/source/blender/src/drawview.c
    branches/soc-2008-quorn/source/blender/src/editaction.c
    branches/soc-2008-quorn/source/blender/src/editarmature.c
    branches/soc-2008-quorn/source/blender/src/editmesh_tools.c
    branches/soc-2008-quorn/source/blender/src/editnode.c
    branches/soc-2008-quorn/source/blender/src/editseq.c
    branches/soc-2008-quorn/source/blender/src/filesel.c
    branches/soc-2008-quorn/source/blender/src/fluidsim.c
    branches/soc-2008-quorn/source/blender/src/interface.c
    branches/soc-2008-quorn/source/blender/src/meshtools.c
    branches/soc-2008-quorn/source/blender/src/space.c
    branches/soc-2008-quorn/source/blender/src/toets.c
    branches/soc-2008-quorn/source/blender/src/transform.c
    branches/soc-2008-quorn/source/blender/src/transform_conversions.c
    branches/soc-2008-quorn/source/blender/src/transform_manipulator.c
    branches/soc-2008-quorn/source/blender/src/transform_orientations.c
    branches/soc-2008-quorn/source/blender/src/view.c
    branches/soc-2008-quorn/source/creator/creator.c
    branches/soc-2008-quorn/source/gameengine/Converter/BL_ArmatureObject.cpp
    branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.h
    branches/soc-2008-quorn/source/gameengine/Ketsji/KX_RayCast.cpp
    branches/soc-2008-quorn/source/gameengine/PyDoc/KX_GameObject.py
    branches/soc-2008-quorn/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/soc-2008-quorn/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h
    branches/soc-2008-quorn/tools/btools.py

Added Paths:
-----------
    branches/soc-2008-quorn/extern/libopenjpeg/
    branches/soc-2008-quorn/extern/libopenjpeg/SConscript
    branches/soc-2008-quorn/extern/libopenjpeg/bio.c
    branches/soc-2008-quorn/extern/libopenjpeg/bio.h
    branches/soc-2008-quorn/extern/libopenjpeg/cio.c
    branches/soc-2008-quorn/extern/libopenjpeg/cio.h
    branches/soc-2008-quorn/extern/libopenjpeg/dwt.c
    branches/soc-2008-quorn/extern/libopenjpeg/dwt.h
    branches/soc-2008-quorn/extern/libopenjpeg/event.c
    branches/soc-2008-quorn/extern/libopenjpeg/event.h
    branches/soc-2008-quorn/extern/libopenjpeg/fix.h
    branches/soc-2008-quorn/extern/libopenjpeg/image.c
    branches/soc-2008-quorn/extern/libopenjpeg/image.h
    branches/soc-2008-quorn/extern/libopenjpeg/int.h
    branches/soc-2008-quorn/extern/libopenjpeg/j2k.c
    branches/soc-2008-quorn/extern/libopenjpeg/j2k.h
    branches/soc-2008-quorn/extern/libopenjpeg/j2k_lib.c
    branches/soc-2008-quorn/extern/libopenjpeg/j2k_lib.h
    branches/soc-2008-quorn/extern/libopenjpeg/jp2.c
    branches/soc-2008-quorn/extern/libopenjpeg/jp2.h
    branches/soc-2008-quorn/extern/libopenjpeg/jpt.c
    branches/soc-2008-quorn/extern/libopenjpeg/jpt.h
    branches/soc-2008-quorn/extern/libopenjpeg/license.txt
    branches/soc-2008-quorn/extern/libopenjpeg/mct.c
    branches/soc-2008-quorn/extern/libopenjpeg/mct.h
    branches/soc-2008-quorn/extern/libopenjpeg/mqc.c
    branches/soc-2008-quorn/extern/libopenjpeg/mqc.h
    branches/soc-2008-quorn/extern/libopenjpeg/openjpeg.c
    branches/soc-2008-quorn/extern/libopenjpeg/openjpeg.h
    branches/soc-2008-quorn/extern/libopenjpeg/opj_includes.h
    branches/soc-2008-quorn/extern/libopenjpeg/opj_malloc.h
    branches/soc-2008-quorn/extern/libopenjpeg/pi.c
    branches/soc-2008-quorn/extern/libopenjpeg/pi.h
    branches/soc-2008-quorn/extern/libopenjpeg/raw.c
    branches/soc-2008-quorn/extern/libopenjpeg/raw.h
    branches/soc-2008-quorn/extern/libopenjpeg/t1.c
    branches/soc-2008-quorn/extern/libopenjpeg/t1.h
    branches/soc-2008-quorn/extern/libopenjpeg/t1_generate_luts.c
    branches/soc-2008-quorn/extern/libopenjpeg/t1_luts.h
    branches/soc-2008-quorn/extern/libopenjpeg/t2.c
    branches/soc-2008-quorn/extern/libopenjpeg/t2.h
    branches/soc-2008-quorn/extern/libopenjpeg/tcd.c
    branches/soc-2008-quorn/extern/libopenjpeg/tcd.h
    branches/soc-2008-quorn/extern/libopenjpeg/tgt.c
    branches/soc-2008-quorn/extern/libopenjpeg/tgt.h
    branches/soc-2008-quorn/extern/libredcode/
    branches/soc-2008-quorn/extern/libredcode/AUTHOR
    branches/soc-2008-quorn/extern/libredcode/LICENSE
    branches/soc-2008-quorn/extern/libredcode/NOTES
    branches/soc-2008-quorn/extern/libredcode/SConscript
    branches/soc-2008-quorn/extern/libredcode/codec.c
    branches/soc-2008-quorn/extern/libredcode/codec.h
    branches/soc-2008-quorn/extern/libredcode/debayer.c
    branches/soc-2008-quorn/extern/libredcode/debayer.h
    branches/soc-2008-quorn/extern/libredcode/format.c
    branches/soc-2008-quorn/extern/libredcode/format.h
    branches/soc-2008-quorn/source/blender/blenkernel/BKE_bmeshCustomData.h
    branches/soc-2008-quorn/source/blender/blenkernel/intern/BME_Customdata.c
    branches/soc-2008-quorn/source/blender/blenlib/BLI_kdopbvh.h
    branches/soc-2008-quorn/source/blender/blenlib/intern/BLI_kdopbvh.c

Removed Paths:
-------------
    branches/soc-2008-quorn/extern/libopenjpeg/SConscript
    branches/soc-2008-quorn/extern/libopenjpeg/bio.c
    branches/soc-2008-quorn/extern/libopenjpeg/bio.h
    branches/soc-2008-quorn/extern/libopenjpeg/cio.c
    branches/soc-2008-quorn/extern/libopenjpeg/cio.h
    branches/soc-2008-quorn/extern/libopenjpeg/dwt.c
    branches/soc-2008-quorn/extern/libopenjpeg/dwt.h
    branches/soc-2008-quorn/extern/libopenjpeg/event.c
    branches/soc-2008-quorn/extern/libopenjpeg/event.h
    branches/soc-2008-quorn/extern/libopenjpeg/fix.h
    branches/soc-2008-quorn/extern/libopenjpeg/image.c
    branches/soc-2008-quorn/extern/libopenjpeg/image.h
    branches/soc-2008-quorn/extern/libopenjpeg/int.h
    branches/soc-2008-quorn/extern/libopenjpeg/j2k.c
    branches/soc-2008-quorn/extern/libopenjpeg/j2k.h
    branches/soc-2008-quorn/extern/libopenjpeg/j2k_lib.c
    branches/soc-2008-quorn/extern/libopenjpeg/j2k_lib.h
    branches/soc-2008-quorn/extern/libopenjpeg/jp2.c
    branches/soc-2008-quorn/extern/libopenjpeg/jp2.h
    branches/soc-2008-quorn/extern/libopenjpeg/jpt.c
    branches/soc-2008-quorn/extern/libopenjpeg/jpt.h
    branches/soc-2008-quorn/extern/libopenjpeg/license.txt
    branches/soc-2008-quorn/extern/libopenjpeg/mct.c
    branches/soc-2008-quorn/extern/libopenjpeg/mct.h
    branches/soc-2008-quorn/extern/libopenjpeg/mqc.c
    branches/soc-2008-quorn/extern/libopenjpeg/mqc.h
    branches/soc-2008-quorn/extern/libopenjpeg/openjpeg.c
    branches/soc-2008-quorn/extern/libopenjpeg/openjpeg.h
    branches/soc-2008-quorn/extern/libopenjpeg/opj_includes.h
    branches/soc-2008-quorn/extern/libopenjpeg/opj_malloc.h
    branches/soc-2008-quorn/extern/libopenjpeg/pi.c
    branches/soc-2008-quorn/extern/libopenjpeg/pi.h
    branches/soc-2008-quorn/extern/libopenjpeg/raw.c
    branches/soc-2008-quorn/extern/libopenjpeg/raw.h
    branches/soc-2008-quorn/extern/libopenjpeg/t1.c
    branches/soc-2008-quorn/extern/libopenjpeg/t1.h
    branches/soc-2008-quorn/extern/libopenjpeg/t1_generate_luts.c
    branches/soc-2008-quorn/extern/libopenjpeg/t1_luts.h
    branches/soc-2008-quorn/extern/libopenjpeg/t2.c
    branches/soc-2008-quorn/extern/libopenjpeg/t2.h
    branches/soc-2008-quorn/extern/libopenjpeg/tcd.c
    branches/soc-2008-quorn/extern/libopenjpeg/tcd.h
    branches/soc-2008-quorn/extern/libopenjpeg/tgt.c
    branches/soc-2008-quorn/extern/libopenjpeg/tgt.h
    branches/soc-2008-quorn/extern/libredcode/AUTHOR
    branches/soc-2008-quorn/extern/libredcode/LICENSE
    branches/soc-2008-quorn/extern/libredcode/NOTES
    branches/soc-2008-quorn/extern/libredcode/SConscript
    branches/soc-2008-quorn/extern/libredcode/codec.c
    branches/soc-2008-quorn/extern/libredcode/codec.h
    branches/soc-2008-quorn/extern/libredcode/debayer.c
    branches/soc-2008-quorn/extern/libredcode/debayer.h
    branches/soc-2008-quorn/extern/libredcode/format.c
    branches/soc-2008-quorn/extern/libredcode/format.h
    branches/soc-2008-quorn/release/scripts/uv_from_adjacent.py
    branches/soc-2008-quorn/source/blender/blenkernel/intern/kdop.c

Modified: branches/soc-2008-quorn/config/linux2-config.py
===================================================================
--- branches/soc-2008-quorn/config/linux2-config.py	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/config/linux2-config.py	2008-06-09 14:04:19 UTC (rev 15171)
@@ -130,6 +130,24 @@
 BF_FFMPEG_INC = '${BF_FFMPEG}/include'
 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
 
+WITH_BF_OPENJPEG = 'true' 
+BF_OPENJPEG = '#extern/libopenjpeg'
+BF_OPENJPEG_LIB = ''
+# Uncomment the following two lines to use system's ffmpeg
+# BF_FFMPEG = '/usr'
+# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil'
+BF_OPENJPEG_INC = '${BF_OPENJPEG}/include'
+BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
+
+WITH_BF_REDCODE = 'true'  
+BF_REDCODE = '#extern/libredcode'
+BF_REDCODE_LIB = ''
+# Uncomment the following two lines to use system's ffmpeg
+# BF_FFMPEG = '/usr'
+# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil'
+BF_REDCODE_INC = '${BF_REDCODE}/include'
+BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
+
 # Mesa Libs should go here if your using them as well....
 WITH_BF_STATICOPENGL = 'false'
 BF_OPENGL = '/usr'

Modified: branches/soc-2008-quorn/config/win32-vc-config.py
===================================================================
--- branches/soc-2008-quorn/config/win32-vc-config.py	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/config/win32-vc-config.py	2008-06-09 14:04:19 UTC (rev 15171)
@@ -157,7 +157,7 @@
 C_WARN = []
 CC_WARN = []
 
-LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid'
+LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid'
 
 PLATFORM_LINKFLAGS = '''
                         /SUBSYSTEM:CONSOLE 

Modified: branches/soc-2008-quorn/extern/SConscript
===================================================================
--- branches/soc-2008-quorn/extern/SConscript	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/extern/SConscript	2008-06-09 14:04:19 UTC (rev 15171)
@@ -21,5 +21,11 @@
     SConscript(['xvidcore/SConscript'])
     SConscript(['ffmpeg/SConscript'])
 
+if env['WITH_BF_OPENJPEG'] and env['BF_OPENJPEG_LIB'] == '':
+    SConscript(['libopenjpeg/SConscript'])
+
+if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
+    SConscript(['libredcode/SConscript'])
+
 if env['OURPLATFORM'] == 'linux2':
     SConscript(['binreloc/SConscript']);

Modified: branches/soc-2008-quorn/extern/bFTGL/SConscript
===================================================================
--- branches/soc-2008-quorn/extern/bFTGL/SConscript	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/extern/bFTGL/SConscript	2008-06-09 14:04:19 UTC (rev 15171)
@@ -22,7 +22,7 @@
 
 #ftgl_env.Append (CPPDEFINES = defines)
 
-incs = 'include src ' + env['BF_FREETYPE_INC']
+incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC']
 defs = ''
 
 sources = env.Glob('src/*.cpp')

Copied: branches/soc-2008-quorn/extern/libopenjpeg (from rev 15170, trunk/blender/extern/libopenjpeg)

Deleted: branches/soc-2008-quorn/extern/libopenjpeg/SConscript
===================================================================
--- trunk/blender/extern/libopenjpeg/SConscript	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/extern/libopenjpeg/SConscript	2008-06-09 14:04:19 UTC (rev 15171)
@@ -1,20 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-Import('env')
-
-sources = env.Glob('*.c')
-incs = '.'
-
-flags = "-Wall -O3 -ffast-math -std=c99"
-
-oj_env = env.Copy();
-oj_env.Replace(CCFLAGS = '')
-oj_env.Replace(BF_DEBUG_FLAGS = '')
-
-oj_env.BlenderLib ( libname='extern_openjpeg', 
-                    sources=sources, includes=Split(incs),
-                    defines=[],
-                    libtype=['core','intern','player'],
-                    priority=[10, 10, 300], compileflags = Split(flags))

Copied: branches/soc-2008-quorn/extern/libopenjpeg/SConscript (from rev 15170, trunk/blender/extern/libopenjpeg/SConscript)
===================================================================
--- branches/soc-2008-quorn/extern/libopenjpeg/SConscript	                        (rev 0)
+++ branches/soc-2008-quorn/extern/libopenjpeg/SConscript	2008-06-09 14:04:19 UTC (rev 15171)
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import sys
+
+Import('env')
+
+sources = env.Glob('*.c')
+incs = '.'
+
+flags = "-Wall -O3 -ffast-math -std=c99"
+
+oj_env = env.Copy();
+oj_env.Replace(CCFLAGS = '')
+oj_env.Replace(BF_DEBUG_FLAGS = '')
+
+oj_env.BlenderLib ( libname='extern_openjpeg', 
+                    sources=sources, includes=Split(incs),
+                    defines=[],
+                    libtype=['core','intern','player'],
+                    priority=[10, 10, 300], compileflags = Split(flags))

Deleted: branches/soc-2008-quorn/extern/libopenjpeg/bio.c
===================================================================
--- trunk/blender/extern/libopenjpeg/bio.c	2008-06-09 12:45:49 UTC (rev 15170)
+++ branches/soc-2008-quorn/extern/libopenjpeg/bio.c	2008-06-09 14:04:19 UTC (rev 15171)
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
- * Copyright (c) 2002-2007, Professor Benoit Macq
- * Copyright (c) 2001-2003, David Janssens
- * Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
- * Copyright (c) 2005, Herve Drolon, FreeImage Team
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "opj_includes.h"
-
-/** @defgroup BIO BIO - Individual bit input-output stream */
-/*@{*/
-
-/** @name Local static functions */
-/*@{*/
-
-/**
-Write a bit
- at param bio BIO handle
- at param b Bit to write (0 or 1)
-*/
-static void bio_putbit(opj_bio_t *bio, int b);
-/**
-Read a bit
- at param bio BIO handle
- at return Returns the read bit
-*/
-static int bio_getbit(opj_bio_t *bio);
-/**
-Write a byte
- at param bio BIO handle
- at return Returns 0 if successful, returns 1 otherwise
-*/
-static int bio_byteout(opj_bio_t *bio);
-/**
-Read a byte
- at param bio BIO handle
- at return Returns 0 if successful, returns 1 otherwise
-*/
-static int bio_bytein(opj_bio_t *bio);
-
-/*@}*/
-
-/*@}*/
-
-/* 
-==========================================================
-   local functions
-==========================================================
-*/
-
-static int bio_byteout(opj_bio_t *bio) {
-	bio->buf = (bio->buf << 8) & 0xffff;
-	bio->ct = bio->buf == 0xff00 ? 7 : 8;
-	if (bio->bp >= bio->end) {
-		return 1;
-	}
-	*bio->bp++ = bio->buf >> 8;
-	return 0;
-}
-
-static int bio_bytein(opj_bio_t *bio) {
-	bio->buf = (bio->buf << 8) & 0xffff;
-	bio->ct = bio->buf == 0xff00 ? 7 : 8;
-	if (bio->bp >= bio->end) {
-		return 1;
-	}
-	bio->buf |= *bio->bp++;
-	return 0;
-}
-
-static void bio_putbit(opj_bio_t *bio, int b) {
-	if (bio->ct == 0) {
-		bio_byteout(bio);
-	}
-	bio->ct--;
-	bio->buf |= b << bio->ct;
-}
-
-static int bio_getbit(opj_bio_t *bio) {
-	if (bio->ct == 0) {
-		bio_bytein(bio);
-	}
-	bio->ct--;
-	return (bio->buf >> bio->ct) & 1;
-}
-
-/* 
-==========================================================
-   Bit Input/Output interface
-==========================================================
-*/
-
-opj_bio_t* bio_create(void) {
-	opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t));
-	return bio;
-}
-
-void bio_destroy(opj_bio_t *bio) {
-	if(bio) {
-		opj_free(bio);
-	}
-}
-
-int bio_numbytes(opj_bio_t *bio) {
-	return (bio->bp - bio->start);
-}
-
-void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len) {
-	bio->start = bp;
-	bio->end = bp + len;
-	bio->bp = bp;
-	bio->buf = 0;
-	bio->ct = 8;
-}
-
-void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len) {
-	bio->start = bp;
-	bio->end = bp + len;
-	bio->bp = bp;
-	bio->buf = 0;
-	bio->ct = 0;
-}
-
-void bio_write(opj_bio_t *bio, int v, int n) {
-	int i;
-	for (i = n - 1; i >= 0; i--) {
-		bio_putbit(bio, (v >> i) & 1);
-	}
-}
-
-int bio_read(opj_bio_t *bio, int n) {
-	int i, v;
-	v = 0;
-	for (i = n - 1; i >= 0; i--) {
-		v += bio_getbit(bio) << i;
-	}
-	return v;
-}
-
-int bio_flush(opj_bio_t *bio) {
-	bio->ct = 0;
-	if (bio_byteout(bio)) {
-		return 1;
-	}
-	if (bio->ct == 7) {
-		bio->ct = 0;
-		if (bio_byteout(bio)) {
-			return 1;
-		}
-	}
-	return 0;
-}
-
-int bio_inalign(opj_bio_t *bio) {
-	bio->ct = 0;
-	if ((bio->buf & 0xff) == 0xff) {
-		if (bio_bytein(bio)) {
-			return 1;
-		}
-		bio->ct = 0;
-	}
-	return 0;
-}

Copied: branches/soc-2008-quorn/extern/libopenjpeg/bio.c (from rev 15170, trunk/blender/extern/libopenjpeg/bio.c)
===================================================================
--- branches/soc-2008-quorn/extern/libopenjpeg/bio.c	                        (rev 0)
+++ branches/soc-2008-quorn/extern/libopenjpeg/bio.c	2008-06-09 14:04:19 UTC (rev 15171)
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2007, Professor Benoit Macq
+ * Copyright (c) 2001-2003, David Janssens
+ * Copyright (c) 2002-2003, Yannick Verschueren
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
+ * Copyright (c) 2005, Herve Drolon, FreeImage Team

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list