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

Function avifDecoderDataCreateTile

src/read.c:1039–1068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1037}
1038
1039static avifTile * avifDecoderDataCreateTile(avifDecoderData * data, avifCodecType codecType, uint32_t width, uint32_t height, uint8_t operatingPoint)
1040{
1041 avifTile * tile = (avifTile *)avifArrayPush(&data->tiles);
1042 if (tile == NULL) {
1043 return NULL;
1044 }
1045 tile->codecType = codecType;
1046 tile->image = avifImageCreateEmpty();
1047 if (!tile->image) {
1048 goto error;
1049 }
1050 tile->input = avifCodecDecodeInputCreate();
1051 if (!tile->input) {
1052 goto error;
1053 }
1054 tile->width = width;
1055 tile->height = height;
1056 tile->operatingPoint = operatingPoint;
1057 return tile;
1058
1059error:
1060 if (tile->input) {
1061 avifCodecDecodeInputDestroy(tile->input);
1062 }
1063 if (tile->image) {
1064 avifImageDestroy(tile->image);
1065 }
1066 avifArrayPop(&data->tiles);
1067 return NULL;
1068}
1069
1070static avifTrack * avifDecoderDataCreateTrack(avifDecoderData * data)
1071{

Callers 3

avifDecoderResetFunction · 0.85

Calls 6

avifArrayPushFunction · 0.85
avifImageCreateEmptyFunction · 0.85
avifImageDestroyFunction · 0.85
avifArrayPopFunction · 0.85

Tested by

no test coverage detected