ri2c was broken

Oops, im_ri2c() was totally broken :-(
This commit is contained in:
John Cupitt 2011-02-28 12:16:43 +00:00
parent 3e112602f2
commit 05ab548636
2 changed files with 11 additions and 8 deletions

View File

@ -33,6 +33,7 @@
- removed man pages, we are all gtk-doc now
- im_jpeg2vips() ignores weird APP1 chunks
- im_add() for int/uint was broken
- im_ri2c() was broken
30/11/10 started 7.24.0
- bump for new stable

View File

@ -11,6 +11,8 @@
* - better upcasting
* - gtkdoc
* - cleanups
* 28/2/11
* - oop heh argh was broken, added to test suite
*/
/*
@ -60,8 +62,8 @@
TYPE *q0 = (TYPE *) q; \
\
for( x = 0; x < len; x++ ) { \
q0[0] = *p1++; \
q0[1] = *p2++; \
q0[0] = p1[x]; \
q0[1] = p2[x]; \
\
q0 += 2; \
} \
@ -70,17 +72,17 @@
/* Join two buffers to make a complex.
*/
static void
join_buffer( PEL **p, PEL *q, int n, IMAGE *im )
join_buffer( PEL **p, PEL *q, int n, IMAGE *out )
{
int x;
int len = n * im->Bands;
int len = n * out->Bands;
switch( im->BandFmt ) {
case IM_BANDFMT_FLOAT:
switch( out->BandFmt ) {
case IM_BANDFMT_COMPLEX:
JOIN( float );
break;
case IM_BANDFMT_DOUBLE:
case IM_BANDFMT_DPCOMPLEX:
JOIN( double );
break;
@ -146,7 +148,7 @@ im_ri2c( IMAGE *in1, IMAGE *in2, IMAGE *out )
if( im_cp_descv( out, t[2], t[3], NULL ) )
return( -1 );
out->BandFmt = fmt == IM_BANDFMT_DOUBLE ?
out->BandFmt = (fmt == IM_BANDFMT_DOUBLE) ?
IM_BANDFMT_DPCOMPLEX : IM_BANDFMT_COMPLEX;
if( im_wrapmany( t + 2, out, (im_wrapmany_fn) join_buffer, out, NULL ) )