Fix butteraugli for auto-optimizer

This commit is contained in:
Surma
2021-02-22 17:58:15 +00:00
parent 934ab9065a
commit 659d2b8277
2 changed files with 4 additions and 4 deletions

View File

@@ -22,10 +22,10 @@ void planarize(std::vector<ImageF>& img,
float* const row_b = img[2].Row(y);
float* const row_a = img[3].Row(y);
for (int x = 0; x < width; x++) {
row_r[x] = 255.0 * pow(rgba[y * width * 4 + x * 4 + 0] / 255.0, gamma);
row_g[x] = 255.0 * pow(rgba[y * width * 4 + x * 4 + 1] / 255.0, gamma);
row_b[x] = 255.0 * pow(rgba[y * width * 4 + x * 4 + 2] / 255.0, gamma);
row_a[x] = 255.0 * pow(rgba[y * width * 4 + x * 4 + 3] / 255.0, gamma);
row_r[x] = 255.0 * pow((uint8_t)rgba[(y * width + x) * 4 + 0] / 255.0, gamma);
row_g[x] = 255.0 * pow((uint8_t)rgba[(y * width + x) * 4 + 1] / 255.0, gamma);
row_b[x] = 255.0 * pow((uint8_t)rgba[(y * width + x) * 4 + 2] / 255.0, gamma);
row_a[x] = 255.0 * pow((uint8_t)rgba[(y * width + x) * 4 + 3] / 255.0, gamma);
}
}
}

BIN
codecs/visdif/visdif.wasm Normal file → Executable file

Binary file not shown.