Skip to content

Commit 57542d6

Browse files
extras
1 parent 18651e1 commit 57542d6

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ avifEncoder struct.
2323
minQuantizer, maxQuantizer, minQuantizerAlpha, and maxQuantizerAlpha
2424
initialized to the default values.
2525
* Add the public API function avifImageIsOpaque() in avif.h.
26+
* Add experimental API for progressive AVIF encoding.
2627

2728
### Changed
2829
* Exif and XMP metadata is exported to PNG and JPEG files by default,

include/avif/avif.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,13 +1117,13 @@ typedef struct avifEncoder
11171117
// settings (see Notes above)
11181118
int maxThreads;
11191119
int speed;
1120-
int keyframeInterval; // How many frames between automatic forced keyframes; 0 to disable (default).
1121-
uint64_t timescale; // timescale of the media (Hz)
1122-
int repetitionCount; // Number of times the image sequence should be repeated. This can also be set to
1123-
// AVIF_REPETITION_COUNT_INFINITE for infinite repetitions. Only applicable for image sequences.
1124-
// Essentially, if repetitionCount is a non-negative integer `n`, then the image sequence should be
1125-
// played back `n + 1` times. Defaults to AVIF_REPETITION_COUNT_INFINITE.
1126-
uint32_t extraLayerCount;
1120+
int keyframeInterval; // How many frames between automatic forced keyframes; 0 to disable (default).
1121+
uint64_t timescale; // timescale of the media (Hz)
1122+
int repetitionCount; // Number of times the image sequence should be repeated. This can also be set to
1123+
// AVIF_REPETITION_COUNT_INFINITE for infinite repetitions. Only applicable for image sequences.
1124+
// Essentially, if repetitionCount is a non-negative integer `n`, then the image sequence should be
1125+
// played back `n + 1` times. Defaults to AVIF_REPETITION_COUNT_INFINITE.
1126+
uint32_t extraLayerCount; // EXPERIMENTAL: Non-zero value encodes layered image.
11271127

11281128
// changeable encoder settings
11291129
int quality;

src/write.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,8 @@ avifResult avifEncoderFinish(avifEncoder * encoder, avifRWData * output)
19201920
avifEncoderItemReferenceArray layeredAlphaItems;
19211921
if (!avifArrayCreate(&layeredColorItems, sizeof(avifEncoderItemReference), 1) ||
19221922
!avifArrayCreate(&layeredAlphaItems, sizeof(avifEncoderItemReference), 1)) {
1923+
avifArrayDestroy(&layeredColorItems);
1924+
avifArrayDestroy(&layeredAlphaItems);
19231925
return AVIF_RESULT_OUT_OF_MEMORY;
19241926
}
19251927

0 commit comments

Comments
 (0)