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/libw32dll/w32codec.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/libw32dll/w32codec.c')
-rw-r--r-- | src/libw32dll/w32codec.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index df54f12da..8f157d693 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: w32codec.c,v 1.87 2002/07/10 05:44:09 pmhahn Exp $ + * $Id: w32codec.c,v 1.88 2002/07/15 21:42:33 esnel Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -779,7 +779,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { uint16_t *pixel, *out; pixel = (uint16_t *) ( (uint8_t *)this->img_buffer + 2 * row * this->o_bih.biWidth ); - out = (uint16_t *) (img->base[0] + 2 * row * this->o_bih.biWidth ); + out = (uint16_t *) (img->base[0] + row * img->pitches[0] ); for (col=0; col<this->o_bih.biWidth; col++, pixel++, out++) { @@ -838,14 +838,13 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { if (img->copy && !this->skipframes) { int height = abs(this->o_bih.biHeight); - int stride = this->o_bih.biWidth; - uint8_t* src[3]; - + uint8_t *src[3]; + src[0] = img->base[0]; - + while ((height -= 16) >= 0) { img->copy(img, src); - src[0] += 32 * stride; + src[0] += 16 * img->pitches[0]; } } |