Michael Niedermayer wrote: > Hi > > On Mon, Jan 22, 2007 at 05:59:02PM +0100, Michel Bardiaux wrote: >> I'm trying to ressucitate my BMP encoder. At the time it was criticized >> for using the put_bits API: understandable but the existing decoder used >> get_bits... >> >> So, the first order of business is to change the decoder to use a >> byte-oriented API. But which one? bytestream.h, or the recent >> intreadwrite.h? > > for reading/writing the header use whatever leads to the simplest / cleanest / > most readable code (put_bits, bytestream.h, intreadwrite.h, ... whatever > you like) > > for reading/writing the raw image use memcpy(), le2me_16() and uintXY_t > read/write ISO C style (expect to see the patch rejected if this is > inefficiently implemented like with bytestream.h or intreadwrite.h which > are designed for unaligned data) > Crystal clear: in this case, the existing code (decoder) is a valid example. Wilco, but for the record, I seriously disagree with that view: (1) Changeing style (from using get/put_bits to manual) in the middle of the code damages readability (2) Any inefficiency in the code moving the image data around, will be completely drowned by the I/O time. -- Michel Bardiaux R&D Director T +32 [0] 2 790 29 41 F +32 [0] 2 790 29 02 E mailto:mbardiaux at mediaxim.be Mediaxim NV/SA Vorstlaan 191 Boulevard du Souverain Brussel 1160 Bruxelles http://www.mediaxim.com/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4