6c2f7aeb10fb2050c27afa0212a1e167ca2809ec |
|
21-Jun-2017 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera: Add debug messages for camera latency Log latency histogram of: - processCaptureRequest call, - dequeueBuffer call, and - waiting time for handout count fall below max_buffers Test: Camera CTS Bug: 62651109 Change-Id: I5ee1cdb4139fa359f0887d6f6871884e28739340 (cherry picked from commit 686f644f981badd481d8781bf80b221544df7b1f)
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
89954d931d7b952597dc8e29e7a87da31a4ae0b1 |
|
22-May-2017 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Camera: Free buffers more aggressively This change attempts to free buffers managerd by BufferManager more aggresively to reduce memory pressure. Also fix a small buffer accounting issue: check detachBuffer actually returns a non-null buffer. Test: keep taking single shot in GCA, CTS Bug: 38483630 Change-Id: I6c64d1dc2244cec4f1300bbf3992f66f2167eed2
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
fd76cf5246c714a1c1ef10b2b974cacf0077f216 |
|
15-May-2017 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera: Handle consumer side detach in BufferManager - BufferQueue consumer may detach buffers, and BufferManager isn't aware. Hook up onBufferRemoved callback so that BufferManager's internal handoutBuffer and attachedBuffer counts can be updated when a buffer is detached. - Deleted some code that's not exercised any more. Test: Camera CTS and burst capture. Bug: 38238747 Change-Id: I6861da6e013fe5609907f807639c5d691c0c3af9
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
47cf8e62b81770c0896aac444ef22a840b3a2c5e |
|
04-Apr-2017 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages" This reverts commit 1a2f15daf13552e86324025cf6d31d887cd8fa02. Test: fix b/36876770 Bug: b/36876770 Change-Id: Ie7b8c9ee444e3e8667154b396e3e6a556b54739a
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
03857c4b5a029a588b647532e907a875026e593a |
|
04-Apr-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Camera: add buffer freed notification for output streams" into oc-dev
|
017d49c409af17a2e0ef3ca48fadb1b5a5ec3fe4 |
|
01-Apr-2017 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Camera: add buffer freed notification for output streams Test: ReprocessCaptureTest fixed Bug: 34461678 Change-Id: Icd5af79a8f7fc35b0a040c57a639ae6777e71024
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
1a2f15daf13552e86324025cf6d31d887cd8fa02 |
|
23-Mar-2017 |
Eino-Ville Talvala <etalvala@google.com> |
Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages Otherwise some bits aren't where they're supposed to be. Also stop using HW_CAMERA_ZSL; we need to only set HW_CAMERA_READ, and it's confusing to set a producer flag on the consumer usage side. Test: Camera CTS passes Bug: 35215313 Change-Id: I23e6e60bf875fe9d8f2d7a1f805d2ef854c16b97
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
bee0f0a5e7aa19aa7c59de03b508985b68bc6b5e |
|
24-Jan-2017 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera: Rework StreamSplitter for camera use cases - Merge notifyRequestedSurfaces into getBufferLocked, so that during getBufferLocked, the stream splitter gets to know which outputs the current request is on. - Reserve buffer slot in the output queue during getBufferLocked instead of during onFrameAvailable. So if there is no slot/buffer available, no new request is sent to HAL. This aligns with current cameraservice logic. Do not hold the lock while calling attachBuffer to output queue because it could block for a slow consumer. - Instead of setting the consumer buffer count of input buffer queue to maximum of all shared outputs, set it to sum of them. By doing this, In the case of a slow consumer, other consumers sharing the same stream won't be impacted. - Handle the case where onBufferReleased not being fired for buffer replaced by attachBuffer/queueBuffer. - Add function to check the return value of onFrameAvailable so that when output is abandoned, the error code is propagated back to queueBuffer. Test: Camera CTS, and CTS with StreamSplitter enabled for all implementation defined use cases. Bug: 33777818 Change-Id: I863f501d5283bbe70c71e66b4d37d690484b90fa
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
c31dc7e61eb37214ad186f6a2bc43d7b92bd236e |
|
01-Feb-2017 |
Eino-Ville Talvala <etalvala@google.com> |
Camera3Device: Update frame counters/timestamps for dumpsys info For output streams, increment frame count and update timestamp when a filled buffer is queued to the output buffer queue. For input streams, increment frame count and update timestamp when a buffer is acquired from the input buffer queue. Test: Manual inspection of adb shell dumpsys media.camera while running DevCamera Change-Id: I8dc1d134baf5ad467e169f3ba6ffe0d1486df9dc
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
758c215374dba397dabe17b8e96dd38593c09dd7 |
|
11-Jan-2017 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera: Combine handling of deferred surface and shared surface - Refactor the OutputConfiguration to contain isDeferred and isShared flag, and not contain NULL surface. - Unify the handling of deferred surface and shared surface. Test: Camera CTS, and manual testing of GoogleCamera use cases Bug: 33777818 Change-Id: I5dd3472f0f2133699b0e9fbdd8ba456956222746
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
0129d52df9794d6fdf06be304722b5cb51a2eab5 |
|
31-Oct-2016 |
Shuzhen Wang <shuzhenwang@google.com> |
camera2: Add support for secondary surface for stream - Enhance OutputConfiguration to contain multiple surfaces for one underlying stream. - Create Camera3SharedOutputStream to handle streams with multiple surfaces. - Create Camera3StreamSplitter to handle buffer flows between camera and multiple consumers. Test: cts, and manually test camera preview/snapshot/recording Bug: 33777818 Change-Id: Ia010c3cc9d9b4bd5b9ea03cc42fe4e0a0d8033f1
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
f0645c19a8c8433766f4cb6edff7fca5db8017bf |
|
02-Aug-2016 |
Zhijun He <zhijunhe@google.com> |
Camera3: don't let dequeueBuffer block indefinitely The synchronous consumers (e.g. ImageReader) may be very slow when the clients have computational intensive image processings. When system load is high, these processing will be even much slower. This could starve the producer side and then cause dequeue/attach buffer block indefinitely. If clients intends to close the capture session, right after a capture request is submitted, the waitUntil drain could be blocked indefinitely if the capture request dequeue buffer call is blocked indefinitely, as the request thread will never become idle until the last dequeue buffer is done and the request is sent.This indefinite getBuffer() blocking could easily trigger the waitUntilDrained 5s timeout thus put the camera device into error state although there is nothing bad happening in the HAL. Introducing the timeout will avoid such bad situation. When consumer is slow, there will be no new request being sent to HAL, as there is really no new buffer available. Bug:30404840 Change-Id: Ibf08d2745911203bce6f31130800707f36d7f985
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
fe82275a06f0ace675482b23ee2cb685d2628af1 |
|
29-Jun-2016 |
Eino-Ville Talvala <etalvala@google.com> |
Merge \"Camera3Device: Correctly shut down abandoned streams\" into nyc-dev am: b889242aff Change-Id: I50fd0619dec5488dbeadb903b95e5bd4e5980f61
|
ff51b47dae1c236291a0508b29e8f4e7d0780761 |
|
29-Jun-2016 |
Eino-Ville Talvala <etalvala@google.com> |
Camera3Device: Correctly shut down abandoned streams If a stream was abandoned (consumer died), the stream teardown would terminate early. Update teardown conditions to complete even for the abandoned state. One consequence of this is that the buffer manager never received an unregister call for the stream, leading it to error out when trying to remove buffers from it. Also switch to STATE_ABANDONED in case of an error detaching a buffer, instead of the error state. Bug: 29778464 Change-Id: I44de69773e8bbf9ebe83207498d6ee0674ed91bf
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
7b171a9e7be64e9881ed03baad1422d75ca768a4 |
|
25-Jun-2016 |
Zhijun He <zhijunhe@google.com> |
Camera3: log a warning when frame drop occurs Bug: 28311997 Change-Id: I7253fb040c1f08c18fc7a01042503e9457163a1e
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
e8a984e43504890e0f676256a0445b9917a2af91 |
|
18-Jun-2016 |
Eino-Ville Talvala <etalvala@google.com> |
resolve merge conflicts of 77c1a35 to nyc-mr1-dev Change-Id: I18c301c55904c06b3f6f5d8eaa2df47ff87ddb4f
|
77c1a3554275a51ac8eb9fbe86f476afc8983192 |
|
13-Jun-2016 |
Eino-Ville Talvala <etalvala@google.com> |
Camera: BufferManager: Don't attach/detach on every frame - Maintain separate count of attached buffers - Only attach when new buffers need to be allocated - Only detach when a buffer needs to be freed - Fix missing notification initializations - Remove warning that's always logged Bug: 28695173 Change-Id: I38e997fa1e69c2b8743e43eed31a6a08a6f9cd7a
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
5d677d1f0879d5101e38df480a38228a64d63959 |
|
30-May-2016 |
Zhijun He <zhijunhe@google.com> |
Camera3: add deferred surface support Initial native implementation and aidl changes for surfaceless support. Bug: 28323863 Change-Id: Id6634c3ef2ecc84422a88f63de0a19a0cb496e96
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
e8c535e833ed135895e99ca81aa3b85d80d7cf3c |
|
14-Apr-2016 |
Chien-Yu Chen <cychen@google.com> |
Camera: Stop repeating request if its output is abandoned Stop repeating request if any of its output stream is abandoned. Add a callback to notify the repeating request has been stopped with frame number of the last frame. Update NDK with the new callback and behavior. Bug: 21270879 Change-Id: I3553775c7807a77104aa1650609480ca3321310c
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
c28dcccb9bc0a94950a7475f9bd8a6a38be34419 |
|
12-Feb-2016 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera3: Use proper timestamp clock domain for different streams If buffer consumers assume different clock domain compared to the camera output, camera3 device uses the offset between the clock domains to convert the timestamp. Bug: 27153476 Change-Id: Iaae33281411cb27b639e87b0dad957d640182898
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
edd41ae47b99b98249e819ac72fb94264326a4eb |
|
03-Feb-2016 |
Zhijun He <zhijunhe@google.com> |
Camera3: buffer manager doesn't support HAL3.2 devices Not all HAL3.2 devices implemented dynamic buffer registeration. This CL excludes the HAL3.2 devices from the buffer manager supported devices. Bug: 26955436 Change-Id: I5bc2eec0a4db2f5ab85f7677ed7b367c13ce67aa
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
1ff811b024c690e53510113d19042b7cd2d2637a |
|
26-Jan-2016 |
Zhijun He <zhijunhe@google.com> |
Camera3: return cancelled buffers to buffer manager When a buffer is cancelled, it is considered as a free buffer and need to be returned to buffer manamager for buffer reuse. This will also make the prepare work. Also fix the buffer removal bug. Bug: 25088440 Change-Id: I0e3da44c76008406ee19541366da7a962c355949
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
13a69633108f40f56aa47f1bcbb406cd5173c245 |
|
26-Jan-2016 |
Shuzhen Wang <shuzhenwang@google.com> |
Camera3: Selectively set buffer timestamp depends on consumer Certain consumers such as Hardware Composer and AudioSource use MONOTONIC timestamp, which causes time misalignment if camera timestamp is in BOOTTIME. Do not set buffer time stamp for such streams and let BufferQueue handle it. Bug: 22214409 Bug: 26762232 Change-Id: Id1c4b85a181e39827e8f27949a199165bbd445f9
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
125684aba1a11b7adbf5f9d607ee2bcc9449081c |
|
27-Dec-2015 |
Zhijun He <zhijunhe@google.com> |
Camera3: add camera3 buffer manager support * Add camera buffer manager for buffer allocation and sharing management across multiple streams. Only gralloc v0 implementation is done, v1 implementation is pending. With this, the max mem footprint for multiple streams in the same stream set will be the max buffer count x max buffer size. * API1 client will still use the old bufferQueue code path, buffer manager is only targeting at API2 clients. * Prepare and teardown should work with buffer manager. * Some existing code typo fix and cleanup (to fix the compiling warnings). Bug: 25088440 Change-Id: I68b246faa43080302acd02a8e976384bd3e26a23
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
e9154ced1216ceb06a82140ed65051c0397e8abc |
|
07-Dec-2015 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Camera: plumbing for RAW OPAQUE Bug: 25596619 Change-Id: I0867a36962084bc508aebc89cb910473402a5e09
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
85a6455f269d79adf9bf48d757a4b1b3c81cf760 |
|
29-Aug-2015 |
Chien-Yu Chen <cychen@google.com> |
Camera3Device: Support batch requests Refactor request threadLoop to three parts: waiting for next batch of requests, preparing HAL requests and output buffers for next batch of requests, and submitting the batch of requests to HAL. Set the batch size to the size of the request list if it's a video recording request in a high speed video configuration. Add a flush lock so that HAL's flush() won't be called while submitting a batch of requests. Bug: 23360060 Change-Id: Icd395b1f955a9b336eec6fa5aff6b17741ce08c7
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
727d172137b4f32681c098de8e2623c0b65a6406 |
|
09-Jun-2015 |
Eino-Ville Talvala <etalvala@google.com> |
CameraService: Add consumer name to output stream dumpsys Also switch use of ANativeWindow to Surface, to get to the getConsumerName() method where necessary. Surface can always be cast to ANativeWindow, but not the other way around, so it's a better option anyway. Change-Id: Ie5c2d30821c1a754f9e382699ff50b4b328288b3
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
4d44cad22ea925a651463f2d51d6586c14d4b787 |
|
11-Apr-2015 |
Eino-Ville Talvala <etalvala@google.com> |
Camera2: Add prepare for output streams The prepare call asynchronously pre-allocates buffers for a given output stream, and then fires the onPrepared callback. Not implemented for Camera2Device or used in Camera2Client. Change-Id: I1cccdfff846dd6985133c591dbdceed823929ade
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
618ff8a48a0c895a78f91f5692510c2a809425c3 |
|
13-Mar-2015 |
Chien-Yu Chen <cychen@google.com> |
camera2: add reprocess support Add support to create input stream, submit reprocess capture requests, and receive reprocess capture results. Change-Id: Iee2d4313f3d52616a484eaea7a28f5ef9d8a674b
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
4c9736fbc82b8b76c996c966583d71ca1df17ca6 |
|
06-Mar-2015 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Camera: fix release fence logic According to spec, HAL will set release_fence to acquire_fence when error happened (usually during flush call). Camera service should not refer to the acquireFence anyhow since per spec HAL needs to set it to -1 if acquireFence has been waited on. Change-Id: I809355d0c8c71f78f657e37d19221fd1f5bdc90b
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
b97babb8c08969b55af3b6456d15f764c8873d3f |
|
12-Mar-2015 |
Yin-Chia Yeh <yinchiayeh@google.com> |
Camera: plumbing rotation field through Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
3d82c0d9ed2b3e956ad699a9ca2c8a70c9d24678 |
|
24-Feb-2015 |
Eino-Ville Talvala <etalvala@google.com> |
Camera: Wire up dataSpace, clean up ICameraDeviceUser - Remove unused arguments from ICameraDeviceUser::createStream - Add dataSpace as a stream parameter, plumb it through everything Change-Id: I608cafe694785d1c512276e71b2016f8ac3b0ccb
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
e0711f2651121754a10c784e3b149024d17fa4d5 |
|
18-Aug-2014 |
Ruchit Sharma <ruchits@nvidia.com> |
camera: add traces for KPI measurement Bug: 17658101 Change-Id: I1d8035c4a8fba7b88a87f205ce57c13d812e9df5
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
7d70c5e5fe787ae5d7af8830864d208749d6337f |
|
25-Jul-2014 |
Eino-Ville Talvala <etalvala@google.com> |
CameraService: Replace deprecated native_window methods Change-Id: I3be5a720ac8b488d1e507c606a9146480faeef63
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
6adc9ccb2948d9421a0ed4b74f52b909bcec2037 |
|
15-Apr-2014 |
Zhijun He <zhijunhe@google.com> |
Camera3: block until get an available buffer Camera3Stream shouldn't error out when the max number of buffers are already dequeued. It should block until next buffer returned from camera device. Bug: 11595505 Change-Id: If65a70c29cb04219e14ded0744059c0ab783444b
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
15ad2470b2f2ac34473eb568b606ad75e8e63ac6 |
|
12-Oct-2013 |
Zhijun He <zhijunhe@google.com> |
Camera: Fix deadlock in Camera3OutputStream process capture request thread, process capture result and setParameter binder threads can run into circular locking situation when acquiring StreamingProcessor lock, Camera3Stream lock, and bufferQueue lock. Releasing the Camera3Stream lock briefly in process capture request thread getbuffer call can break this deadlock. Bug: 11016037 Change-Id: If08d4b134c26be26039b1d5363759e60f911bad6
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
f1e98d857ec377f2c9b916073d40732e6ebb7ced |
|
06-Sep-2013 |
Eino-Ville Talvala <etalvala@google.com> |
Camera API 2, Device 2/3: Implement idle and shutter callbacks - Update callback Binder interface - Rename frameId to be requestId to be consistent and disambiguate from frameNumber. - Implement shutter callback from HAL2/3 notify() - Add in-flight tracking to HAL2 - Add requestId to in-flight tracking - Report requestId from shutter callback - Implement idle callback from HAL3 process_capture_result - Add new idle tracker thread - Update all idle waiting to use the tracker - Add reporting from request thread, all streams to tracker - Remove existing idle waiting infrastructure Bug: 10549462 Change-Id: I867bfc248e3848c50e71527e3561fe92dc037958
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
b2f5b19e5b6e1408a259add23dba91037756a943 |
|
30-Jul-2013 |
Eino-Ville Talvala <etalvala@google.com> |
Camera3: Provide consumer usage flags to HAL for each stream At stream configure time, pass on the stream's consumer usage flags to the HAL, to speed up final hardware configuration. Bug: 9592202 Change-Id: Ie467be053be36a09e482f5f05cad65df42d66476
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
7b82efe7a376c882f8f938e1c41b8311a8cdda4a |
|
26-Jul-2013 |
Eino-Ville Talvala <etalvala@google.com> |
Camera: Rename new API to camera2, rearrange camera service - Support API rename from photography to camera2 - Reorganize camera service files - API support files to api1/, api2/, api_pro/ - HAL device support files into device{1,2,3}/ - Common files into common/ - Camera service remains at top-level Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
/frameworks/av/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|