|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mediaframe.mpeg1.motion_data
The motion_data class is used to store and compute the motion information.
Two objects of this class are created: One for forward and one for backward prediction.
| Field Summary | |
private int |
col_y_incr
The increment for the luminance line, equals to pixel_per_col_line - 8. |
private boolean |
down_half_x
True, if the fractional part > 0 of the vertical part of the motion vector for the luminance blocks. |
private boolean |
down_half_x_col
True, if the fractional part > 0 of the vertical part of the motion vector for the chrominance blocks. |
private int |
down_x
The integer part of the vertical part of the motion vector for the luminance blocks. |
private int |
down_x_col
The integer part of the vertical part of the motion vector for the chrominance blocks. |
private int |
error_count
The current number of printed errors in motion_data. |
private boolean |
Full_pel_x_vector
Equals true if full pixel accuracy is used, equals false, if half pixel accuracy is used. |
private int |
lum_y_incr
The increment for the luminance line, equals to pixel_per_lum_line - 8. |
private int |
max
The max value of the motion vector. |
private int |
min
The min value of the motion vector. |
private int |
pixel_per_col_line
The number of pixels per colour line. |
private int |
pixel_per_lum_line
The number of pixels per luminance line. |
private int |
range
The range (equals to max - min) of the motion vector. |
private int |
recon_down_x
The value of the vertical part of the motion vector. |
private int |
recon_down_x_prev
The value of the vertical part of the previous motion vector. |
private int |
recon_right_x
The value of the horizontal part value of the motion vector. |
private int |
recon_right_x_prev
The value of the horizontal part of the previous motion vector. |
private boolean |
right_half_x
True, if the fractional part > 0 of the horizontal part of the motion vector for the luminance blocks. |
private boolean |
right_half_x_col
True, if the fractional part > 0 of the horizontal part of the motion vector for the chrominance blocks. |
private int |
right_x
The integer part of the horizontal part of the motion vector for the luminance blocks. |
private int |
right_x_col
The integer part of the horizontal part of the motion vector for the chrominance blocks. |
private int |
x_ward_f
The size of the motion data. |
| Constructor Summary | |
motion_data()
|
|
| Method Summary | |
void |
compute_motion_vector(int motion_horiz_x_code,
int motion_verti_x_code,
int motion_horiz_x_r,
int motion_verti_x_r)
The method "compute_motion_vector" computes the motion vector according to the values supplied by the "MPEG_video". |
void |
copy_area(int mb_row,
int mb_column,
int[][] src,
int[][] dst)
The method "copy_area" grabs the area determined by the motion vector from "src" and puts it to the destination storage "dst". |
void |
copy_unchanged(int mb_row,
int mb_column,
int[][] src,
int[][] dst)
The method "copy_unchanged" grabs the "src" and puts it to the same position in "dst". |
void |
get_area(int mb_row,
int mb_column,
int[][] src,
int[] dst)
The method "get_area" grabs the area determined by the motion vector from "src" and puts it to the temporary storage "dst". |
void |
init(int f_pixel_per_lum_line,
int f_pixel_per_col_line,
int f_lum_y_incr,
int f_col_y_incr)
The method "init" is called by the "MPEG_video" as soon as the MPEG dimensions are known. |
private int |
motion_displacement(int motion_code,
int PMD,
int motion_r)
The internal method "motion_displacement" computes the difference of the actual motion vector in respect to the last motion vector. |
void |
put_area(int mb_row,
int mb_column,
int[] src,
int[][] dst)
The method "put_area" gets the pixels from temporary storage "src" and adds them to the macroblock addressed by "mb_row" and "mb_column" |
void |
put_area(int mb_row,
int mb_column,
int[] src1,
int[] src2,
int[][] dst)
The method "put_area(2)" is called if both, a forward and a backward motion vector is supplied. |
void |
reset_prev()
In some situations it is necessary to reset the motion data. |
void |
set_pic_data(int f,
boolean Full)
The method "set_pic_data" is called from "MPEG_video" as soon as the size of the motion data is given. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int recon_right_x_prev
private int recon_down_x_prev
private int recon_right_x
private int recon_down_x
private int right_x
private int down_x
private boolean right_half_x
private boolean down_half_x
private int right_x_col
private int down_x_col
private boolean right_half_x_col
private boolean down_half_x_col
private int x_ward_f
private int min
private int max
private int range
private boolean Full_pel_x_vector
private int error_count
private int pixel_per_lum_line
private int pixel_per_col_line
private int lum_y_incr
private int col_y_incr
| Constructor Detail |
public motion_data()
| Method Detail |
public final void init(int f_pixel_per_lum_line,
int f_pixel_per_col_line,
int f_lum_y_incr,
int f_col_y_incr)
f_pixel_per_lum_line - the number of pixels per luminance line.f_pixel_per_col_line - the number of pixels per colour line.f_lum_y_incr - the increment for the luminance line, equals to f_pixel_per_lum_line - 8.f_col_y_incr - the increment for the luminance line, equals to f_pixel_per_col_line - 8.
public final void set_pic_data(int f,
boolean Full)
f - the size of the motion data.Full - equals true if full pixel accuracy is used, equals false, if half pixel accuracy is used.public final void reset_prev()
private final int motion_displacement(int motion_code,
int PMD,
int motion_r)
motion_code - the motion code value for prediction.PMD - the motion displacement value of the previous motion vector.motion_r - the motion residual value.
public final void compute_motion_vector(int motion_horiz_x_code,
int motion_verti_x_code,
int motion_horiz_x_r,
int motion_verti_x_r)
motion_horiz_x_code - the motion code value of horizontal part for prediction.motion_verti_x_code - the motion code value of vertial part for prediction.motion_horiz_x_r - the motion residual value of horizontal part for prediction.motion_verti_x_r - the motion residual value of vertial part for prediction.
public final void get_area(int mb_row,
int mb_column,
int[][] src,
int[] dst)
mb_row - the row of the left top corner of the area to grab.mb_column - the column of the left top corner of the area to grab.src - the source YUV frame.dst - the destination YUV frame.
public final void copy_area(int mb_row,
int mb_column,
int[][] src,
int[][] dst)
mb_row - the row of the left top corner of the area to grab.mb_column - the column of the left top corner of the area to grab.src - the source YUV frame.dst - the destination YUV frame.
public final void copy_unchanged(int mb_row,
int mb_column,
int[][] src,
int[][] dst)
mb_row - the row of the left top corner of the area to grab.mb_column - the column of the left top corner of the area to grab.src - the source YUV frame.dst - the destination YUV frame.
public final void put_area(int mb_row,
int mb_column,
int[] src,
int[][] dst)
mb_row - the row of the left top corner of the area to grab.mb_column - the column of the left top corner of the area to grab.src - the source YUV frame.dst - the destination YUV frame.
public final void put_area(int mb_row,
int mb_column,
int[] src1,
int[] src2,
int[][] dst)
mb_row - the row of the left top corner of the area to grab.mb_column - the column of the left top corner of the area to grab.src1 - first source YUV frame.src2 - second source YUV frame.dst - the destination YUV frame.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||