Commit dbfad503 authored by Shik Chen's avatar Shik Chen Committed by Chromium LUCI CQ

CCA: Reduce delay between consecutive barcode detections

This CL reduces the barcode detection latency by shorten the delay
between consecutive barcode detections.

According to camera.CCAQRPerf, the slowest device needs ~50ms to detect
a barcode from a 720x720 image. With 200ms delay, it should occupy <20% cpu
on the slowest devices (50ms includes some I/O overhead).

The measured cpu usage difference for a 1920x1080 stream on Kukui is
about 3%.

Bug: b/172879638
Test: Manually in expert mode
Change-Id: Ie7a86d19c0734979b7456b79181af2e16ba69f34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2569436
Commit-Queue: Shik Chen <shik@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Auto-Submit: Shik Chen <shik@chromium.org>
Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833171}
parent 20fa2e0b
......@@ -9,8 +9,8 @@ import {clearAsyncInterval, setAsyncInterval} from './async_interval.js';
// eslint-disable-next-line no-unused-vars
import {BarcodeWorkerInterface} from './barcode_worker_interface.js';
// TODO(b/172879638): Get some performance data and tune the scan interval.
const SCAN_INTERVAL = 1000;
// The delay interval bewteen consecutive barcode detections.
const SCAN_INTERVAL = 200;
// If any dimension of the video exceeds this size, the image would be cropped
// and/or scaled before scanning to speed up the detection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment