|
From: Christoph S. <ch...@ne...> - 2001-04-18 15:44:46
|
Hello,
My first e-mail about my PAL -> YUV 4:2:0 conversion problems with libdv-0.7
was probably a little cryptic.
This is the kind of code I use to decode the DV frame:
static dv_decoder_t *decoder;
guint16 pitches[3];
unsigned char *frame[3]
static unsigned char dv_data[512*1024];
...
allocate memory for frame
...
decoder = dv_decoder_new();
dv_init();
decoder->quality = DV_QUALITY_BEST;
...
read dv_data from AVI file
...
dv_parse_header(decoder, dv_data);
switch(decoder->sampling) {
case e_dv_sample_420:
pitches[0] = decoder->width;
pitches[1] = decoder->width / 2;
pitches[2] = decoder->width / 2;
res = dv_decode_full_frame(decoder, dv_data, e_dv_color_yuv,
(guchar **) frame, pitches);
break;
default:
break;
}
I also prepared two 5 second MPEG-1 sequences (VCD compatible video streams)
that show the correct output using RGB decoding of the DV data (through
dv2jpg) and the result I get using YUV decoding or Xv output in kino-0.4. The
files are about 700K each and you can download them from
http://markov.chem.rochester.edu/chris/dv_tst.mpg
http://markov.chem.rochester.edu/chris/dv_tst_correct.mpg
The setup I am using is Debian woody and XFree 4.0.2 with the Xv patch from
Gatos for my r128 video card (Xpert2000).
Thanks in advance,
Christoph
------------------------------------------------------------------------------
Christoph Scheurer e-mail: ch...@fe...
Department of Chemistry WWW: http://markov.chem.rochester.edu/chris
University of Rochester
P.O. Box RC 270216 phone: +1-716-275-8289
Rochester, NY 14627-0216 +1-716-242-0989 (private)
USA Fax: +1-716-473-6889
------------------------------------------------------------------------------
GnuPG public key: http://markov.chem.rochester.edu/chris/key.html
|