History log of /packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ce10e6217be01d56238fac708a738f8d3313bac0 16-May-2015 Paul Rohde <codelogic@google.com> Increase the default JPG buffer size.

BUG: 21162720
Change-Id: Ie9d634533778c254a000da92f0af2948d814b1dd
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
de2c5f84c216d91a366d3361be78a8c8710bd65d 09-Apr-2015 Paul Rohde <codelogic@google.com> Add a memory pool for reusing direct bytebuffers.

This should reduce GC's caused by releasing and reusing direct
bytebuffers for subsequent image captures and jpg encoding.

Bug: 20129797
Change-Id: I5dd2538bd3dbc77be1446564f537e7ec0fc56ec4
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
37036186326fb68c27063f97305405d3667a5eb3 25-Mar-2015 Sascha Haeberling <haeberling@google.com> Change CaptureSession.saveAndFinish to return a future for the URI.

Bug: 19665531

Most callers of saveAndFinish never provided the callback. In addition
it's unclear on what thread the callback is called. This cleans this up
a bit and moves the responsibility to the caller to decide on which
thread the URI should be received. Callers that don't care don't have to
do anything.

Also fixes a bug where we wouldn't even supply a URI for when there was
no placeholder.

Change-Id: I1a186b470d2cca8f34a674e9eb5c533fc01a4409
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
ad529c3073ce16c1cc2861f33658132b87bfea95 18-Mar-2015 I-Jong Lin <ijonglin@google.com> Add Faces and Lens Dist. info to photoCaptureDone

Added the plumbing for getting values off of the
TotalCaptureResult and putting them into the
photoCaptureDoneEvent.

Bug: 19805467
Change-Id: Id0d16623ffe7eef78b23fd15a4edfeeca5a66eaa
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
12df9856109645b9f874d3f007c100ed7130f94c 20-Mar-2015 I-Jong Lin <ijonglin@google.com> Catch memory allocation errors JPEG ImageTask

Bug: 19354210

Although rare, we should fail gracefully in the case
where we cannot allocate a large memory buffer in
TaskCompressImageToJpeg.

Change-Id: I1f16ba16a785b32869030a5f8ec2116fbbc900d3
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
c36bcac14302b1bb3d7a316f221685d4d6ad95cb 17-Mar-2015 I-Jong Lin <ijonglin@google.com> Pass crop and implement crop in JPEG ImageSaver

Bug: 19660460

Allows for the JpegImageBackendSaver to accept crop
regions and then implements this crop within the
JPEG compression task.

Change-Id: I165b272376c3d5c919c1c41b55bf0b8e551520be
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
d2672f692de547859664be4e7f6950f8f9b0bc89 17-Mar-2015 Andy Huibers <andyhuibers@google.com> Add processing time to capture done event for CaptureModule captures.

Bug: 18913439
Bug: 19035503
Change-Id: Ib3768d93a2240ccfbf5f5a750b66939c6930ed0e
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
e7c53cc907f5bb40c8d112830d12ac494e4c68c5 12-Mar-2015 I-Jong Lin <ijonglin@google.com> Add PhotoCaptureEvent to Capture Module

Adds a CaptureSession collector class so that
we can combine stats information from both the
CaptureModule and ImageBackend to create a
complete PhotoCaptureDone event.

Bug: 19035503
Change-Id: Ide5f708c5f3efb710fa704f3f30c52ac7a8c3fe4
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
fddf523fda6ea8af438ef476c991412fd96f3cc7 13-Mar-2015 I-Jong Lin <ijonglin@google.com> Merge "Implementation of Crop in Thumbnail Creation" into ub-camera-haleakala
725059d4d1ab78b5ffaa99cbba397b2dafc717d2 10-Mar-2015 I-Jong Lin <ijonglin@google.com> Implementation of Crop in Thumbnail Creation

Propogated the crop information into the thumbnail creation
code. Required generalization of the thubmnail creator to
accept a crop region, and implementation of consistent
handling of the crop parameter into the TaskInfo.

Tests for this newer functionality are available in ag/653259.

Bug: 19323062
Change-Id: I135ae16459eedf7f2631925526c0e64184f6a859
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
7b132e3a555529a3add373fe169a1eca5cf006e8 12-Mar-2015 Spike Sprague <spikuru@google.com> If JPEG data already has some EXIF data, carry it over during EXIF population
bug: 16961102

