From 25808e78f899f0b119c7aaeae4895ec2cb54423b Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Mon, 15 Oct 2001 16:13:23 +0000 Subject: Harm van der Heijden's divx4 decoder patch for XShm video_out (no visible video unless XShm's slice copy method is called, which contains the yuv2rgb conversion) CVS patchset: 817 CVS date: 2001/10/15 16:13:23 --- src/libdivx4/xine_decoder.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 752c9beef..f0d2d95c7 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/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.2 2001/10/14 00:43:06 guenter Exp $ + * $Id: xine_decoder.c,v 1.3 2001/10/15 16:13:23 jkeil Exp $ * * xine decoder plugin using divx4 * @@ -287,6 +287,26 @@ static void divx4_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { } } + /* more video-out voodoo: + some sort of copy operation, looks like. Straight from the ffmpeg + plugin. The XShm driver seems to need it, the Xv one does not. */ + if (img->copy && img->bad_frame == 0) { + 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; + } + } + + /* this again from ffmpeg plugin */ img->PTS = buf->PTS; img->draw(img); -- cgit v1.2.3