Main Page | Namespace List | Compound List | File List | Compound Members | File Members

izz.cc

Go to the documentation of this file.
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 #include "izz.h"
00012 #include <stdio.h>
00013 
00014 const int IZZ::zigzag[64] = 
00015 {
00016    0,  1,  8, 16,  9,  2,  3, 10,
00017   17, 24, 32, 25, 18, 11,  4,  5,
00018   12, 19, 26, 33, 40, 48, 41, 34,
00019   27, 20, 13,  6,  7, 14, 21, 28,
00020   35, 42, 49, 56, 57, 50, 43, 36,
00021   29, 22, 15, 23, 30, 37, 44, 51,
00022   58, 59, 52, 45, 38, 31, 39, 46,
00023   53, 60, 61, 54, 47, 55, 62, 63
00024 };
00025 
00026 IZZ::IZZ(
00027   const Id&     n, 
00028   In<VYApixel>&     Cin,
00029   Out<VYApixel>&    Cout)
00030 :
00031         Process(n),
00032         CinP(   id("CinP"),     Cin),
00033         CoutP(    id("CoutP"),    Cout)
00034 { 
00035 }
00036 
00037 void IZZ::main()
00038 {
00039   VYApixel  Cin[64];
00040   VYApixel  Cout[64];
00041 
00042   while (true)
00043   {
00044     read(CinP, Cin, 64);
00045     for (unsigned int i=0; i<64; i++)
00046     {
00047       Cout[zigzag[i]] = Cin[i];
00048     }
00049     write(CoutP, Cout, 64);
00050   }
00051 }

Generated on Wed Feb 15 14:52:45 2006 for jpegdec by doxygen 1.3.2