| 7171 | } |
| 7172 | |
| 7173 | uint32_t avifDecoderNearestKeyframe(const avifDecoder * decoder, uint32_t frameIndex) |
| 7174 | { |
| 7175 | if (!decoder->data) { |
| 7176 | // Nothing has been parsed yet |
| 7177 | return 0; |
| 7178 | } |
| 7179 | |
| 7180 | for (; frameIndex != 0; --frameIndex) { |
| 7181 | if (avifDecoderIsKeyframe(decoder, frameIndex)) { |
| 7182 | break; |
| 7183 | } |
| 7184 | } |
| 7185 | return frameIndex; |
| 7186 | } |
| 7187 | |
| 7188 | // Returns the number of available rows in decoder->image given a color or alpha subimage. |
| 7189 | static uint32_t avifGetDecodedRowCount(const avifDecoder * decoder, const avifTileInfo * info, const avifImage * image) |