fixed random failures in Core_DFT.complex_output2 test (the case of input_mat.cols == 1)

This commit is contained in:
Vadim Pisarevsky 2015-05-05 20:31:30 +03:00
parent 73f760fdf0
commit 0ee8634b2f

View File

@ -1089,11 +1089,12 @@ RealDFT( const T* src, T* dst, int n, int nf, int* factors, const int* itab,
}
}
if( complex_output && (n & 1) == 0 )
if( complex_output && ((n & 1) == 0 || n == 1))
{
dst[-1] = dst[0];
dst[0] = 0;
dst[n] = 0;
if( n > 1 )
dst[n] = 0;
}
}