charles,
that was it... i was passing a ptr to a block of structs, not a ptr
to a block of ptrs to the structs... its this stuff that always gets
me with C. Anyways, works great now, thanks everyone!
mike
--
Mike Woodworth
[EMAIL PROTECTED]
On Apr 28, 2006, at 11:02 AM, Charles Yeomans wrote:
On Apr 28, 2006, at 12:17 AM, Mike Woodworth wrote:
hey,
i'm hoping someone here has run into this problem before and can
steer me in the right direction. I'm trying to call the following
declare:
vImage_Error vImageMatrixMultiply_Planar8 (
const vImage_Buffer *srcs[],
const vImage_Buffer *dests[],
uint32_t src_planes,
uint32_t dest_planes,
const int16_t matrix[],
int32_t divisor,
const int16_t *pre_bias,
const int32_t *post_bias,
vImage_Flags flags
);
for the most part it doesn't scare me... the same kinda stuff i've
done piles before - but the line const int16_t matrix[] has me
scratching my head. the array i'm trying to pass in is 9 values.
I've built a memoryblock of size 18, and passed it to the declare
as 2 int64 and an int16. i've written the declare as:
declare function vImageMatrixMultiply_Planar8 lib
"Accelerate" (srcs as Ptr, dests as Ptr, src_planes as integer,
dest_planes as integer, matrix1 as int64, matrix2 as int64,matrix3
as int16, divisor as integer, prebias as integer, postbias as
integer, flags as integer) as Integer
however this crashes the app.
According to the documentation, matrix is an array of int16_t,
which suggests that it should be declared in Rb as Ptr. You should
make certain that the size of this MemoryBlock is
2*src_planes*dest_planes. Presumably you do not want the pre_bias
and post_bias values and so are passing 0 in these parameters. If
this doesn't fix things, I'd suggest looking carefully at how
you're setting up the srcs and dests parameters. Those are
pointers to arrays of pointers to structs, so you should be doing
something like the following.
dim ptrToSrcs as new MemoryBlock(4)
ptrToSrcs.Ptr(0) = srcsArray
Then pass ptrToSrcs to the function.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>