Change-Id: I887726dda0af62c7eaecbde4297079fc447c39fa
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
dfef32425e6184d5721bb7af9db823ec46bc2b4f 11-Mar-2015 Sascha Haeberling <haeberling@google.com> Add Location to EXIF

Bug: 16961102

Change-Id: I9f2335c0f02bea1286698330483cd30fdb875f45
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
f6031c016d916db9789026dc0a6c559d8163a088 19-Feb-2015 Spike Sprague <spikuru@google.com> Add EXIF data to images processed via software JPEG encoder.
bug: 16961102

Change-Id: I3df48a74fedbba6ca5540bf095f5e5eaf93db3ab
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
56ccc3e5f74dcef523fd45a6cd32b96e00a15c6a 06-Mar-2015 Puneet Lall <puneetl@google.com> Fix exif dimensions for cropped images

Bug: 19323062
Change-Id: Ieb2905bc44324f2e9f7f4498fd1e1882924e4e92
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
c56ef82017f772c5892bfc8a46f4ee5e3a9b65ad 06-Mar-2015 Puneet Lall <puneetl@google.com> Add partial crop support to ImageBackend

Adds functionality to crop final YUV images through the ImageBackend.

Note that thumbnails are not yet cropped correctly.

Bug: 19323062
Change-Id: I55e0ad2ce60fd963d0d3f452dc10bc7548f08b1c
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
22cc812406334dfe7f1d38ecac75b82b51c1c9d1 02-Mar-2015 Andy Huibers <andyhuibers@google.com> Move JPEG quality to separate stub-able method.

Bug: 19548882
Change-Id: I43e1fe93de63eacdc8c8a16b4f3b528e3a65728b
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
02d42f96dc463f76beae47b9ac4d681e87c06c57 28-Feb-2015 Pengchong Jin <pengchong@google.com> Change software jpeg encoder quality to CameraProfile.QUALITY_HIGH

Bug: 19548882
Change-Id: I9bdbeb11c2614f3d3d3f60d2a940d2c368617072
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
6a7c7722d1eb49418b8ee02df0018f03719a8c61 13-Feb-2015 I-Jong Lin <ijonglin@google.com> N4 Capture Module Rotation/EXIF fix

Finally, have some understanding what values are supposed to be
passed to the session vs. what are supposed to be put in the EXIF
flags. Although they are similar, they are used for slightly
different purposes. This CL has been tested on both N5 and N4
and seems to give filmstrip behavior and forwards the correct
EXIF values.

Bug: 19378973
Change-Id: Ie8b41b6d8e03e0a5392da8f0e7b52f65383b4e4f
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
7a72d72e97fe280fd88127b7891efe9112bcaeac 12-Feb-2015 I-Jong Lin <ijonglin@google.com> N4 CaptureModule Memory Optimization

Although functionally correct, there was some processing that was
wasteful of memory in N4 Capture Module. The two major culprits
are the implicit full-size JPEG decoding for the thumbnail, and
using the capacity (instead of the limit) of the byte buffers when
making a memory copy of the JPEG data. Fixes include a explicit
subsample value for thumbnail and a tighter memory allocation based on
the limit.

Bug: 19354120
Change-Id: Ibd94c30974753e426254ac002e795b5d1de8bcba
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
f68a39a0ad362ff0543e11e3f0ce11741a7de48c 05-Feb-2015 I-Jong Lin <ijonglin@google.com> Add JPEG Orientation into N4 CaptureRequests

Wired up the SimpleOneCameraFactory to dynamically decorate
the JPEG capture request with the proper orientation so that
the framework does the proper orientation.

Paired with ag/629241.

Bug: 19122922
Change-Id: If206b0d18979ddc4ed9ab6df7ce4d22ba01534a8
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
ec604214008248f7858b3a8b66d70919947399a9 04-Feb-2015 I-Jong Lin <ijonglin@google.com> Remove UNKNOWN Orientation values

UNKNOWN Orientation is causing some strange crashes in the Camera App,
in certain situation when the phone starts up while faceup on a table,
i.e. an unknown orientation. This CL is to make sure that we stop
any UNKOWN orientations propogating through the system and causes these
sorts of crashes.

Bug: 19049293
Change-Id: I4f403bda1b6b23f2bbe5ee590e23d0fc078543b7
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
4dc301a073dab22b9bc12e0b846530d3a80bf8f7 15-Jan-2015 I-Jong Lin <ijonglin@google.com> Image Backend Integration w/ Simple Camera

