|
From: salsaman <sal...@gm...> - 2008-09-21 20:24:13
|
Hi,
sorry if this is posted twice, my original message seems to have not reached
the list.
could somebody please explain how yuv_mode of dv_decode_full_frame() works ?
I have the following code for example (for PAL), but it is crashing:
uint8_t fbuffer[144000];
int frame=1;
size_t bytes=144000;
int rowstrides[3];
if (cdata.palette==YUV420) {
rowstrides[0]=720;
rowstrides[1]=360;
rowstrides[2]=360;
}
else {
rowstrides[0]=cdata.width*6; // YUV411 - 6 bytes per pixel
}
lseek(fd,bytes,SEEK_SET);
if (read (fd, fbuffer, 144000) < 144000) return FALSE;
dv_parse_header(dv_dec, fbuffer);
//dv_parse_packs(dv_dec, fbuffer);
dv_decode_full_frame(dv_dec,fbuffer,e_dv_color_yuv,(uint8_t
**)pixel_data,rowstrides);
Here pixel_data is an array of pointers to the Y,U, and V planes for YUV420.
Also, do I need the dv_parse_header() and/or dv_parse_packs() ?
Regards,
Salsaman.
http://lives.sourceforge.net
|