1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
/*
* JPEGConstants
*
* Copyright (c) 2004, 2005, 2006 Marco Schmidt.
* All rights reserved.
*/
package net.sourceforge.jiu.codecs.jpeg;
/**
* Constants necessary to encode and decode JPEG streams.
* @author Marco Schmidt
* @since 0.13.0
*/
public final class JPEGConstants
{
/**
* Length of sample block edge, in samples (8).
*/
public static final int BLOCK_EDGE_LENGTH = 8;
/**
* 16 bit value that denotes the beginning of a JPEG stream (0xffd8).
*/
public static final int JFIF_SIGNATURE = 0xffd8;
/**
* DHT (define Huffman table) marker ID value.
*/
public static final int MARKER_DHT = 0xc4;
/**
* DQT (define quantization table) marker ID value.
*/
public static final int MARKER_DQT = 0xdb;
/**
* SOF0 (start of frame, type 0) marker ID value.
*/
public static final int MARKER_SOF0 = 0xc0;
/**
* SOF1 (start of frame, type 1) marker ID value.
*/
public static final int MARKER_SOF1 = 0xc1;
/**
* SOF2 (start of frame, type 2) marker ID value.
*/
public static final int MARKER_SOF2 = 0xc2;
/**
* SOF3 (start of frame, type 3) marker ID value.
*/
public static final int MARKER_SOF3 = 0xc3;
/**
* SOF5 (start of frame, type 5) marker ID value.
*/
public static final int MARKER_SOF5 = 0xc5;
/**
* SOF6 (start of frame, type 6) marker ID value.
*/
public static final int MARKER_SOF6 = 0xc6;
/**
* SOF7 (start of frame, type 7) marker ID value.
*/
public static final int MARKER_SOF7 = 0xc7;
/**
* SOF9 (start of frame, type 9) marker ID value.
*/
public static final int MARKER_SOF9 = 0xc9;
/**
* SOFa (start of frame, type a) marker ID value.
*/
public static final int MARKER_SOFA = 0xca;
/**
* SOFb (start of frame, type b) marker ID value.
*/
public static final int MARKER_SOFB = 0xcb;
/**
* SOFd (start of frame, type d) marker ID value.
*/
public static final int MARKER_SOFD = 0xcd;
/**
* SOFe (start of frame, type e) marker ID value.
*/
public static final int MARKER_SOFE = 0xce;
/**
* SOFf (start of frame, type f) marker ID value.
*/
public static final int MARKER_SOFF = 0xcf;
/**
* SOS (start of scan) marker ID value.
*/
public static final int MARKER_SOS = 0xda;
/**
* Maximum length of a Huffman code in bit (16).
*/
public static final int MAX_HUFFMAN_CODE_LENGTH = 16;
/**
* Number of samples in a block of samples (64).
*/
public static final int SAMPLES_PER_BLOCK = BLOCK_EDGE_LENGTH * BLOCK_EDGE_LENGTH;
/**
* Empty private constructor to prevent instantiation of this class.
*/
private JPEGConstants()
{
}
}
|