28 int sps = 0, pps = 0,
idr = 0, res = 0, sli = 0;
32 code = (code << 8) + p->
buf[i];
33 if ((code & 0xffffff00) == 0x100) {
34 int ref_idc = (code >> 5) & 3;
35 int type = code & 0x1F;
36 static const int8_t ref_zero[] = {
37 2, 0, 0, 0, 0, -1, 1, -1,
38 -1, 1, 1, 1, 1, -1, 2, 2,
39 2, 2, 2, 0, 2, 2, 2, 2,
40 2, 2, 2, 2, 2, 2, 2, 2
46 if (ref_zero[type] == 1 && ref_idc)
48 if (ref_zero[type] == -1 && !ref_idc)
50 if (ref_zero[type] == 2)
61 if (p->
buf[i + 2] & 0x03)
72 if (sps && pps && (
idr || sli > 3) && res < (sps + pps +
idr))