Wiring for cameras that only deliver compressed JPEG artifacts.
This CL was tested by enabling it on the Nexus 5.
Currently, the code in this CL is NOT exposed in any known
Nexus Camera model. The two unexposed bugs are as follows: an camera
initialization bug on Nexus 4, and a cross-device functional issue
with the SimpleCameraOneFactory object in that it doesn't request
a JPEG compression artifact from the HAL with zero orientation.

Bug: 18908116
Change-Id: If7080c4e8e52a329fb9a6fed52f7c31541758afb
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
a1ea88071be696ea8dee99c7bdb4007128ed60ef 15-Jan-2015 I-Jong Lin <ijonglin@google.com> Fix for JPEG Compression w/ Unknown Orientation

TaskCompressImageToJpeg blindly passed the orientation from the camera to
JpegUtilNative.compressJpegFromYUV420Image, which then threw a run-time
exception. Behavior for TaskCompressImageToJpeg with an image of
UNKNOWN orientation is to treat it as CLOCKWISE_0 for purposes of
JPEG compression. Instead of crashing, the camera now receives a JPEG
of the dark image of one's tabletop.

Bug: 19000723
Change-Id: I412fb6fed5d80035b180db7f6e8504d6d36b4fcc
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
30ef96534cc65c0ba4665f6da2fc36e879edf196 08-Jan-2015 I-Jong Lin <ijonglin@google.com> Passing an intermediate preview to the session.

Generalized the image thumbnail preview task to create artifacts of
multiple shape. Added this task before the full-sized JPEG decode.
Added a field in the TaskInfo to specify the purpose of the imaging
artifacts on the listener, since the processing of an image may result
in multiple uncompressed/compress artifacts and need extra
explicit identification to be properly routed by listener. Changed the
default behavior of the ImageBackend to produce an intermediate-sized
preview on job submission. Routed this intermediate-sized preview to
the CaptureSession for an earlier Filmstrip update.

Bug: 18841584
Change-Id: I8db2d3a7c30cddd1e0e9ddf0709b7867f841b056
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
fc1394dd9690497178ae1088468e08d13bf0423a 09-Jan-2015 Senpo Hu <senpo@google.com> Fix placeholder bug.

Bug: 18947927
Change-Id: I08542d614b15f31398150ea52caa6055ec63ccfb
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
5aa7eb2930b813c97f3754d93fe7fa978651887b 08-Jan-2015 Senpo Hu <senpo@google.com> Instantiate a ImageSaver.Builder in CaptureModule.

We will need different image savers for capture intent.
Since we plan to create a separate module for capture intent,
this change allows modules to be able to choose a different builder.

Bug: 18726217
Change-Id: I5871263123b06958d902cc8e3a4d911f14c83e66
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
3c7b7ec6aa2e51859718a6d6dead3c12d10ea370 05-Jan-2015 I-Jong Lin <ijonglin@google.com> Interface ImageTaskManager for Image-based Tasks

Clearly defined with relationship between derived ImageTasks and the
respective ImageBackend. Once tasks are derived from
TaskImageContainer, they should only have limited functionality back
to the ImageBackend to spawn new tasks to describe their internal task
graph and manage their image references. The new class ImageTaskManager
defines this relationship and implies that most of functionality should
be internal to the task itself rather than the ImageBackend.

Also, included clean-up of some unused parameters in ImageConsumer
interface as well.

Change-Id: I6a0a5f72aea55adc8b846eb3cd945b61bc6d2a93
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
09d1f4473af1494572d77949ad87b95e21028135 23-Dec-2014 Sascha Haeberling <haeberling@google.com> Rotate images before storing them so that rotation for reading is always 0.

This also fixed the filmstrip loading slowness issue.

Change-Id: I920f5f136576c6812522d99bfed5063357593206
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java
3830d419691ef865f01b362fee9618bac2aa8888 20-Dec-2014 Sascha Haeberling <haeberling@google.com> Store ZSL images in correct orientation and show progress in filmstrip.

Added an ImageRotationCalculator which calcuates the image rotation
based on camera characteristics and the device orientation at the time
of the shot.

Also moves the image backend code into its own sub-package.

Change-Id: I4b6b83e3e3cebece83215c19d0aff826ff853352
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/TaskCompressImageToJpeg.java