Hello, >> + /* swap to good indian if camera needs it */ >> + if (cam->method == 0) >> + for (i = 0; i < BUFFER_SIZE; i += 2) { >> + swap = cam->buffer[i]; >> + cam->buffer[i] = cam->buffer[i + 1]; >> + cam->buffer[i + 1] = swap; >> + } > > please use the macros
Sorry, I am not sure which macro to use in this case. My comment is not very good, in fact on some cameras I need to swap the bytes to have correct JPEG data (so this is not an endianness issue I think). Maybe there is a macro to swap bytes in a buffer? I cannot find it. Thanks for your comments and best regards, Antoine -- Antoine "Royale" Jacquet http://royale.zerezo.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel