strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.7k stars 298 forks source link

decoding and encoding progress report from library to client application #161

Open cgilles opened 4 years ago

cgilles commented 4 years ago

Decoding and encoding process can take a while especially with large image.

I see in API a progress handler in decoding structure:

struct heif_decoding_options { uint8_t version;

// version 1 options

// Ignore geometric transformations like cropping, rotation, mirroring. // Default: false (do not ignore). uint8_t ignore_transformations;

void (start_progress)(enum heif_progress_step step, int max_progress, void progress_user_data); void (on_progress)(enum heif_progress_step step, int progress, void progress_user_data); void (end_progress)(enum heif_progress_step step, void progress_user_data); void* progress_user_data; };

I check the rest of the code to see if progress_user_data or on_progress are used, and i found nothing excepted an init to NULL at structure allocation.

It's planed to extend this progress handler in the future ?

Best

Gilles Caulier

farindk commented 4 years ago

I'd like to have progress information, but that information ultimatively has to come from the decoder plugins, and as far as the decoders don't support it, I cannot add it to libheif.

We could add some progress information for tiled images (number of tiles already decoded), which is maybe a good first step, because iPhone images are all stored in small tiles.