summaryrefslogtreecommitdiffstats
path: root/tkmpeg/ezmpeg.h
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-01-07 19:25:36 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-01-07 19:25:36 (GMT)
commit0dd09186b4455ddd6c9dc09a2e27ea961a185784 (patch)
treeadf3d70e88fa5c4e6584c2b7dcc65c56f019759c /tkmpeg/ezmpeg.h
parent3eacbfa27772fd77d216cfbbacd7aa029e55c195 (diff)
parent10406a56d77a2de05a7c1a59c5e8e0ff6b35a260 (diff)
downloadblt-0dd09186b4455ddd6c9dc09a2e27ea961a185784.zip
blt-0dd09186b4455ddd6c9dc09a2e27ea961a185784.tar.gz
blt-0dd09186b4455ddd6c9dc09a2e27ea961a185784.tar.bz2
Merge commit '10406a56d77a2de05a7c1a59c5e8e0ff6b35a260' as 'tkmpeg'
Diffstat (limited to 'tkmpeg/ezmpeg.h')
-rw-r--r--tkmpeg/ezmpeg.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/tkmpeg/ezmpeg.h b/tkmpeg/ezmpeg.h
new file mode 100644
index 0000000..47a5599
--- /dev/null
+++ b/tkmpeg/ezmpeg.h
@@ -0,0 +1,74 @@
+//This file is part of ezMPEG
+//Copyright (C)2002 Ingo Oppermann ( ingo_opp@users.sourceforge.net / http://sourceforge.net/projects/ezmpeg/ )
+//
+//This program is free software; you can redistribute it and/or
+//modify it under the terms of the GNU General Public License
+//as published by the Free Software Foundation; either
+//version 2 of the License, or (at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//GNU General Public License for more details.
+
+// Version 0.1
+
+typedef struct ezMPEGStream {
+ char *outfile;
+ FILE *out;
+ int hsize;
+ int vsize;
+ int picture_rate;
+ int gop_size;
+ int dc_prev[3];
+ double q_scale;
+
+ int picture_count;
+ int buffersize;
+ int buffercount;
+ char *buffer;
+ int buf;
+ int pos;
+
+ short error_code;
+ char error_msg[256];
+} ezMPEGStream;
+
+typedef struct Block {
+ float a[64];
+} Block;
+
+typedef struct Macroblock {
+ Block lum[4];
+ Block chrom[2];
+} Macroblock;
+
+// Prototypes
+// 'sichtbare' Funktionen. Nur diese 5 Funktionen werden direkt benutzt
+int ezMPEG_Init(ezMPEGStream *ms, const char *outfile, int hsize, int vsize, int picture_rate, int gop_size, int q_scale);
+int ezMPEG_Start(ezMPEGStream *ms);
+int ezMPEG_Add(ezMPEGStream *ms, unsigned char *picture);
+int ezMPEG_Finalize(ezMPEGStream *ms);
+void ezMPEG_Resize(ezMPEGStream *ms, unsigned char *outbild, unsigned char *inbild, int x, int y, int u, int v);
+char *ezMPEG_GetLastError(ezMPEGStream *ms);
+
+// 'unsichtbare' Funktionen
+void ezMPEG_InitBitBuffer(ezMPEGStream *ms);
+void ezMPEG_ByteAlign(ezMPEGStream *ms);
+int ezMPEG_WriteBits(ezMPEGStream *ms, unsigned int value, int length);
+
+void ezMPEG_WriteSequenceHeader(ezMPEGStream *ms);
+void ezMPEG_WriteGOPHeader(ezMPEGStream *ms);
+void ezMPEG_WritePictureHeader(ezMPEGStream *ms);
+
+Macroblock ezMPEG_GetMacroblock(ezMPEGStream *ms, unsigned char *picture, int number);
+Macroblock ezMPEG_QuantizeMacroblock(ezMPEGStream *ms, Macroblock mb);
+void ezMPEG_WriteMacroblock(ezMPEGStream *ms, Macroblock mb);
+
+float ezMPEG_1DFDCT(float *v, int i);
+
+void ezMPEG_EncodeDC(ezMPEGStream *ms, int dc_diff, int type);
+void ezMPEG_EncodeAC(ezMPEGStream *ms, int runlength, int level);
+
+void ezMPEG_FlushBuffer(ezMPEGStream *ms);
+void ezMPEG_SetError(ezMPEGStream *ms, const char *error_msg);