MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_mpeg1_encode_slice_header

Function ff_mpeg1_encode_slice_header

libavcodec/mpeg12enc.c:325–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void ff_mpeg1_encode_slice_header(MPVEncContext *const s)
326{
327 if (s->c.codec_id == AV_CODEC_ID_MPEG2VIDEO && s->c.height > 2800) {
328 put_header(s, SLICE_MIN_START_CODE + (s->c.mb_y & 127));
329 /* slice_vertical_position_extension */
330 put_bits(&s->pb, 3, s->c.mb_y >> 7);
331 } else {
332 av_assert1(s->c.mb_y <= SLICE_MAX_START_CODE - SLICE_MIN_START_CODE);
333 put_header(s, SLICE_MIN_START_CODE + s->c.mb_y);
334 }
335 put_qscale(s);
336 /* slice extra information */
337 put_bits(&s->pb, 1, 0);
338}
339
340static int mpeg1_encode_picture_header(MPVMainEncContext *const m)
341{

Callers 2

encode_threadFunction · 0.85

Calls 3

put_qscaleFunction · 0.85
put_headerFunction · 0.70
put_bitsFunction · 0.70

Tested by

no test coverage detected