Lines Matching refs:cnt
69 int cnt = x & mask;
70 if (!cnt) {
72 if (cnt >= INT_MAX - 1000) {
76 cnt += 255;
78 cnt += mask + x;
80 return cnt;
85 * @param cnt number of bytes to copy, must be >= 0
87 static inline void copy(LZOContext *c, int cnt)
91 av_assert0(cnt >= 0);
92 if (cnt > c->in_end - src) {
93 cnt = FFMAX(c->in_end - src, 0);
96 if (cnt > c->out_end - dst) {
97 cnt = FFMAX(c->out_end - dst, 0);
104 cnt -= 4;
105 if (cnt > 0)
107 memcpy(dst, src, cnt);
108 c->in = src + cnt;
109 c->out = dst + cnt;
115 * @param cnt number of bytes to copy, must be > 0
117 * cnt > back is valid, this will copy the bytes we just copied,
120 static inline void copy_backptr(LZOContext *c, int back, int cnt)
123 av_assert0(cnt > 0);
128 if (cnt > c->out_end - dst) {
129 cnt = FFMAX(c->out_end - dst, 0);
132 av_memcpy_backptr(dst, back, cnt);
133 c->out = dst + cnt;
164 int cnt, back;
167 cnt = (x >> 5) - 1;
170 cnt = get_len(&c, x, 31);
174 cnt = get_len(&c, x, 7);
179 if (cnt != 1)
185 cnt = get_len(&c, x, 15);
186 copy(&c, cnt + 3);
190 cnt = 1;
193 cnt = 0;
196 copy_backptr(&c, back, cnt + 2);
198 cnt = x & 3;
199 copy(&c, cnt);