History

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

Paul B Mahol committed 3 years ago

Commit 024c30a1 parent b7e79ba1 file · +3 −4Browse files

Unified · Split

libavcodec/exr.c+3−4
@@ -1119,7 +1119,6 @@ static int dwa_uncompress(const EXRContext *s, const uint8_t *src, int compresse · 1118 unmodified lines
1119 }1119 }
1120 1120
1121 {1121 {
1122 const float scale = s->pixel_type == EXR_FLOAT ? 2.f : 1.f;
1123 const int o = s->nb_channels == 4;1122 const int o = s->nb_channels == 4;
1124 float *bo = ((float *)td->uncompressed_data) +1123 float *bo = ((float *)td->uncompressed_data) +
1125 y * td->xsize * s->nb_channels + td->xsize * (o + 0) + x;1124 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 · 11 unmodified lines
1137 1136
1138 convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]);1137 convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]);
1139 1138
1140 bo[xx] = to_linear(bo[xx], scale);1139 bo[xx] = to_linear(bo[xx], 1.f);
1141 go[xx] = to_linear(go[xx], scale);1140 go[xx] = to_linear(go[xx], 1.f);
1142 ro[xx] = to_linear(ro[xx], scale);1141 ro[xx] = to_linear(ro[xx], 1.f);
1143 }1142 }
1144 1143
1145 bo += td->xsize * s->nb_channels;1144 bo += td->xsize * s->nb_channels;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t