Hi Tomáš Válek,
I did some testing on a Huawei Nova 3 device, but I didn’t see an obvious FPS issue on Preview or ImageAnalysis.
The device I used to do the testing is:
Model: PAR-LX9
Build number: 9.1.0.346(C636E1R1P3)
Android version 9
Available FPS ranges: [12, 15]
Available FPS ranges: [15, 15]
Available FPS ranges: [14, 20]
Available FPS ranges: [20, 20]
Available FPS ranges: [14, 25]
Available FPS ranges: [25, 25]
Available FPS ranges: [14, 30]
Available FPS ranges: [30, 30]
If I didn't set a specific
CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE value, I can see the following log printed by the device. The default target FPS range setting should be [14, 25]. Both Preview and ImageAnalysis's FPS were 25.x in normal situations and decreased to 14.x if I covered the camera by hand.
2022-02-09 13:55:00.
604 778-1252/? I/Feature: setFpsParam set
SUBCMD_AE_TARGET_FPS_RANGE![14, 25], intent = 1, fps = 0 Thermal = 0 m_fHwcamera=0, m_IppCtrlFlag=0
If I set
CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE value as [30, 30], the following log would be printed. No matter if I covered the camera by hand or not, both Preview and ImageAnalysis's FPS of the back camera became 27.x . And, both Preview and ImageAnalysis's FPS of the front camera could reach 29.x.
2022-02-09 13:52:04.944 778-1252/? I/Feature: setFpsParam set SUBCMD_AE_TARGET_FPS_RANGE![30, 30], intent = 1, fps = 0 Thermal = 0 m_fHwcamera=0, m_IppCtrlFlag=0
The selected resolutions are 1440x1080 for Preview
and 640x480 for ImageAnalysis in the above testing. Basically I think the results matched the target FPS range settings. Could you help to create an issue here and provide more detailed information about the Preview FPS issue encountered by you? The information might include: - Do you only see the FPS issue in Preview or also ImageAnalysis? What is the "very low" value you encountered?
- Does the issue only or easier occur in specific environment settings?
- What does "some resolutions do not work" mean? Can the resolutions be found by StreamConfigurationMap#getOutputSizes(int)?
- Is your Huawei Nova 3 device the same as what I used to do the testing?
- Could you describe more about the issues you encountered compared to the old Camera API?
- Do you encounter the same issues on other LIMITED level devices or Huawei Nova 3 is the only one you encountered those issues?