[vlc-devel] [vlc-commits] commit: vmem: By default keep the original image aspect ratio. (Pierre d' Herbemont )
fenrir at elivagar.org
Sun Oct 31 14:16:24 CET 2010
On Sun, Oct 31, 2010 at 02:05:00PM +0100, Pierre d'Herbemont wrote:
> >> - for (int i = 0; i < picture->i_planes; i++)
> >> - picture->p[i].p_pixels = planes[i];
> >> + const int y = sys->place.y;
> >> + const int x = sys->place.x;
> >> + const int pitch = sys->vmem_pitch;
> >> + const int bbp = pitch / sys->vmem_width;
> > This is wrong, the pitch is not a multiple of the width.
> No. "vmem pitch" doesn't include any extra trailer bytes.
Yes it can, the module handle it correctly. The only limitation is
that the same pitch is used for each plane.
> > Use picture->p[i].i_pixel_pitch instead.
> Nice shortcut. No idea this was even existing. Why don't we have bpp directly?
i_pixel_pitch is the number of bytes per pixel (per plane). So I don't understand
More information about the vlc-devel