libavcodec/exr: fix incorrect translation of denorm mantissa

This commit is contained in:
Mark Reid
2020-09-14 19:14:46 -07:00
committed by Paul B Mahol
parent 2524e64dbe
commit 8ddcbebc3f
6 changed files with 6 additions and 6 deletions

View File

@@ -201,7 +201,7 @@ static union av_intfloat32 exr_half2float(uint16_t hf)
mantissa <<= 1;
exp = HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
// check for leading 1 in denorm mantissa
while ((mantissa & (1 << 10))) {
while (!(mantissa & (1 << 10))) {
// for every leading 0, decrement single precision exponent by 1
// and shift half-float mantissa value to the left
mantissa <<= 1;

View File

@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#dimensions 0: 935x251
#sar 0: 1/1
0, 0, 0, 1, 3754960, 0x4d48a1b2
0, 0, 0, 1, 3754960, 0x8d9af112

View File

@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#dimensions 0: 587x675
#sar 0: 1/1
0, 0, 0, 1, 6339600, 0x4f2b496b
0, 0, 0, 1, 6339600, 0xda3e31df

View File

@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#dimensions 0: 587x675
#sar 0: 1/1
0, 0, 0, 1, 6339600, 0x4f2b496b
0, 0, 0, 1, 6339600, 0xda3e31df

View File

@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#dimensions 0: 587x675
#sar 0: 1/1
0, 0, 0, 1, 6339600, 0x4f2b496b
0, 0, 0, 1, 6339600, 0xda3e31df

View File

@@ -3,4 +3,4 @@
#codec_id 0: rawvideo
#dimensions 0: 587x675
#sar 0: 1/1
0, 0, 0, 1, 6339600, 0x4f2b496b
0, 0, 0, 1, 6339600, 0xda3e31df