Lines Matching refs:offset_w
39 size_t offset_r, offset_w;
40 // distinguishes the ambiguous situation offset_r == offset_w
89 if (f->offset_w <= f->offset_r && !f->is_empty)
90 return f->nb_elems - f->offset_r + f->offset_w;
91 return f->offset_w - f->offset_r;
113 if (f->offset_w <= f->offset_r && !f->is_empty) {
114 const size_t copy = FFMIN(inc, f->offset_w);
116 if (copy < f->offset_w) {
118 (f->offset_w - copy) * f->elem_size);
119 f->offset_w -= copy;
121 f->offset_w = copy == inc ? 0 : f->nb_elems + copy;
153 size_t offset_w;
160 offset_w = f->offset_w;
163 size_t len = FFMIN(f->nb_elems - offset_w, to_write);
164 uint8_t *wptr = f->buffer + offset_w * f->elem_size;
174 offset_w += len;
175 if (offset_w >= f->nb_elems)
176 offset_w = 0;
179 f->offset_w = offset_w;
282 f->offset_r = f->offset_w = 0;
367 size_t offset_w = f->wptr - f->buffer;
377 if (offset_w <= offset_r && av_fifo_size(f)) {
378 const size_t copy = FFMIN(new_size - old_size, offset_w);
380 if (copy < offset_w) {
381 memmove(tmp, tmp + copy , offset_w - copy);
382 offset_w -= copy;
384 offset_w = old_size + copy;
390 f->wptr = f->buffer + offset_w;