Skip to content

Interleaved data #6673

Answered by Yay295
Yay295 asked this question in Q&A
Oct 21, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

The interleaved data I had remembered seeing is actually in the unpacking code:

static void
unpackLA(UINT8 *_out, const UINT8 *in, int pixels) {
int i;
/* LA, pixel interleaved */
for (i = 0; i < pixels; i++) {
UINT32 iv = MAKE_UINT32(in[0], in[0], in[0], in[1]);
memcpy(_out, &iv, sizeof(iv));
in += 2;
_out += 4;
}
}
static void
unpackLAL(UINT8 *_out, const UINT8 *in, int pixels) {
int i;
/* LA, line interleaved */
for (i = 0; i < pixels; i++, _out += 4) {
UINT32 iv = MAKE_UINT32(in[i], in[i], in[i], in[i + pixels]);
memcpy(_out, &iv

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@Yay295
Comment options

@radarhere
Comment options

@Yay295
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by radarhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants