[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15403] branches/soc-2008-unclezeiv: svn merge -r 15365:15402 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Davide Vercelli davide.vercelli at gmail.com
Wed Jul 2 04:06:27 CEST 2008


Revision: 15403
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15403
Author:   unclezeiv
Date:     2008-07-02 04:05:33 +0200 (Wed, 02 Jul 2008)

Log Message:
-----------
svn merge -r 15365:15402 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/soc-2008-unclezeiv/intern/iksolver/intern/IK_QTask.h
    branches/soc-2008-unclezeiv/intern/moto/include/MT_random.h
    branches/soc-2008-unclezeiv/intern/moto/intern/MT_random.cpp
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/ipo.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/text.c
    branches/soc-2008-unclezeiv/source/blender/imbuf/intern/IMB_anim.h
    branches/soc-2008-unclezeiv/source/blender/imbuf/intern/anim.c
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_actuator_types.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Lamp.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_logic.c
    branches/soc-2008-unclezeiv/source/blender/src/drawaction.c
    branches/soc-2008-unclezeiv/source/blender/src/drawview.c
    branches/soc-2008-unclezeiv/source/blender/src/editaction.c
    branches/soc-2008-unclezeiv/source/blender/src/editfont.c
    branches/soc-2008-unclezeiv/source/blender/src/poseobject.c
    branches/soc-2008-unclezeiv/source/blender/src/space.c
    branches/soc-2008-unclezeiv/source/blender/src/view.c
    branches/soc-2008-unclezeiv/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2008-unclezeiv/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
    branches/soc-2008-unclezeiv/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ShapeActionActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_2DFilterActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PythonController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PythonController.h
    branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/common/GPC_RenderTools.h
    branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/BL_Shader.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_Camera.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_MeshProxy.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
    branches/soc-2008-unclezeiv/source/gameengine/PyDoc/KX_GameObject.py
    branches/soc-2008-unclezeiv/source/gameengine/PyDoc/SCA_PythonController.py
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_2DFilterManager.h
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_IRenderTools.h
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp

Modified: branches/soc-2008-unclezeiv/intern/iksolver/intern/IK_QTask.h
===================================================================
--- branches/soc-2008-unclezeiv/intern/iksolver/intern/IK_QTask.h	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/intern/iksolver/intern/IK_QTask.h	2008-07-02 02:05:33 UTC (rev 15403)
@@ -74,7 +74,7 @@
 
 	virtual bool PositionTask() const { return false; }
 
-	virtual void Scale(float scale) {}
+	virtual void Scale(float) {}
 
 protected:
 	int m_id;

Modified: branches/soc-2008-unclezeiv/intern/moto/include/MT_random.h
===================================================================
--- branches/soc-2008-unclezeiv/intern/moto/include/MT_random.h	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/intern/moto/include/MT_random.h	2008-07-02 02:05:33 UTC (rev 15403)
@@ -31,10 +31,10 @@
 
 #include <limits.h>
 
-#define MT_RAND_MAX ULONG_MAX
+#define MT_RAND_MAX UINT_MAX
 
-extern void          MT_srand(unsigned long);
-extern unsigned long MT_rand();
+extern void          MT_srand(unsigned int);
+extern unsigned int  MT_rand();
 
 #endif
 

Modified: branches/soc-2008-unclezeiv/intern/moto/intern/MT_random.cpp
===================================================================
--- branches/soc-2008-unclezeiv/intern/moto/intern/MT_random.cpp	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/intern/moto/intern/MT_random.cpp	2008-07-02 02:05:33 UTC (rev 15403)
@@ -76,11 +76,11 @@
 #define TEMPERING_SHIFT_T(y)  (y << 15)
 #define TEMPERING_SHIFT_L(y)  (y >> 18)
 
-static unsigned long mt[N]; /* the array for the state vector  */
+static unsigned int mt[N]; /* the array for the state vector  */
 static int mti = N+1; /* mti==N+1 means mt[N] is not initialized */
 
 /* initializing the array with a NONZERO seed */
-void MT_srand(unsigned long seed)
+void MT_srand(unsigned int seed)
 {
     /* setting initial seeds to mt[N] using         */
     /* the generator Line 25 of Table 1 in          */
@@ -91,12 +91,12 @@
         mt[mti] = (69069 * mt[mti-1]) & 0xffffffff;
 }
 
