From: Berke Durak <berke.durak@exalead.com>
To: Christoph Bauer <Christoph.Bauer@lmsintl.com>
Cc: caml-list List <caml-list@inria.fr>
Subject: Re: [Caml-list] bigarray & int24
Date: Mon, 31 Mar 2008 12:30:13 +0200 [thread overview]
Message-ID: <47F0BD35.1010508@exalead.com> (raw)
In-Reply-To: <BB046CA812535C45BD0029AA9D04BA7902C90A60@KL-SRV57.lmsintl.com>
Christoph Bauer a écrit :
> Hi,
>
> my program should read unaligned 3 byte integers. (A real world
> example for such a format would be an RGB image). What is
> the best approach?
>
> - extend bigarray for the int24 format and send the patch to INRIA
> - write a C-function, which converts the data to an int32-array
> - read an 1-byte-bigarray and construct an int-bigarray
> - ???
>
> It should be a bigarray solution, because my program reads other
> (supported)
> formats as well.
>
> Speed matters, because there are a lot of data.
>
> Thanks,
>
> Christoph Bauer
Last time I did this, I used a (m x n x 3) byte bigarray, also known
pendantically as a rank 3 tensor, where m is the number of rows and
n the number of columns. Should work reasonably well.
--
Berke DURAK
next prev parent reply other threads:[~2008-03-31 10:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-31 9:58 Christoph Bauer
2008-03-31 10:30 ` Berke Durak [this message]
2008-03-31 11:27 ` Sylvain Le Gall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F0BD35.1010508@exalead.com \
--to=berke.durak@exalead.com \
--cc=Christoph.Bauer@lmsintl.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox