Date: Tue, 26 Jun 2001 06:06:59 -0700 (PDT) From: Marc van Woerkom <3d@hub.freebsd.org> To: freebsd-hackers@freebsd.org Subject: swapping bytes, fpos_t Message-ID: <20010626130659.400C437B405@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Hi, while porting the ogle dvd player I faced the problem of needing fast byte swap routines for 16, 32 and 64 bit words. After grepping through the -CURRENT sources I came up with at least three different assembler implementations. - one in NTOHS, NTOHL - one undocumented swap16/swap32 used by USB driver - perhaps swab() from the string lib (might need src!=dest) I finally gave up and used the same solution that the xine player porter took - taking code from the ac3dec library. What do you guys advice? Oh yes, and I used fpos_t in all parts of libdvdread, that were used for seeking. Is this ugly, should better use the uint64 type burried deep with the machine dependent headers? What is good coding practice here? Regards, Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010626130659.400C437B405>