Lines Matching defs:granule

43     int64_t granule;
56 /** for theora granule */
60 /* for VP8 granule */
66 int64_t last_granule; ///< last packet granule
114 bytestream_put_le64(&ptr, page->granule);
132 static int ogg_key_granule(OGGStreamContext *oggstream, int64_t granule)
134 return (oggstream->kfgshift && !(granule & ((1<<oggstream->kfgshift)-1))) ||
135 (oggstream->isvp8 && !((granule >> 3) & 0x07ffffff));
138 static int64_t ogg_granule_to_timestamp(OGGStreamContext *oggstream, int64_t granule)
141 return (granule>>oggstream->kfgshift) +
142 (granule & ((1<<oggstream->kfgshift)-1));
144 return granule >> 32;
146 return granule;
155 if (next->granule == -1 || page->granule == -1)
158 next_granule = av_rescale_q(ogg_granule_to_timestamp(st2->priv_data, next->granule),
160 cur_granule = av_rescale_q(ogg_granule_to_timestamp(st->priv_data, page->granule),
167 oggstream->page.granule = -1;
184 oggstream->page.start_granule = ogg_granule_to_timestamp(oggstream, oggstream->page.granule);
200 const uint8_t *data, unsigned size, int64_t granule,
215 (ogg_granule_to_timestamp(oggstream, granule) >
217 ogg_key_granule(oggstream, granule))) {
218 if (oggstream->page.granule != -1)
249 page->granule = granule;
256 int64_t next = av_rescale_q(ogg_granule_to_timestamp(oggstream, page->granule),
270 if (flush && oggstream->page.granule != -1)
591 /** KFGSHIFT is the width of the less significant section of the granule position
639 int64_t granule;
652 granule = (oggstream->last_kf_pts<<oggstream->kfgshift) | pframe_count;
654 granule = pkt->pts + pkt->duration +
668 granule = (pts << 32) | (invcnt << 30) | (dist << 3);
670 granule = pkt->pts + pkt->duration;
675 ret = ogg_buffer_data(s, st, pkt->data, pkt->size, granule, 0);
681 oggstream->last_granule = granule;