summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/mpegplay/decoderClass.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/lib/mpegplay/decoderClass.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/lib/mpegplay/decoderClass.h')
-rw-r--r--mpeglib/lib/mpegplay/decoderClass.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/mpeglib/lib/mpegplay/decoderClass.h b/mpeglib/lib/mpegplay/decoderClass.h
new file mode 100644
index 00000000..2e969edc
--- /dev/null
+++ b/mpeglib/lib/mpegplay/decoderClass.h
@@ -0,0 +1,96 @@
+/*
+ class for decoders
+ Copyright (C) 1999 Martin Vogt
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation.
+
+ For more information look at the file COPYRIGHT in this package
+
+ */
+
+
+#ifndef __DECODERCLASS_H
+#define __DECODERCLASS_H
+
+
+
+#include "videoDecoder.h"
+#include "mpegVideoStream.h"
+#include "decoderTables.h"
+#include "slice.h"
+#include "proto.h"
+#include "../util/mmx/mmx.h"
+#include "mmxidct.h"
+#include "picture.h"
+
+/* Special values for DCT Coefficients */
+#define END_OF_BLOCK 62
+#define ESCAPE 61
+
+
+/* DCT coeff tables. */
+#define RUN_MASK 0xfc00
+#define LEVEL_MASK 0x03f0
+#define NUM_MASK 0x000f
+#define RUN_SHIFT 10
+#define LEVEL_SHIFT 4
+#define RUNTYPE char
+
+class DecoderClass {
+
+ int lmmx;
+ int zigzag_direct[256];
+
+ /* Block structure. */
+
+ short int dct_recon[8][8]; /* Reconstructed dct coeff matrix. */
+ int dct_dc_y_past; /* Past lum. dc dct coefficient. */
+ int dct_dc_cr_past; /* Past cr dc dct coefficient. */
+ int dct_dc_cb_past; /* Past cb dc dct coefficient. */
+ short int *reconptr; /* reconptr = dct_recon[0]; */
+
+ class VideoDecoder* vid_stream;
+ class MpegVideoStream* mpegVideoStream;
+ public:
+ DecoderClass(class VideoDecoder* vid_stream,
+ class MpegVideoStream* mpegVideoStream);
+ ~DecoderClass();
+ int decodeDCTDCSizeLum();
+ int decodeDCTDCSizeChrom();
+ int decodeMotionVectors();
+ int decodeCBP();
+
+ inline short int* getDCT() { return ((short int*) &(dct_recon[0][0]));}
+ void resetDCT();
+
+ void decodeMBTypeB(int& quant,int& motion_fwd,
+ int& motion_bwd,int& pat,int& intra);
+
+ void decodeMBTypeI(int& quant,int& motion_fwd,
+ int& motion_bwd,int& pat,int& intra);
+
+ void decodeMBTypeP(int& quant,int& motion_fwd,
+ int& motion_bwd,int& pat,int& intra);
+
+ void ParseReconBlock(int& n,int& mb_intra,unsigned int& quant_scale,
+ int& lflag,
+ unsigned int* iqmatrixptr,
+ unsigned int* niqmatrixptr);
+ int decodeMBAddrInc();
+
+
+ void print();
+
+ private:
+
+
+ inline void decodeDCTCoeff(unsigned short int* dct_coeff_tbl,
+ unsigned RUNTYPE& run,
+ int& level);
+
+
+
+};
+#endif