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)

Variable Index

 o ak_idx
 o Asp_ratio
 o B_TYPE
 o back_idx
 o Backward
 o backward_f
 o backward_f_code
 o backward_r_size
 o Bit_rate
 o Broken_Link
 o Closed_Group
 o col_y_incr
 o const_param
 o dct_dc_cb_past
value of past DC values
 o dct_dc_cr_past
value of past DC values
 o dct_dc_y_past
value of past DC values
 o dct_recon
the values before IDCT transformation
 o Drop_Flag
 o EXT_START_CODE
 o forw_f_code
 o Forward
 o forward_f
 o forward_r_size
 o Frame_nr
 o Frame_nr_offset
 o Full_pel_back_vector
 o Full_pel_forw_vector
 o GOP_START_CODE
 o Height
 o Hour
 o Huf
the VLC (Hufmann) decoder
 o I_TYPE
 o idct
an IDCT object to tranform the DCT coefficients
 o intramatrix
the default intramatrix
 o lum_block
is it the first luminance block ???
 o lum_y_incr
 o macro_block_address
 o macro_block_intra
 o macro_block_motion_backward
 o macro_block_motion_forward
 o macro_block_pattern
 o macro_block_quant
 o mb_column
 o mb_height
 o mb_row
 o mb_width
 o Minute
 o motion_horiz_back_code
 o motion_horiz_back_r
 o motion_horiz_forw_code
 o motion_horiz_forw_r
 o motion_verti_back_code
 o motion_verti_back_r
 o motion_verti_forw_code
 o motion_verti_forw_r
 o mpeg_stream
input filter
 o non_intramatrix
 o nullmatrix
a matrix of zeros
 o P_TYPE
 o past_intra_address
 o pel1
 o pel2
 o Pel_buffer
The "Pel_buffer" is a main feature of the video scanner.
 o Pic_rate
 o Pic_Type
 o Pict_Count
 o PICTURE_START_CODE
 o pixel_per_col_line
 o pixel_per_lum_line
 o Player
 o pred_idx
 o quant_matrix
 o Quant_scale
 o Second
 o SEQ_END_CODE
 o SEQ_START_CODE
 o SLICE_MAX_START_CODE
 o SLICE_MIN_START_CODE
 o Temp_ref
 o USER_START_CODE
 o values
return values of the Hufmann decoder
 o VBV_buffer
 o VBV_Delay
 o Width
 o zigzag
the reverse zigzag scan order

Constructor Index

 o MPEG_video(MPEG_Play, io_tool)
The constructor only notices the parameter and creates an VLC (Hufmann) decoder object.

Method Index

 o correct_col_pixel(int)
The method "correct_col_pixel" is called in predicted macro blocks.
 o correct_lum_pixel(int)
The method "correct_lum_pixel" is called in predicted macro blocks.
 o Parse_Block(int)
The method "Parse_Block" parses a block according to ISO 11172-2.
 o Parse_group_of_pictures()
The method "Parse_group_of_pictures" parses the group of pictures according to ISO 11172-2.
 o Parse_macroblock(int)
The method "Parse_macroblock" parses a macroblock according to ISO 11172-2.
 o Parse_picture()
The method "Parse_picture" parses a picture according to ISO 11172-2.
 o Parse_sequence_header()
The method "Parse_sequence_header" parses the sequence header according to ISO 11172-2.
 o Parse_slice()
The method "Parse_slice" parses a slice according to ISO 11172-2.
 o run()
The method "parse_video_stream" parsese the MPEG video stream according to ISO 11172-2 and performs some initial steps.
 o set_col_pixel(int)
 o set_dct_diff(int, int)
The method "set_dct_diff" computes the DCT difference according to ISO 11172-2.
 o set_lum_pixel(int)
The method "set_lum_pixel" takes the re-transformed luminance values and places them at the appropriate position.

Variables

 o mpeg_stream
 protected io_tool mpeg_stream
input filter

 o Huf
 protected Huffmann Huf
the VLC (Hufmann) decoder

 o values
 protected int values[]
return values of the Hufmann decoder

 o nullmatrix
 protected int nullmatrix[]
a matrix of zeros

 o intramatrix
 protected int intramatrix[]
the default intramatrix

 o zigzag
 protected int zigzag[]
the reverse zigzag scan order

 o idct
 protected IDCT idct
an IDCT object to tranform the DCT coefficients

 o dct_recon
 protected int dct_recon[]
the values before IDCT transformation

 o non_intramatrix
 protected int non_intramatrix[]
 o lum_block
 protected boolean lum_block
is it the first luminance block ???

 o dct_dc_cr_past
 protected int dct_dc_cr_past
