From a273bbfb0364faf56c8c58ce726beb94d824ffce Mon Sep 17 00:00:00 2001
From: Roberto Togni <r_togni@tiscali.it>
Date: Mon, 12 Jan 2004 22:14:45 +0000
Subject: [PATCH] MSZH and ZLIB decoder support Experimental ZLIB encoder (not
 working yet)

Originally committed as revision 2693 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 doc/ffmpeg-doc.texi    | 2 ++
 libavcodec/Makefile    | 2 +-
 libavcodec/allcodecs.c | 3 +++
 libavcodec/avcodec.h   | 5 +++++
 libavformat/avienc.c   | 2 ++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/doc/ffmpeg-doc.texi b/doc/ffmpeg-doc.texi
index c63d0193417..c25b3f3cd1c 100644
--- a/doc/ffmpeg-doc.texi
+++ b/doc/ffmpeg-doc.texi
@@ -726,6 +726,8 @@ following image formats are supported:
 @item FLIC video             @tab     @tab  X
 @item Duck TrueMotion v1     @tab     @tab  X @tab fourcc: DUCK
 @item VMD Video              @tab     @tab  X @tab used in Sierra VMD files
+@item MSZH                   @tab     @tab  X @tab Part of LCL
+@item ZLIB                   @tab  X  @tab  X @tab Part of LCL, encoder experimental
 @end multitable
 
 @code{X} means that the encoding (resp. decoding) is supported.
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index e4b216ee038..c07cd4d574e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -19,7 +19,7 @@ OBJS= common.o utils.o mem.o allcodecs.o \
       vp3.o asv1.o 4xm.o cabac.o ffv1.o ra144.o ra288.o vcr1.o cljr.o \
       roqvideo.o dpcm.o interplayvideo.o xan.o rpza.o cinepak.o msrle.o \
       msvideo1.o vqavideo.o idcinvideo.o adx.o rational.o faandct.o 8bps.o \
-      smc.o parser.o flicvideo.o truemotion1.o vmdav.o
+      smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o
 
 ifeq ($(AMR_NB),yes)
 ifeq ($(AMR_NB_FIXED),yes)
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 56b1ef82b71..b71db053085 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -73,6 +73,7 @@ void avcodec_register_all(void)
     register_avcodec(&asv1_encoder);
     register_avcodec(&asv2_encoder);
     register_avcodec(&ffv1_encoder);
+    register_avcodec(&zlib_encoder);
 #endif /* CONFIG_ENCODERS */
     register_avcodec(&rawvideo_encoder);
     register_avcodec(&rawvideo_decoder);
@@ -142,6 +143,8 @@ void avcodec_register_all(void)
     register_avcodec(&truemotion1_decoder);
     register_avcodec(&vmdvideo_decoder);
     register_avcodec(&vmdaudio_decoder);
+    register_avcodec(&mszh_decoder);
+    register_avcodec(&zlib_decoder);
 #ifdef CONFIG_AC3
     register_avcodec(&ac3_decoder);
 #endif
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3fd4e17d72b..b58bfc266d0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -91,6 +91,8 @@ enum CodecID {
     CODEC_ID_TRUEMOTION1,
     CODEC_ID_VMDVIDEO,
     CODEC_ID_VMDAUDIO,
+    CODEC_ID_MSZH,
+    CODEC_ID_ZLIB,
 
     /* various pcm "codecs" */
     CODEC_ID_PCM_S16LE,
@@ -1624,6 +1626,7 @@ extern AVCodec asv2_encoder;
 extern AVCodec vcr1_encoder;
 extern AVCodec ffv1_encoder;
 extern AVCodec mdec_encoder;
+extern AVCodec zlib_encoder;
 
 extern AVCodec h263_decoder;
 extern AVCodec mpeg4_decoder;
@@ -1687,6 +1690,8 @@ extern AVCodec flic_decoder;
 extern AVCodec vmdvideo_decoder;
 extern AVCodec vmdaudio_decoder;
 extern AVCodec truemotion1_decoder;
+extern AVCodec mszh_decoder;
+extern AVCodec zlib_decoder;
 extern AVCodec ra_144_decoder;
 extern AVCodec ra_288_decoder;
 extern AVCodec roq_dpcm_decoder;
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index eaf5554bb68..214445534ed 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -155,6 +155,8 @@ const CodecTag codec_bmp_tags[] = {
     { CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
     { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
     { CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
+    { CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
+    { CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
     { 0, 0 },
 };
 
-- 
GitLab