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

Function encode_ext_header

libavcodec/wmv2enc.c:49–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47} WMV2EncContext;
48
49static int encode_ext_header(WMV2EncContext *w)
50{
51 MPVEncContext *const s = &w->msmpeg4.m.s;
52 PutBitContext pb;
53 int code;
54
55 init_put_bits(&pb, s->c.avctx->extradata, WMV2_EXTRADATA_SIZE);
56
57 put_bits(&pb, 5, s->c.avctx->time_base.den / s->c.avctx->time_base.num); // yes 29.97 -> 29
58 put_bits(&pb, 11, FFMIN(w->msmpeg4.m.bit_rate / 1024, 2047));
59
60 put_bits(&pb, 1, w->mspel_bit = 1);
61 put_bits(&pb, 1, s->loop_filter);
62 put_bits(&pb, 1, w->abt_flag = 1);
63 put_bits(&pb, 1, w->j_type_bit = 1);
64 put_bits(&pb, 1, w->top_left_mv_flag = 0);
65 put_bits(&pb, 1, w->per_mb_rl_bit = 1);
66 put_bits(&pb, 3, code = 1);
67
68 flush_put_bits(&pb);
69
70 s->slice_height = s->c.mb_height / code;
71
72 return 0;
73}
74
75static int wmv2_encode_picture_header(MPVMainEncContext *const m)
76{

Callers 1

wmv2_encode_initFunction · 0.85

Calls 3

init_put_bitsFunction · 0.85
flush_put_bitsFunction · 0.85
put_bitsFunction · 0.70

Tested by

no test coverage detected