| 354 | } |
| 355 | |
| 356 | static uint32_t avifSampleTableGetImageDelta(const avifSampleTable * sampleTable, uint32_t imageIndex) |
| 357 | { |
| 358 | uint32_t maxSampleIndex = 0; |
| 359 | for (uint32_t i = 0; i < sampleTable->timeToSamples.count; ++i) { |
| 360 | const avifSampleTableTimeToSample * timeToSample = &sampleTable->timeToSamples.timeToSample[i]; |
| 361 | maxSampleIndex += timeToSample->sampleCount; |
| 362 | if ((imageIndex < maxSampleIndex) || (i == (sampleTable->timeToSamples.count - 1))) { |
| 363 | return timeToSample->sampleDelta; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | // TODO: fail here? |
| 368 | return 1; |
| 369 | } |
| 370 | |
| 371 | static avifCodecType avifSampleTableGetCodecType(const avifSampleTable * sampleTable) |
| 372 | { |
no outgoing calls
no test coverage detected