/* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* dodecode.c Decode stream of characters on infile and return array * * This version encodes the different quadrants separately * * Programmer: R. White Date: 9 May 1991 * * Modified to read VMS fixed-length files, R. White, 16 June 1992 */ #include #include "qfile.h" #define input_nybble(infile) input_nbits(infile,4) extern void qtree_decode(); extern void start_inputing_bits(); extern int input_bit(); extern int input_nbits(); extern void dodecode(infile,a,nx,ny,nbitplanes) QFILE *infile; int a[]; /* Array of values to decode */ int nx,ny; /* Array dimensions are [nx][ny] */ unsigned char nbitplanes[3]; /* Number of bit planes in quadrants */ { int i, nel, nx2, ny2; nel = nx*ny; nx2 = (nx+1)/2; ny2 = (ny+1)/2; /* * initialize a to zero */ for (i=0; i