[Scummvm-cvs-logs] SF.net SVN: scummvm: [23038] tools/trunk/encode_dxa.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Jun 11 23:53:43 CEST 2006


Revision: 23038
Author:   eriktorbjorn
Date:     2006-06-11 14:53:38 -0700 (Sun, 11 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23038&view=rev

Log Message:
-----------
Removed the USE_ZMBV code, to avoid confusion. It was added as an experiment,
but the compression rate was reportedly not an improvement over standard DXA.

Modified Paths:
--------------
    tools/trunk/encode_dxa.cpp
Modified: tools/trunk/encode_dxa.cpp
===================================================================
--- tools/trunk/encode_dxa.cpp	2006-06-11 21:43:09 UTC (rev 23037)
+++ tools/trunk/encode_dxa.cpp	2006-06-11 21:53:38 UTC (rev 23038)
@@ -35,12 +35,6 @@
 
 #define	 BUFFER_LEN	1024
 
-//#define USE_ZMBV
-
-#ifdef USE_ZMBV
-#include "zmbv.h"
-#endif
-
 static CompressMode gCompMode = kMP3Mode;
 
 class DxaEncoder {
@@ -49,13 +43,6 @@
 	int _width, _height, _framerate, _framecount;
 	uint8 *_prevframe, *_prevpalette;
 
-#ifdef USE_ZMBV
-	VideoCodec *_codec;
-
-	byte *_codecBuf;
-	int _codecBufSize;
-#endif
-
 public:
 	DxaEncoder(char *filename, int width, int height, int fps);
 	~DxaEncoder();
@@ -74,13 +61,6 @@
 	_prevpalette = new uint8[768];
 
 	writeHeader();
-
-#ifdef USE_ZMBV
-	_codec = new VideoCodec();
-	_codec->SetupCompress(width, height);
-	_codecBufSize = _codec->NeededSize(width, height, ZMBV_FORMAT_8BPP);
-	_codecBuf = (byte *)malloc(_codecBufSize);
-#endif
 }
 
 DxaEncoder::~DxaEncoder() {
@@ -122,19 +102,6 @@
 		writeNULL();
 	}
 
-#ifdef USE_ZMBV
-	uint8 cpalette[1024];
-
-	for (int i = 0; i < 256; i++) {
-		cpalette[i * 4 + 0] = palette[i * 3 + 0];
-		cpalette[i * 4 + 1] = palette[i * 3 + 1];
-		cpalette[i * 4 + 2] = palette[i * 3 + 2];
-		cpalette[i * 4 + 3] = 0;
-	}
-
-	_codec->PrepareCompressFrame(0, ZMBV_FORMAT_8BPP, (char *)cpalette, _codecBuf, _codecBufSize);
-#endif
-
 	if (_framecount == 0 || memcmp(_prevframe, frame, _width * _height)) {
 		//FRAM
 		uint8 compType;
@@ -146,9 +113,6 @@
 		else
 			compType = 3;
 
-#ifdef USE_ZMBV
-		compType = 10;
-#endif
 		switch (compType) {
 		case 2:
 			{
@@ -205,24 +169,6 @@
 
 				break;
 			}
-#ifdef USE_ZMBV
-		case 10:
-			{
-				int outsize;
-				void *ptr;
-
-				for (int i = 0; i < _height; i++) {
-					ptr = frame + i * _width;
-					_codec->CompressLines(1, &ptr);
-				}
-				outsize = _codec->FinishCompressFrame();
-
-				writeByte(_dxa, compType);
-				writeUint32BE(_dxa, outsize);
-				fwrite(_codecBuf, outsize, 1, _dxa);
-				break;
-			}
-#endif
 		}
 
 		memcpy(_prevframe, frame, _width * _height);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list