JM8.6代码文件结构
总结一下, JM8.6中比较重要的源代码文件
[block.c]用于处理一个块
void |
intrapred_luma (int img_x, int img_y, int *left_available, int *up_available, int *all_available) |
void |
|
int |
dct_luma_16x16 (int new_intra_mode) |
int |
dct_luma (int block_x, int block_y, int *coeff_cost, int old_intra_mode) |
int |
dct_chroma (int uv, int cr_cbp) |
[decoder.c] "decoders in the encoder
void |
decode_one_b8block (int decoder, int mbmode, int b8block, int b8mode, int b8ref) |
|||
void |
decode_one_mb (int decoder, Macroblock *currMB) |
|||
void |
Get_Reference_Block (byte **imY, int block_y, int block_x, int mvhor, int mvver, byte **out) |
|||
Get_Reference_Pixel (byte **imY, int y_pos, int x_pos) |
||||
void |
||||
void |
DecOneForthPix (byte **dY, byte ***dref) |
|||
void |
compute_residue_b8block (int b8block, int i16mode) |
|||
void |
compute_residue_mb (int i16mode) |
|||
void |
Build_Status_Map (byte **s_map) |
|||
void |
Error_Concealment (byte **inY, byte **s_map, byte ***refY) |
|||
void |
Conceal_Error (byte **inY, int mb_y, int mb_x, byte ***refY, byte **s_map) |
|||
[image.c] Code one image/slice |
||||
void |
code_a_picture (Picture *pic) |
|||
void |
frame_picture (Picture *frame) |
|||
static int |
writeout_picture (Picture *pic) |
|||
static int |
picture_structure_decision (Picture *frame, Picture *top, Picture *bot) |
|||
static void |
distortion_fld (float *dis_fld_y, float *dis_fld_u, float *dis_fld_v) |
|||
static void |
find_snr () |
|||
static void |
||||
static void |
frame_mode_buffer (int bit_frame, float snr_frame_y, float snr_frame_u, float snr_frame_v) |
|||
static void |
init_frame () |
|||
static void |
||||
static void |
||||
static void |
||||
static Sourceframe * |
AllocSourceframe (int xs, int ys) |
|||
static void |
FreeSourceframe (Sourceframe *sf) |
|||
static void |
ReadOneFrame (int FrameNoInFile, int HeaderSize, int xs, int ys, Sourceframe *sf) |
|||
static void |
||||
static int |
||||
int |
||||
static void |
||||
static void |
GenerateFullPelRepresentation (pel_t **Fourthpel, pel_t *Fullpel, int xsize, int ysize) |
|||
void |
||||
dummy_slice_too_big (int bits_slice) |
||||
void |
copy_rdopt_data (int bot_block) |
|||
static void |
GenerateFieldComponent (char *src, char *top, char *bot, int xs, int ys) |
[lencod.c]主函数所在文件
void |
|
void |
|
int |
main (int argc, char **argv) |
void |
|
void |
init_poc () |
void |
CAVLC_init () |
void |
init_img () |
void |
free_img () |
Picture * |
|
void |
free_picture (Picture *pic) |
int |
|
void |
|
int |
get_mem_mv (int *******mv) |
int |
get_mem_ACcoeff (int *****cofAC) |
void |
|
void |
|
void |
SetImgType () |
[macroblock.c] Process one macroblock
void |
set_MB_parameters (int mb_addr) |
void |
|
void |
start_macroblock (int mb_addr, int mb_field) |
void |
terminate_macroblock (Boolean *end_of_slice, Boolean *recode_macroblock) |
int |
slice_too_big (int rlc_bits) |
void |
OneComponentLumaPrediction4x4 (int *mpred, int pic_pix_x, int pic_pix_y, int *mv, int ref, StorablePicture **list) |
void |
copyblock4x4 (int *mpred, int block[BLOCK_SIZE][BLOCK_SIZE]) |
void |
LumaPrediction4x4 (int block_x, int block_y, int p_dir, int fw_mode, int bw_mode, int fw_ref_idx, int bw_ref_idx) |
int |
LumaResidualCoding8x8 (int *cbp, int *cbp_blk, int block8x8, int p_dir, int fw_mode, int bw_mode, int fw_refframe, int bw_refframe) |
void |
SetModesAndRefframe (int b8, int *p_dir, int *fw_mode, int *bw_mode, int *fw_ref, int *bw_ref) |
void |
|
void |
OneComponentChromaPrediction4x4 (int *mpred, int block_c_x, int block_c_y, int ******mv, int list_idx, int ref, int blocktype, int uv) |
void |
IntraChromaPrediction4x4 (int uv, int block_x, int block_y) |
void |
ChromaPrediction4x4 (int uv, int block_x, int block_y, int p_dir, int fw_mode, int bw_mode, int fw_ref_idx, int bw_ref_idx) |
void |
ChromaResidualCoding (int *cr_cbp) |
void |
IntraChromaPrediction8x8 (int *mb_up, int *mb_left, int *mb_up_left) |
int |
ZeroRef (Macroblock *currMB) |
int |
MBType2Value (Macroblock *currMB) |
int |
writeIntra4x4Modes (int only_this_block) |
int |
B8Mode2Value (int b8mode, int b8pdir) |
int |
writeMBHeader (int rdopt) |
void |
write_terminating_bit (short bit) |
int |
|
void |
|
void |
write_one_macroblock (int eos_bit) |
int |
BType2CtxRef (int btype) |
int |
writeReferenceFrame (int mode, int i, int j, int fwd_flag, int ref) |
int |
writeMotionVector8x8 (int i0, int j0, int i1, int j1, int refframe, int list_idx, int mv_mode) |
int |
|
int |
|
int |
writeLumaCoeff4x4_CABAC (int b8, int b4, int intra4x4mode) |
int |
writeLumaCoeff8x8 (int block8x8, int intra4x4mode) |
int |
|
int |
predict_nnz (int i, int j) |
int |
predict_nnz_chroma (int i, int j) |
int |
writeCoeff4x4_CAVLC (int block_type, int b8, int b4, int param) |
int |
find_sad_16x16 (int *intra_mode) |
[mb_access.c]
int |
mb_is_available (int mbAddr, int currMbAddr) |
|
void |
||
void |
get_mb_block_pos (int mb_addr, int *x, int *y) |
|
void |
get_mb_pos (int mb_addr, int *x, int *y) |
|
void |
getNonAffNeighbour (unsigned int curr_mb_nr, int xN, int yN, int luma, PixelPos *pix) |
|
void |
getAffNeighbour (unsigned int curr_mb_nr, int xN, int yN, int luma, PixelPos *pix) |
|
void |
getNeighbour (int curr_mb_nr, int xN, int yN, int luma, PixelPos *pix) |
|
void |
getLuma4x4Neighbour (int curr_mb_nr, int block_x, int block_y, int rel_x, int rel_y, PixelPos *pix) |
|
void |
getChroma4x4Neighbour (int curr_mb_nr, int block_x, int block_y, int rel_x, int rel_y, PixelPos *pix) |
|
[mv-search.c] |
||
void |
SetMotionVectorPredictor (int pmv[2], int ***refPic, int ****tmp_mv, int ref_frame, int list, int block_x, int block_y, int blockshape_x, int blockshape_y) |
|
void |
||
void |
||
void |
||
void |
SetupLargerBlocks (int list, int refindex, int max_pos) |
|
void |
SetupFastFullPelSearch (int ref, int list) |
|
void |
||
void |
||
int |
FullPelBlockMotionSearch (pel_t **orig_pic, int ref, int list, int pic_pix_x, int pic_pix_y, int blocktype, int pred_mv_x, int pred_mv_y, int *mv_x, int *mv_y, int search_range, int min_mcost, double lambda) |
|
int |
FastFullPelBlockMotionSearch (pel_t **orig_pic, int ref, int list, int pic_pix_x, int pic_pix_y, int blocktype, int pred_mv_x, int pred_mv_y, int *mv_x, int *mv_y, int search_range, int min_mcost, double lambda) |
|
int |
SATD (int *diff, int use_hadamard) |
|
int |
SubPelBlockMotionSearch (pel_t **orig_pic, int ref, int list, int pic_pix_x, int pic_pix_y, int blocktype, int pred_mv_x, int pred_mv_y, int *mv_x, int *mv_y, int search_pos2, int search_pos4, int min_mcost, double lambda) |
|
int |
BlockMotionSearch (int ref, int list, int mb_x, int mb_y, int blocktype, int search_range, double lambda) |
|
int |
BIDPartitionCost (int blocktype, int block8x8, int fw_ref, int bw_ref, int lambda_factor) |
|
int |
GetSkipCostMB (double lambda) |
|
void |
||
int |
Get_Direct_Cost8x8 (int block, double lambda) |
|
int |
Get_Direct_CostMB (double lambda) |
|
void |
PartitionMotionSearch (int blocktype, int block8x8, double lambda) |
|
void |
[rdopt.c]
void |
clear_rdopt () |
void |
init_rdopt () |
void |
|
int |
CheckReliabilityOfRef (int block, int list_idx, int ref, int mode) |
double |
RDCost_for_4x4IntraBlocks (int *nonzero, int b8, int b4, int ipmode, double lambda, double min_rdcost, int mostProbableMode) |
int |
Mode_Decision_for_4x4IntraBlocks (int b8, int b4, double lambda, int *min_cost) |
int |
Mode_Decision_for_8x8IntraBlocks (int b8, double lambda, int *cost) |
int |
Mode_Decision_for_Intra4x4Macroblock (double lambda, int *cost) |
double |
RDCost_for_8x8blocks (int *cnt_nonz, int *cbp_blk, double lambda, int block, int mode, int pdir, int ref, int bwd_ref) |
int |
|
void |
SetModesAndRefframeForBlocks (int mode) |
void |
Intra16x16_Mode_Decision (Macroblock *currMB, int *i16mode) |
void |
SetCoeffAndReconstruction8x8 (Macroblock *currMB) |
void |
SetMotionVectorsMB (Macroblock *currMB, int bframe) |
int |
RDCost_for_macroblocks (double lambda, int mode, double *min_rdcost) |
void |
store_macroblock_parameters (int mode) |
void |
|
void |
SetRefAndMotionVectors (int block, int mode, int pdir, int fwref, int bwref) |
int |
|
void |
[rdopt_coding_state.c]
void |
delete_coding_state (CSptr cs) |
void |
store_coding_state (CSptr cs) |
void |
reset_coding_state (CSptr cs) |
[vlc.c]
[cabac.c]