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/libffmpeg/xine_decoder.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/libffmpeg/xine_decoder.c')
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index e53823f4c..00445dcf8 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.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: xine_decoder.c,v 1.48 2002/07/15 19:43:16 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.49 2002/07/15 21:42:33 esnel Exp $ * * xine decoder plugin using ffmpeg * @@ -275,7 +275,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { xine_fast_memcpy (dy, sy, this->bih.biWidth); - dy += this->bih.biWidth; + dy += img->pitches[0]; sy += this->av_picture.linesize[0]; } @@ -310,8 +310,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { } - du += this->bih.biWidth/2; - dv += this->bih.biWidth/2; + du += img->pitches[1]; + dv += img->pitches[2]; if (this->context.pix_fmt != PIX_FMT_YUV420P) { su += 2*this->av_picture.linesize[1]; @@ -323,19 +323,18 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { } if (img->copy) { - - int height = abs(this->bih.biHeight); - int stride = this->bih.biWidth; - uint8_t* src[3]; - + 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 * stride; - src[1] += 4 * stride; - src[2] += 4 * stride; + src[0] += 16 * img->pitches[0]; + src[1] += 8 * img->pitches[1]; + src[2] += 8 * img->pitches[2]; } } } |