00001 // /// // Mx clientSDK 00002 // ///// //// Mx Crossplatform Client Library 00003 // /// XXX XXX /// 00004 // /// XXX XXX /// $RCSfile: mxcpcFramewiseMxPEGScanDecoder.h,v $ 00005 // /// XXX /// $Revision: 1.4 $ 00006 // /// XXX XXX /// $Date: 2005/12/20 16:41:55 $ 00007 // //// XXX XXX //// $Author: cvs-kai $ 00008 // //// //// 00009 // //// M O B O T I X //////////////////////////////////////////////// 00010 // //// Security Vision Systems ////////////////////////////////////////////// 00011 // // 00012 // Copyright (C) 2005 - 2006, MOBOTIX AG, Germany // 00013 // This software is made available under the BSD licence. Please refer // 00014 // to the file LICENCE.TXT contained in this distribution for details. // 00015 // // 00016 // ///////////////////////////////////////////////////////////////////// 00017 00018 00019 00020 #ifndef __MXCPC_FRAMEWISEMXPEGSCANDECODER_H__ 00021 #define __MXCPC_FRAMEWISEMXPEGSCANDECODER_H__ 00022 00023 00024 00025 #include <mxcpcFramewiseMxPEGDecoder.h> 00026 00027 00028 00029 class mxcpcMxPEGDecoderBackEnd; 00030 00031 00032 00033 //! The framewise (frame prefetching) approach to <tt>MxPEG</tt> decoding 00034 //! provided by mxcpcFramewiseMxPEGDecoder needs an actual implementation of a 00035 //! <i>scan decoder</i> doing the actual bitstream crunching. 00036 /*! 00037 * Various implementations exist, for example the 00038 * mxcpcFramewiseMxPEGScanDecoderIPP which makes use of Intel's <i>Performance 00039 * Primitives</i> library <i>(IPP)</i>. 00040 * 00041 * \ingroup mxcpc_core 00042 */ 00043 class mxcpcFramewiseMxPEGScanDecoder { 00044 00045 protected: 00046 static const unsigned char DefaultHuffmanTable_Y_DC[], 00047 DefaultHuffmanTable_Y_AC[], 00048 DefaultHuffmanTable_UV_DC[], 00049 DefaultHuffmanTable_UV_AC[]; 00050 static const int DefaultHuffmanTable_Y_DC_Size, 00051 DefaultHuffmanTable_Y_AC_Size, 00052 DefaultHuffmanTable_UV_DC_Size, 00053 DefaultHuffmanTable_UV_AC_Size; 00054 00055 protected: 00056 mxcpcMxPEGDecoderBackEnd *BackEnd; 00057 00058 public: 00059 mxcpcFramewiseMxPEGScanDecoder(); 00060 virtual ~mxcpcFramewiseMxPEGScanDecoder(); 00061 00062 public: 00063 //! Returns a string elaborating on the type of acceleration method used. 00064 virtual const char *getAccelerationTypeString(void) = 0; 00065 //! Informs the scan decoder about which decoder backend to feed with 00066 //! decoded data. 00067 /*! 00068 * The scan decoder will <b>not</b> delete the backend upon its own 00069 * deletion. 00070 */ 00071 void setBackEnd(mxcpcMxPEGDecoderBackEnd *backend); 00072 //! Copies 64 bytes from the specified location to the scan decoder's 00073 //! Y quantization table. 00074 virtual void setYQuantizationTable(unsigned char *data_bytes) = 0; 00075 //! Copies 64 bytes from the specified location to the scan decoder's 00076 //! UV quantization table. 00077 virtual void setUVQuantizationTable(unsigned char *data_bytes) = 0; 00078 //! Performs the scan decode for an entire <tt>MxPEG</tt> frame. 00079 /*! 00080 * The frame descriptor is assumed to contain valid information. 00081 * 00082 * In case something goes wrong the backend is to be informed via a call 00083 * to its mxcpcMxPEGDecoderBackEnd::errorEncountered() method. 00084 * 00085 * \attention The mxcpcMxPEGDecoderBackEnd::frameComplete() method must 00086 * <b>not</b> be called - this is done by the 00087 * mxcpcFramewiseMxPEGDecoder owning this scan decoder. 00088 * 00089 * \attention Implementations must guard against missing backends. 00090 */ 00091 virtual void performScanSweep(mxcpcFramewiseMxPEGDecoder::UndecodedFrameDescriptor 00092 *frame_descriptor) = 0; 00093 }; 00094 00095 00096 00097 #endif // __MXCPC_FRAMEWISEMXPEGSCANDECODER_H__