Lines Matching refs:unit
166 // Sequence End unit at the very end of a packet).
180 // We didn't find a start code, so this is the final unit.
191 // Do we have a further unit to add to the fragment?
198 CodedBitstreamUnit *unit)
203 err = init_get_bits(&gbc, unit->data, 8 * unit->data_size);
207 err = ff_cbs_alloc_unit_content2(ctx, unit);
211 if (MPEG2_START_IS_SLICE(unit->type)) {
212 MPEG2RawSlice *slice = unit->content;
223 len = unit->data_size;
226 slice->data_ref = av_buffer_ref(unit->data_ref);
229 slice->data = unit->data + pos / 8;
234 switch (unit->type) {
238 type *header = unit->content; \
266 CodedBitstreamUnit *unit,
271 switch (unit->type) {
274 err = cbs_mpeg2_write_ ## func(ctx, pbc, unit->content); \
286 "code %02"PRIx32".\n", unit->type);
294 CodedBitstreamUnit *unit,
297 MPEG2RawSlice *slice = unit->content;
343 CodedBitstreamUnit *unit,
346 if (MPEG2_START_IS_SLICE(unit->type))
347 return cbs_mpeg2_write_slice (ctx, unit, pbc);
349 return cbs_mpeg2_write_header(ctx, unit, pbc);
370 CodedBitstreamUnit *unit = &frag->units[i];
376 memcpy(data + dp, unit->data, unit->data_size);
377 dp += unit->data_size;