All Packages Class Hierarchy This Package Previous Next Index
Class de.tuchemnitz.informatik.MPEG_Play.MPEG_video
java.lang.Object
|
+----de.tuchemnitz.informatik.MPEG_Play.MPEG_video
- public class MPEG_video
- extends Object
- implements Runnable
This file contains the class "MPEG_video". The object of this class scans the MPEG-video stream,
extracts the information (especially the DCT values), activates the IDCT, applies the motion vectors and passes the pixel values to the applet.
Furthermore it resizes the applet and (possibly) the frame once it has recognized the dimensions of the frame.
If the scanner is ready it calls the method "close_chain" which prepares the frames for playing.
To understand how the video scanner works knowledge of the MPEG file format is needed (See ISO 11172-2).
Made the constructor public, David Chatting 30th November 1999.
MPEG Play homepage
- Version:
- MPEG JAVA v3.4
- Author:
- Joerg Anders (ja@informatik.tu-chemnitz.de)
-
ak_idx
-
-
Asp_ratio
-
-
B_TYPE
-
-
back_idx
-
-
Backward
-
-
backward_f
-
-
backward_f_code
-
-
backward_r_size
-
-
Bit_rate
-
-
Broken_Link
-
-
Closed_Group
-
-
col_y_incr
-
-
const_param
-
-
dct_dc_cb_past
- value of past DC values
-
dct_dc_cr_past
- value of past DC values
-
dct_dc_y_past
- value of past DC values
-
dct_recon
- the values before IDCT transformation
-
Drop_Flag
-
-
EXT_START_CODE
-
-
forw_f_code
-
-
Forward
-
-
forward_f
-
-
forward_r_size
-
-
Frame_nr
-
-
Frame_nr_offset
-
-
Full_pel_back_vector
-
-
Full_pel_forw_vector
-
-
GOP_START_CODE
-
-
Height
-
-
Hour
-
-
Huf
- the VLC (Hufmann) decoder
-
I_TYPE
-
-
idct
- an IDCT object to tranform the DCT coefficients
-
intramatrix
- the default intramatrix
-
lum_block
- is it the first luminance block ???
-
lum_y_incr
-
-
macro_block_address
-
-
macro_block_intra
-
-
macro_block_motion_backward
-
-
macro_block_motion_forward
-
-
macro_block_pattern
-
-
macro_block_quant
-
-
mb_column
-
-
mb_height
-
-
mb_row
-
-
mb_width
-
-
Minute
-
-
motion_horiz_back_code
-
-
motion_horiz_back_r
-
-
motion_horiz_forw_code
-
-
motion_horiz_forw_r
-
-
motion_verti_back_code
-
-
motion_verti_back_r
-
-
motion_verti_forw_code
-
-
motion_verti_forw_r
-
-
mpeg_stream
- input filter
-
non_intramatrix
-
-
nullmatrix
- a matrix of zeros
-
P_TYPE
-
-
past_intra_address
-
-
pel1
-
-
pel2
-
-
Pel_buffer
- The "Pel_buffer" is a main feature of the video scanner.
-
Pic_rate
-
-
Pic_Type
-
-
Pict_Count
-
-
PICTURE_START_CODE
-
-
pixel_per_col_line
-
-
pixel_per_lum_line
-
-
Player
-
-
pred_idx
-
-
quant_matrix
-
-
Quant_scale
-
-
Second
-
-
SEQ_END_CODE
-
-
SEQ_START_CODE
-
-
SLICE_MAX_START_CODE
-
-
SLICE_MIN_START_CODE
-
-
Temp_ref
-
-
USER_START_CODE
-
-
values
- return values of the Hufmann decoder
-
VBV_buffer
-
-
VBV_Delay
-
-
Width
-
-
zigzag
- the reverse zigzag scan order
-
MPEG_video(MPEG_Play, io_tool)
- The constructor only notices the parameter and creates an VLC (Hufmann) decoder object.
-
correct_col_pixel(int)
- The method "correct_col_pixel" is called in predicted macro blocks.
-
correct_lum_pixel(int)
- The method "correct_lum_pixel" is called in predicted macro blocks.
-
Parse_Block(int)
- The method "Parse_Block" parses a block according to ISO 11172-2.
-
Parse_group_of_pictures()
- The method "Parse_group_of_pictures" parses the group of pictures according to ISO 11172-2.
-
Parse_macroblock(int)
- The method "Parse_macroblock" parses a macroblock according to ISO 11172-2.
-
Parse_picture()
- The method "Parse_picture" parses a picture according to ISO 11172-2.
-
Parse_sequence_header()
- The method "Parse_sequence_header" parses the sequence header according to ISO 11172-2.
-
Parse_slice()
- The method "Parse_slice" parses a slice according
to ISO 11172-2.
-
run()
- The method "parse_video_stream" parsese the MPEG video stream according to ISO 11172-2 and performs some initial steps.
-
set_col_pixel(int)
-
-
set_dct_diff(int, int)
- The method "set_dct_diff" computes the DCT difference according to ISO 11172-2.
-
set_lum_pixel(int)
- The method "set_lum_pixel" takes the re-transformed luminance values and
places them at the appropriate position.
mpeg_stream
protected io_tool mpeg_stream
- input filter
Huf
protected Huffmann Huf
- the VLC (Hufmann) decoder
values
protected int values[]
- return values of the Hufmann decoder
nullmatrix
protected int nullmatrix[]
- a matrix of zeros
intramatrix
protected int intramatrix[]
- the default intramatrix
zigzag
protected int zigzag[]
- the reverse zigzag scan order
idct
protected IDCT idct
- an IDCT object to tranform the DCT coefficients
dct_recon
protected int dct_recon[]
- the values before IDCT transformation
non_intramatrix
protected int non_intramatrix[]
lum_block
protected boolean lum_block
- is it the first luminance block ???
dct_dc_cr_past
protected int dct_dc_cr_past
- value of past DC values
dct_dc_cb_past
protected int dct_dc_cb_past
- value of past DC values
dct_dc_y_past
protected int dct_dc_y_past
- value of past DC values
Pel_buffer
protected int Pel_buffer[][][]
- The "Pel_buffer" is a main feature of the video scanner.
3 frames are stored at:
Pel_buffer[0]
Pel_buffer[1]
Pel_buffer[2]
The frame at index "ak_idx" is the frame coming into being. The frame at
index "pred_idx" is the frame for forward prediction. The frame at index
"back_idx" is the frame for backward prediction. The method "Parse_Picture"
administers the values of these 3 variables.
The index in second dimension determins whether the information is:
luminance information - Pel_buffer[?][0]
chrominance information (cr) - Pel_buffer[?][1]
chrominance information (cb) - Pel_buffer[?][2]
ak_idx
protected int ak_idx
pred_idx
protected int pred_idx
back_idx
protected int back_idx
Player
protected MPEG_Play Player
SEQ_END_CODE
protected static final int SEQ_END_CODE
SEQ_START_CODE
protected static final int SEQ_START_CODE
GOP_START_CODE
protected static final int GOP_START_CODE
PICTURE_START_CODE
protected static final int PICTURE_START_CODE
SLICE_MIN_START_CODE
protected static final int SLICE_MIN_START_CODE
SLICE_MAX_START_CODE
protected static final int SLICE_MAX_START_CODE
EXT_START_CODE
protected static final int EXT_START_CODE
USER_START_CODE
protected static final int USER_START_CODE
I_TYPE
public static final int I_TYPE
P_TYPE
public static final int P_TYPE
B_TYPE
public static final int B_TYPE
Width
protected int Width
Height
protected int Height
Asp_ratio
protected int Asp_ratio
Pic_rate
protected int Pic_rate
mb_width
protected int mb_width
mb_height
protected int mb_height
Bit_rate
protected int Bit_rate
VBV_buffer
protected int VBV_buffer
const_param
protected boolean const_param
quant_matrix
protected boolean quant_matrix
Hour
protected int Hour
Minute
protected int Minute
Second
protected int Second
Pict_Count
protected int Pict_Count
Drop_Flag
protected boolean Drop_Flag
Closed_Group
protected boolean Closed_Group
Broken_Link
protected boolean Broken_Link
Temp_ref
protected int Temp_ref
Pic_Type
protected int Pic_Type
Frame_nr_offset
protected int Frame_nr_offset
Frame_nr
protected int Frame_nr
VBV_Delay
protected int VBV_Delay
Full_pel_forw_vector
protected boolean Full_pel_forw_vector
forw_f_code
protected int forw_f_code
forward_f
protected int forward_f
forward_r_size
protected int forward_r_size
motion_horiz_forw_code
protected int motion_horiz_forw_code
motion_horiz_forw_r
protected int motion_horiz_forw_r
motion_verti_forw_code
protected int motion_verti_forw_code
motion_verti_forw_r
protected int motion_verti_forw_r
Full_pel_back_vector
protected boolean Full_pel_back_vector
backward_f_code
protected int backward_f_code
backward_f
protected int backward_f
backward_r_size
protected int backward_r_size
motion_horiz_back_code
protected int motion_horiz_back_code
motion_horiz_back_r
protected int motion_horiz_back_r
motion_verti_back_code
protected int motion_verti_back_code
motion_verti_back_r
protected int motion_verti_back_r
Quant_scale
protected int Quant_scale
macro_block_address
protected int macro_block_address
past_intra_address
protected int past_intra_address
mb_row
protected int mb_row
mb_column
protected int mb_column
macro_block_motion_forward
protected boolean macro_block_motion_forward
macro_block_motion_backward
protected boolean macro_block_motion_backward
macro_block_pattern
protected boolean macro_block_pattern
macro_block_quant
protected boolean macro_block_quant
macro_block_intra
protected boolean macro_block_intra
pel1
protected int pel1[]
pel2
protected int pel2[]
Forward
protected motion_data Forward
Backward
protected motion_data Backward
pixel_per_lum_line
protected int pixel_per_lum_line
pixel_per_col_line
protected int pixel_per_col_line
lum_y_incr
protected int lum_y_incr
col_y_incr
protected int col_y_incr
MPEG_video
public MPEG_video(MPEG_Play play,
io_tool tool)
- The constructor only notices the parameter and creates an VLC (Hufmann) decoder object.
DJC 30th Nov 1999 - Made public
run
public void run()
- The method "parse_video_stream" parsese the MPEG video stream according to ISO 11172-2 and performs some initial steps.
Parse_sequence_header
protected void Parse_sequence_header()
- The method "Parse_sequence_header" parses the sequence header according to ISO 11172-2.
Parse_group_of_pictures
protected void Parse_group_of_pictures()
- The method "Parse_group_of_pictures" parses the group of pictures according to ISO 11172-2.
The information is simply ignored.
Parse_picture
protected void Parse_picture()
- The method "Parse_picture" parses a picture according to ISO 11172-2.
It determines the frame number in display order and the picture type.
Depending on the picture type some special actions are performed.
Especially the index of the referred frame for forward and backward prediction is to be defined.
Parse_slice
protected void Parse_slice()
- The method "Parse_slice" parses a slice according
to ISO 11172-2. It determines quantization scale and the macroblock address of the first macro block of the slice.
Parse_macroblock
protected void Parse_macroblock(int b_nr)
- The method "Parse_macroblock" parses a macroblock according to ISO 11172-2.
It is one of the complexest methods because of the great variety of the constitution of a macroblock.
The constitution and existence of the the most information fields depends on the constitution and existence
of information fields before.
Furthermore the decoding process is controlled by this method.
In some situations some variables must be reset to some default values
or in case of skipped macroblocks implizit values must be applied.
Bear in mind that some variables used in this method are member (class) variables for later reference!
Parse_Block
protected void Parse_Block(int nr)
- The method "Parse_Block" parses a block according to ISO 11172-2.
Thereby the DC and AC coefficients are reconstructed and placed
into the "dct_recon" field in de-"zigzag"-ed order.
After that the IDCT routine is called. The method counts the coefficients
and calls a sparse IDCT method if the coefficient count is 1.
set_dct_diff
protected void set_dct_diff(int dct_diff,
int dct_size)
- The method "set_dct_diff" computes the DCT difference according to ISO 11172-2. Is sets "dct_recon[0]".
set_lum_pixel
protected void set_lum_pixel(int nr)
- The method "set_lum_pixel" takes the re-transformed luminance values and
places them at the appropriate position. Note that the variables:
pixel_per_lum_line
mb_row
mb_column
are computed in "run()" as soon it was possible.
set_col_pixel
protected void set_col_pixel(int nr)
correct_lum_pixel
protected void correct_lum_pixel(int nr)
- The method "correct_lum_pixel" is called in predicted macro blocks.
Because the values in "dct_recon" are motion compensation information the task of
this method is to correct the already supplied (copied) values.
Note that the variables:
pixel_per_lum_line
lum_y_incr
mb_row
mb_column
are computed in "run()" as soon it was possible.
correct_col_pixel
protected void correct_col_pixel(int nr)
- The method "correct_col_pixel" is called in predicted macro blocks.
Because the values in "dct_recon" are motion compensation information the task of
this method is to correct the already supplied (copied) values.
Note that the variables:
pixel_per_col_line
col_y_incr
mb_row
mb_column
are computed in "run()" as soon it was possible.
All Packages Class Hierarchy This Package Previous Next Index