am fd983181: add meta-files about 3rd party projects

Merge commit 'fd983181d9043cdf45497ace19c60fd9e4e1799c'

* commit 'fd983181d9043cdf45497ace19c60fd9e4e1799c':
  add meta-files about 3rd party projects
Fixed memory leak in function getThumbnail.

If the function is able to extract a thumbnail it returns without
calling the function DiscardData() which cleans up the parsed
EXIF data.

Change-Id: I9642f059ff2270ad2ced26a349f14e5255ee40fb
Merge "Fixed memory leak in function getThumbnail."
am be1baa7e: Merge "Fixed memory leak in function getThumbnail."

* commit 'be1baa7ec9b31849c2169f627b3b65cd19ef0af0':
  Fixed memory leak in function getThumbnail.
am c5a25662: am be1baa7e: Merge "Fixed memory leak in function getThumbnail."

* commit 'c5a256626bd67390bab579f4e52f27bdd6ce5b7c':
  Fixed memory leak in function getThumbnail.
Do not set default value (-1) for FLASH & WHITE_BALANCE if it's not available in EXIF.

Change-Id: I5107853fbb7bd9dd5ffb5fc7304f0528b59665a7
Better non-ascii character filtering.
(Note: in some platform, the range of char is [-128, 127] rather than [0, 255].)

Change-Id: I338f625879fe66abbeafc13b682639cd67c887c9
Make create_EXIF allocate enough memory

The create_EXIF method crashes if over 1K bytes exif header
is passed because only 1K byte is allocated for exif header.
It is hard to calcurate exact nessesary size for editing the
exif header dynamically, so this value is changed to the
mamixmum size of exif, 64K.

Change-Id: Ia2c8481da5130f02ec8f1c63ece9aa4289b1ad5f
Merge "Make create_EXIF allocate enough memory"
am e5617a0c: Merge "Make create_EXIF allocate enough memory"

* commit 'e5617a0c5cc0b7cdd9531db348a929263b466d00':
  Make create_EXIF allocate enough memory
am fc9da699: am e5617a0c: Merge "Make create_EXIF allocate enough memory"

* commit 'fc9da699e0155adc1820bd06b72d40276e31a630':
  Make create_EXIF allocate enough memory
Add API for jhead to use a JPEG buffer

Previously, jhead API only supports reading and saving a JPEG
from/to a file. This patch adds functionality to use the jhead
library with a JPEG buffer from memory.
Signed-off-by: Tyler Luu <tluu@ti.com>

Change-Id: I18be11c8255fcdcc38f49167853c5b9690448557
Signed-off-by: Iliyan Malchev <malchev@google.com>
Fix IFD linking in EXIF creation

The original version of create_EXIF_internal uses continutation
to link the thumbnail IFD to Exif IFD. The Android version tries to
explicitly gives the TAG_EXIF_OFFSET value for the thumbnail IFD.
However, there were some holes left from the original implementation.

Fixes:
1. Explicitly mark the end of the main EXIF section since we are not using
continuation to connect to thumbnail IFD.
2. Overwrite value of TAG_EXIF_OFFSET when we get to the thumbnail section.
The first write for the value of TAG_EXIF_OFFSET relies on some calculation
which is prone to be wrong. We can simply overwrite the value here with the
proper value.

Change-Id: I12d3fbcf10ad30b9520d7fcbdb9b16a61e91641a
Signed-off-by: Tyler Luu <tluu@ti.com>
Add API for jhead to use a thumbnail buffer

Extend jhead API to allow passing of thumbnail
buffer. Previously, jhead only supported replacing
thumbnails from file.

Change-Id: I9783473effbbebdfb13ef10d4974a89122d9b000
Signed-off-by: Tyler Luu <tluu@ti.com>
Fix insertion of GPSProcessingMethod tag

GPSProcessingMethod was not being inserted properly because it
was being treated as STRING format which results in "ASCII" being
taken as the processing method. GPSProcessingMethod is defined as
UNDEFINED format with the value containing a character string in
Exif2.2 standard.

1. Set GPSProcessingMethod to UNDEFINED format as defined in Exif2.2
2. Add handling of ASCII value with UNDEFINED format in writeExifTagAndData.
Handling is similar to STRING format, except we have to account for the
'ASCII\0\0\0' header before the string.

b/5448171

Change-Id: I411a67d7d97e35bee66aa582b25f0f6333c0679a
Signed-off-by: Tyler Luu <tluu@ti.com>
Fixes for exif tag insertion

1. Change ExposureTime tag to rational format as defined by
Exif2.2 standard
2. Update # of components for types with unknown length of -1
after parsing through list

Change-Id: Ib1f65f677b2d8acad310ba8cba46efb3e21920a4
Signed-off-by: Tyler Luu <tluu@ti.com>