[vlc-devel] [PATCH v3] codec: jpeg encoder implemented

Maxim Bublis b at codemonkey.ru
Fri Jan 31 14:33:03 CET 2014


> > Maybe you could advice me how to do that without additional allocations.
> > JSAMPARRAY is a 3-dimensional array, top index is color component. Each
> > element is a JSAMPARRAY - 2-dimensional array of row pointers.
> > We are having p_pic->p[i].p_pixels, which is a plane array of pixels for
> > each color component.
>
>
> Something like:
>
> p_row_pointers[i] = &p_pic->p[i].p_pixels[p_pic->p[i].i_pitch *
> p_jpeg.next_scanline * p_jpeg.comp_info[i].v_samp_factor /
> p_jpeg.max_v_samp_factor];
>
> ?


Not, it is not correct.
p_row_pointers[i] is JSAMPARRAY (aka unsigned char
**), &p_pic->p[i].p_pixels[idx] is uint8_t * (aka unsigned char *).

-- 
Maxim Bublis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140131/91562f43/attachment.html>


More information about the vlc-devel mailing list