Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7ca678b4 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

HEIF: Re-decode the image when changing color type

Bug: 135133301
Test: I902de3410c45a21cf27b48a02cdc5d514b7ada60

AImageDecoder allows decoding an image multiple times, using different
settings (e.g. color type) each time, using the same underlying SkCodec.
After finishing decoding the image, HeifDecoderImpl discards its
MediaMetadataRetriever in order to clean up resources. Hang onto the
input data, so that if a client attempts to decode again, the Impl can
recreate its MediaMetadataRetriever to perform a second decode.

If the client is using the same output color, no new
MediaMetadataRetriever is needed, since it can continue to use the
original video frame output.

When called from Java, the HeifDecoderImpl will be quickly discarded
anyway, so holding on to the input data until that discard should not be
a problem.

Change-Id: I2ca01a006215c1e6f6472c5e6a4df4e2155a3b11
parent 0bc6f60e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment