From 2f8fec9a43442cb5ffc66dfde9fd2f23989f358a Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 16 Oct 2009 22:03:55 -0500 Subject: [PATCH] use unsigned<->signed unpacking for normal-noise because SSE doesn't have an unsigned->unsigned pack instruction --- extra/noise/noise.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/noise/noise.factor b/extra/noise/noise.factor index 5d32ed4502..1ea5b95157 100644 --- a/extra/noise/noise.factor +++ b/extra/noise/noise.factor @@ -38,10 +38,10 @@ CONSTANT: normal-noise-count 4 TYPED: normal-noise-map ( seed: integer dim -- bytes ) '[ _ product normal-noise-count * random-bytes >byte-array ] with-seed [ - [ ushort-8{ 0 0 0 0 0 0 0 0 } ushort-8{ 0 0 0 0 0 0 0 0 } ] normal-noise-count ndip - [ uchar-16 ushort-8 vconvert [ v+ ] bi-curry@ bi* ] normal-noise-count napply + [ short-8{ 0 0 0 0 0 0 0 0 } short-8{ 0 0 0 0 0 0 0 0 } ] normal-noise-count ndip + [ uchar-16 short-8 vconvert [ v+ ] bi-curry@ bi* ] normal-noise-count napply [ normal-noise-pow vrshift ] bi@ - ushort-8 uchar-16 vconvert + short-8 uchar-16 vconvert ] data-map( uchar-16[normal-noise-count] -- uchar-16 ) ; inline : normal-noise-image ( seed dim -- image )