[vlc-devel] [PATCH v3] codec: jpeg encoder implemented
funman at videolan.org
Sat Feb 1 11:22:42 CET 2014
On 01/31/14 14:33, Maxim Bublis wrote:
>>> 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 /
> 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 *).
OK then, if it can be improved we can do it later anyway.
More information about the vlc-devel