public class RFC2035
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short[] |
chm_ac_codelens |
static short[] |
chm_ac_symbols |
static short[] |
chm_dc_codelens |
static short[] |
chm_dc_symbols |
static int[] |
jpeg_chroma_quantizer_normal
Table K.2 from JPEG spec.
|
static int[] |
jpeg_chroma_quantizer_zigzag |
static int[] |
jpeg_luma_quantizer_normal
Table K.1 from JPEG spec.
|
static int[] |
jpeg_luma_quantizer_zigzag |
static short[] |
lum_ac_codelens |
static short[] |
lum_ac_symbols |
static short[] |
lum_dc_codelens |
static short[] |
lum_dc_symbols |
Constructor and Description |
---|
RFC2035() |
Modifier and Type | Method and Description |
---|---|
static int[] |
createZigZag(int[] array)
Creates ZigZag-ordered array from given regular-order array, can only be used for arrays of 64 elements, since it uses xmax=8, ymax=8
|
static int[] |
createZigZag(int[] array,
int xmax,
int ymax)
Creates ZigZag-ordered array from regular-order array
|
static int |
MakeHeaders(boolean includeSOI,
byte[] p,
int i,
int type,
int q,
int w,
int h)
The old MakeHeaders method.
|
static int |
MakeHeaders(boolean includeSOI,
byte[] p,
int i,
int type,
int q,
int w,
int h,
byte[] luma,
byte[] chroma,
int dri)
Given an RTP/JPEG type code, q factor, width, and height,
generate a frame and scan headers that can be prepended
to the RTP/JPEG data payload to produce a JPEG compressed
image in interchange format (except for possible trailing
garbage and absence of an EOI marker to terminate the scan).
|
static int |
MakeQuantHeader(byte[] p,
int i,
byte[] qt,
int tableNo)
Creates quantization header for given qtable.
|
static void |
MakeTables(int q,
byte[] lum_q,
byte[] chr_q,
int[] jpeg_luma,
int[] jpeg_chroma)
Call MakeTables with the Q factor and two int[64] return arrays
|
public static final int[] jpeg_luma_quantizer_zigzag
public static final int[] jpeg_chroma_quantizer_zigzag
public static final int[] jpeg_luma_quantizer_normal
public static final int[] jpeg_chroma_quantizer_normal
public static final short[] lum_dc_codelens
public static final short[] lum_dc_symbols
public static final short[] lum_ac_codelens
public static final short[] lum_ac_symbols
public static final short[] chm_dc_codelens
public static final short[] chm_dc_symbols
public static final short[] chm_ac_codelens
public static final short[] chm_ac_symbols
public static void MakeTables(int q, byte[] lum_q, byte[] chr_q, int[] jpeg_luma, int[] jpeg_chroma)
q
- Q factorlum_q
- input luminance jpeg qtablechr_q
- input chrominance jpeg qtablejpeg_luma
- returned luminance qtablejpeg_chroma
- returned chrominance qtablepublic static int MakeQuantHeader(byte[] p, int i, byte[] qt, int tableNo)
p
- destination for the created headeri
- initial offsetqt
- qtable datatableNo
- qtable numberpublic static int MakeHeaders(boolean includeSOI, byte[] p, int i, int type, int q, int w, int h)
includeSOI
- specifies wheter SOI should be prependedp
- destination for created headersi
- initial offset of ptype
- value of type parameter for the JPEG/RTP frameq
- value of Q parameter for the JPEG/RTP framew
- width of JPEG/RTP frame (in blocks)h
- height of JPEG/RTP frame (in blocks)public static int MakeHeaders(boolean includeSOI, byte[] p, int i, int type, int q, int w, int h, byte[] luma, byte[] chroma, int dri)
p
- destination for the created datai
- initial offset of pincludeSOI
- - kenlars99 - not in original RFC sample code, allows us to control whether
to include the initial SOI marker (0xFFD8). Turn this off if there are other headers before these,
such as the JFIF header. If false, caller is responsible for the initial SOI marker.type
- value of type parameter for the JPEG/RTP frameq
- value of q parameter for the JPEG/RTP framew
- width of JPEG/RTP frame (in blocks)h
- height of JPEG/RTP frame (in blocks)luma
- - kane77 - used to specify luma table if q>127, if null then tables are computed the normal waychroma
- - kane77 - used to specify chroma table if q>127, if null then tables are computed the normal waydri
- - kane77 - used to specify restart interval, if dri==0 then no DRI header is created.public static int[] createZigZag(int[] array)
array
- array in normal orderpublic static int[] createZigZag(int[] array, int xmax, int ymax)
array
- array in normal orderxmax
- maximal x dimension of arrayymax
- maximal y dimension of array