MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_buffer_init_planes

Function hb_buffer_init_planes

libhb/fifo.c:820–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818}
819
820void 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.

Callers 4

hb_buffer_dupFunction · 0.85
hb_buffer_copyFunction · 0.85
hb_frame_buffer_initFunction · 0.85
hb_video_buffer_reallocFunction · 0.85

Calls 3

hb_image_strideFunction · 0.85
hb_image_widthFunction · 0.85
hb_image_heightFunction · 0.85

Tested by

no test coverage detected