changeset 5899:a79f46ea2a6a

8bpp raw avi support
author arpi
date Mon, 29 Apr 2002 16:03:37 +0000
parents 31202ff6fb3d
children 3e51d5f6d624
files libmpcodecs/vd_raw.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_raw.c	Mon Apr 29 15:57:22 2002 +0000
+++ b/libmpcodecs/vd_raw.c	Mon Apr 29 16:03:37 2002 +0000
@@ -32,6 +32,7 @@
     // set format fourcc for raw RGB:
     if(sh->format==0){
 	switch(sh->bih->biBitCount){
+	case 8:  sh->format=IMGFMT_BGR8; break;
 	case 15: 
 	case 16: sh->format=IMGFMT_BGR15; break;
 	case 24: sh->format=IMGFMT_BGR24; break;
@@ -72,6 +73,10 @@
     } else {
 	mpi->planes[0]=data;
 	mpi->stride[0]=mpi->width*(mpi->bpp/8);
+	if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){
+	    // export palette:
+	    mpi->planes[1]=((unsigned char*)&sh->bih)+40;
+	}
     }
     
     return mpi;