mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/exr: add fast path for case when powf() isn't needed
This commit is contained in:
parent
f01d522cf3
commit
4cb989e836
@ -1130,13 +1130,18 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
|
||||
t.f = trc_func(t.f);
|
||||
*ptr_x++ = t;
|
||||
}
|
||||
} else {
|
||||
} else if (one_gamma != 1.f) {
|
||||
for (x = 0; x < xsize; x++) {
|
||||
t.i = bytestream_get_le32(&src);
|
||||
if (t.f > 0.0f && c < 3) /* avoid negative values */
|
||||
t.f = powf(t.f, one_gamma);
|
||||
*ptr_x++ = t;
|
||||
}
|
||||
} else {
|
||||
for (x = 0; x < xsize; x++) {
|
||||
t.i = bytestream_get_le32(&src);
|
||||
*ptr_x++ = t;
|
||||
}
|
||||
}
|
||||
} else if (s->pixel_type == EXR_HALF) {
|
||||
// 16-bit
|
||||
|
Loading…
x
Reference in New Issue
Block a user