Lines Matching refs:nb_entries

61 	if (!stts->nb_entries) {  in stbl_AddDTS()
65 stts->nb_entries = 1; in stbl_AddDTS()
76 ent = &stts->entries[stts->nb_entries-1]; in stbl_AddDTS()
104 … if ((stts->nb_entries>=2) && (ent->sampleDelta== stts->entries[stts->nb_entries-2].sampleDelta)) { in stbl_AddDTS()
105 stts->entries[stts->nb_entries-2].sampleCount += ent->sampleCount; in stbl_AddDTS()
106 stts->nb_entries--; in stbl_AddDTS()
115 if (stts->alloc_size==stts->nb_entries) { in stbl_AddDTS()
119 …memset(&stts->entries[stts->nb_entries], 0, sizeof(GF_SttsEntry)*(stts->alloc_size-stts->nb_entrie… in stbl_AddDTS()
121 ent = &stts->entries[stts->nb_entries]; in stbl_AddDTS()
122 stts->nb_entries++; in stbl_AddDTS()
140 for (i=0; i<stts->nb_entries; i++) { in stbl_AddDTS()
160 if (stts->nb_entries+3 >= stts->alloc_size) { in stbl_AddDTS()
164 …memset(&stts->entries[stts->nb_entries], 0, sizeof(GF_SttsEntry)*(stts->alloc_size - stts->nb_entr… in stbl_AddDTS()
169 stts->nb_entries = 1; in stbl_AddDTS()
179 stts->nb_entries ++; in stbl_AddDTS()
196 if (ctts->nb_entries && (ctts->entries[ctts->nb_entries-1].decodingOffset==offset)) { in AddCompositionOffset()
197 ctts->entries[ctts->nb_entries-1].sampleCount++; in AddCompositionOffset()
199 if (ctts->alloc_size==ctts->nb_entries) { in AddCompositionOffset()
203 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size-ctts->nb_entrie… in AddCompositionOffset()
207 ctts->entries[ctts->nb_entries].decodingOffset = offset; in AddCompositionOffset()
208 ctts->entries[ctts->nb_entries].sampleCount = 1; in AddCompositionOffset()
209 ctts->nb_entries++; in AddCompositionOffset()
225 if (ctts->nb_entries==ctts->alloc_size) { in stbl_AddCTS()
229 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size - ctts->nb_entr… in stbl_AddCTS()
231 ctts->entries[ctts->nb_entries].decodingOffset = offset; in stbl_AddCTS()
232 ctts->entries[ctts->nb_entries].sampleCount = 1; in stbl_AddCTS()
233 ctts->nb_entries++; in stbl_AddCTS()
252 for (i=0; i<ctts->nb_entries; i++) { in stbl_AddCTS()
269 if (ctts->nb_entries+2>=ctts->alloc_size) { in stbl_AddCTS()
273 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size-ctts->nb_entrie… in stbl_AddCTS()
278 ctts->nb_entries = 1; in stbl_AddCTS()
285 ctts->nb_entries++; in stbl_AddCTS()
309 for (i=1; i<ctts->nb_entries; i++) { in stbl_repackCTS()
318 ctts->nb_entries=j+1; in stbl_repackCTS()
333 count = ctts->nb_entries; in stbl_unpackCTS()
335 ctts->nb_entries = 0; in stbl_unpackCTS()
339 if (ctts->nb_entries == ctts->alloc_size) { in stbl_unpackCTS()
344 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size-ctts->nb_entrie… in stbl_unpackCTS()
346 ctts->entries[ctts->nb_entries].decodingOffset = packed[i].decodingOffset; in stbl_unpackCTS()
347 ctts->entries[ctts->nb_entries].sampleCount = 1; in stbl_unpackCTS()
348 ctts->nb_entries++; in stbl_unpackCTS()
353 while (stbl->SampleSize->sampleCount > ctts->nb_entries) { in stbl_unpackCTS()
354 if (ctts->nb_entries == ctts->alloc_size) { in stbl_unpackCTS()
358 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size-ctts->nb_entrie… in stbl_unpackCTS()
360 ctts->entries[ctts->nb_entries].decodingOffset = 0; in stbl_unpackCTS()
361 ctts->entries[ctts->nb_entries].sampleCount = 1; in stbl_unpackCTS()
362 ctts->nb_entries++; in stbl_unpackCTS()
462 stss->nb_entries = 1; in stbl_AddRAP()
466 if (stss->sampleNumbers[stss->nb_entries-1] == sampleNumber) return GF_OK; in stbl_AddRAP()
468 if (stss->sampleNumbers[stss->nb_entries-1] < sampleNumber) { in stbl_AddRAP()
469 if (stss->nb_entries==stss->alloc_size) { in stbl_AddRAP()
473 …memset(&stss->sampleNumbers[stss->nb_entries], 0, sizeof(u32) * (stss->alloc_size-stss->nb_entries in stbl_AddRAP()
475 stss->sampleNumbers[stss->nb_entries] = sampleNumber; in stbl_AddRAP()
477 newNumbers = (u32*)gf_malloc(sizeof(u32) * (stss->nb_entries + 1)); in stbl_AddRAP()
481 for (i = 0; i < stss->nb_entries; i++) { in stbl_AddRAP()
490 stss->alloc_size = stss->nb_entries+1; in stbl_AddRAP()
493 stss->nb_entries ++; in stbl_AddRAP()
684 if (!stsc->nb_entries || (stsc->nb_entries + (needs_split ? 2 : 0) >= stsc->alloc_size)) { in stbl_AddChunkOffset()
689 …memset(&stsc->entries[stsc->nb_entries], 0, sizeof(GF_StscEntry)*(stsc->alloc_size-stsc->nb_entrie… in stbl_AddChunkOffset()
692 ent = &stsc->entries[stsc->nb_entries]; in stbl_AddChunkOffset()
695 if (stsc->nb_entries) stsc->entries[stsc->nb_entries-1].nextChunk = stsc->w_lastChunkNumber; in stbl_AddChunkOffset()
699 stsc->nb_entries += 1; in stbl_AddChunkOffset()
704 for (i=0; i<stsc->nb_entries; i++) { in stbl_AddChunkOffset()
707 if (i+1<stsc->nb_entries) nb_chunks = stsc->entries[i+1].firstChunk - ent->firstChunk; in stbl_AddChunkOffset()
725 …sert_idx+3], &stsc->entries[insert_idx+1], sizeof(GF_StscEntry)*(stsc->nb_entries - insert_idx - 1… in stbl_AddChunkOffset()
736 stsc->nb_entries += 2; in stbl_AddChunkOffset()
739 ent = &stsc->entries[stsc->nb_entries]; in stbl_AddChunkOffset()
740 insert_idx = stsc->nb_entries; in stbl_AddChunkOffset()
742 …s[insert_idx+1], &stsc->entries[insert_idx], sizeof(GF_StscEntry)*(stsc->nb_entries+1-insert_idx)); in stbl_AddChunkOffset()
747 stsc->nb_entries += 1; in stbl_AddChunkOffset()
758 if (stsc->nb_entries) in stbl_AddChunkOffset()
759 stsc->entries[stsc->nb_entries-1].nextChunk = ent->firstChunk; in stbl_AddChunkOffset()
761 stbl->SampleToChunk->currentIndex = stsc->nb_entries-1; in stbl_AddChunkOffset()
768 for (i = insert_idx+1; i<stsc->nb_entries+1; i++) { in stbl_AddChunkOffset()
770 if (i+1<stsc->nb_entries) in stbl_AddChunkOffset()
783 co64->nb_entries = stco->nb_entries + 1; in stbl_AddChunkOffset()
784 co64->alloc_size = co64->nb_entries; in stbl_AddChunkOffset()
785 co64->offsets = (u64*)gf_malloc(sizeof(u64) * co64->nb_entries); in stbl_AddChunkOffset()
788 for (i=0; i<stco->nb_entries; i++) { in stbl_AddChunkOffset()
795 if (!k) co64->offsets[co64->nb_entries - 1] = offset; in stbl_AddChunkOffset()
800 if (new_chunk_idx > stco->nb_entries) { in stbl_AddChunkOffset()
801 if (!stco->alloc_size) stco->alloc_size = stco->nb_entries; in stbl_AddChunkOffset()
802 if (stco->nb_entries == stco->alloc_size) { in stbl_AddChunkOffset()
806 … memset(&stco->offsets[stco->nb_entries], 0, sizeof(u32) * (stco->alloc_size-stco->nb_entries) ); in stbl_AddChunkOffset()
808 stco->offsets[stco->nb_entries] = (u32) offset; in stbl_AddChunkOffset()
809 stco->nb_entries += 1; in stbl_AddChunkOffset()
812 newOff = (u32*)gf_malloc(sizeof(u32) * (stco->nb_entries + 1)); in stbl_AddChunkOffset()
815 for (i=0; i<stco->nb_entries; i++) { in stbl_AddChunkOffset()
824 stco->nb_entries ++; in stbl_AddChunkOffset()
825 stco->alloc_size = stco->nb_entries; in stbl_AddChunkOffset()
831 if (sampleNumber > co64->nb_entries) { in stbl_AddChunkOffset()
832 if (!co64->alloc_size) co64->alloc_size = co64->nb_entries; in stbl_AddChunkOffset()
833 if (co64->nb_entries == co64->alloc_size) { in stbl_AddChunkOffset()
837 … memset(&co64->offsets[co64->nb_entries], 0, sizeof(u64) * (co64->alloc_size - co64->nb_entries) ); in stbl_AddChunkOffset()
839 co64->offsets[co64->nb_entries] = offset; in stbl_AddChunkOffset()
840 co64->nb_entries += 1; in stbl_AddChunkOffset()
843 newLarge = (u64*)gf_malloc(sizeof(u64) * (co64->nb_entries + 1)); in stbl_AddChunkOffset()
846 for (i=0; i<co64->nb_entries; i++) { in stbl_AddChunkOffset()
855 co64->nb_entries++; in stbl_AddChunkOffset()
887 co64->nb_entries = ((GF_ChunkOffsetBox *)stbl->ChunkOffset)->nb_entries; in stbl_SetChunkOffset()
888 co64->alloc_size = co64->nb_entries; in stbl_SetChunkOffset()
889 co64->offsets = (u64*)gf_malloc(sizeof(u64)*co64->nb_entries); in stbl_SetChunkOffset()
891 for (i=0; i<co64->nb_entries; i++) { in stbl_SetChunkOffset()
954 for (i = 0; i < stss->nb_entries; i++) { in stbl_SetSampleRAP()
962 if (i+1 < stss->nb_entries) in stbl_SetSampleRAP()
963 …memmove(stss->sampleNumbers + i, stss->sampleNumbers + i + 1, sizeof(u32) * (stss->nb_entries - i … in stbl_SetSampleRAP()
964 stss->nb_entries--; in stbl_SetSampleRAP()
969 if (stss->nb_entries==stss->alloc_size) { in stbl_SetSampleRAP()
973 …memset(&stss->sampleNumbers[stss->nb_entries], 0, sizeof(u32)*(stss->alloc_size - stss->nb_entries in stbl_SetSampleRAP()
976 if (i+1 < stss->nb_entries) in stbl_SetSampleRAP()
977 …memmove(stss->sampleNumbers + i + 1, stss->sampleNumbers + i, sizeof(u32) * (stss->nb_entries - i … in stbl_SetSampleRAP()
979 stss->nb_entries ++; in stbl_SetSampleRAP()
1037 stts->nb_entries = 0; in stbl_RemoveDTS()
1044 ent = &stts->entries[stts->nb_entries-1]; in stbl_RemoveDTS()
1046 if (!ent->sampleCount) stts->nb_entries--; in stbl_RemoveDTS()
1058 for (i=0; i<stts->nb_entries; i++) { in stbl_RemoveDTS()
1071 stts->nb_entries = 1; in stbl_RemoveDTS()
1088 stts->nb_entries++; in stbl_RemoveDTS()
1135 …leNumber-1], &ctts->entries[sampleNumber], sizeof(GF_DttsEntry)* (ctts->nb_entries-sampleNumber) ); in stbl_RemoveCTS()
1136 ctts->nb_entries--; in stbl_RemoveCTS()
1173 if (stsc->nb_entries < stbl->SampleSize->sampleCount) { in stbl_RemoveChunk()
1175 GF_StscEntry *ent = &stsc->entries[stsc->nb_entries-1]; in stbl_RemoveChunk()
1179 stsc->nb_entries--; in stbl_RemoveChunk()
1182 ((GF_ChunkOffsetBox *)stbl->ChunkOffset)->nb_entries --; in stbl_RemoveChunk()
1184 ((GF_ChunkLargeOffsetBox *)stbl->ChunkOffset)->nb_entries --; in stbl_RemoveChunk()
1186 if (stsc->nb_entries) { in stbl_RemoveChunk()
1187 ent = &stsc->entries[stsc->nb_entries-1]; in stbl_RemoveChunk()
1197 …mpleNumber-1], &stsc->entries[sampleNumber], sizeof(GF_StscEntry)*(stsc->nb_entries-sampleNumber)); in stbl_RemoveChunk()
1198 stsc->nb_entries--; in stbl_RemoveChunk()
1201 for (i=sampleNumber-1; i < stsc->nb_entries; i++) { in stbl_RemoveChunk()
1216 ((GF_ChunkOffsetBox *)stbl->ChunkOffset)->nb_entries = 0; in stbl_RemoveChunk()
1233 ((GF_ChunkOffsetBox *)stbl->ChunkOffset)->nb_entries -= 1; in stbl_RemoveChunk()
1238 ((GF_ChunkLargeOffsetBox *)stbl->ChunkOffset)->nb_entries = 0; in stbl_RemoveChunk()
1256 ((GF_ChunkLargeOffsetBox *)stbl->ChunkOffset)->nb_entries -= 1; in stbl_RemoveChunk()
1270 if (stss->nb_entries == 1) { in stbl_RemoveRAP()
1276 stss->alloc_size = stss->nb_entries = 0; in stbl_RemoveRAP()
1280 for (i=0; i<stss->nb_entries; i++) { in stbl_RemoveRAP()
1283 … memmove(&stss->sampleNumbers[i], &stss->sampleNumbers[i+1], sizeof(u32)* (stss->nb_entries-i-1) ); in stbl_RemoveRAP()
1284 stss->nb_entries--; in stbl_RemoveRAP()
1511 if (stts->nb_entries) { in stbl_AppendTime()
1512 if (stts->entries[stts->nb_entries-1].sampleDelta == duration) { in stbl_AppendTime()
1513 stts->entries[stts->nb_entries-1].sampleCount += nb_pack; in stbl_AppendTime()
1517 if (stts->nb_entries==stts->alloc_size) { in stbl_AppendTime()
1521 …memset(&stts->entries[stts->nb_entries], 0, sizeof(GF_SttsEntry)*(stts->alloc_size-stts->nb_entrie… in stbl_AppendTime()
1523 stts->entries[stts->nb_entries].sampleCount = nb_pack; in stbl_AppendTime()
1524 stts->entries[stts->nb_entries].sampleDelta = duration; in stbl_AppendTime()
1525 stts->nb_entries++; in stbl_AppendTime()
1586 co64->nb_entries = stco->nb_entries + 1; in stbl_AppendChunk()
1587 if (co64->nb_entries<=stco->nb_entries) return GF_OUT_OF_MEM; in stbl_AppendChunk()
1588 co64->alloc_size = co64->nb_entries; in stbl_AppendChunk()
1589 co64->offsets = (u64*)gf_malloc(sizeof(u64) * co64->nb_entries); in stbl_AppendChunk()
1591 for (i=0; i<stco->nb_entries; i++) co64->offsets[i] = stco->offsets[i]; in stbl_AppendChunk()
1598 stco->alloc_size = stco->nb_entries + 1; in stbl_AppendChunk()
1599 if (stco->alloc_size < stco->nb_entries + 1) return GF_OUT_OF_MEM; in stbl_AppendChunk()
1602 stco->offsets[stco->nb_entries] = (u32) offset; in stbl_AppendChunk()
1603 stco->nb_entries += 1; in stbl_AppendChunk()
1608 co64->alloc_size = co64->nb_entries+1; in stbl_AppendChunk()
1609 if (co64->alloc_size < co64->nb_entries + 1) return GF_OUT_OF_MEM; in stbl_AppendChunk()
1613 co64->offsets[co64->nb_entries] = offset; in stbl_AppendChunk()
1614 co64->alloc_size = co64->nb_entries; in stbl_AppendChunk()
1624 nextChunk = ((GF_ChunkOffsetBox *) stbl->ChunkOffset)->nb_entries; in stbl_AppendSampleToChunk()
1626 if (stsc->nb_entries) { in stbl_AppendSampleToChunk()
1627 ent = &stsc->entries[stsc->nb_entries-1]; in stbl_AppendSampleToChunk()
1635 if (stsc->nb_entries==stsc->alloc_size) { in stbl_AppendSampleToChunk()
1639 …memset(&stsc->entries[stsc->nb_entries], 0, sizeof(GF_StscEntry)*(stsc->alloc_size - stsc->nb_entr… in stbl_AppendSampleToChunk()
1642 ent = &stsc->entries[stsc->nb_entries]; in stbl_AppendSampleToChunk()
1647 stsc->nb_entries++; in stbl_AppendSampleToChunk()
1672 stbl->SyncSample->nb_entries = stbl->SampleSize->sampleCount-1; in stbl_AppendRAP()
1673 stbl->SyncSample->alloc_size = stbl->SyncSample->nb_entries; in stbl_AppendRAP()
1678 if (stbl->SyncSample->alloc_size == stbl->SyncSample->nb_entries) { in stbl_AppendRAP()
1682 …sampleNumbers[stbl->SyncSample->nb_entries], 0, sizeof(u32) * (stbl->SyncSample->alloc_size-stbl->… in stbl_AppendRAP()
1684 stbl->SyncSample->sampleNumbers[stbl->SyncSample->nb_entries] = stbl->SampleSize->sampleCount; in stbl_AppendRAP()
1685 stbl->SyncSample->nb_entries += 1; in stbl_AppendRAP()
1699 if (tmap->nb_entries >= stbl->SampleSize->sampleCount) { in stbl_AppendTrafMap()
1701 for (i=0; i<tmap->nb_entries; i++) { in stbl_AppendTrafMap()
1706 tmap->nb_entries = 0; in stbl_AppendTrafMap()
1709 if (tmap->nb_entries + 1 > tmap->nb_alloc) { in stbl_AppendTrafMap()
1714 tmap_ent = &tmap->frag_starts[tmap->nb_entries]; in stbl_AppendTrafMap()
1715 tmap->nb_entries += 1; in stbl_AppendTrafMap()
1753 if (ctts->nb_entries && (ctts->entries[ctts->nb_entries-1].decodingOffset == offset) ) { in stbl_AppendCTSOffset()
1754 ctts->entries[ctts->nb_entries-1].sampleCount++; in stbl_AppendCTSOffset()
1757 if (ctts->nb_entries==ctts->alloc_size) { in stbl_AppendCTSOffset()
1761 …memset(&ctts->entries[ctts->nb_entries], 0, sizeof(GF_DttsEntry)*(ctts->alloc_size-ctts->nb_entrie… in stbl_AppendCTSOffset()
1763 ctts->entries[ctts->nb_entries].decodingOffset = offset; in stbl_AppendCTSOffset()
1764 ctts->entries[ctts->nb_entries].sampleCount = 1; in stbl_AppendCTSOffset()
1765 ctts->nb_entries++; in stbl_AppendCTSOffset()
1783 stbl->DegradationPriority->nb_entries = stbl->SampleSize->sampleCount; in stbl_AppendDegradation()
1830 if (stbl->SampleSize->sampleCount == stbl->SampleToChunk->nb_entries) return GF_OK; in stbl_UnpackOffsets()
1837 stco_tmp->nb_entries = stbl->SampleSize->sampleCount; in stbl_UnpackOffsets()
1838 stco_tmp->offsets = (u32*)gf_malloc(stco_tmp->nb_entries * sizeof(u32)); in stbl_UnpackOffsets()
1843 stco_tmp->alloc_size = stco_tmp->nb_entries; in stbl_UnpackOffsets()
1848 co64_tmp->nb_entries = stbl->SampleSize->sampleCount; in stbl_UnpackOffsets()
1849 co64_tmp->offsets = (u64*)gf_malloc(co64_tmp->nb_entries * sizeof(u64)); in stbl_UnpackOffsets()
1854 co64_tmp->alloc_size = co64_tmp->nb_entries; in stbl_UnpackOffsets()
1863 stsc_tmp->nb_entries = stsc_tmp->alloc_size = stbl->SampleSize->sampleCount; in stbl_UnpackOffsets()
1864 stsc_tmp->entries = gf_malloc(sizeof(GF_StscEntry)*stsc_tmp->nb_entries); in stbl_UnpackOffsets()
1934 co64->nb_entries = stco->nb_entries + 1; in stbl_AddOffset()
1935 co64->alloc_size = co64->nb_entries; in stbl_AddOffset()
1936 co64->offsets = (u64*)gf_malloc(co64->nb_entries * sizeof(u64)); in stbl_AddOffset()
1941 for (i = 0; i< co64->nb_entries - 1; i++) { in stbl_AddOffset()
1954 if (stco->nb_entries==stco->alloc_size) { in stbl_AddOffset()
1958 memset(&stco->offsets[stco->nb_entries], 0, (stco->alloc_size - stco->nb_entries) * sizeof(u32)); in stbl_AddOffset()
1961 stco->offsets[stco->nb_entries] = (u32) offset; in stbl_AddOffset()
1962 stco->nb_entries += 1; in stbl_AddOffset()
1966 if (co64->nb_entries==co64->alloc_size) { in stbl_AddOffset()
1970 … memset(&co64->offsets[co64->nb_entries], 0, (co64->alloc_size - co64->nb_entries) * sizeof(u64) ); in stbl_AddOffset()
1972 co64->offsets[co64->nb_entries] = offset; in stbl_AddOffset()
1973 co64->nb_entries += 1; in stbl_AddOffset()
2004 cur_ent = &the_stsc->entries[the_stsc->nb_entries - 1]; in stbl_SetChunkAndOffset()
2020 if (the_stsc->nb_entries > 1) { in stbl_SetChunkAndOffset()
2021 GF_StscEntry *ent = &the_stsc->entries[the_stsc->nb_entries - 2]; in stbl_SetChunkAndOffset()
2028 the_stsc->nb_entries--; in stbl_SetChunkAndOffset()
2036 if (the_stsc->nb_entries==the_stsc->alloc_size) { in stbl_SetChunkAndOffset()
2040 …memset(&the_stsc->entries[the_stsc->nb_entries], 0, sizeof(GF_StscEntry)*(the_stsc->alloc_size-the… in stbl_SetChunkAndOffset()
2043 newEnt = &the_stsc->entries[the_stsc->nb_entries]; in stbl_SetChunkAndOffset()
2048 newEnt->firstChunk = ((GF_ChunkOffsetBox *) (*the_stco) )->nb_entries; in stbl_SetChunkAndOffset()
2050 newEnt->firstChunk = ((GF_ChunkLargeOffsetBox *) (*the_stco) )->nb_entries; in stbl_SetChunkAndOffset()
2056 if (the_stsc->nb_entries) in stbl_SetChunkAndOffset()
2057 the_stsc->entries[the_stsc->nb_entries-1].nextChunk = newEnt->firstChunk; in stbl_SetChunkAndOffset()
2058 the_stsc->nb_entries++; in stbl_SetChunkAndOffset()