value of past DC values

 o dct_dc_cb_past
 protected int dct_dc_cb_past
value of past DC values

 o dct_dc_y_past
 protected int dct_dc_y_past
value of past DC values

 o 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]

 o ak_idx
 protected int ak_idx
 o pred_idx
 protected int pred_idx
 o back_idx
 protected int back_idx
 o Player
 protected MPEG_Play Player
 o SEQ_END_CODE
 protected static final int SEQ_END_CODE
 o SEQ_START_CODE
 protected static final int SEQ_START_CODE
 o GOP_START_CODE
 protected static final int GOP_START_CODE
 o PICTURE_START_CODE
 protected static final int PICTURE_START_CODE
 o SLICE_MIN_START_CODE
 protected static final int SLICE_MIN_START_CODE
 o SLICE_MAX_START_CODE
 protected static final int SLICE_MAX_START_CODE
 o EXT_START_CODE
 protected static final int EXT_START_CODE
 o USER_START_CODE
 protected static final int USER_START_CODE
 o I_TYPE
 public static final int I_TYPE
 o P_TYPE
 public static final int P_TYPE
 o B_TYPE
 public static final int B_TYPE
 o Width
 protected int Width
 o Height
 protected int Height
 o Asp_ratio
 protected int Asp_ratio
 o Pic_rate
 protected int Pic_rate
 o mb_width
 protected int mb_width
 o mb_height
 protected int mb_height
 o Bit_rate
 protected int Bit_rate
 o VBV_buffer
 protected int VBV_buffer
 o const_param
 protected boolean const_param
 o quant_matrix
 protected boolean quant_matrix
 o Hour
 protected int Hour
 o Minute
 protected int Minute
 o Second
 protected int Second
 o Pict_Count
 protected int Pict_Count
 o Drop_Flag
 protected boolean Drop_Flag
 o Closed_Group
 protected boolean Closed_Group
 o Broken_Link
 protected boolean Broken_Link
 o Temp_ref
 protected int Temp_ref
 o Pic_Type
 protected int Pic_Type
 o Frame_nr_offset
 protected int Frame_nr_offset
 o Frame_nr
 protected int Frame_nr
 o VBV_Delay
 protected int VBV_Delay
 o Full_pel_forw_vector
 protected boolean Full_pel_forw_vector
 o forw_f_code
 protected int forw_f_code
 o forward_f
 protected int forward_f
 o forward_r_size
 protected int forward_r_size
 o motion_horiz_forw_code
 protected int motion_horiz_forw_code
 o motion_horiz_forw_r
 protected int motion_horiz_forw_r
 o motion_verti_forw_code
 protected int motion_verti_forw_code
 o motion_verti_forw_r
 protected int motion_verti_forw_r
 o Full_pel_back_vector
 protected boolean Full_pel_back_vector
 o backward_f_code
 protected int backward_f_code
 o backward_f
 protected int backward_f
 o backward_r_size
 protected int backward_r_size
 o motion_horiz_back_code
 protected int motion_horiz_back_code
 o motion_horiz_back_r
 protected int motion_horiz_back_r
 o motion_verti_back_code
 protected int motion_verti_back_code
 o motion_verti_back_r
 protected int motion_verti_back_r
 o Quant_scale
 protected int Quant_scale
 o macro_block_address
 protected int macro_block_address
 o past_intra_address
 protected int past_intra_address
 o mb_row
 protected int mb_row
 o mb_column
 protected int mb_column
 o macro_block_motion_forward
 protected boolean macro_block_motion_forward
 o macro_block_motion_backward
 protected boolean macro_block_motion_backward
 o macro_block_pattern
 protected boolean macro_block_pattern
 o macro_block_quant
 protected boolean macro_block_quant
 o macro_block_intra
 protected boolean macro_block_intra
 o pel1
 protected int pel1[]
 o pel2
 protected int pel2[]
 o Forward
 protected motion_data Forward
 o Backward
 protected motion_data Backward
 o pixel_per_lum_line
 protected int pixel_per_lum_line
 o pixel_per_col_line
 protected int pixel_per_col_line
 o lum_y_incr
 protected int lum_y_incr
 o col_y_incr
 protected int col_y_incr

Constructors

 o 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

Methods

 o run
 public void run()
The method "parse_video_stream" parsese the MPEG video stream according to ISO 11172-2 and performs some initial steps.

 o Parse_sequence_header
 protected void Parse_sequence_header()
The method "Parse_sequence_header" parses the sequence header according to ISO 11172-2.

 o 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.

 o 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.

 o 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.

 o 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!

 o 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.

 o 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]".

 o 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.

 o set_col_pixel
 protected void set_col_pixel(int nr)
 o 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.

 o 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