#include "block.h"
#include "macroblock_p444.h"
Go to the source code of this file.
Functions | |
void | next_macroblock (Macroblock *currMB) |
void | start_macroblock (Slice *currSlice, Macroblock **currMB, int mb_addr, Boolean mb_field) |
void | reset_macroblock (Macroblock *currMB) |
void | end_macroblock (Macroblock *currMB, Boolean *end_of_slice, Boolean *recode_macroblock) |
void | write_macroblock (Macroblock *currMB, int eos_bit, Boolean prev_recode_mb) |
int | luma_residual_coding_16x16 (Macroblock *currMB, int, int[2]) |
int | luma_residual_coding_8x8 (Macroblock *currMB, int *, int64 *, int, short, int[2], char *) |
void | luma_residual_coding (Macroblock *currMB) |
void | chroma_residual_coding (Macroblock *currMB) |
void | intra_chroma_RD_decision (Macroblock *currMB, RD_PARAMS) |
byte | TransformDecision (Macroblock *currMB, int, int *) |
int | B8Mode2Value (Slice *currSlice, short b8mode, short b8pdir) |
int | writeMBLayerPSlice (Macroblock *currMB, int rdopt, int *coeff_rate) |
int | writeMBLayerBSlice (Macroblock *currMB, int rdopt, int *coeff_rate) |
int | writeMBLayerISlice (Macroblock *currMB, int rdopt, int *coeff_rate) |
void | write_terminating_bit (Slice *currSlice, short bit) |
int | writeMotionInfo2NAL (Macroblock *currMB) |
int | write_pslice_motion_info_to_NAL (Macroblock *currMB) |
int | write_bslice_motion_info_to_NAL (Macroblock *currMB) |
int | writeReferenceFrame (Macroblock *currMB, int i, int j, int list_idx, int ref) |
int | writeMotionVector8x8 (Macroblock *currMB, int i0, int j0, int i1, int j1, int refframe, int list_idx, int mv_mode, short bipred_me) |
int | writeCoeff4x4_CABAC (Macroblock *currMB, ColorPlane, int, int, int) |
int | writeCoeff8x8_CABAC (Macroblock *currMB, ColorPlane, int, int) |
int | writeCoeff8x8 (Macroblock *currMB, ColorPlane, int, int, int) |
int | writeCoeff16x16_CABAC (Macroblock *currMB, ColorPlane) |
int | writeCoeff16x16_CAVLC (Macroblock *currMB, ColorPlane) |
int | writeCoeff4x4_CAVLC_normal (Macroblock *currMB, int block_type, int b8, int b4, int param) |
int | writeCoeff4x4_CAVLC_444 (Macroblock *currMB, int block_type, int b8, int b4, int param) |
int | distI16x16_sad (Macroblock *currMB, imgpel **img_org, imgpel **pred_img, double min_cost) |
int | distI16x16_sse (Macroblock *currMB, imgpel **img_org, imgpel **pred_img, double min_cost) |
int | distI16x16_satd (Macroblock *currMB, imgpel **img_org, imgpel **pred_img, double min_cost) |
double | find_sad_16x16_JM (Macroblock *currMB) |
int | predict_nnz (Macroblock *currMB, int block_type, int i, int j) |
int | predict_nnz_chroma (Macroblock *currMB, int i, int j) |
void | SetLagrangianMultipliersOn (ImageParameters *p_Img, InputParameters *p_Inp) |
void | SetLagrangianMultipliersOff (ImageParameters *p_Img, InputParameters *p_Inp) |
void | set_modes_and_reframe (Macroblock *currMB, int b8, short *p_dir, int list_mode[2], char *list_ref_idx) |
void | set_modes_and_reframe_b_slice (Macroblock *currMB, int b8, short *p_dir, int list_mode[2], char *list_ref_idx) |
void | set_modes_and_reframe_p_slice (Macroblock *currMB, int b8, short *p_dir, int list_mode[2], char *list_ref_idx) |
Variables | |
static const short | part_size [8][2] |
static const short | block_size [8][2] |
Definition in file macroblock.h.
int B8Mode2Value | ( | Slice * | currSlice, | |
short | b8mode, | |||
short | b8pdir | |||
) |
Converts 8x8 block type to coding value.
Definition at line 1757 of file macroblock.c.
References slice::slice_type.
Referenced by RDCost_for_8x8blocks(), submacroblock_mode_decision_low(), writeMBLayerBSlice(), and writeMBLayerPSlice().
void chroma_residual_coding | ( | Macroblock * | currMB | ) |
Chroma residual coding for an macroblock.
Definition at line 1376 of file macroblock.c.
References chroma_prediction_4x4(), copy_image_data(), dct_chroma_sp(), dct_chroma_sp2(), storable_picture::imgUV, slice::mb_ores, slice::mb_pred, slice::mb_rres, macroblock::mb_type, macroblock::opix_c_y, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, and slice::slice_type.
Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().
void end_macroblock | ( | Macroblock * | currMB, | |
Boolean * | end_of_slice, | |||
Boolean * | recode_macroblock | |||
) |
terminates processing of the current macroblock depending on the chosen slice mode
Check end-of-slice group condition first
Now check maximum # of MBs in slice
Check if the last coded macroblock fits into the size of the slice But only if this is not the first macroblock of this slice
(first MB OR first MB in a slice) AND bigger that maximum size of slice
MB that did not fit in this slice anymore is not a Skip MB
currMB | Current Macroblock | |
end_of_slice | returns true for last macroblock of a slice, otherwise false | |
recode_macroblock | returns true if max. slice size is exceeded an macroblock must be recoded in next slice |
Definition at line 536 of file macroblock.c.
References assignSE2partition, Bitstream::bits_to_go, Bitstream::bits_to_go_skip, Bitstream::byte_buf, Bitstream::byte_buf_skip, Bitstream::byte_pos, Bitstream::byte_pos_skip, img_par::cod_counter, error(), errortext, ET_SIZE, FmoGetLastCodedMBOfSliceGroup(), FmoMB2SliceGroup(), syntaxelement::len, slice::max_part_nr, macroblock::mbAddrX, slice::num_mb, macroblock::p_Img, macroblock::p_slice, slice::partArr, inp_par_enc::slice_argument, inp_par_enc::slice_mode, macroblock::slice_nr, slice::slice_too_big, slice_too_big(), Bitstream::stored_bits_to_go, Bitstream::stored_byte_buf, Bitstream::stored_byte_pos, syntaxelement::type, syntaxelement::value1, syntaxelement::value2, and writeSE_UVLC().
Referenced by encode_one_slice(), and encode_one_slice_MBAFF().
double find_sad_16x16_JM | ( | Macroblock * | currMB | ) |
Find best 16x16 based intra mode.
< pixel position p(0,-1)
< pixel positions p(-1, -1..15)
Definition at line 4789 of file macroblock.c.
References slice::mpr_16x16, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, slice::slice_type, and inp_par_enc::UseConstrainedIntraPred.
Referenced by init_rdopt().
void intra_chroma_RD_decision | ( | Macroblock * | currMB, | |
RD_PARAMS | ||||
) |
RD Decision for Intra prediction mode of the chrominance layers of one macroblock.
< pixel position p(0,-1)
< pixel positions p(-1, -1..15)
Definition at line 1468 of file macroblock.c.
References macroblock::c_ipred_mode, img_par::field_mode, slice::mpr_16x16, macroblock::p_Img, macroblock::p_slice, Q_PEL, and inp_par_enc::UseConstrainedIntraPred.
Referenced by SetChromaPredMode().
void luma_residual_coding | ( | Macroblock * | currMB | ) |
Residual Coding of a Luma macroblock (not for intra).
Definition at line 1209 of file macroblock.c.
References _LUMA_MB_COEFF_COST_, macroblock::cbp_blk, slice::cofAC, copy_image_data_16x16(), copyblock_sp(), storable_picture::imgY, luma_prediction(), luma_residual_coding_16x16(), luma_residual_coding_8x8(), slice::mb_ores, slice::mb_pred, macroblock::mb_type, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, macroblock::qp_scaled, and slice::slice_type.
Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().
int luma_residual_coding_16x16 | ( | Macroblock * | currMB, | |
int | block8x8, | |||
int | list_mode[2] | |||
) |
Residual Coding of an 8x8 Luma block (not for intra).
currMB | Current Macroblock to be coded | |
block8x8 | block number of 8x8 block | |
list_mode | list prediction mode (1-7, 0=DIRECT) |
Definition at line 814 of file macroblock.c.
References _LUMA_COEFF_COST_, macroblock::cbp_blk, slice::cofAC, copy_image_data_8x8(), copyblock_sp(), storable_picture::imgY, slice::mb_pred, macroblock::p_Img, macroblock::p_slice, macroblock::pix_x, macroblock::pix_y, macroblock::qp_scaled, and slice::slice_type.
Referenced by luma_residual_coding().
int luma_residual_coding_8x8 | ( | Macroblock * | currMB, | |
int * | cbp, | |||
int64 * | cbp_blk, | |||
int | block8x8, | |||
short | p_dir, | |||
int | list_mode[2], | |||
char * | ref_idx | |||
) |
Residual Coding of an 8x8 Luma block (not for intra).
currMB | Current Macroblock to be coded | |
cbp | Output: cbp (updated according to processed 8x8 luminance block) | |
cbp_blk | Output: block cbp (updated according to processed 8x8 luminance block) | |
block8x8 | block number of 8x8 block | |
p_dir | prediction direction | |
list_mode | list0 prediction mode (1-7, 0=DIRECT) | |
ref_idx | reference pictures for each list |
Definition at line 933 of file macroblock.c.
References _LUMA_COEFF_COST_, slice::cofAC, copy_image_data_8x8(), copyblock_sp(), storable_picture::imgY, luma_prediction(), slice::mb_ores, slice::mb_pred, macroblock::opix_y, macroblock::p_slice, img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, macroblock::qp_scaled, and slice::slice_type.
Referenced by luma_residual_coding(), RDCost_for_8x8blocks(), and submacroblock_mode_decision_low().
void next_macroblock | ( | Macroblock * | currMB | ) |
updates the coordinates and statistics parameter for the next macroblock
Definition at line 182 of file macroblock.c.
References macroblock::c_ipred_mode, macroblock::mb_type, macroblock::p_Img, macroblock::p_slice, macroblock::qp, inp_par_enc::slice_mode, and slice::slice_type.
Referenced by encode_one_slice(), and encode_one_slice_MBAFF().
int predict_nnz | ( | Macroblock * | currMB, | |
int | block_type, | |||
int | i, | |||
int | j | |||
) |
Get the Prediction from the Neighboring Blocks for Number of Nonzero Coefficients.
Luma Blocks
Definition at line 3740 of file macroblock.c.
References error(), get4x4Neighbour(), img_par::nz_coeff, macroblock::p_Img, and macroblock::p_slice.
Referenced by est_RunLevel_CAVLC(), writeCoeff4x4_CAVLC_444(), and writeCoeff4x4_CAVLC_normal().
int predict_nnz_chroma | ( | Macroblock * | currMB, | |
int | i, | |||
int | j | |||
) |
Get the Prediction from the Neighboring Blocks for Number of Nonzero Coefficients.
Chroma Blocks
Definition at line 3831 of file macroblock.c.
References get4x4Neighbour(), img_par::nz_coeff, macroblock::p_Img, macroblock::p_slice, and YUV444.
Referenced by est_RunLevel_CAVLC(), writeCoeff4x4_CAVLC_444(), and writeCoeff4x4_CAVLC_normal().
void reset_macroblock | ( | Macroblock * | currMB | ) |
resets info for the current macroblock
currMB | current macroblock |
Definition at line 288 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, macroblock::intra_pred_modes8x8, macroblock::mb_type, macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::mvd, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, and inp_par_enc::UseConstrainedIntraPred.
Referenced by start_macroblock().
void set_modes_and_reframe | ( | Macroblock * | currMB, | |
int | b8, | |||
short * | p_dir, | |||
int | list_mode[2], | |||
char * | list_ref_idx | |||
) |
Set mode parameters and reference frames for an 8x8 block.
Definition at line 1077 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, storable_picture::motion, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, and slice::slice_type.
void set_modes_and_reframe_b_slice | ( | Macroblock * | currMB, | |
int | b8, | |||
short * | p_dir, | |||
int | list_mode[2], | |||
char * | list_ref_idx | |||
) |
Set mode parameters and reference frames for an 8x8 block.
Definition at line 1161 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, storable_picture::motion, macroblock::p_Img, and pic_motion_params::ref_idx.
void set_modes_and_reframe_p_slice | ( | Macroblock * | currMB, | |
int | b8, | |||
short * | p_dir, | |||
int | list_mode[2], | |||
char * | list_ref_idx | |||
) |
Set mode parameters and reference frames for an 8x8 block.
Definition at line 1136 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, storable_picture::motion, macroblock::p_Img, and pic_motion_params::ref_idx.
void start_macroblock | ( | Slice * | currSlice, | |
Macroblock ** | currMB, | |||
int | mb_addr, | |||
Boolean | mb_field | |||
) |
initializes the current macroblock
currSlice | current slice | |
currMB | current macroblock | |
mb_addr | current macroblock address | |
mb_field | true for field macroblock coding |
< avoid decreasing the NumberofbasicUnit for the same MB twice
Definition at line 374 of file macroblock.c.
References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, cbp_linfo_inter_normal(), cbp_linfo_inter_other(), cbp_linfo_intra_normal(), cbp_linfo_intra_other(), CheckAvailabilityOfNeighbors(), CheckAvailabilityOfNeighborsCABAC(), img_par::cod_counter, slice::DFAlphaC0Offset, slice::DFBetaOffset, slice::DFDisableIdc, FmoGetPreviousMBNr(), init_ME_engine(), inp_par_enc::IntraProfile, slice::max_part_nr, img_par::mb_data, pic_motion_params::mb_field, inp_par_enc::MbInterlace, storable_picture::motion, macroblock::p_slice, slice::partArr, img_par::qp, img_par::qpsp, rc_handle_mb(), inp_par_enc::RCEnable, reset_macroblock(), ResetFastFullIntegerSearch(), set_MB_parameters(), inp_par_enc::slice_mode, macroblock::slice_nr, slice::slice_type, Bitstream::stored_bits_to_go, Bitstream::stored_byte_buf, Bitstream::stored_byte_pos, and update_qp().
Referenced by encode_one_slice(), and encode_one_slice_MBAFF().
byte TransformDecision | ( | Macroblock * | currMB, | |
int | , | |||
int * | ||||
) |
Makes the decision if 8x8 tranform will be used (for RD-off).
Definition at line 1293 of file macroblock.c.
References luma_prediction(), slice::mb_pred, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, and macroblock::pix_x.
Referenced by encode_one_macroblock_low().
int write_bslice_motion_info_to_NAL | ( | Macroblock * | currMB | ) |
Writes motion info (b slice).
Definition at line 2814 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, macroblock::mb_type, storable_picture::motion, macroblock::p_slice, pic_motion_params::ref_idx, writeMotionVector8x8(), and writeReferenceFrame().
void write_macroblock | ( | Macroblock * | currMB, | |
int | eos_bit, | |||
Boolean | prev_recode_mb | |||
) |
Passes the chosen syntax elements to the NAL.
Definition at line 2599 of file macroblock.c.
References img_par::intras, slice::max_part_nr, macroblock::mb_type, macroblock::mbAddrX, macroblock::p_Img, macroblock::p_slice, slice::partArr, rc_update_mb_stats(), inp_par_enc::RCEnable, reset_mb_nz_coeff(), slice::slice_type, and inp_par_enc::UseConstrainedIntraPred.
Referenced by encode_one_slice(), and encode_one_slice_MBAFF().
int write_pslice_motion_info_to_NAL | ( | Macroblock * | currMB | ) |
Writes motion info (p slice).
Definition at line 2902 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, macroblock::mb_type, storable_picture::motion, macroblock::p_slice, pic_motion_params::ref_idx, writeMotionVector8x8(), writeReferenceFrame(), and ZeroRef().
int writeCoeff16x16_CABAC | ( | Macroblock * | currMB, | |
ColorPlane | ||||
) |
Write Luma Coeffcients, as well as Cb and Cr Coefficients in the case of 444 common mode, of an macroblock.
Definition at line 3573 of file macroblock.c.
References assignSE2partition, slice::cofAC, slice::cofDC, syntaxelement::context, syntaxelement::len, macroblock::mb_type, macroblock::mbAddrX, img_par::nz_coeff, macroblock::p_slice, slice::partArr, reset_mb_nz_coeff(), macroblock::subblock_x, macroblock::subblock_y, syntaxelement::type, syntaxelement::value1, syntaxelement::value2, writeCoeff8x8(), and writeRunLevel_CABAC().
int writeCoeff16x16_CAVLC | ( | Macroblock * | currMB, | |
ColorPlane | ||||
) |
Write Luma Coeffcients, as well as Cb and Cr Coefficients in the case of 444 common mode, of an macroblock.
Definition at line 3477 of file macroblock.c.
References macroblock::mb_type, macroblock::mbAddrX, img_par::nz_coeff, macroblock::p_Img, macroblock::p_slice, reset_mb_nz_coeff(), and writeCoeff8x8().
int writeCoeff4x4_CABAC | ( | Macroblock * | currMB, | |
ColorPlane | , | |||
int | , | |||
int | , | |||
int | ||||
) |
Writes Coeffs of an 4x4 block.
Definition at line 3220 of file macroblock.c.
References assignSE2partition, slice::cofAC, syntaxelement::context, syntaxelement::len, macroblock::p_slice, slice::partArr, macroblock::subblock_x, macroblock::subblock_y, syntaxelement::type, syntaxelement::value1, syntaxelement::value2, and writeRunLevel_CABAC().
Referenced by rdcost_for_4x4_intra_blocks(), rdcost_for_4x4_intra_blocks_444(), and writeCoeff8x8().
int writeCoeff4x4_CAVLC_444 | ( | Macroblock * | currMB, | |
int | block_type, | |||
int | b8, | |||
int | b4, | |||
int | param | |||
) |
Writes coeff of an 4x4 block (CAVLC).
Definition at line 4243 of file macroblock.c.
References assignSE2partition, slice::cofAC, slice::cofDC, error(), syntaxelement::len, macroblock::mbAddrX, img_par::nz_coeff, macroblock::p_slice, slice::partArr, predict_nnz(), predict_nnz_chroma(), syntaxelement::type, syntaxelement::value1, syntaxelement::value2, writeSyntaxElement_Level_VLC1(), writeSyntaxElement_Level_VLCN(), writeSyntaxElement_NumCoeffTrailingOnes(), writeSyntaxElement_NumCoeffTrailingOnesChromaDC(), writeSyntaxElement_Run(), writeSyntaxElement_TotalZeros(), writeSyntaxElement_TotalZerosChromaDC(), and writeSyntaxElement_VLC().
int writeCoeff4x4_CAVLC_normal | ( | Macroblock * | currMB, | |
int | block_type, | |||
int | b8, | |||
int | b4, | |||
int | param | |||
) |
Writes coeff of an 4x4 block (CAVLC).
Definition at line 3896 of file macroblock.c.
References assignSE2partition, slice::cofAC, slice::cofDC, error(), syntaxelement::len, macroblock::mbAddrX, img_par::nz_coeff, macroblock::p_slice, slice::partArr, predict_nnz(), predict_nnz_chroma(), syntaxelement::type, syntaxelement::value1, syntaxelement::value2, writeSyntaxElement_Level_VLC1(), writeSyntaxElement_Level_VLCN(), writeSyntaxElement_NumCoeffTrailingOnes(), writeSyntaxElement_NumCoeffTrailingOnesChromaDC(), writeSyntaxElement_Run(), writeSyntaxElement_TotalZeros(), writeSyntaxElement_TotalZerosChromaDC(), and writeSyntaxElement_VLC().
int writeCoeff8x8 | ( | Macroblock * | currMB, | |
ColorPlane | , | |||
int | , | |||
int | , | |||
int | ||||
) |
Writes Luma Coeff of an 8x8 block.
Definition at line 3353 of file macroblock.c.
References macroblock::p_slice, writeCoeff4x4_CABAC(), and writeCoeff8x8_CABAC().
Referenced by RDCost_for_8x8blocks(), writeCoeff16x16_CABAC(), and writeCoeff16x16_CAVLC().
int writeCoeff8x8_CABAC | ( | Macroblock * | currMB, | |
ColorPlane | , | |||
int | , | |||
int | ||||
) |
Writes coefficients of an 8x8 block (CABAC).
Definition at line 3286 of file macroblock.c.
References assignSE2partition, slice::cofAC, syntaxelement::context, syntaxelement::len, macroblock::p_slice, slice::partArr, slice::slice_type, macroblock::subblock_x, macroblock::subblock_y, syntaxelement::type, syntaxelement::value1, syntaxelement::value2, and writeRunLevel_CABAC().
Referenced by rdcost_for_8x8_intra_blocks(), rdcost_for_8x8_intra_blocks_444(), and writeCoeff8x8().
int writeMBLayerBSlice | ( | Macroblock * | currMB, | |
int | rdopt, | |||
int * | coeff_rate | |||
) |
Codes macroblock header.
currMB | current macroblock | |
rdopt | true for calls during RD-optimization | |
coeff_rate | bitrate of Luma and Chroma coeff |
Definition at line 1891 of file macroblock.c.
References assignSE2partition, B8Mode2Value(), macroblock::c_ipred_mode, CheckAvailabilityOfNeighborsCABAC(), img_par::cod_counter, field_flag_inference(), FmoGetNextMBNr(), syntaxelement::len, img_par::mb_data, macroblock::mb_type, macroblock::mb_x, macroblock::mb_y, macroblock::mbAddrX, MBType2Value(), macroblock::p_Img, macroblock::p_slice, slice::partArr, reset_mb_nz_coeff(), syntaxelement::type, syntaxelement::value1, syntaxelement::value2, writeCBPandDquant(), writeChromaCoeff(), writeChromaIntraPredMode(), writeIPCMData(), writeSE_Flag(), writeSE_UVLC(), YUV400, and YUV444.
int writeMBLayerPSlice | ( | Macroblock * | currMB, | |
int | rdopt, | |||
int * | coeff_rate | |||
) |
Codes macroblock header.
currMB | current macroblock | |
rdopt | true for calls during RD-optimization | |
coeff_rate | bitrate of Luma and Chroma coeff |
Definition at line 2162 of file macroblock.c.
References assignSE2partition, B8Mode2Value(), macroblock::c_ipred_mode, CheckAvailabilityOfNeighborsCABAC(), img_par::cod_counter, field_flag_inference(), FmoGetNextMBNr(), syntaxelement::len, img_par::mb_data, macroblock::mb_type, macroblock::mb_x, macroblock::mb_y, macroblock::mbAddrX, MBType2Value(), macroblock::p_Img, macroblock::p_slice, slice::partArr, reset_mb_nz_coeff(), syntaxelement::type, syntaxelement::value1, syntaxelement::value2, writeCBPandDquant(), writeChromaCoeff(), writeChromaIntraPredMode(), writeIPCMData(), writeSE_Flag(), writeSE_UVLC(), YUV400, and YUV444.
int writeMotionInfo2NAL | ( | Macroblock * | currMB | ) |
Writes motion info.
Definition at line 2957 of file macroblock.c.
References macroblock::block_x, macroblock::block_y, macroblock::mb_type, storable_picture::motion, macroblock::p_slice, pic_motion_params::ref_idx, slice::slice_type, writeMotionVector8x8(), writeReferenceFrame(), and ZeroRef().
int writeMotionVector8x8 | ( | Macroblock * | currMB, | |
int | i0, | |||
int | j0, | |||
int | i1, | |||
int | j1, | |||
int | refframe, | |||
int | list_idx, | |||
int | mv_mode, | |||
short | bipred_me | |||
) |
Writes motion vectors of an 8x8 block.
Definition at line 2721 of file macroblock.c.
References slice::all_mv, assignSE2partition, slice::bipred_mv, macroblock::block_x, macroblock::block_y, get_neighbors(), is_bipred_enabled(), syntaxelement::len, storable_picture::motion, pic_motion_params::mv, macroblock::mvd, macroblock::p_Img, macroblock::p_slice, slice::partArr, pic_motion_params::ref_idx, macroblock::subblock_x, macroblock::subblock_y, syntaxelement::type, syntaxelement::value1, and syntaxelement::value2.
Referenced by RDCost_for_8x8blocks(), write_bslice_motion_info_to_NAL(), write_pslice_motion_info_to_NAL(), and writeMotionInfo2NAL().
int writeReferenceFrame | ( | Macroblock * | currMB, | |
int | i, | |||
int | j, | |||
int | list_idx, | |||
int | ref | |||
) |
Codes the reference frame.
Definition at line 2684 of file macroblock.c.
References assignSE2partition, syntaxelement::len, macroblock::p_slice, slice::partArr, macroblock::subblock_x, macroblock::subblock_y, syntaxelement::type, syntaxelement::value1, and syntaxelement::value2.
Referenced by RDCost_for_8x8blocks(), write_bslice_motion_info_to_NAL(), write_pslice_motion_info_to_NAL(), and writeMotionInfo2NAL().
const short block_size[8][2] [static] |
Initial value:
{ {16, 16}, {16, 16}, {16, 8}, {8, 16}, {8, 8}, {8, 4}, {4, 8}, {4, 4} }
Definition at line 37 of file macroblock.h.
const short part_size[8][2] [static] |
Initial value:
{ {4, 4}, {4, 4}, {4, 2}, {2, 4}, {2, 2}, {2, 1}, {1, 2}, {1, 1} }
Definition at line 25 of file macroblock.h.