• Home
  • History
  • Annotate
  • only in /frameworks/av/media/libheif/
History log of /frameworks/av/media/libheif/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0c1407f79ef36422330c2003a608d37df714256b 03-May-2018 Chong Zhang <chz@google.com> Decode one row of tiles at a time for image that has tiles

Add an api to IMediaMetadataRetriever to decode image rect.
It will reuse the same full frame IMemory, and decode only
the requested rect. For now, StagefrightMetadataRetriever
will only allow decoding of rect that's a full row of tiles,
and the requested must be issued sequentially (i.e. no
arbitrary rects). When the extract side is fixed to allow
seeking by tiles, it can be extended to allow arbitrary
rects.

This allows HeifDecoderImpl (on client side) to start
processing the getScanlines in parallel with the decoding.

Test: CTS MediaMetadataRetrieverTest;
Manual testing of HEIF decoding of files with or without tiles;
Manual testing of HEIF thumbnails generation in Downloads app.

bug: 78475896
Change-Id: I820b21cdf33f80593ee6092d8e1ba68b3beb65dd
eifDecoderImpl.cpp
eifDecoderImpl.h
70b0afdfabfdfb34aa7a2b86f382eac197cc90cb 27-Feb-2018 Chong Zhang <chz@google.com> heif: use width and height for decoder -- DO NOT MERGE

The display dimensions from MPEG4Extractor is applied on top
of width and height for scaling, it's not for cropping. For
bitmap uses we have to use width and height, the frame from
media server is not scaled.

bug: 73172046
Test: test app in bug; open folders with heif files in Photos.
Change-Id: I3d7f1492d08d48876836ccc05b6eb4de0d0c0f9a
(cherry picked from commit 1a6c11685d3868d0ebe8543842d213c4ff7e9009)
eifDecoderImpl.cpp
a4f859cd14083195b6b17c4a16c9074410325934 09-Mar-2018 Sungtak Lee <taklee@google.com> Handle overflow in android::HeifDataSource::readAt
am: 237f9034c6

Change-Id: Idc655aa698903af90455f82b6aa665c6472872f5
237f9034c6cbe5cbafb0cd4c862d9dddfbdf7389 06-Mar-2018 Sungtak Lee <taklee@google.com> Handle overflow in android::HeifDataSource::readAt

Bug: 73782357
Change-Id: I03a5b4c5ddaf2664f342973da7f1a79f29cd7be5
eifDecoderImpl.cpp
49d4aa0a7407ea6632c4a3441c7a4d922d003ea5 27-Feb-2018 Chong Zhang <chz@google.com> heif: use width and height for decoder -- DO NOT MERGE

The display dimensions from MPEG4Extractor is applied on top
of width and height for scaling, it's not for cropping. For
bitmap uses we have to use width and height, the frame from
media server is not scaled.

This required porting over some fixes from master to fix the
display size vs. image size reporting, otherwise images with
grids may show a black border at the bottom or right.

bug: 73172046
Test: test app in bug; open folders with heif files in Photos
and Downloads; CTS MediaMetadataRetrieverTest.
Change-Id: I3d7f1492d08d48876836ccc05b6eb4de0d0c0f9a
eifDecoderImpl.cpp
49ce671c4efa4c5d038351ca441e34c5afa5241f 24-Jan-2018 Dongwon Kang <dwkang@google.com> Remove unused includes and forward declarations in libmediaextractor/include

Test: make checkbuild
Bug: 67908556
Change-Id: If840305af5c043bb8014590eb208cf11c99e61ee
eifDecoderImpl.cpp
d3e0d861aa68a7ef129fe228595bff734448ebc8 03-Oct-2017 Chong Zhang <chz@google.com> heif: fixes for image sequences and dual-function files

Adding support for two new sets of APIs on MediaMetadataRetriever:

- getImageAtIndex() and getPrimaryImage()
- getFrameAtIndex() and getFramesAtIndex()

Outline of changes:

- Proper indexing of all displayable still images, so that they
can be retrieved by getImageAtIndex()

- Exposing still images as "image/x.android.heic" tracks in
MediaExtractor with necessary descriptive keys (such as "grid-*")

- Support to retrieve video frames by absolute index instead
of timestamps, as image use cases mostly are interested in
getting the images and care less about timing.

- Support to retrieve video frames in batches because retrieving
one frame at a time is inefficient.

- Refactor image / frame decoding code into FrameDecoder, and split
still image decoding and video sequence decoding into to sub
classes to facilite future development.

bug: 63633199

test:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I2fe8519fb6907f315a8b513921fc1cc7f436e28d
eifDecoderImpl.cpp
eifDecoderImpl.h
d91dc5a0602f54fc0d4d2187f37b5b8169bb62c3 10-Oct-2017 Dongwon Kang <dwkang@google.com> Remove libmedia and libstagefright dependency from extractors

- MediaSource, DataSource and MediaExtractor are moved to
libmediaextractor so that they can be used by extractor
implementations without depending on libmedia and libstagefright.
- XXXFactory classes has been added in order not to expose CreateXXX
methods in libmediaextractor.
- avc_utils is moved to libstagefright_foundation since most of
extractor implementations are relying on that.

Test: build + post submit media CTS tests
Bug: 65851881
Change-Id: I7d5cf18dd25abc10478ac3f6e7d1828ad023e3fb
eifDecoderImpl.cpp
4c6398b1f8f0525c9ff9a53484b3b9b601bca35b 08-Sep-2017 Chong Zhang <chz@google.com> stagefright: explicitly release extractor in StagefrightMetadataRetriever

Extractor dtor on media.extractor side happens asynchronously with the
dtor of StagefrightMetadataRetriever. If the extractor calls back into
the DataSource after mediaserver side released the reference to it, the
binder transaction could get stuck.

Adding an explicity release() and call it before StagefrightMetadataRetriever
continues to destruct the DataSource. Only implement it for MPEG4Extractor
to avoid impacting other extractors at this stage.

Also adding some code to aggressively release the extractor and data
source in HeifDecoderImpl to free up memory.

bug: 65463215

Change-Id: I84c442a1e010dd37a976af5453a353e43f672e22
eifDecoderImpl.cpp
3f3ffab372ea65f5d658166aee1f6bff0faf78d6 23-Aug-2017 Chong Zhang <chz@google.com> heif: cache the entire stream if possible to support seek

Also, reuse decoding result if decode is called again. Currently
decode only retrieves primary picture, so there is no point to
go to metadata retriever again.

Bug: 64077740

Change-Id: I9243de396957f4d717c386bbaa8692494d624998
eifDecoderImpl.cpp
eifDecoderImpl.h
ee079fe295c41f89c2ac6316e99ee10847fb78fd 23-Aug-2017 Chong Zhang <chz@google.com> heif: fix decoding of image size different from full tiled area

Bug: 64077740

Change-Id: I57ee7e1bc05e320be723d224b9328526543cad25
eifDecoderImpl.cpp
ea280cb32091e46f3cb5ec68f2c7200913b43168 02-Aug-2017 Chong Zhang <chz@google.com> heif: adding libheif to be used by skia heif codec

- define platform-independent HeifDecoder interface to be used by
skia to decode heif

- add android implementation of HeifDecoder utilizing media framework
MediaMetadataRetriever.

bug: 64077740
Change-Id: I87d803a16c117ab081adbd7c88c1bdb3c4318d66
ndroid.bp
eifDecoderImpl.cpp
eifDecoderImpl.h
nclude/HeifDecoderAPI.h