Add RecoveryMapMath tests; also some fixes.
Add thorough tests for recovery map math. Also, the following fixes for
issues discovered along the way:
* Added proper scaling of luminances during map generation
* Corrected some luminance and color conversions using incorrect
luminance/luma cooeficients
* Corrected PQ inverse OETF
* Corrected clipping of gain when encoding recovery
* Corrected sampleMap to use a better, working sampling algorithm
instead of the previous bad and incorrect one
* Clarified expected ranges in and out of some transformation
functions
* Clarified references for a bunch of transformations
Bug: 252835416
Test: builds, new tests pass
Change-Id: I3c2192e840b784774c60cf212aaf188501915340
diff --git a/libs/jpegrecoverymap/tests/Android.bp b/libs/jpegrecoverymap/tests/Android.bp
index 8f37954..b509478 100644
--- a/libs/jpegrecoverymap/tests/Android.bp
+++ b/libs/jpegrecoverymap/tests/Android.bp
@@ -26,13 +26,15 @@
test_suites: ["device-tests"],
srcs: [
"recoverymap_test.cpp",
+ "recoverymapmath_test.cpp",
],
shared_libs: [
- "libimage_io",
"libjpeg",
"liblog",
],
static_libs: [
+ "libimage_io",
+ "libgmock",
"libgtest",
"libjpegdecoder",
"libjpegencoder",