changeset 1948:e0cc7b7290ec

native codec 'rle' added
author arpi
date Mon, 24 Sep 2001 20:21:53 +0000
parents 06d9db9be752
children 5ceb384bf163
files Makefile codec-cfg.c codec-cfg.h dec_video.c
diffstat 4 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Sep 24 18:35:46 2001 +0000
+++ b/Makefile	Mon Sep 24 20:21:53 2001 +0000
@@ -16,7 +16,7 @@
 #prefix = /usr/local
 BINDIR = ${prefix}/bin
 # BINDIR = /usr/local/bin
-SRCS = mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demux_mov.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
+SRCS = mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demux_mov.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
 OBJS = $(SRCS:.c=.o)
 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
--- a/codec-cfg.c	Mon Sep 24 18:35:46 2001 +0000
+++ b/codec-cfg.c	Mon Sep 24 20:21:53 2001 +0000
@@ -221,6 +221,7 @@
 		"vfwex",
 		"divx4",
 		"raw",
+		"rle",
 		NULL
 	};
         char **drv=audioflag?audiodrv:videodrv;
--- a/codec-cfg.h	Mon Sep 24 18:35:46 2001 +0000
+++ b/codec-cfg.h	Mon Sep 24 20:21:53 2001 +0000
@@ -38,6 +38,7 @@
 #define VFM_VFWEX 6
 #define VFM_DIVX4 7
 #define VFM_RAW 8
+#define VFM_RLE 9
 
 #ifndef GUID_TYPE
 #define GUID_TYPE
--- a/dec_video.c	Mon Sep 24 18:35:46 2001 +0000
+++ b/dec_video.c	Mon Sep 24 20:21:53 2001 +0000
@@ -62,6 +62,9 @@
 #include <decore.h>
 #endif
 
+void AVI_Decode_RLE8(char *image,char *delta,int tdsize,
+    unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel);
+
 //**************************************************************************//
 //             The OpenDivX stuff:
 //**************************************************************************//
@@ -351,6 +354,11 @@
  case VFM_RAW: {
    break;
  }
+ case VFM_RLE: {
+   int bpp=((out_fmt&255)+7)/8; // RGB only
+   sh_video->our_out_buffer = memalign(64,sh_video->disp_w*sh_video->disp_h*bpp); // FIXME!!!
+   break;
+ }
 }
   sh_video->inited=1;
   return 1;
@@ -552,6 +560,14 @@
     planes[0]=start;
     blit_frame=2;
     break;
+  case VFM_RLE:
+//void AVI_Decode_RLE8(char *image,char *delta,int tdsize,
+//    unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel);
+    AVI_Decode_RLE8(sh_video->our_out_buffer,start,in_size, 
+       (int*)(((char*)sh_video->bih)+40),
+      sh_video->disp_w,sh_video->disp_h,((out_fmt&255)+7)/8);
+    blit_frame=3;
+    break;
 } // switch
 //------------------------ frame decoded. --------------------