Skip to content

Commit

Permalink
rav1e: Set still picture mode
Browse files Browse the repository at this point in the history
This will be fixed with rav1e 0.3.0, see
xiph/rav1e#1000

Fixes AOMediaCodec#33
  • Loading branch information
cryptomilk committed Jan 28, 2020
1 parent 8300d21 commit ff9899e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/codec_rav1e.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include <string.h>

#define AVIF_RAV1E_VERSION (RAV1E_MAJOR * 10000) + (RAV1E_MINOR * 100) + RAV1E_PATCH

struct avifCodecInternal
{
uint32_t unused; // rav1e codec has no state
Expand Down Expand Up @@ -67,6 +69,11 @@ static avifBool rav1eCodecEncodeImage(avifCodec * codec, avifImage * image, avif
goto cleanup;
}

#if AVIF_RAV1E_VERSION >= 300
if (rav1e_config_parse(rav1eConfig, "still_picture", "true") == -1) {
goto cleanup;
}
#endif
if (rav1e_config_parse_int(rav1eConfig, "width", image->width) == -1) {
goto cleanup;
}
Expand Down

0 comments on commit ff9899e

Please sign in to comment.