0

我得到一个眨眼和不正确的相机预览图像(有关更多详细信息,请参阅问题)。我从 MIUI (Android 5-7) 用户那里得到了类似的评论,但我没有带有 MIUI 的设备进行测试。感谢一位用户的帮助,我从他的设备中获得了一份日志。但是,不幸的是,我无法确定失败的确切原因。

日志(仅最重要的部分)

10-02 16:08:50.632   583 11772 D QCameraParameters: int32_t qcamera::QCameraParameters::setNumOfSnapshot():   nBurstNum = 1, nExpnum = 1
10-02 16:08:50.632   583 11772 E QCamera2HWI: int qcamera::QCamera2HardwareInterface::commitParameterChanges(), mParameters.isMorphoHDREnabled() 0
10-02 16:08:50.632   583 11772 D QCameraMorphoPostProc: Enable++, enable 0
10-02 16:08:50.632   583 11772 E QCameraMorphoPostProc: Enable: nothing to changed!
10-02 16:08:50.632   583 11772 D QCameraMorphoPostProc: Enable++, enable 0
10-02 16:08:50.632   583 11772 E QCameraMorphoPostProc: Enable: nothing to changed!
10-02 16:08:50.632   583 11772 E QCamera2HWI: int qcamera::QCamera2HardwareInterface::commitParameterChanges(), mParameters.isMorphoHHTEnabled() 0
10-02 16:08:50.632   583 11772 D QCameraMorphoPostProc: Enable++, enable 0
10-02 16:08:50.632   583 11772 E QCameraMorphoPostProc: Enable: nothing to changed!
10-02 16:08:50.647   616 11789 E mm-camera: :cpp_hardware_set_clock:356 Set clock 160000000 BW abg 209952000 BW inst 209952000
10-02 16:08:50.648   616 11789 D mm-camera: cpp_hw_params_update_wnr_params:6505, invalid trigger input 0.000000
10-02 16:08:50.652 11692 11692 I Finsky  : [1] com.google.android.finsky.utils.ad.onTrimMemory(2): Memory trim requested to level 10
10-02 16:08:50.666   583 11832 I QCamera2HWI: [KPI Perf] static void qcamera::QCamera2HardwareInterface::preview_stream_cb_routine(mm_camera_super_buf_t*, qcamera::QCameraStream*, void*) : PROFILE_FIRST_PREVIEW_FRAME
10-02 16:08:50.670   616 11807 E mm-camera: iface_util_calc_cds_trigger:<cds_debug> HAL CDS mode on
10-02 16:08:50.670   616 11807 E mm-camera: iface_util_calc_cds_trigger:<cds_debug> take CDS! request enb = 1, curr enb = 0 curr_triiger 0.000000, lowlight_start 385.000000, lowlight_end 428.000000
10-02 16:08:50.672   616 11781 E mm-camera-isp2: bf_stats47_stats_config_update:2650 roi from 3a
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 934 y 422 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 934 y 422 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1027 for y 422 w 92 h 92 Changed x 1026
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1026 y 422 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1026 y 422 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1120 y 422 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1120 y 422 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1213 for y 422 w 92 h 92 Changed x 1212
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1212 y 422 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1212 y 422 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1306 y 422 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1306 y 422 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 515 for x 934 w 92 h 92 Changed y 514
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 934 y 514 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 934 y 514 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1027 for y 515 w 92 h 92 Changed x 1026
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 515 for x 1026 w 92 h 92 Changed y 514
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1026 y 514 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1026 y 514 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 515 for x 1120 w 92 h 92 Changed y 514
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1120 y 514 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1120 y 514 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1213 for y 515 w 92 h 92 Changed x 1212
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 515 for x 1212 w 92 h 92 Changed y 514
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1212 y 514 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1212 y 514 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 515 for x 1306 w 92 h 92 Changed y 514
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1306 y 514 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1306 y 514 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 934 y 608 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 934 y 608 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1027 for y 608 w 92 h 92 Changed x 1026
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1026 y 608 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1026 y 608 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1120 y 608 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1120 y 608 w 91 Changed h 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1213 for y 608 w 92 h 92 Changed x 1212
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1212 y 608 h 92 Changed w 91
10-02 16:08:50.673   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1212 y 608 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1306 y 608 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1306 y 608 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 701 for x 934 w 92 h 92 Changed y 700
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 934 y 700 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 934 y 700 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1027 for y 701 w 92 h 92 Changed x 1026
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 701 for x 1026 w 92 h 92 Changed y 700
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1026 y 700 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1026 y 700 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 701 for x 1120 w 92 h 92 Changed y 700
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1120 y 700 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1120 y 700 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1213 for y 701 w 92 h 92 Changed x 1212
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 701 for x 1212 w 92 h 92 Changed y 700
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1212 y 700 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1212 y 700 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1725 error: invalid y 701 for x 1306 w 92 h 92 Changed y 700
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1306 y 700 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1306 y 700 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 934 y 794 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 934 y 794 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1027 for y 794 w 92 h 92 Changed x 1026
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1026 y 794 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1026 y 794 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1120 y 794 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1120 y 794 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1711 error: invalid x 1213 for y 794 w 92 h 92 Changed x 1212
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1212 y 794 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1212 y 794 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1732 error: invalid w 92 for x 1306 y 794 h 92 Changed w 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_validate_roi_boundary:1739 error: invalid h 92 for x 1306 y 794 w 91 Changed h 91
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_sort_ending_pixel_order:2138 i_start = 1199393
10-02 16:08:50.674   616 11781 E mm-camera-isp2: bf_stats47_sort_ending_pixel_order:2138 i_start = 1199485
10-02 16:08:50.674   616 11781 E mm-camera-isp2: be_stats44_trigger_update:447 failed Denomitor is zero hnum 0 vnum 0
10-02 16:08:50.675   616 11781 E mm-camera-isp2: bg_stats44_trigger_update:404 bg_rgn_width 36 bg_rgn_height 27
10-02 16:08:50.675   616 11781 E mm-camera-isp2: abf40_trigger_update:587 aec_ratio.ratio = 0.000000

