Lines Matching refs:cnt
67 int cnt = x & mask;
68 if (!cnt) {
70 if (cnt >= INT_MAX - 1000) {
74 cnt += 255;
76 cnt += mask + x;
78 return cnt;
83 * @param cnt number of bytes to copy, must be >= 0
85 static inline void copy(LZOContext *c, int cnt)
89 av_assert0(cnt >= 0);
90 if (cnt > c->in_end - src) {
91 cnt = FFMAX(c->in_end - src, 0);
94 if (cnt > c->out_end - dst) {
95 cnt = FFMAX(c->out_end - dst, 0);
102 cnt -= 4;
103 if (cnt > 0)
105 memcpy(dst, src, cnt);
106 c->in = src + cnt;
107 c->out = dst + cnt;
113 * @param cnt number of bytes to copy, must be > 0
115 * cnt > back is valid, this will copy the bytes we just copied,
118 static inline void copy_backptr(LZOContext *c, int back, int cnt)
121 av_assert0(cnt > 0);
126 if (cnt > c->out_end - dst) {
127 cnt = FFMAX(c->out_end - dst, 0);
130 av_memcpy_backptr(dst, back, cnt);
131 c->out = dst + cnt;
162 int cnt, back;
165 cnt = (x >> 5) - 1;
168 cnt = get_len(&c, x, 31);
172 cnt = get_len(&c, x, 7);
177 if (cnt != 1)
183 cnt = get_len(&c, x, 15);
184 copy(&c, cnt + 3);
188 cnt = 1;
191 cnt = 0;
194 copy_backptr(&c, back, cnt + 2);
196 cnt = x & 3;
197 copy(&c, cnt);