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

Function avifDecoderItemCodecConfigOrFirstCellCodecConfig

src/read.c:2304–2320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2302}
2303
2304static const avifProperty * avifDecoderItemCodecConfigOrFirstCellCodecConfig(const avifDecoderItem * item)
2305{
2306 if (!memcmp(item->type, "grid", 4)) {
2307 // In case of a grid, return the codec configuration property of the first cell.
2308 // avifDecoderAdoptGridTileCodecType() copies that property from the first cell to the grid item anyway.
2309 for (uint32_t i = 0; i < item->meta->items.count; ++i) {
2310 avifDecoderItem * inputImageItem = item->meta->items.item[i];
2311 if (inputImageItem->dimgForID == item->id) {
2312 return avifPropertyArrayFind(&inputImageItem->properties,
2313 avifGetConfigurationPropertyName(avifGetCodecType(inputImageItem->type)));
2314 }
2315 }
2316 // The number of tiles was verified in avifDecoderItemReadAndParse().
2317 assert(AVIF_FALSE);
2318 }
2319 return avifPropertyArrayFind(&item->properties, avifGetConfigurationPropertyName(avifGetCodecType(item->type)));
2320}
2321
2322static avifResult avifDecoderSampleTransformItemValidateProperties(const avifDecoderItem * satoItem, avifDiagnostics * diag)
2323{

Calls 3

avifPropertyArrayFindFunction · 0.85
avifGetCodecTypeFunction · 0.85

Tested by

no test coverage detected