1 /*************************************************************
2 Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
3 PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
4 Group. If you use this software, you agree to the following: This
5 program package is purely experimental, and is licensed "as is".
6 Permission is granted to use, modify, and distribute this program
7 without charge for any purpose, provided this license/ disclaimer
8 notice appears in the copies.  No warranty or maintenance is given,
9 either expressed or implied.  In no event shall the author(s) be
10 liable to you or a third party for any special, incidental,
11 consequential, or other damages, arising out of the use or inability
12 to use the program for any purpose (or the loss of data), even if we
13 have been advised of such possibilities.  Any public reference or
14 advertisement of this source code should refer to it as the Portable
15 Video Research Group (PVRG) code, and not by any author(s) (or
16 Stanford University) name.
17 *************************************************************/
18 /*
19 ************************************************************
20 param.h
21 
22 The basic system parameters are kept here.
23 
24 ************************************************************
25 */
26 
27 #ifndef PARAM_DONE
28 #define PARAM_DONE
29 
30 /* This is the general definition for the size and width of the
31    JPEG blocks. Do not change.
32    */
33 #define BLOCKSIZE 64
34 #define BLOCKWIDTH 8
35 #define BLOCKHEIGHT 8
36 
37 /* Definitions for JPEG and internal compatibility. */
38 
39 #define MAXIMUM_HORIZONTAL_FREQUENCY 15
40 #define MAXIMUM_VERTICAL_FREQUENCY 15
41 
42 #define MAXIMUM_JPEG_HORIZONTAL_FREQUENCY 4
43 #define MAXIMUM_JPEG_VERTICAL_FREQUENCY 4
44 
45 #define MINIMUM_BUFFERSIZE 16
46 
47 #define MAXIMUM_UNSIGNED16 65535
48 #define MAXIMUM_RESYNC_INTERVAL 65535
49 #define MAXIMUM_BUFFERSIZE 65535
50 #define MAXIMUM_IMAGE_HEIGHT 65535
51 #define MAXIMUM_IMAGE_WIDTH 65535
52 
53 /* Devices: Number of active devices operating at one time.
54    Quantization tables, huffman tables, etc. are all devices.
55    */
56 #define MAXIMUM_DEVICES 16
57 
58 /* Sources: Number of active sources in stream at one time.
59    A source is one interleave possibility.
60    */
61 #define MAXIMUM_SOURCES 16
62 
63 /* Components: Number of components that can be active per frame.
64    A component consists of one complete plane of the image.
65 */
66 #define MAXIMUM_COMPONENTS 256
67 
68 /* Q value as defined by archaic and now defunct F-Factor:
69    Used to rescale quantization matrices.
70  */
71 
72 #define Q_PRECISION 50
73 
74 /* Scan component threshold is the maximum number of components put
75 in per scan */
76 
77 #define SCAN_COMPONENT_THRESHOLD 4
78 
79 /* Mask to be used for creating files. */
80 #define UMASK 0666  /* Octal */
81 
82 /* Buffersize is used as the default I/O buffer. A smaller size ensures
83    less storage space. A larger size requires more storage space.
84    256 seems like a good number for smaller machines, but for machines
85    with greater than 0.5 MB of memory, 1024 would be better because
86    it reduces on the number of seeks necessary.  Helpful for macro-sized
87    words such as 16 bit or 24 bit to have a proper multiple of such
88    word.
89    */
90 #define BUFFERSIZE 256
91 
92 /* Lossless Buffersize is a variable that is kept for the lossless
93    streams.  It can be any positive number, though a larger number
94    will speed up the processing of information.  A large number also
95    will cause (MAXIMUM_SOURCES)*(LOSSLESSBUFFERSIZE)*sizeof(int)
96    storage consumption.  To ensure proper operation, this should
97    be equivalent to the BUFFERSIZE variable * dimensions of the
98    scan frequencies so that two fetches are not required for filling
99    the lossless buffer. (It would make having the upper buffer useless).
100    The minimum number is (MAX_HF+1)*(MAX_VF+1) */
101 
102 #define LOSSLESSBUFFERSIZE 289
103 
104 /* Number of streams is the number of active read/write streams possible.
105    For all jpeg operations, this value is 1.*/
106 
107 #define NUMBER_OF_STREAMS 1
108 
109 #define ISO_DCT
110 #define LEE_DCT
111 
112 #endif
113