pdn-avif icon indicating copy to clipboard operation
pdn-avif copied to clipboard

Very large AVIF saving is unresponsive

Open rickbrew opened this issue 2 years ago • 2 comments

Got this e-mail sent from Paint.NET, forwarding it along (I'm just the messenger!). I'll send them a URL to this issue as well.

Unresponsive very large AVIF saves when canceling preview. Captured a very long webpage, 7MB PNG using full page screen capture plugin, decided to compress it with avif (very slow), the preview calculation takes a long time so I just hit ok to save which froze the preview at 33% and saving dialog said canceling while also at 33% for many minutes with 100% cpu, eventually it changed to saving and ended but it didn’t seem like it was actually cancelling.

Even when the avif saving works, the progress meter is useless as it goes to 33% where it stays for a while and jumps to the end.

rickbrew avatar Feb 21 '22 02:02 rickbrew

Seems related to https://github.com/0xC0000054/pdn-avif/issues/14

rickbrew avatar Feb 21 '22 02:02 rickbrew

Seems related to #14

Yes, it is.

The plugin only reports progress and allows cancellation before and after AOM compresses each image. As I mentioned in that thread, I filed an issue to add a progress reporting/cancellation API to the AOM encoder:

https://bugs.chromium.org/p/aomedia/issues/detail?id=2837

A number of people have starred that issue, but there has not been any movement on implementing it.

Captured a very long webpage, 7MB PNG

I would be interested to know what the image dimensions were, but even 1920x1080 takes a while on the Very Slow preset.

The Very Slow preset instructs AOM to encode the image using the slowest compression, without splitting it into smaller tiles. This usually provides the smallest file size, but it is not a great user experience due to the limited opportunities for progress reporting and cancellation.

0xC0000054 avatar Feb 21 '22 06:02 0xC0000054