net.sourceforge.dvb.projectx.video
Class MpvDecoder
java.lang.Object
|
+--net.sourceforge.dvb.projectx.video.MpvDecoder
- public class MpvDecoder
- extends java.lang.Object
Method Summary |
void |
Add_Block(int comp,
int bx,
int by,
int[] dct_type,
boolean addflag)
integer matrix by dukios
static int ref_dct_matrix_i[] = new int[64];
static {
for(int i = 0; i < 8; i++)
{
for(int j = 0; j < 8; j++)
{
ref_dct_matrix_i[i * 8 + j] = Math.round(ref_dct_matrix[i][j] * 65536.0f);
}
}
}
public void IDCT_referenceFAST(short block[]){
int i, j, k, v;
long tmp0 = ref_dct_matrix_i[0] * block[0];
long partial_product = ref_dct_matrix_i[0] * tmp0;
v = (int) (partial_product >> 32);
block[0] = idct_clip_table[IDCT_CLIP_TABLE_OFFSET + v];
Arrays.fill(block,block[0]);
}
public void IDCT_reference(short block[]){
int i, j, k, v;
long tmp[] = new long[64];
int i8 = 0;
for (i = 0; i < 8; i++)
{
for (j = 0; j < 8; j++)
{
tmp[i8 + j] = (
ref_dct_matrix_i[0 + j] * block[i8] +
ref_dct_matrix_i[8 + j] * block[i8 + 1] +
ref_dct_matrix_i[16 + j] * block[i8 + 2] +
ref_dct_matrix_i[24 + j] * block[i8 + 3] +
ref_dct_matrix_i[32 + j] * block[i8 + 4] +
ref_dct_matrix_i[40 + j] * block[i8 + 5] +
ref_dct_matrix_i[48 + j] * block[i8 + 6] +
ref_dct_matrix_i[56 + j] * block[i8 + 7]);
}
i8 += 8;
}
// Transpose operation is integrated into address mapping by switching loop order of i and j
for (j = 0; j < 8; j++)
{
for (i = 0; i < 8; i++)
{
long partial_product = (
ref_dct_matrix_i[i] * tmp[j] +
ref_dct_matrix_i[8 + i] * tmp[8 + j] +
ref_dct_matrix_i[16 + i] * tmp[16 + j] +
ref_dct_matrix_i[24 + i] * tmp[24 + j] +
ref_dct_matrix_i[32 + i] * tmp[32 + j] +
ref_dct_matrix_i[40 + i] * tmp[40 + j] +
ref_dct_matrix_i[48 + i] * tmp[48 + j] +
ref_dct_matrix_i[56 + i] * tmp[56 + j]);
v = (int) (partial_product >> 32);
block[8 * i + j] = idct_clip_table[IDCT_CLIP_TABLE_OFFSET + v];
}
}
} |
void |
clearPreviewPixel()
|
void |
copyright_extension()
|
int |
decode_macroblock(int[] macroblock_type,
int[] motion_type,
int[] dct_type,
int[][][] PMV,
int[] dc_dct_pred,
int[][] motion_vertical_field_select,
int[] dmvector)
|
void |
decode_motion_vector(int pred,
int r_size,
int motion_code,
int motion_residual,
int full_pel_vector)
|
void |
Decode_MPEG2_Intra_Block(int comp,
int[] dc_dct_pred)
|
void |
Decode_MPEG2_Non_Intra_Block(int comp)
|
void |
Decode_Picture()
|
long |
decodeArray(byte[] array,
boolean direction,
boolean _viewGOP,
boolean fast,
int yGain)
returns arrays byteposition offset of 1st successful decoded GOP
interface, entry point to decode picture for preview |
long |
decodeArray(byte[] array,
int start_position,
boolean direction,
boolean _viewGOP,
boolean fast,
int yGain)
returns arrays byteposition offset of 1st successful decoded GOP
interface, entry point to decode picture for preview |
void |
Dual_Prime_Arithmetic(int[][] DMV,
int[] dmvector,
int mvx,
int mvy)
|
int |
extern_Get_Hdr()
|
int |
extra_bit_information()
|
int |
Get_Chroma_DC_dct_diff()
|
int |
Get_coded_block_pattern()
|
int |
Get_Hdr()
|
int |
Get_Luma_DC_dct_diff()
|
int |
Get_macroblock_address_increment()
|
int |
getAspectRatio()
|
int[] |
getCutImage()
create new smaller cutimage pixel data |
int |
getErrors()
|
int |
getHeight()
|
java.lang.String |
getInfo_1()
|
java.lang.String |
getInfo_2()
|
boolean |
getPalPlusInfo()
|
int[] |
getPixels()
|
int[] |
getPreviewPixel()
|
int |
getWidth()
|
java.lang.String |
getWSSFormatInfo()
|
java.lang.String |
getWSSInfo()
|
void |
InitialDecoder()
|
boolean |
isAccelerated()
|
void |
macroblock_modes(int[] pmacroblock_type,
int[] pmotion_type,
int[] pmotion_vector_count,
int[] pmv_format,
int[] pdmv,
int[] pmvscale,
int[] pdct_type)
|
void |
motion_compensation(int[] MBA,
int[] macroblock_type,
int[] motion_type,
int[][][] PMV,
int[][] motion_vertical_field_select,
int[] dmvector,
int[] dct_type)
|
void |
motion_vector(int[] PMV,
int[] dmvector,
int h_r_size,
int v_r_size,
int[] dmv,
int[] mvscale,
int full_pel_vector)
|
void |
motion_vectors(int[][][] PMV,
int[] dmvector,
int[][] motion_vertical_field_select,
int s,
int[] motion_vector_count,
int[] mv_format,
int h_r_size,
int v_r_size,
int[] dmv,
int[] mvscale)
|
void |
picture_data()
|
void |
resetDecoder()
|
void |
skipped_macroblock(int[] dc_dct_pred,
int[][][] PMV,
int[] motion_type,
int[][] motion_vertical_field_select,
int[] macroblock_type)
|
int |
slice_header()
|
int |
slice(int MBAmax)
|
int |
start_of_slice(int[] MBA,
int[] MBAinc,
int[] dc_dct_pred,
int[][][] PMV)
|
void |
Update_Picture_Buffers()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MpvDecoder
public MpvDecoder()
isAccelerated
public boolean isAccelerated()
extern_Get_Hdr
public int extern_Get_Hdr()
Get_Hdr
public int Get_Hdr()
copyright_extension
public void copyright_extension()
resetDecoder
public void resetDecoder()
InitialDecoder
public void InitialDecoder()
Decode_Picture
public void Decode_Picture()
Update_Picture_Buffers
public void Update_Picture_Buffers()
picture_data
public void picture_data()
slice_header
public int slice_header()
extra_bit_information
public int extra_bit_information()
slice
public int slice(int MBAmax)
skipped_macroblock
public void skipped_macroblock(int[] dc_dct_pred,
int[][][] PMV,
int[] motion_type,
int[][] motion_vertical_field_select,
int[] macroblock_type)
decode_macroblock
public int decode_macroblock(int[] macroblock_type,
int[] motion_type,
int[] dct_type,
int[][][] PMV,
int[] dc_dct_pred,
int[][] motion_vertical_field_select,
int[] dmvector)
Decode_MPEG2_Intra_Block
public void Decode_MPEG2_Intra_Block(int comp,
int[] dc_dct_pred)
Decode_MPEG2_Non_Intra_Block
public void Decode_MPEG2_Non_Intra_Block(int comp)
Get_Luma_DC_dct_diff
public int Get_Luma_DC_dct_diff()
Get_Chroma_DC_dct_diff
public int Get_Chroma_DC_dct_diff()
Get_coded_block_pattern
public int Get_coded_block_pattern()
start_of_slice
public int start_of_slice(int[] MBA,
int[] MBAinc,
int[] dc_dct_pred,
int[][][] PMV)
Get_macroblock_address_increment
public int Get_macroblock_address_increment()
motion_vectors
public void motion_vectors(int[][][] PMV,
int[] dmvector,
int[][] motion_vertical_field_select,
int s,
int[] motion_vector_count,
int[] mv_format,
int h_r_size,
int v_r_size,
int[] dmv,
int[] mvscale)
motion_vector
public void motion_vector(int[] PMV,
int[] dmvector,
int h_r_size,
int v_r_size,
int[] dmv,
int[] mvscale,
int full_pel_vector)
decode_motion_vector
public void decode_motion_vector(int pred,
int r_size,
int motion_code,
int motion_residual,
int full_pel_vector)
Dual_Prime_Arithmetic
public void Dual_Prime_Arithmetic(int[][] DMV,
int[] dmvector,
int mvx,
int mvy)
motion_compensation
public void motion_compensation(int[] MBA,
int[] macroblock_type,
int[] motion_type,
int[][][] PMV,
int[][] motion_vertical_field_select,
int[] dmvector,
int[] dct_type)
Add_Block
public void Add_Block(int comp,
int bx,
int by,
int[] dct_type,
boolean addflag)
- integer matrix by dukios
static int ref_dct_matrix_i[] = new int[64];
static {
for(int i = 0; i < 8; i++)
{
for(int j = 0; j < 8; j++)
{
ref_dct_matrix_i[i * 8 + j] = Math.round(ref_dct_matrix[i][j] * 65536.0f);
}
}
}
public void IDCT_referenceFAST(short block[]){
int i, j, k, v;
long tmp0 = ref_dct_matrix_i[0] * block[0];
long partial_product = ref_dct_matrix_i[0] * tmp0;
v = (int) (partial_product >> 32);
block[0] = idct_clip_table[IDCT_CLIP_TABLE_OFFSET + v];
Arrays.fill(block,block[0]);
}
public void IDCT_reference(short block[]){
int i, j, k, v;
long tmp[] = new long[64];
int i8 = 0;
for (i = 0; i < 8; i++)
{
for (j = 0; j < 8; j++)
{
tmp[i8 + j] = (
ref_dct_matrix_i[0 + j] * block[i8] +
ref_dct_matrix_i[8 + j] * block[i8 + 1] +
ref_dct_matrix_i[16 + j] * block[i8 + 2] +
ref_dct_matrix_i[24 + j] * block[i8 + 3] +
ref_dct_matrix_i[32 + j] * block[i8 + 4] +
ref_dct_matrix_i[40 + j] * block[i8 + 5] +
ref_dct_matrix_i[48 + j] * block[i8 + 6] +
ref_dct_matrix_i[56 + j] * block[i8 + 7]);
}
i8 += 8;
}
// Transpose operation is integrated into address mapping by switching loop order of i and j
for (j = 0; j < 8; j++)
{
for (i = 0; i < 8; i++)
{
long partial_product = (
ref_dct_matrix_i[i] * tmp[j] +
ref_dct_matrix_i[8 + i] * tmp[8 + j] +
ref_dct_matrix_i[16 + i] * tmp[16 + j] +
ref_dct_matrix_i[24 + i] * tmp[24 + j] +
ref_dct_matrix_i[32 + i] * tmp[32 + j] +
ref_dct_matrix_i[40 + i] * tmp[40 + j] +
ref_dct_matrix_i[48 + i] * tmp[48 + j] +
ref_dct_matrix_i[56 + i] * tmp[56 + j]);
v = (int) (partial_product >> 32);
block[8 * i + j] = idct_clip_table[IDCT_CLIP_TABLE_OFFSET + v];
}
}
}
macroblock_modes
public void macroblock_modes(int[] pmacroblock_type,
int[] pmotion_type,
int[] pmotion_vector_count,
int[] pmv_format,
int[] pdmv,
int[] pmvscale,
int[] pdct_type)
getPixels
public int[] getPixels()
getPreviewPixel
public int[] getPreviewPixel()
clearPreviewPixel
public void clearPreviewPixel()
getWidth
public int getWidth()
getHeight
public int getHeight()
getAspectRatio
public int getAspectRatio()
getInfo_1
public java.lang.String getInfo_1()
getInfo_2
public java.lang.String getInfo_2()
getWSSInfo
public java.lang.String getWSSInfo()
getPalPlusInfo
public boolean getPalPlusInfo()
getWSSFormatInfo
public java.lang.String getWSSFormatInfo()
getErrors
public int getErrors()
getCutImage
public int[] getCutImage()
- create new smaller cutimage pixel data
decodeArray
public long decodeArray(byte[] array,
boolean direction,
boolean _viewGOP,
boolean fast,
int yGain)
- returns arrays byteposition offset of 1st successful decoded GOP
interface, entry point to decode picture for preview
- Returns:
-
decodeArray
public long decodeArray(byte[] array,
int start_position,
boolean direction,
boolean _viewGOP,
boolean fast,
int yGain)
- returns arrays byteposition offset of 1st successful decoded GOP
interface, entry point to decode picture for preview
- Returns:
-