summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-24 20:21:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-24 20:21:53 +0000
commit9d4682c79006886dd3310b3b85b17eb45a1d2e5f (patch)
tree9720d336b3312447ad9185ae6bd44347513bf29d
parentbb7a39bf93208be4c2d4a46f3293eda50ad001a6 (diff)
downloadmpv-9d4682c79006886dd3310b3b85b17eb45a1d2e5f.tar.bz2
mpv-9d4682c79006886dd3310b3b85b17eb45a1d2e5f.tar.xz
native codec 'rle' added
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1949 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Makefile2
-rw-r--r--codec-cfg.c1
-rw-r--r--codec-cfg.h1
-rw-r--r--dec_video.c16
4 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9b5df60dd6..6645b88428 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ PRG_CFG = codec-cfg
#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)
diff --git a/codec-cfg.c b/codec-cfg.c
index cd98d82f4a..05320e02bc 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -221,6 +221,7 @@ static short get_driver(char *s,int audioflag)
"vfwex",
"divx4",
"raw",
+ "rle",
NULL
};
char **drv=audioflag?audiodrv:videodrv;
diff --git a/codec-cfg.h b/codec-cfg.h
index 959fdb6a74..9ade3e28c7 100644
--- a/codec-cfg.h
+++ b/codec-cfg.h
@@ -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
diff --git a/dec_video.c b/dec_video.c
index 13a3ad221b..333602e3ac 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -62,6 +62,9 @@ extern int init_video_codec(sh_video_t *sh_video,int ex);
#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 @@ switch(sh_video->codec->driver){
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 @@ else
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. --------------------