MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifProcessAOMOptionsPreInit

Function avifProcessAOMOptionsPreInit

src/codec_aom.c:426–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426static avifBool avifProcessAOMOptionsPreInit(avifCodec * codec, avifBool alpha, struct aom_codec_enc_cfg * cfg)
427{
428 for (uint32_t i = 0; i < codec->csOptions->count; ++i) {
429 const avifCodecSpecificOption * entry = &codec->csOptions->entries[i];
430 int val;
431 if (avifKeyEqualsName(entry->key, "end-usage", alpha)) { // Rate control mode
432 if (!aomOptionParseEnum(entry->value, endUsageEnum, &val)) {
433 avifDiagnosticsPrintf(codec->diag, "Invalid value for end-usage: %s", entry->value);
434 return AVIF_FALSE;
435 }
436 cfg->rc_end_usage = val;
437 }
438 }
439 return AVIF_TRUE;
440}
441
442#if !defined(HAVE_AOM_CODEC_SET_OPTION)
443typedef enum

Callers 1

aomCodecEncodeImageFunction · 0.85

Calls 3

aomOptionParseEnumFunction · 0.85
avifDiagnosticsPrintfFunction · 0.85
avifKeyEqualsNameFunction · 0.70

Tested by

no test coverage detected