summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwald Snel <esnel@users.sourceforge.net>2002-06-03 17:31:29 +0000
committerEwald Snel <esnel@users.sourceforge.net>2002-06-03 17:31:29 +0000
commit1957406c11532f8181c1f029714ffaee68635e82 (patch)
tree5524dc09b90c14673360317a44ec3a43284c49a1
parent243192ad422158528aef4105278e7046517cf9d7 (diff)
downloadxine-lib-1957406c11532f8181c1f029714ffaee68635e82.tar.gz
xine-lib-1957406c11532f8181c1f029714ffaee68635e82.tar.bz2
Fix msvc decoder (add img->copy for XShm driver)
Update msvc and cinepak to new xine_bmiheader format CVS patchset: 2000 CVS date: 2002/06/03 17:31:29
-rw-r--r--src/libxinevdec/cinepak.c6
-rw-r--r--src/libxinevdec/msvc.c21
2 files changed, 20 insertions, 7 deletions
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index b8c55ac01..fedadeb70 100644
--- a/src/libxinevdec/cinepak.c
+++ b/src/libxinevdec/cinepak.c
@@ -22,7 +22,7 @@
* based on overview of Cinepak algorithm and example decoder
* by Tim Ferguson: http://www.csse.monash.edu.au/~timf/
*
- * $Id: cinepak.c,v 1.6 2002/06/03 13:31:12 miguelfreitas Exp $
+ * $Id: cinepak.c,v 1.7 2002/06/03 17:31:29 esnel Exp $
*/
#include <stdlib.h>
@@ -312,8 +312,8 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_bmiheader *bih;
bih = (xine_bmiheader *) buf->content;
- this->biWidth = (le2me_32 (bih->biWidth) + 3) & ~0x03;
- this->biHeight = (le2me_32 (bih->biHeight) + 3) & ~0x03;
+ this->biWidth = (bih->biWidth + 3) & ~0x03;
+ this->biHeight = (bih->biHeight + 3) & ~0x03;
this->video_step = buf->decoder_info[1];
if (this->img_buffer)
diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c
index f072cd16d..a592ce2d5 100644
--- a/src/libxinevdec/msvc.c
+++ b/src/libxinevdec/msvc.c
@@ -22,7 +22,7 @@
* based on overview of Microsoft Video-1 algorithm
* by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt
*
- * $Id: msvc.c,v 1.4 2002/06/03 13:31:12 miguelfreitas Exp $
+ * $Id: msvc.c,v 1.5 2002/06/03 17:31:29 esnel Exp $
*/
#include <stdlib.h>
@@ -210,9 +210,9 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_bmiheader *bih;
bih = (xine_bmiheader *) buf->content;
- this->biWidth = (le2me_32 (bih->biWidth) + 3) & ~0x03;
- this->biHeight = (le2me_32 (bih->biHeight) + 3) & ~0x03;
- this->biBitCount = le2me_32 (bih->biBitCount);
+ this->biWidth = (bih->biWidth + 3) & ~0x03;
+ this->biHeight = (bih->biHeight + 3) & ~0x03;
+ this->biBitCount = bih->biBitCount;
this->video_step = buf->decoder_info[1];
if (this->biBitCount != 8 && this->biBitCount != 16) {
@@ -271,6 +271,19 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_fast_memcpy (img->base[0], this->img_buffer, (n << 1));
+ if (img->copy) {
+ int height = abs(this->biHeight);
+ int stride = this->biWidth;
+ uint8_t* src[3];
+
+ src[0] = img->base[0];
+
+ while ((height -= 16) >= 0) {
+ img->copy(img, src);
+ src[0] += 32 * stride;
+ }
+ }
+
img->draw(img);
img->free(img);