Camera2: Fix FPS value scaling between HAL2 and API
API assumes FPS values are in fixed-point with LSB 0.001; HAL2 just
uses ints with no fractional part.
HAL should probably use floats or something similar, but for now, fix
scaling so the two agree on FPS values.
Bug: 7230239
Change-Id: Ie18a4f11fc9d17d9ae2d04781511a273213eda55
diff --git a/services/camera/libcameraservice/camera2/Parameters.h b/services/camera/libcameraservice/camera2/Parameters.h
index 7789ebb..5dd3391 100644
--- a/services/camera/libcameraservice/camera2/Parameters.h
+++ b/services/camera/libcameraservice/camera2/Parameters.h
@@ -223,6 +223,8 @@
// Map from camera orientation + facing to gralloc transform enum
static int degToTransform(int degrees, bool mirror);
+ static const int kFpsToApiScale = 1000;
+
// Transform between (-1000,-1000)-(1000,1000) normalized coords from camera
// API and HAL2 (0,0)-(activePixelArray.width/height) coordinates
int arrayXToNormalized(int width) const;