MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_bitvec_add_bits

Function hb_bitvec_add_bits

libhb/muxcommon.c:68–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67
68static int hb_bitvec_add_bits(hb_bitvec_t *bv, int bits)
69{
70 int ii;
71 int words_cur = (bv->size + 31) >> 5;
72 int words = (bv->size + bits + 31) >> 5;
73 if (words > words_cur)
74 {
75 uint32_t *tmp = realloc(bv->vec, words * sizeof(uint32_t));
76 if (tmp == NULL)
77 {
78 return -1;
79 }
80 for (ii = words_cur; ii < words; ii++)
81 tmp[ii] = 0;
82 bv->vec = tmp;
83 }
84 bv->size += bits;
85 return 0;
86}
87
88static hb_bitvec_t* hb_bitvec_new(int size)
89{

Callers 2

hb_bitvec_newFunction · 0.85
hb_bitvec_cpyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected