[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15389] branches/apricot: svn merge -r15360:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/ blender/

Campbell Barton ideasman42 at gmail.com
Mon Jun 30 00:08:23 CEST 2008


Revision: 15389
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15389
Author:   campbellbarton
Date:     2008-06-30 00:08:23 +0200 (Mon, 30 Jun 2008)

Log Message:
-----------
svn  merge  -r15360:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender/

Modified Paths:
--------------
    branches/apricot/intern/iksolver/intern/IK_QTask.h
    branches/apricot/intern/moto/include/MT_random.h
    branches/apricot/intern/moto/intern/MT_random.cpp
    branches/apricot/source/blender/blenkernel/intern/image.c
    branches/apricot/source/blender/blenkernel/intern/ipo.c
    branches/apricot/source/blender/blenkernel/intern/text.c
    branches/apricot/source/blender/imbuf/intern/IMB_anim.h
    branches/apricot/source/blender/imbuf/intern/anim.c
    branches/apricot/source/blender/makesdna/DNA_actuator_types.h
    branches/apricot/source/blender/makesdna/DNA_userdef_types.h
    branches/apricot/source/blender/nodes/intern/CMP_nodes/CMP_math.c
    branches/apricot/source/blender/src/buttons_logic.c
    branches/apricot/source/blender/src/drawaction.c
    branches/apricot/source/blender/src/drawview.c
    branches/apricot/source/blender/src/editaction.c
    branches/apricot/source/blender/src/editfont.c
    branches/apricot/source/blender/src/poseobject.c
    branches/apricot/source/blender/src/space.c
    branches/apricot/source/blender/src/view.c
    branches/apricot/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/apricot/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
    branches/apricot/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
    branches/apricot/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_2DFilterActuator.h
    branches/apricot/source/gameengine/GameLogic/SCA_PythonController.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_PythonController.h
    branches/apricot/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
    branches/apricot/source/gameengine/GamePlayer/common/GPC_RenderTools.h
    branches/apricot/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/apricot/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/apricot/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/apricot/source/gameengine/Ketsji/KX_GameObject.h
    branches/apricot/source/gameengine/PyDoc/KX_GameObject.py
    branches/apricot/source/gameengine/PyDoc/SCA_PythonController.py
    branches/apricot/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/apricot/source/gameengine/Rasterizer/RAS_2DFilterManager.h
    branches/apricot/source/gameengine/Rasterizer/RAS_IRenderTools.h
    branches/apricot/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
    branches/apricot/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp

Modified: branches/apricot/intern/iksolver/intern/IK_QTask.h
===================================================================
--- branches/apricot/intern/iksolver/intern/IK_QTask.h	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/intern/iksolver/intern/IK_QTask.h	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/intern/moto/include/MT_random.h
===================================================================
--- branches/apricot/intern/moto/include/MT_random.h	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/intern/moto/include/MT_random.h	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/intern/moto/intern/MT_random.cpp
===================================================================
--- branches/apricot/intern/moto/intern/MT_random.cpp	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/intern/moto/intern/MT_random.cpp	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/image.c	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/blenkernel/intern/image.c	2008-06-29 22:08:23 UTC (rev 15389)
@@ -859,8 +859,8 @@
 			extension= ".bmp";
 	}
 	else if(G.have_libtiff && (imtype==R_TIFF)) {
-		if(!BLI_testextensie(string, ".tif"))
-			extension= ".tif";
+		if(!BLI_testextensie(string, ".tif") && 
+			!BLI_testextensie(string, ".tiff")) extension= ".tif";
 	}
 #ifdef WITH_OPENEXR
 	else if( ELEM(imtype, R_OPENEXR, R_MULTILAYER)) {

Modified: branches/apricot/source/blender/blenkernel/intern/ipo.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/ipo.c	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/blenkernel/intern/ipo.c	2008-06-29 22:08:23 UTC (rev 15389)
@@ -1882,7 +1882,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/apricot/source/blender/blenkernel/intern/text.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/text.c	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/blenkernel/intern/text.c	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/source/blender/imbuf/intern/IMB_anim.h
===================================================================
--- branches/apricot/source/blender/imbuf/intern/IMB_anim.h	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/imbuf/intern/IMB_anim.h	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/source/blender/imbuf/intern/anim.c
===================================================================
--- branches/apricot/source/blender/imbuf/intern/anim.c	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/imbuf/intern/anim.c	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/source/blender/makesdna/DNA_actuator_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_actuator_types.h	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/makesdna/DNA_actuator_types.h	2008-06-29 22:08:23 UTC (rev 15389)
@@ -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/apricot/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_userdef_types.h	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/makesdna/DNA_userdef_types.h	2008-06-29 22:08:23 UTC (rev 15389)
@@ -312,7 +312,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/apricot/source/blender/nodes/intern/CMP_nodes/CMP_math.c
===================================================================
--- branches/apricot/source/blender/nodes/intern/CMP_nodes/CMP_math.c	2008-06-29 21:52:23 UTC (rev 15388)
+++ branches/apricot/source/blender/nodes/intern/CMP_nodes/CMP_math.c	2008-06-29 22:08:23 UTC (rev 15389)
@@ -57,7 +57,7 @@
 		break; 
 	case 3: /* Divide */
 		{
-			if(in[1]==0)	/* We don't want to divide by zero. */
+			if(in2[0]==0)	/* We don't want to divide by zero. */
 				out[0]= 0.0;
 			else
 				out[0]= in[0] / in2[0];


@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list