[FFmpeg-cvslog] avcodec/exr: remove wrong scaling for 32bit DWA compression

Paul B Mahol git at videolan.org
Thu Jun 8 13:11:21 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Jun  8 12:05:47 2023 +0200| [024c30aa3b3cdb7d32fa5d79b0973ab8f3065ead] | committer: Paul B Mahol

avcodec/exr: remove wrong scaling for 32bit DWA compression

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=024c30aa3b3cdb7d32fa5d79b0973ab8f3065ead
---

 libavcodec/exr.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 8cc6b056b2..fae1d08ab0 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1119,7 +1119,6 @@ static int dwa_uncompress(const EXRContext *s, const uint8_t *src, int compresse
             }
 
             {
-                const float scale = s->pixel_type == EXR_FLOAT ? 2.f : 1.f;
                 const int o = s->nb_channels == 4;
                 float *bo = ((float *)td->uncompressed_data) +
                     y * td->xsize * s->nb_channels + td->xsize * (o + 0) + x;
@@ -1137,9 +1136,9 @@ static int dwa_uncompress(const EXRContext *s, const uint8_t *src, int compresse
 
                         convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]);
 
-                        bo[xx] = to_linear(bo[xx], scale);
-                        go[xx] = to_linear(go[xx], scale);
-                        ro[xx] = to_linear(ro[xx], scale);
+                        bo[xx] = to_linear(bo[xx], 1.f);
+                        go[xx] = to_linear(go[xx], 1.f);
+                        ro[xx] = to_linear(ro[xx], 1.f);
                     }
 
                     bo += td->xsize * s->nb_channels;



More information about the ffmpeg-cvslog mailing list