00001 /*-------------------------------------------------------------------- 00002 * 00003 * (C) Copyright Koninklijke Philips Electronics NV 2006. 00004 * All rights reserved. This software is licensed under the terms of 00005 * version 2.1 of the GNU Lesser General Public License as published 00006 * by the Free Software Foundation. For licensing and warranty 00007 * information, see the file COPYING in the main directory. 00008 * 00009 *------------------------------------------------------------------*/ 00010 00011 #ifndef JPEGDEC_H 00012 #define JPEGDEC_H 00013 00014 #include "yapi.h" 00015 #include "vya.h" 00016 #include "jfif.h" 00017 #include "decode.h" 00018 #include "raster.h" 00019 00020 class JPEGDecode : public ProcessNetwork 00021 { 00022 public: 00023 // constructor 00024 JPEGDecode( 00025 const Id& n, 00026 In<unsigned char>& byteStreamF, 00027 Out<VYApixel>& YoutF, 00028 Out<VYApixel>& UoutF, 00029 Out<VYApixel>& VoutF, 00030 Out<VYAimageWidth>& YimgWidthOutF, 00031 Out<VYAimageHeight>& YimgHeightOutF, 00032 Out<VYAimageWidth>& UVimgWidthOutF, 00033 Out<VYAimageHeight>& UVimgHeightOutF, 00034 Out<VYAimageType>& YUVimgTypeOutF 00035 ); 00036 00037 // type member function 00038 const char* type() const { return "JPEGDecode"; } 00039 00040 private: 00041 InPort<unsigned char> byteStreamP; 00042 00043 OutPort<VYApixel> YoutP; 00044 OutPort<VYApixel> UoutP; 00045 OutPort<VYApixel> VoutP; 00046 OutPort<VYAimageWidth> YimgWidthOutP; 00047 OutPort<VYAimageHeight> YimgHeightOutP; 00048 OutPort<VYAimageWidth> UVimgWidthOutP; 00049 OutPort<VYAimageHeight> UVimgHeightOutP; 00050 OutPort<VYAimageType> YUVimgTypeOutP; 00051 00052 // Fifos 00053 Fifo<Bits> DQTsegment; 00054 Fifo<Bits> DHTsegment; 00055 Fifo<Bits> MCUsegment; 00056 Fifo<Bits> RestartInterval; 00057 00058 Fifo<VYAid> quantizationTableId; 00059 Fifo<VYAid> huffmanTableId; 00060 00061 Fifo<Marker> DHTmarker; 00062 Fifo<Marker> DQTmarker; 00063 00064 Fifo<VYAimageDepth> imageDepth; 00065 Fifo<VYAimageComponent> imageComponentId; 00066 Fifo<VYAimageX> imageX; 00067 Fifo<VYAimageY> imageY; 00068 Fifo<VYAimageH> imageH; 00069 Fifo<VYAimageV> imageV; 00070 00071 Fifo<VYAimageDepth> scanDepth; 00072 Fifo<VYAimageComponent> scanComponentId; 00073 00074 Fifo<VYApixel> pixels; 00075 00076 // Processes and Networks 00077 JFIF jfif; 00078 Decode decode; 00079 Raster raster; 00080 }; 00081 00082 #endif