| 818 | } |
| 819 | |
| 820 | void hb_buffer_init_planes(hb_buffer_t * b) |
| 821 | { |
| 822 | uint8_t * data = b->data; |
| 823 | int pp; |
| 824 | |
| 825 | for( pp = 0; pp <= b->f.max_plane; pp++ ) |
| 826 | { |
| 827 | b->plane[pp].data = data; |
| 828 | b->plane[pp].stride = hb_image_stride(b->f.fmt, b->f.width, pp); |
| 829 | b->plane[pp].width = hb_image_width(b->f.fmt, b->f.width, pp); |
| 830 | b->plane[pp].height = hb_image_height(b->f.fmt, b->f.height, pp); |
| 831 | b->plane[pp].size = b->plane[pp].stride * |
| 832 | b->plane[pp].height; |
| 833 | data += b->plane[pp].size; |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | // this routine gets a buffer for an uncompressed picture |
| 838 | // with pixel format pix_fmt and dimensions width x height. |
no test coverage detected