[AG-TECH] YUV411 (and 422) to RGB in VIC
Sam Gundry
sgundry at vpac.org
Wed Feb 7 00:08:18 CST 2007
Hi,
I wish to write the image data from VIC to shared memory. However, I
would like this to be in RGB format beforehand.
At the moment, I copy the image data during the Decoder::render_frame()
function (in ./codec/decoder.cpp). After the line: YuvFrame f(now_,
(u_int8_t*)frm, rvts_, inw_, inh_), I write to the shared memory, say,
like this: setMemory(f.bp_).
Before I write to memory, I would like to convert f.bp_ which is either
in YUV411 or YUV422 format (I am restricting myself to these at the
moment), to RGB. I've noticed that ./render/rgb-converter.cpp might have
some relevant conversion functions but have not been able to figure it
out...
I have considered converting the data directly myself, however, after
some attempts, I haven't been successful. I have managed to display a
black & white image (the Y component?) but when I try to get color (the
UV parts), it all goes pear shaped.
I was wondering if somebody knows the format of the YUV411 and YUV422 in
VIC? I have tried to convert YUV411 from uYYvYY and YUV422 from uYvY to
no avail. Are these the correct formats (and consequently, my conversion
is all mucked up)?
When I write the image data out to a RAW file, a YUV viewer program can
open the file successfully.
I appreciate any advice/suggestions.
Regards,
Sam
--
Centre for Computational Prototyping
Victorian Partnership for Advanced Computing
www.vpac.org
More information about the ag-tech
mailing list