Opened 23 months ago

Closed 23 months ago

Last modified 20 months ago

#9798 closed enhancement (fixed)

Quite-OK Image format support

Reported by: FrostBird347 Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: qoi, image2
Cc: FrostBird347 Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The Quite-OK Image format is a relatively new image format.
It is extremely simple (the example encode/decoder uses around 300 lines of code in C and the format specification fits on a single page), is 20x-50x faster at encoding and 3x-4x faster at decoding than stb_image and stb_image_write. It also doesn't take up much more space than a png image.

As ImageMagick does support qoi, it is possible to encode a bunch of qoi frames into a video by piping the output to ffmpeg, however this does significantly slow down encode speed as the frames need to be converted to another format first. An example is provided below:

convert $FrameList ppm:- | ffmpeg -f image2pipe -framerate 25 -i - -c:v libx264 -pix_fmt yuv420p $OutputFile

The qoi format is best suited for situations where images need to be encoded or decoded as quickly as possible while still using minimal size. Extracting frames from a video is one such situation and depending on the video's format, qoi could provide the fastest performance.

Change History (5)

comment:1 by FrostBird347, 23 months ago

Keywords: image2 added; format image removed

comment:2 by Elon Musk, 23 months ago

Problem with this format (or any similar format) is that its almost impossible to write parser for it that will be robust in splitting stream of images into multiple frames when using it via pipe.

four byte identifier at start is simply just not enough.

comment:3 by Elon Musk, 23 months ago

Looks like there is 8 byte marker at end of each file, that makes stuff much easier.

comment:4 by Elon Musk, 23 months ago

Resolution: fixed
Status: newclosed

comment:5 by Carl Eugen Hoyos, 20 months ago

Component: undeterminedavcodec
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.