libavcodec/exr: fix incorrect translation of denorm mantissa

pull/351/head
Mark Reid 4 years ago committed by Paul B Mahol
parent 2524e64dbe
commit 8ddcbebc3f
  1. 2
      libavcodec/exr.c
  2. 2
      tests/ref/fate/exr-rgba-multiscanline-half-b44
  3. 2
      tests/ref/fate/exr-slice-raw
  4. 2
      tests/ref/fate/exr-slice-rle
  5. 2
      tests/ref/fate/exr-slice-zip1
  6. 2
      tests/ref/fate/exr-slice-zip16

@ -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;

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save