[SCM] frei0r/master: Added some bug-fix patches cherry-picked from upstream VCS

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Tue May 20 16:02:52 UTC 2014


The following commit has been merged in the master branch:
commit 37dc44940ebc3b8c7b1569e40c148fb1498bb98d
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Tue May 20 14:38:51 2014 +0200

    Added some bug-fix patches cherry-picked from upstream VCS

diff --git a/debian/patches/020130305~852a4ac.patch b/debian/patches/020130305~852a4ac.patch
new file mode 100644
index 0000000..f18feba
--- /dev/null
+++ b/debian/patches/020130305~852a4ac.patch
@@ -0,0 +1,196 @@
+Author: Janne Liljeblad <janne.liljeblad at gmail.com>
+Last-Update: 2013-03-05
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=852a4ac
+Description: Add transparent background option to vectorscope
+
+---
+ src/filter/vectorscope/vectorscope.c | 105 ++++++++++++++++++++++++++++-------
+ 1 file changed, 84 insertions(+), 21 deletions(-)
+
+diff --git a/src/filter/vectorscope/vectorscope.c b/src/filter/vectorscope/vectorscope.c
+index fd28313..e984534 100644
+--- a/src/filter/vectorscope/vectorscope.c
++++ b/src/filter/vectorscope/vectorscope.c
+@@ -57,6 +57,8 @@ typedef struct vectorscope_instance {
+ 	gavl_video_scaler_t* scope_scaler;
+ 	gavl_video_frame_t* scope_frame_src;
+ 	gavl_video_frame_t* scope_frame_dst;
++  double mix;
++  double overlay_sides;
+ } vectorscope_instance_t;
+ 
+ int f0r_init()
+@@ -74,14 +76,26 @@ void f0r_get_plugin_info( f0r_plugin_info_t* info )
+ 	info->color_model = F0R_COLOR_MODEL_RGBA8888;
+ 	info->frei0r_version = FREI0R_MAJOR_VERSION;
+ 	info->major_version = 0; 
+-	info->minor_version = 1; 
+-	info->num_params =  0; 
++	info->minor_version = 2; 
++	info->num_params =  2; 
+ 	info->explanation = "Displays the vectorscope of the video-data";
+ }
+ 
+ void f0r_get_param_info( f0r_param_info_t* info, int param_index )
+ {
+-	/* empty */
++  switch(param_index)
++  {
++  case 0:
++    info->name = "mix";
++    info->type = F0R_PARAM_DOUBLE;
++    info->explanation = "The amount of source image mixed into background of display";
++    break;
++  case 1:
++    info->name = "overlay sides";
++    info->type = F0R_PARAM_BOOL;
++    info->explanation = "If false, the sides of image are shown without overlay";
++    break;
++  } 
+ }
+ 
+ f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+@@ -94,6 +108,9 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+ 		return NULL;
+ 	}
+ 
++  inst->mix = 0.0;
++  inst->overlay_sides = 1.0;
++
+ 	inst->scala = (unsigned char*)malloc( width * height * 4 );
+ 
+ 	gavl_video_scaler_t* video_scaler;
+@@ -232,13 +249,35 @@ void f0r_destruct(f0r_instance_t instance)
+ }
+ 
+ void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
+-{   
+-	/* empty */
++{  
++  assert(instance);
++  vectorscope_instance_t* inst = (vectorscope_instance_t*)instance;
++  
++  switch(param_index)
++  {
++  case 0:
++	  *((double *)param) = inst->mix;
++	  break;
++  case 1:
++	  *((double *)param) = inst->overlay_sides;
++	  break;
++  }
+ }
+ 
+ void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
+-{
+-	/* empty */
++{ 
++  assert(instance);
++  vectorscope_instance_t* inst = (vectorscope_instance_t*)instance;
++
++  switch(param_index)
++  {
++	case 0:
++	  inst->mix = *((double *)param);
++	  break;
++	case 1:
++	  inst->overlay_sides = *((double *)param);
++	  break;
++  }
+ }
+ 
+  /* RGB to YCbCr range 0-255 */
+@@ -257,7 +296,8 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 	vectorscope_instance_t* inst = (vectorscope_instance_t*)instance;
+ 
+ 	int width = inst->w;
+-	int height = inst->h;	
++	int height = inst->h;
++  double mix = inst->mix;
+ 	int len = inst->w * inst->h;
+ 	int scope_len = SCOPE_WIDTH * SCOPE_HEIGHT;
+ 
+@@ -276,9 +316,17 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 	src_end = src + len;
+ 	scope_end = scope + scope_len;
+ 
+-	while ( dst < dst_end ) {
+-		*(dst++) = 0xFF000000;
+-	}
++  if ( inst->overlay_sides > 0.5) {
++	  while ( dst < dst_end ) {
++		  *(dst++) = 0xFF000000;
++	  }
++  } else {
++	  while ( dst < dst_end ) {
++		  *(dst++) = *(src++);
++	  }
++    src -= len;
++  }
++
+ 	dst = outframe;
+ 	while ( scope < scope_end ) {
+ 		*(scope++) = 0xFF000000;
+@@ -293,7 +341,6 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 		YCbCr = rgb_to_YCbCr(rgb);
+ 		x = YCbCr.Cb;
+ 		y = 255-YCbCr.Cr;
+-		//printf ("Cb: %d, Cr: %d\n", x, y );
+ 		if ( x >= 0 && x < SCOPE_WIDTH && y >= 0 && y < SCOPE_HEIGHT ) {
+ 			pixel = (uint8_t*)&scope[x+SCOPE_WIDTH*y];
+ 			if ( pixel[0] < 255 ) {
+@@ -301,7 +348,6 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 				pixel[1]++;
+ 				pixel[2]++;
+ 			}
+-			//dst[x+width*y] += 1;//0xFFFFFFFF;
+ 		}
+ 	}
+ 
+@@ -310,17 +356,34 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 
+ 	gavl_video_scaler_scale( inst->scope_scaler, inst->scope_frame_src, inst->scope_frame_dst );
+ 
+-	unsigned char *scala8, *dst8, *dst8_end;
++	unsigned char *scala8, *dst8, *dst8_end, *src8;
+ 
+ 	scala8 = inst->scala;
++  src8 = (unsigned char*)inframe;
+ 	dst8 = (unsigned char*)outframe;
+ 	dst8_end = dst8 + ( len * 4 );
+-	while ( dst8 < dst8_end ) {
+-		dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
+-		dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
+-		dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
+-		scala8 += 4;
+-		dst8 += 4;
+-	}
++  if (mix > 0.001 ) { // to not lose performance for non-mixing users
++	  while ( dst8 < dst8_end ) {
++		  dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
++		  dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
++		  dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
++		  if (dst8[0] == 0) {
++        dst8[0] = src8[0] * mix;
++        dst8[1] = src8[1] * mix;
++        dst8[2] = src8[2] * mix;
++      }
++		  scala8 += 4;
++		  dst8 += 4;
++      src8 += 4;
++	  }
++  } else {
++	  while ( dst8 < dst8_end ) {
++		  dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
++		  dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
++		  dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
++		  scala8 += 4;
++		  dst8 += 4;
++    }
++  }
+ }
+ 
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020130305~d67548e.patch b/debian/patches/020130305~d67548e.patch
new file mode 100644
index 0000000..762542c
--- /dev/null
+++ b/debian/patches/020130305~d67548e.patch
@@ -0,0 +1,180 @@
+Author: Janne Liljeblad <janne.liljeblad at gmail.com>
+Last-Update: 2013-03-05
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=d67548e
+Description: Add transparent background option to rgbparade
+
+---
+ src/filter/rgbparade/rgbparade.c | 105 ++++++++++++++++++++++++++++++++-------
+ 1 file changed, 88 insertions(+), 17 deletions(-)
+
+diff --git a/src/filter/rgbparade/rgbparade.c b/src/filter/rgbparade/rgbparade.c
+index 66bde18..b97aa64 100644
+--- a/src/filter/rgbparade/rgbparade.c
++++ b/src/filter/rgbparade/rgbparade.c
+@@ -45,6 +45,8 @@ typedef struct rgbparade {
+ 	gavl_video_scaler_t* parade_scaler;
+ 	gavl_video_frame_t* parade_frame_src;
+ 	gavl_video_frame_t* parade_frame_dst;
++  double mix;
++  double overlay_sides;
+ } rgbparade_t;
+ 
+ int f0r_init()
+@@ -62,13 +64,27 @@ void f0r_get_plugin_info( f0r_plugin_info_t* info )
+ 	info->color_model = F0R_COLOR_MODEL_RGBA8888;
+ 	info->frei0r_version = FREI0R_MAJOR_VERSION;
+ 	info->major_version = 0; 
+-	info->minor_version = 1; 
+-	info->num_params =  0; 
++	info->minor_version = 2; 
++	info->num_params =  2; 
+ 	info->explanation = "Displays a histogram of R, G and B of the video-data";
+ }
+ 
+ void f0r_get_param_info( f0r_param_info_t* info, int param_index )
+-{ /* empty */ }
++{
++  switch(param_index)
++  {
++  case 0:
++    info->name = "mix";
++    info->type = F0R_PARAM_DOUBLE;
++    info->explanation = "The amount of source image mixed into background of display";
++    break;
++  case 1:
++    info->name = "overlay sides";
++    info->type = F0R_PARAM_BOOL;
++    info->explanation = "If false, the sides of image are shown without overlay";
++    break;
++  } 
++}
+ 
+ f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+ {
+@@ -76,6 +92,9 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+ 	inst->w = width;
+ 	inst->h = height;
+ 
++  inst->mix = 0.0;
++  inst->overlay_sides = 1.0;
++
+ 	inst->scala = (unsigned char*)malloc( width * height * 4 );
+ 
+ 	gavl_video_scaler_t* video_scaler;
+@@ -196,10 +215,36 @@ void f0r_destruct(f0r_instance_t instance)
+ }
+ 
+ void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
+-{ /* empty */ }
++{  
++  assert(instance);
++  rgbparade_t* inst = (rgbparade_t*)instance;
++  
++  switch(param_index)
++  {
++  case 0:
++	  *((double *)param) = inst->mix;
++	  break;
++  case 1:
++	  *((double *)param) = inst->overlay_sides;
++	  break;
++  }
++}
+ 
+ void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
+-{ /* empty */ }
++{ 
++  assert(instance);
++  rgbparade_t* inst = (rgbparade_t*)instance;
++
++  switch(param_index)
++  {
++	case 0:
++	  inst->mix = *((double *)param);
++	  break;
++	case 1:
++	  inst->overlay_sides = *((double *)param);
++	  break;
++  }
++}
+ 
+ void draw_grid(unsigned char* scope, double width, double height)
+ {
+@@ -230,7 +275,8 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 	rgbparade_t* inst = (rgbparade_t*)instance;
+ 
+ 	int width = inst->w;
+-	int height = inst->h;	
++	int height = inst->h;
++  double mix = inst->mix;
+ 	int len = inst->w * inst->h;
+ 	int parade_len = width * PARADE_HEIGHT;
+ 
+@@ -250,9 +296,17 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 	src_end = src + len;
+ 	parade_end = parade + parade_len;
+ 
+-	while ( dst < dst_end ) {
+-		*(dst++) = 0xFF000000;
+-	}
++  if ( inst->overlay_sides > 0.5) {
++	  while ( dst < dst_end ) {
++		  *(dst++) = 0xFF000000;
++	  }
++  } else {
++	  while ( dst < dst_end ) {
++		  *(dst++) = *(src++);
++	  }
++    src -= len;
++  }
++
+ 	dst = outframe;
+ 	while ( parade < parade_end ) {
+ 		*(parade++) = 0xFF000000;
+@@ -291,17 +345,34 @@ void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, u
+ 
+ 	gavl_video_scaler_scale( inst->parade_scaler, inst->parade_frame_src, inst->parade_frame_dst );
+ 
+-	unsigned char *scala8, *dst8, *dst8_end;
++	unsigned char *scala8, *dst8, *dst8_end, *src8;
+ 
+ 	scala8 = inst->scala;
++  src8 = (unsigned char*)inframe;
+ 	dst8 = (unsigned char*)outframe;
+ 	dst8_end = dst8 + ( len * 4 );
+-	while ( dst8 < dst8_end ) {
+-		dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
+-		dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
+-		dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
+-		scala8 += 4;
+-		dst8 += 4;
+-	}
++  if (mix > 0.001 ) { // to not lose performance for non-mixing users
++	  while ( dst8 < dst8_end ) {
++		  dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
++		  dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
++		  dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
++		  if (dst8[0] == 0 && dst8[1] == 0 && dst8[2] == 0){
++        dst8[0] = src8[0] * mix;
++        dst8[1] = src8[1] * mix;
++        dst8[2] = src8[2] * mix;
++      }
++		  scala8 += 4;
++		  dst8 += 4;
++      src8 += 4;
++    }
++  } else {
++	  while ( dst8 < dst8_end ) {
++	    dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
++	    dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
++	    dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
++	    scala8 += 4;
++	    dst8 += 4;
++    }
++  }
+ }
+ 
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020130314~5b70863.patch b/debian/patches/020130314~5b70863.patch
new file mode 100644
index 0000000..b4f335a
--- /dev/null
+++ b/debian/patches/020130314~5b70863.patch
@@ -0,0 +1,26 @@
+Author: Dan Dennedy <dan at dennedy.org>
+Last-Update: 2013-03-14
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=5b70863
+Description: Fix version in autoconf.
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1a92ac3..48335d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ AC_PREREQ(2.59c)
+-AC_INIT(frei0r-plugins, [1.3.0], [frei0r-devel at piksel.no])
++AC_INIT(frei0r-plugins, [1.4.0], [frei0r-devel at piksel.no])
+ AC_CONFIG_MACRO_DIR([m4])
+ 
+ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020130314~e803035.patch b/debian/patches/020130314~e803035.patch
new file mode 100644
index 0000000..526945e
--- /dev/null
+++ b/debian/patches/020130314~e803035.patch
@@ -0,0 +1,25 @@
+Author: Dan Dennedy <dan at dennedy.org>
+Last-Update: 2013-03-14
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=e803035
+Description: Fix missing string.h include.
+
+---
+ include/frei0r_cairo.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/frei0r_cairo.h b/include/frei0r_cairo.h
+index 4e545cb..d82e115 100644
+--- a/include/frei0r_cairo.h
++++ b/include/frei0r_cairo.h
+@@ -21,6 +21,7 @@
+ 
+ 
+ #include <cairo.h>
++#include <string.h>
+ 
+ /**
+ * String identifiers for gradient types available using Cairo.
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020130316~245bb38.patch b/debian/patches/020130316~245bb38.patch
new file mode 100644
index 0000000..cbd1df8
--- /dev/null
+++ b/debian/patches/020130316~245bb38.patch
@@ -0,0 +1,71 @@
+Author: =?UTF-8?q?Jean-Fran=C3=A7ois=20Fortin=20Tam?= <nekohayo at gmail.com>
+Last-Update: 2013-03-16
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=245bb38
+Description: Make property names for "pixeliz0r" and "lenscorrection"
+ human-readable
+
+---
+ src/filter/lenscorrection/lenscorrection.c | 10 +++++-----
+ src/filter/pixeliz0r/pixeliz0r.c           |  4 ++--
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/filter/lenscorrection/lenscorrection.c b/src/filter/lenscorrection/lenscorrection.c
+index 3db5541..85a4a54 100644
+--- a/src/filter/lenscorrection/lenscorrection.c
++++ b/src/filter/lenscorrection/lenscorrection.c
+@@ -62,27 +62,27 @@ void f0r_get_param_info(f0r_param_info_t* info, int param_index)
+ 	switch(param_index)
+ 	{
+ 		case 0:
+-			info->name = "xcenter";
++			info->name = "X center";
+ 			info->type = F0R_PARAM_DOUBLE;
+ 			info->explanation = "";
+ 			break;
+ 		case 1:
+-			info->name = "ycenter";
++			info->name = "Y center";
+ 			info->type = F0R_PARAM_DOUBLE;
+ 			info->explanation = "";
+ 			break;
+ 		case 2:
+-			info->name = "correctionnearcenter";
++			info->name = "Correction near center";
+ 			info->type = F0R_PARAM_DOUBLE;
+ 			info->explanation = "";
+ 			break;
+ 		case 3:
+-			info->name = "correctionnearedges";
++			info->name = "Correction near edges";
+ 			info->type = F0R_PARAM_DOUBLE;
+ 			info->explanation = "";
+ 			break;
+ 		case 4:
+-			info->name = "brightness";
++			info->name = "Brightness";
+ 			info->type = F0R_PARAM_DOUBLE;
+ 			info->explanation = "";
+ 			break;
+diff --git a/src/filter/pixeliz0r/pixeliz0r.c b/src/filter/pixeliz0r/pixeliz0r.c
+index 6baf91b..e13805d 100644
+--- a/src/filter/pixeliz0r/pixeliz0r.c
++++ b/src/filter/pixeliz0r/pixeliz0r.c
+@@ -47,12 +47,12 @@ void f0r_get_param_info(f0r_param_info_t* info, int param_index)
+   switch(param_index)
+     {
+     case 0:
+-      info->name = "BlockSizeX";
++      info->name = "Block width";
+       info->type = F0R_PARAM_DOUBLE;
+       info->explanation = "Horizontal size of one \"pixel\"";
+       break;
+     case 1:
+-      info->name = "BlockSizeY";
++      info->name = "Block height";
+       info->type = F0R_PARAM_DOUBLE;
+       info->explanation = "Vertical size of one \"pixel\"";
+       break;      
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020130415~b1faa09.patch b/debian/patches/020130415~b1faa09.patch
new file mode 100644
index 0000000..8d96f78
--- /dev/null
+++ b/debian/patches/020130415~b1faa09.patch
@@ -0,0 +1,92 @@
+Author: Marko Cebokli <mc at mcpc14.site>
+Last-Update: 2013-04-15
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=b1faa09
+Description: Medians: fix indexes in median13
+
+---
+ src/filter/medians/small_medians.h | 68 +++++++++++++++++++-------------------
+ 1 file changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/filter/medians/small_medians.h b/src/filter/medians/small_medians.h
+index bd26d0a..81a6705 100644
+--- a/src/filter/medians/small_medians.h
++++ b/src/filter/medians/small_medians.h
+@@ -137,40 +137,40 @@ static inline uint32_t median13(uint32_t *mm)
+ {
+ uint8_t *m=(uint8_t*)mm;
+ //     -R-              -G-              -B-
+-    P_SO(m[10],m[3]); P_SO(m[11],m[4]); P_SO(m[12],m[5]);
+-    P_SO(m[6],m[10]); P_SO(m[7],m[11]); P_SO(m[8],m[12]);
+-    P_SO(m[11],m[1]); P_SO(m[12],m[2]); P_SO(m[13],m[3]);
+-    P_SO(m[5],m[4]);  P_SO(m[6],m[5]);  P_SO(m[7],m[6]);
+-    P_SO(m[0],m[8]);  P_SO(m[1],m[9]);  P_SO(m[2],m[10]);
+-    P_SO(m[1],m[3]);  P_SO(m[2],m[4]);  P_SO(m[3],m[5]);
+-    P_SO(m[5],m[0]);  P_SO(m[6],m[1]);  P_SO(m[7],m[2]);
+-    P_SO(m[7],m[1]);  P_SO(m[8],m[2]);  P_SO(m[9],m[3]);
+-    P_SO(m[8],m[10]); P_SO(m[9],m[11]); P_SO(m[10],m[12]);
+-    P_SO(m[8],m[12]); P_SO(m[9],m[13]); P_SO(m[10],m[14]);
+-    P_SO(m[4],m[12]); P_SO(m[5],m[13]); P_SO(m[6],m[14]);
+-    P_SO(m[3],m[12]); P_SO(m[4],m[13]); P_SO(m[5],m[14]);
+-    P_SO(m[7],m[11]); P_SO(m[8],m[12]); P_SO(m[9],m[13]);
+-    P_SO(m[9],m[2]);  P_SO(m[10],m[3]); P_SO(m[11],m[4]);
+-    P_SO(m[0],m[2]);  P_SO(m[1],m[3]);  P_SO(m[2],m[4]);
+-    P_SO(m[4],m[1]);  P_SO(m[5],m[2]);  P_SO(m[6],m[3]);
+-    P_SO(m[11],m[0]); P_SO(m[12],m[1]); P_SO(m[13],m[2]);
+-    P_SO(m[4],m[9]);  P_SO(m[5],m[10]); P_SO(m[6],m[11]);
+-    P_MA(m[7],m[5]);  P_MA(m[8],m[6]);  P_MA(m[9],m[7]);
+-    P_MI(m[2],m[1]);  P_MI(m[3],m[2]);  P_MI(m[4],m[3]);
+-    P_MA(m[4],m[6]);  P_MA(m[5],m[7]);  P_MA(m[6],m[8]);
+-    P_SO(m[5],m[9]);  P_SO(m[6],m[10]); P_SO(m[7],m[11]);
+-    P_SO(m[9],m[0]);  P_SO(m[10],m[1]); P_SO(m[11],m[2]);
+-    P_MI(m[3],m[0]);  P_MI(m[4],m[1]);  P_MI(m[5],m[2]);
+-    P_MA(m[5],m[6]);  P_MA(m[6],m[7]);  P_MA(m[7],m[8]);
+-    P_SO(m[2],m[3]);  P_SO(m[3],m[4]);  P_SO(m[4],m[5]);
+-    P_MA(m[11],m[6]); P_MA(m[12],m[7]); P_MA(m[13],m[8]);
+-    P_SO(m[9],m[2]);  P_SO(m[10],m[3]); P_SO(m[11],m[4]);
+-    P_MA(m[8],m[9]);  P_MA(m[9],m[10]); P_MA(m[10],m[11]);
+-    P_MI(m[10],m[2]); P_MI(m[11],m[3]); P_MI(m[12],m[4]);
+-    P_SO(m[9],m[10]); P_SO(m[10],m[11]);P_SO(m[11],m[12]);
+-    P_MA(m[9],m[6]);  P_MA(m[10],m[7]); P_MA(m[11],m[8]);
+-    P_MI(m[10],m[3]); P_MI(m[11],m[4]); P_MI(m[12],m[5]);
+-    P_MI(m[6],m[10]); P_MI(m[7],m[11]); P_MI(m[8],m[12]);
++    P_SO(m[40],m[12]); P_SO(m[41],m[13]); P_SO(m[42],m[14]);
++    P_SO(m[24],m[40]); P_SO(m[25],m[41]); P_SO(m[26],m[42]);
++    P_SO(m[44],m[4]);  P_SO(m[45],m[5]);  P_SO(m[46],m[6]);
++    P_SO(m[20],m[16]); P_SO(m[21],m[17]); P_SO(m[22],m[18]);
++    P_SO(m[0],m[32]);  P_SO(m[1],m[33]);  P_SO(m[2],m[34]);
++    P_SO(m[4],m[12]);  P_SO(m[5],m[13]);  P_SO(m[6],m[14]);
++    P_SO(m[20],m[0]);  P_SO(m[21],m[1]);  P_SO(m[22],m[2]);
++    P_SO(m[28],m[4]);  P_SO(m[29],m[5]);  P_SO(m[30],m[6]);
++    P_SO(m[32],m[40]); P_SO(m[33],m[41]); P_SO(m[34],m[42]);
++    P_SO(m[32],m[48]); P_SO(m[33],m[49]); P_SO(m[34],m[50]);
++    P_SO(m[16],m[48]); P_SO(m[17],m[49]); P_SO(m[18],m[50]);
++    P_SO(m[12],m[48]); P_SO(m[13],m[49]); P_SO(m[14],m[50]);
++    P_SO(m[28],m[44]); P_SO(m[29],m[45]); P_SO(m[30],m[46]);
++    P_SO(m[36],m[8]);  P_SO(m[37],m[9]);  P_SO(m[38],m[10]);
++    P_SO(m[0],m[8]);   P_SO(m[1],m[9]);   P_SO(m[2],m[10]);
++    P_SO(m[16],m[4]);  P_SO(m[17],m[5]);  P_SO(m[18],m[6]);
++    P_SO(m[44],m[0]);  P_SO(m[45],m[1]);  P_SO(m[46],m[2]);
++    P_SO(m[16],m[36]); P_SO(m[17],m[37]); P_SO(m[18],m[38]);
++    P_MA(m[28],m[20]); P_MA(m[29],m[21]); P_MA(m[30],m[22]);
++    P_MI(m[8],m[4]);   P_MI(m[9],m[5]);   P_MI(m[10],m[6]);
++    P_MA(m[16],m[24]); P_MA(m[17],m[25]); P_MA(m[18],m[26]);
++    P_SO(m[20],m[36]); P_SO(m[21],m[37]); P_SO(m[22],m[38]);
++    P_SO(m[36],m[0]);  P_SO(m[37],m[1]);  P_SO(m[38],m[2]);
++    P_MI(m[12],m[0]);  P_MI(m[13],m[1]);  P_MI(m[14],m[2]);
++    P_MA(m[20],m[24]); P_MA(m[21],m[25]); P_MA(m[22],m[26]);
++    P_SO(m[8],m[12]);  P_SO(m[9],m[13]);  P_SO(m[10],m[14]);
++    P_MA(m[44],m[24]); P_MA(m[45],m[25]); P_MA(m[46],m[26]);
++    P_SO(m[36],m[8]);  P_SO(m[37],m[9]);  P_SO(m[38],m[10]);
++    P_MA(m[32],m[36]); P_MA(m[33],m[37]); P_MA(m[34],m[38]);
++    P_MI(m[40],m[8]);  P_MI(m[41],m[9]);  P_MI(m[42],m[10]);
++    P_SO(m[36],m[40]); P_SO(m[37],m[41]); P_SO(m[38],m[42]);
++    P_MA(m[36],m[24]); P_MA(m[37],m[25]); P_MA(m[38],m[26]);
++    P_MI(m[40],m[12]); P_MI(m[41],m[13]); P_MI(m[42],m[14]);
++    P_MI(m[24],m[40]); P_MI(m[25],m[41]); P_MI(m[26],m[42]);
+ return mm[6];
+ }
+ 
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/020140427~fc84121.patch b/debian/patches/020140427~fc84121.patch
new file mode 100644
index 0000000..eda611f
--- /dev/null
+++ b/debian/patches/020140427~fc84121.patch
@@ -0,0 +1,51 @@
+Author: Dan Dennedy <dan at dennedy.org>
+Last-Update: 2014-04-27
+Forwarded: yes
+Origin: upstream, http://git.dyne.org/frei0r/commit/?id=fc84121
+Description: Fix array out-of-bounds error in partik0l.
+
+When using rand(), it may make sense to use RAND_MAX. But in a build
+made on MinGW RAND_MAX is equivalent to a SHRT_MAX, which results in
+crashes in blossom_recal() due to accessing the prime array outside of
+its bounds. INT_MAX was chosen because on Linux, RAND_MAX is equivalent
+to INT_MAX, and UINT_MAX gives different results visually.
+---
+ src/generator/partik0l/partik0l.cpp | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/generator/partik0l/partik0l.cpp b/src/generator/partik0l/partik0l.cpp
+index 6dd5a8a..87728c7 100644
+--- a/src/generator/partik0l/partik0l.cpp
++++ b/src/generator/partik0l/partik0l.cpp
+@@ -38,6 +38,7 @@
+ 
+ #include <time.h>
+ #include <inttypes.h>
++#include <limits.h>
+ 
+ /* defines for blob size and roundness */
+ #define LIM 8 // 25
+@@ -185,13 +186,13 @@ void Partik0l::update() {
+ 
+ void Partik0l::blossom_recal(bool r) {
+ 
+-  float z = ((PRIMES-2)*fastrand()/RAND_MAX)+1;
+-  blossom_m = 1.0+(30.0)*fastrand()/RAND_MAX;
+-  blossom_n = 1.0+(30.0)*fastrand()/RAND_MAX;
+-  blossom_i = prime[ (int) (z*fastrand()/RAND_MAX) ];
+-  blossom_j = prime[ (int) (z*fastrand()/RAND_MAX) ];
+-  blossom_k = prime[ (int) (z*fastrand()/RAND_MAX) ];
+-  blossom_l = prime[ (int) (z*fastrand()/RAND_MAX) ];
++  float z = ((PRIMES-2)*fastrand()/INT_MAX)+1;
++  blossom_m = 1.0+(30.0)*fastrand()/INT_MAX;
++  blossom_n = 1.0+(30.0)*fastrand()/INT_MAX;
++  blossom_i = prime[ (int) (z*fastrand()/INT_MAX) ];
++  blossom_j = prime[ (int) (z*fastrand()/INT_MAX) ];
++  blossom_k = prime[ (int) (z*fastrand()/INT_MAX) ];
++  blossom_l = prime[ (int) (z*fastrand()/INT_MAX) ];
+   wd = (double)w;
+   hd = (double)h;
+   if(r)
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..8b763c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+020130314~5b70863.patch
+020130314~e803035.patch
+020130305~852a4ac.patch
+020130305~d67548e.patch
+020130316~245bb38.patch
+020130415~b1faa09.patch
+020140427~fc84121.patch

-- 
frei0r packaging



More information about the pkg-multimedia-commits mailing list