title: Converting c pointer types
body: <p>I have a c pointer to a structre type called uchar4 which looks like </p>
  
  <pre><code>{
      uchar x; 
      uchar y; 
      uchar z; 
      uchar w;
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>uint8 *data_in;
  uchar4 *temp = (uchar4*)data_in;
  </code></pre>
  
  <p>However, the first 8 bytes always seem to be wrong. Is there another way of doing this?</p>
  
  <p>EDIT:</p>
  
  <p>the input data = 32 43 F6 A8 88 5A 30 8D 31 31 98 A2 E0 37 07 34</p>
  
  <p>the output data = 32 88 31 E0 37 07 34 8D 31 31 98 A2 E0 37 07 34</p>
  
  <p>The first half is always these seemingly random values</p>