41 for (p = 0; p < a->
planes; p++) {
43 while ((intptr_t)a->
data[p] % cur_align)
45 if (cur_align < min_align)
46 min_align = cur_align;
67 int read_only,
const char *
name)
71 memset(a, 0,
sizeof(*a));
88 for (p = 0; p < (a->
is_planar ? channels : 1); p++) {
102 a->
name = name ? name :
"{no name}";
138 a->
name = name ? name :
"{no name}";
140 if (nb_samples > 0) {
155 int ret, new_buf_size, plane_size, p;
168 if (new_buf_size < 0)
182 for (p = 0; p < a->
planes; p++)
186 memcpy(a->
data, new_data,
sizeof(new_data));
243 for (p = 0; p < src->
planes; p++) {
250 for (p = 0; p < src->
planes; p++) {
260 for (p = 0; p < src->
planes; p++)
272 int ret, p, dst_offset2, dst_move_size;
281 if (dst_offset < 0 || dst_offset > dst->
nb_samples ||
282 src_offset < 0 || src_offset > src->
nb_samples) {
284 src_offset, dst_offset);
289 if (nb_samples > src->
nb_samples - src_offset)
310 for (p = 0; p < src->
planes; p++) {
311 if (dst_move_size > 0) {
312 memmove(dst->
data[p] + dst_offset2 * dst->
stride,
314 dst_move_size * dst->
stride);
316 memcpy(dst->
data[p] + dst_offset * dst->
stride,
318 nb_samples * src->
stride);
335 for (p = 0; p < a->
planes; p++)
336 memmove(a->
data[p], a->
data[p] + move_offset, move_size);
350 offset_size = offset * a->
stride;
351 for (p = 0; p < a->
planes; p++)
352 offset_data[p] = a->
data[p] + offset_size;