Undeclared uint8 data types are used in exif_utils.cpp file and this
change corrects their types as uint8_t instead.
Bug: 140885470
Test: mm
Change-Id: I2e48a134c24cd3f17a7b6bafdc815200ca546826
Signed-off-by: Changyeon Jo <changyeon@google.com>
This change removes libBionicGtestMain from the dependency of
camera.v4l2_test target.
Bug: 134488555
Change-Id: Ia719f770b03fa1679bb9467f58806e64b05eb469
Signed-off-by: Changyeon Jo <changyeon@google.com>
This change fixes an array initialization failure due to recent
resizing of camera_module structure's reserved variable.
Bug: 126418509
Change-Id: Ifda61b5427f317192976aee788d0e6849f7d189f
Signed-off-by: Changyeon Jo <changyeon@google.com>
This reverts commit 7c7c62db25.
Reason for revert: libjpeg-turbo has been updated with XOM compatibility.
Change-Id: If1daae895f9cfe08c03169ed2546c81c51a94117
Disable execute-only memory layouts in camera.v4l2.
This relies on libjpeg_static_ndk, which contains some data mixed into
code and thus requires a readable .text.
Bug: 77958880
Test: Built the library, checked the program headers with readelf.
Change-Id: I5646b8c5e9a0ad151663df29f019b5a84db4b15c
The member function `ImageProcessor::GetConvertedSize` is called by the
`ImageProcessor::ConvertFormat` every time when conversion is performed.
But for JPEG destination format it leads to error. It is proposed to add
the handling of the JPEG format with postponed size calculation.
Test: try to take a picture via camera with YUYV output format.
Change-Id: I1ec564e2434361c82b5d93348511116494249f06
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
Test: try to scale image and get SIGSEGV crash of the `cameraserver`
in the `CachedFrame` class.
Change-Id: I17ab13f7c9e7fc84cd38f89dce30e6e5e0535cc7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
Remove unused or already included headers. Sort and format includes
accordind to the "Google C++ Style Guide". Replace C-headers by C++
analog when it's possible.
Test: build
Change-Id: I19fa6abb5bb68e0257c9c933e68f42f92b394ce7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
The request tracker manages "in flights" buffers and frames. These
two containers are modified by calling the tracker's member functions.
Such functions are called from at least three threads: (see
`v4l2_camera.cpp` for more details):
- "main" thread;
- separate buffer enqueue thread ("Enqueue buffers");
- separate buffer dequeue thread ("Dequeue buffers").
It is proposed to introduce additional mutex for the request tracker
to prevent a race condition.
An alternative approach is introducing an additional mutex for the
shared containers inside the `RequresTracker` class. But such approach
requires more changes and may lead to problems with design in the
future.
This commit contains a few additional changes which are not directly
related to the topic:
- as far as more than one local lock is used all of them are renamed;
- the `mFlushLock` member is removed because it is completely covered
by the new mutex.
Test: try to use a camera with more than one buffer and get SIGSEGV
crash of the `cameraserver` in the `RequestTracker` class.
Change-Id: I2c1901722289cee9f0cb05a11a4dabe70d18f2ba
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
The `ioctl` take request of the `unsinged long` type but current
implementation narrows it up to `int`.
Test: if add something like this into `IoctlLocked`:
```
switch (request) {
case VIDIOC_QBUF: break;
default:;
}
```
the following error is appears: "error: case value evaluates
to 3227014671, which cannot be narrowed to type 'int'
[-Wc++11-narrowing]".
Change-Id: Icb1c99e082feb0c019393205a4b0b717ddc09c05
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
The camera module API version 2.5 added a new function,
dropping the number of reserved to 4.
Bug: None
Test: Builds
Change-Id: Ib3df07481ba54509a1215e642ccf70d0b1d4dd2c
Utiltizes ARC++ image processing code to perform the conversion between
the camera format and the requested format from the framework. In order
to support USB devices which may not implement the required formats,
conversion between YUYV/MJPEG to the request format is done on-the-fly.
TEST: All existing unit tests pass. Tested manually with the camera
sample APK, preview/video/capture in both JPEG and YUV formats. Tested
on the RPi v2 Camera, the Logitech C270 and the 180 degree Fisheye USB
camera.
Bug: 37708856, Bug: 69983918
Exempt-From-Owner-Approval: This HAL is owned by AT team.
Change-Id: I1a54581d1170fa3270036ec366fb613fe587a094
close always succeeds, even if it was interrupted and "fails" with
EINTR. Retrying will either close a nonexistent fd or stomp on another
thread's newly opened file descriptor.
Bug: http://b/20501816
Test: treehugger
Change-Id: I706d5e8027e60b13f23f9488fdf5cf7cef7b3d3b
This CL makes camera HAL support native camera resoultions up to
3280x2464, which is the maximum camera resolution of RPi3's camera
module version two.
Bug: 69983703
Test: Verified with ThingsCameraQA.apk
Exempt-From-Owner-Approval: V4L2 camera HAL is owned by iot team.
Change-Id: I303e763e87bdfc5ae81d398aac8be0730e57b05d
* This directory still has many warnings to fix.
Bug: 66996870
Test: normal build
Change-Id: I0e05b78eca9d58dc9081bb3810f5ccabadfc21a7
Exempt-From-Owner-Approval: quick fix for broken build