diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-07-15 21:42:33 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-07-15 21:42:33 +0000 |
commit | 76e9bd86be57306fbf3bf607d68f9f38c04b4691 (patch) | |
tree | d66dc0bb9e7653dce6ed1b38bc3c08841c61e521 /src/libxinevdec/yuv.c | |
parent | fbb014bfa86dd9183d53d9f2e81ac5abfa75246c (diff) | |
download | xine-lib-76e9bd86be57306fbf3bf607d68f9f38c04b4691.tar.gz xine-lib-76e9bd86be57306fbf3bf607d68f9f38c04b4691.tar.bz2 |
Add 'pitch' support to video decoders (pitch != width)
CVS patchset: 2282
CVS date: 2002/07/15 21:42:33
Diffstat (limited to 'src/libxinevdec/yuv.c')
-rw-r--r-- | src/libxinevdec/yuv.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c index 70a383adf..05eba1207 100644 --- a/src/libxinevdec/yuv.c +++ b/src/libxinevdec/yuv.c @@ -21,7 +21,7 @@ * Actually, this decoder just reorganizes chunks of raw YUV data in such * a way that xine can display them. * - * $Id: yuv.c,v 1.1 2002/07/15 00:56:12 tmmm Exp $ + * $Id: yuv.c,v 1.2 2002/07/15 21:42:34 esnel Exp $ */ #include <stdio.h> @@ -196,24 +196,21 @@ static void yuv_decode_data (video_decoder_t *this_gen, img->pts = buf->pts; img->bad_frame = 0; -/* if (img->copy) { - - int height = abs(this->biHeight); - int stride = this->biWidth; - uint8_t* src[3]; - - src[0] = img->base[0]; - src[1] = img->base[1]; - src[2] = img->base[2]; - while ((height -= 16) >= 0) { - img->copy(img, src); - src[0] += 16 * stride; - src[1] += 4 * stride; - src[2] += 4 * stride; - } + int height = img->height; + uint8_t *src[3]; + + src[0] = img->base[0]; + src[1] = img->base[1]; + src[2] = img->base[2]; + + while ((height -= 16) >= 0) { + img->copy(img, src); + src[0] += 16 * img->pitches[0]; + src[1] += 8 * img->pitches[1]; + src[2] += 8 * img->pitches[2]; + } } -*/ img->draw(img); img->free(img); |