I have a c pointer to a structre type called uchar4 which looks like
{
uchar x;
uchar y;
uchar z;
uchar w;
}
I also have data passed in as uint8*. I'd like to create a uchar* pointing to the data at the uint8* so I've tried doing this:
uint8 *data_in;
uchar4 *temp = (uchar4*)data_in;
However, the first 8 bytes always seem to be wrong. Is there another way of doing this?
EDIT:
the input data = 32 43 F6 A8 88 5A 30 8D 31 31 98 A2 E0 37 07 34
the output data = 32 88 31 E0 37 07 34 8D 31 31 98 A2 E0 37 07 34
The first half is always these seemingly random values