MIUI 用户,您也可以在Google Play中测试我的应用程序(请不要留下差评)或创建自己的新项目以检查错误发生在哪个阶段。该项目应:

  • 使用 android.hardware.Camera (我知道它已被弃用,但我想支持 android 4 上的用户)。
  • 使用 TextureView 进行输出(我在 onSurfaceTextureUpdated 方法中使用位图来确定颜色。)

我不知道为什么会这样。我希望您能帮助我确定错误的原因。

4

1 回答 1

1

刚刚在运行 MIUI 9 Global 7.9.22 的小米 MI4 (LTE) 上测试了您的应用程序 | Beta(对应安卓版本:6.0.1 MMB29M)。应用程序运行良好,没有闪烁/不正确的图像,并且日志没有吐出任何相关错误这是 logcat 的片段:

10-04 14:31:19.889 344-17006/? D/QCameraParameters: update current cct value. old:2432, now:2452
10-04 14:31:19.940 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 15.433594 lux idx 367.901733
10-04 14:31:19.968 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 14.546875 lux idx 368.742950
10-04 14:31:19.969 344-17006/? D/QCameraParameters: update current cct value. old:2452, now:2462
10-04 14:31:20.008 344-17006/? D/QCameraParameters: update current cct value. old:2462, now:2473
10-04 14:31:20.008 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 14.546875 lux idx 370.292084
10-04 14:31:20.050 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 14.546875 lux idx 371.721436
10-04 14:31:20.051 344-17006/? D/QCameraParameters: update current cct value. old:2473, now:2483
10-04 14:31:20.107 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 14.984375 lux idx 373.024628
10-04 14:31:20.128 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 15.433594 lux idx 374.805603
10-04 14:31:20.131 373-416/? E/QCALOG: [MessageQ] ProcessNewMessage: [XT-CS] unknown deliver target [OS-Agent]
10-04 14:31:20.173 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 15.898438 lux idx 375.732544
10-04 14:31:20.184 373-416/? E/QCALOG: [MessageQ] ProcessNewMessage: [XTWiFi-PE] unknown deliver target [OS-Agent]
10-04 14:31:20.189 424-614/? W/XTCC-5.1.0.8: [CS-RIL-LISTENER] timerCallback fired for ril update registering, re-register
10-04 14:31:20.190 373-416/? E/QCALOG: [MessageQ] ProcessNewMessage: [XT-CS] unknown deliver target [OS-Agent]
10-04 14:31:20.208 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 16.375000 lux idx 375.805603
10-04 14:31:20.209 344-17006/? D/QCameraParameters: update current cct value. old:2483, now:2503
10-04 14:31:20.257 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 16.867188 lux idx 375.903381
10-04 14:31:20.290 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 16.867188 lux idx 375.168091
10-04 14:31:20.291 344-17006/? D/QCameraParameters: update current cct value. old:2503, now:2513
10-04 14:31:20.335 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 16.867188 lux idx 375.332733
10-04 14:31:20.371 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.375000 lux idx 376.332733
10-04 14:31:20.372 344-17006/? D/QCameraParameters: update current cct value. old:2513, now:2524
10-04 14:31:20.408 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.375000 lux idx 377.168091
10-04 14:31:20.451 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 378.024628
10-04 14:31:20.453 386-460/? I/ThermalEngine: Sensor:batt_temp:354 mC
10-04 14:31:20.511 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 377.332733
10-04 14:31:20.531 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 376.517487
10-04 14:31:20.531 344-17006/? D/QCameraParameters: update current cct value. old:2524, now:2534
10-04 14:31:20.570 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 376.721436
10-04 14:31:20.609 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 375.943665
10-04 14:31:20.609 344-17006/? D/QCameraParameters: update current cct value. old:2534, now:2544
10-04 14:31:20.651 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 376.721436
10-04 14:31:20.932 344-17006/? D/QCameraParameters: update current cct value. old:2544, now:2564
10-04 14:31:20.940 17727-17727/? D/wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
10-04 14:31:20.943 17727-17727/? D/wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=48
10-04 14:31:21.129 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 375.943665
10-04 14:31:21.129 344-17006/? D/QCameraParameters: update current cct value. old:2564, now:2575
10-04 14:31:21.329 377-17034/? E/mm-camera-sensor: port_sensor_handle_aec_update:807 g 17.894531 lux idx 376.721436
10-04 14:31:21.455 386-460/? I/ThermalEngine: Sensor:batt_temp:355 mC
10-04 14:31:21.494 344-17006/? D/QCameraParameters: update current cct value. old:2575, now:2585
10-04 14:31:22.015 344-17006/? D/QCameraParameters: update current cct value. old:2585, now:2595
10-04 14:31:22.456 386-460/? I/ThermalEngine: Sensor:batt_temp:355 mC
于 2017-10-04T13:32:29.330 回答