-unsigned long MT_rand()
+unsigned int MT_rand()
 {
-    static unsigned long mag01[2] = { 0x0, MATRIX_A };
+    static unsigned int mag01[2] = { 0x0, MATRIX_A };
     /* mag01[x] = x * MATRIX_A  for x=0,1 */
 
-    unsigned long y;
+    unsigned int y;
 
     if (mti >= N) { /* generate N words at one time */
         int kk;

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/ipo.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/ipo.c	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/ipo.c	2008-07-02 02:05:33 UTC (rev 15403)
@@ -1859,7 +1859,7 @@
 		/* yafray: aperture & focal distance params */
 		switch(icu->adrcode) {
 		case CAM_LENS:
-			icu->ymin= 5.0;
+			icu->ymin= 1.0;
 			icu->ymax= 1000.0;
 			break;
 		case CAM_STA:

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/text.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/text.c	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/text.c	2008-07-02 02:05:33 UTC (rev 15403)
@@ -942,7 +942,8 @@
 	if (!text) return NULL;
 	if (!text->curl) return NULL;
 	if (!text->sell) return NULL;
-		
+	if (!text->lines.first) return NULL;
+
 	linef= text->lines.first;
 	charf= 0;
 		

Modified: branches/soc-2008-unclezeiv/source/blender/imbuf/intern/IMB_anim.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/imbuf/intern/IMB_anim.h	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/imbuf/intern/IMB_anim.h	2008-07-02 02:05:33 UTC (rev 15403)
@@ -183,8 +183,9 @@
 	AVFormatContext *pFormatCtx;
 	AVCodecContext *pCodecCtx;
 	AVCodec *pCodec;
+	AVFrame *pFrame;
 	AVFrame *pFrameRGB;
-	AVFrame *pFrame;
+	AVFrame *pFrameDeinterlaced;
 	struct SwsContext *img_convert_ctx;
 	int videoStream;
 #endif

Modified: branches/soc-2008-unclezeiv/source/blender/imbuf/intern/anim.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/imbuf/intern/anim.c	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/imbuf/intern/anim.c	2008-07-02 02:05:33 UTC (rev 15403)
@@ -600,6 +600,7 @@
 	anim->videoStream = videoStream;
 
 	anim->pFrame = avcodec_alloc_frame();
+	anim->pFrameDeinterlaced = avcodec_alloc_frame();
 	anim->pFrameRGB = avcodec_alloc_frame();
 
 	if (avpicture_get_size(PIX_FMT_BGR32, anim->x, anim->y)
@@ -609,10 +610,20 @@
 		avcodec_close(anim->pCodecCtx);
 		av_close_input_file(anim->pFormatCtx);
 		av_free(anim->pFrameRGB);
+		av_free(anim->pFrameDeinterlaced);
 		av_free(anim->pFrame);
 		return -1;
 	}
 
+	if (anim->ib_flags & IB_animdeinterlace) {
+		avpicture_fill((AVPicture*) anim->pFrameDeinterlaced, 
+			       MEM_callocN(avpicture_get_size(
+						   anim->pCodecCtx->pix_fmt,
+						   anim->x, anim->y), 
+					   "ffmpeg deinterlace"), 
+			       anim->pCodecCtx->pix_fmt, anim->x, anim->y);
+	}
+
 	if (pCodecCtx->has_b_frames) {
 		anim->preseek = 25; /* FIXME: detect gopsize ... */
 	} else {
@@ -644,7 +655,7 @@
 
 	ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect, 0);
 
-	avpicture_fill((AVPicture *)anim->pFrameRGB, 
+	avpicture_fill((AVPicture*) anim->pFrameRGB, 
 		       (unsigned char*) ibuf->rect, 
 		       PIX_FMT_BGR32, anim->x, anim->y);
 
@@ -723,15 +734,29 @@
 			} 
 
 			if(frameFinished && pos_found == 1) {
+				AVFrame * input = anim->pFrame;
+
+				/* This means the data wasnt read properly, 
+				   this check stops crashing */
+				if (input->data[0]==0 && input->data[1]==0 
+				    && input->data[2]==0 && input->data[3]==0){
+					av_free_packet(&packet);
+					break;
+				}
+
 				if (anim->ib_flags & IB_animdeinterlace) {
 					if (avpicture_deinterlace(
+						    (AVPicture*) 
+						    anim->pFrameDeinterlaced,
+						    (const AVPicture*)
 						    anim->pFrame,
-						    anim->pFrame,
 						    anim->pCodecCtx->pix_fmt,
 						    anim->pCodecCtx->width,
 						    anim->pCodecCtx->height)
 					    < 0) {
 						filter_y = 1;
+					} else {
+						input = anim->pFrameDeinterlaced;
 					}
 				}
 
@@ -748,8 +773,8 @@
 					unsigned char* top;
 
 					sws_scale(anim->img_convert_ctx,
-						  anim->pFrame->data,
-						  anim->pFrame->linesize,
+						  input->data,
+						  input->linesize,
 						  0,
 						  anim->pCodecCtx->height,
 						  dst2,
@@ -806,27 +831,25 @@
 					int i;
 					unsigned char* r;
 					
-					/* This means the data wasnt read properly, this check stops crashing */
-					if (anim->pFrame->data[0]!=0 || anim->pFrame->data[1]!=0 || anim->pFrame->data[2]!=0 || anim->pFrame->data[3]!=0) {
 						
-						sws_scale(anim->img_convert_ctx,
-							  anim->pFrame->data,
-							  anim->pFrame->linesize,
-							  0,
-							  anim->pCodecCtx->height,
-							  dst2,
-							  dstStride2);
+					sws_scale(anim->img_convert_ctx,
+						  input->data,
+						  input->linesize,
+						  0,
+						  anim->pCodecCtx->height,
+						  dst2,
+						  dstStride2);
 					
-						/* workaround: sws_scale 
-						   sets alpha = 0... */
+					/* workaround: sws_scale 
+					   sets alpha = 0... */
 					
-						r = (unsigned char*) ibuf->rect;
-	
-						for (i = 0; i < ibuf->x * ibuf->y;i++){
-							r[3] = 0xff;
-							r+=4;
-						}
+					r = (unsigned char*) ibuf->rect;
+					
+					for (i = 0; i < ibuf->x * ibuf->y;i++){
+						r[3] = 0xff;
+						r+=4;
 					}
+					
 					av_free_packet(&packet);
 					break;
 				}
@@ -851,6 +874,11 @@
 		av_close_input_file(anim->pFormatCtx);
 		av_free(anim->pFrameRGB);
 		av_free(anim->pFrame);
+
+		if (anim->ib_flags & IB_animdeinterlace) {
+			MEM_freeN(anim->pFrameDeinterlaced->data[0]);
+		}
+		av_free(anim->pFrameDeinterlaced);
 		sws_freeContext(anim->img_convert_ctx);
 	}
 	anim->duration = 0;

Modified: branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_actuator_types.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_actuator_types.h	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_actuator_types.h	2008-07-02 02:05:33 UTC (rev 15403)
@@ -192,11 +192,13 @@
 } bVisibilityActuator;
 
 typedef struct bTwoDFilterActuator{
-	char pad[4];
-	/* Tells what type of 2D Filter*/
+	char pad[2];
+	/* bitwise flag for enabling or disabling depth(bit 0) and luminance(bit 1) */
+	short texture_flag;
+	/* Tells what type of 2D Filter */
 	short type;
 	/* (flag == 0) means 2D filter is activate and
-	   (flag != 0) means 2D filter is inactive*/
+	   (flag != 0) means 2D filter is inactive */
 	short flag;
 	int   int_arg;
 	/* a float argument */

Modified: branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_userdef_types.h	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_userdef_types.h	2008-07-02 02:05:33 UTC (rev 15403)
@@ -310,7 +310,7 @@
 #define	USER_DUP_ACT			(1 << 10)
 
 /* gameflags */
-#define USER_VERTEX_ARRAYS		1
+#define USER_DEPRECATED_FLAG	1
 #define USER_DISABLE_SOUND		2
 #define USER_DISABLE_MIPMAP		4
 

Modified: branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Lamp.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Lamp.c	2008-07-02 01:48:57 UTC (rev 15402)
+++ branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Lamp.c	2008-07-02 02:05:33 UTC (rev 15403)
@@ -1560,12 +1560,11 @@
 	char *type = PyString_AsString(value);
 	PyObject *arg, *error;
 
-	/* parse string argument */
-
-	if( !value )
-		return ( EXPP_ReturnPyObjError( PyExc_TypeError,
-						"expected string argument" ) );
-
+	/* parse string argument */	
+	if( !type ) 
+		return EXPP_ReturnPyObjError ( PyExc_TypeError,
+					       "expected string argument" );
+	
 	/* check for valid arguments, set type accordingly */
 
 	if( !strcmp( type, "Lamp" ) )
@@ -1586,7 +1585,7 @@
 
 	/* build tuple, call wrapper */
 
-	arg = Py_BuildValue( "(i)", type );

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list