Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

qtest.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1995 The Regents of the University of California.
00003  * All rights reserved.
00004  *
00005  * Permission to use, copy, modify, and distribute this software and its
00006  * documentation for any purpose, without fee, and without written agreement is
00007  * hereby granted, provided that the above copyright notice and the following
00008  * two paragraphs appear in all copies of this software.
00009  *
00010  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
00011  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00012  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
00013  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00014  *
00015  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
00016  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
00017  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
00018  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
00019  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00020  */
00021 
00022 /*  
00023  *  $Header: /misc/elrond0/share/cvs/AFNI/src/mpeg_encodedir/qtest.c,v 1.4 2004/04/02 15:12:41 rwcox Exp $
00024  *  $Log: qtest.c,v $
00025  *  Revision 1.4  2004/04/02 15:12:41  rwcox
00026  *  Cput
00027  *
00028  *  Revision 1.3  2003/12/23 13:50:08  rwcox
00029  *  Cput
00030  *
00031  *  Revision 1.2  2003/12/03 14:46:14  rwcox
00032  *  Cput
00033  *
00034  *  Revision 1.1  2001/12/17 16:11:55  rwcox
00035  *  Cadd
00036  *
00037  * Revision 1.5  1995/01/19  23:09:15  eyhung
00038  * Changed copyrights
00039  *
00040  * Revision 1.4  1993/01/18  10:20:02  dwallach
00041  * *** empty log message ***
00042  *
00043  * Revision 1.3  1993/01/18  10:17:29  dwallach
00044  * RCS headers installed, code indented uniformly
00045  *
00046  * Revision 1.3  1993/01/18  10:17:29  dwallach
00047  * RCS headers installed, code indented uniformly
00048  *
00049  */
00050 
00051 #include <stdio.h>
00052 #include "mtypes.h"
00053 #include "mproto.h"
00054 
00055 main()
00056 {
00057     Block a;
00058     FlatBlock b;
00059     BitBucket *bb;
00060     int i, j;
00061 
00062     bb = new_bitbucket();
00063 
00064     for (i = 0; i < 8; i++)
00065         for (j = 0; j < 8; j++)
00066             a[i][j] = random() % 100;
00067     mp_quant_zig_block(a, b, 1, 1);
00068     for (i = 0; i < 64; i++)
00069         printf("%6d ", b[i]);
00070     printf("\n");
00071 
00072     mp_rle_huff_block(b, bb);   /* intuititve names, huh? */
00073 
00074     printf("Huffman output is %d bits\n", bb->totalbits);
00075 }
 

Powered by Plone

This site conforms to the following standards: