Commit 5099c541 authored by Martin Vignali's avatar Martin Vignali Committed by Andreas Cadhalpun

libavcodec/exr: add support for uint32 channel decoding with pxr24

Doesn't decode the uint32 layer, but decodes the half part of the file.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 8c8f543b
......@@ -882,6 +882,22 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src,
bytestream_put_le16(&out, pixel);
}
break;
case EXR_UINT:
ptr[0] = in;
ptr[1] = ptr[0] + s->xdelta;
ptr[2] = ptr[1] + s->xdelta;
ptr[3] = ptr[2] + s->xdelta;
in = ptr[3] + s->xdelta;
for (j = 0; j < s->xdelta; ++j) {
uint32_t diff = (*(ptr[0]++) << 24) |
(*(ptr[1]++) << 16) |
(*(ptr[2]++) << 8 ) |
(*(ptr[3]++));
pixel += diff;
bytestream_put_le32(&out, pixel);
}
break;
default:
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment