Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

Oliver Neukum <[email protected]>
Newsgroups gmane.comp.video.video4linux,gmane.linux.usb.devel
Message-ID <[email protected]>
Am Dienstag, 13. Februar 2007 18:51 schrieb Antoine Jacquet:
> 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.

Sorry, there's a swab32, but no swab16. I misremembered.

	Regards
		Oliver

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.