#include "win32.h"
#include "defines.h"
#include "parsetcommon.h"
#include "ifunctions.h"
#include "frame.h"
#include "io_video.h"
#include "io_image.h"
#include "nalucommon.h"

Go to the source code of this file.
Data Structures | |
| struct | EncodingEnvironment |
| struct to characterize the state of the arithmetic coding engine More... | |
| struct | BiContextType |
| struct for context management More... | |
| struct | MotionInfoContexts |
| struct | TextureInfoContexts |
| struct | pix_pos |
| Pixel position for checking neighbors. More... | |
| struct | DecRefPicMarking_s |
| Buffer structure for decoded reference picture marking commands. More... | |
| struct | syntaxelement |
| Syntax Element. More... | |
| struct | macroblock |
| Macroblock. More... | |
| struct | Bitstream |
| Bitstream. More... | |
| struct | datapartition |
| DataPartition. More... | |
| struct | Slice |
| Slice. More... | |
| struct | DistMetric |
| DistortionParams. More... | |
| struct | DistortionParams |
| struct | Picture |
| struct | LambdaParams |
| struct | VUIParameters |
| struct | Block8x8Info |
| block 8x8 temporary RD info More... | |
| struct | InputParameters |
| all input parameters More... | |
| struct | ImageParameters |
| ImageParameters. More... | |
| struct | pic_motion_params2 |
| definition of pic motion parameters More... | |
| struct | MotionVector |
| struct | RD_DATA |
| struct | GOP_DATA |
| struct | RD_8x8DATA |
| struct | RD_PARAMS |
| struct | SubImageContainer |
Defines | |
| #define | NUM_MB_TYPE_CTX 11 |
| #define | NUM_B8_TYPE_CTX 9 |
| #define | NUM_MV_RES_CTX 10 |
| #define | NUM_REF_NO_CTX 6 |
| #define | NUM_DELTA_QP_CTX 4 |
| #define | NUM_MB_AFF_CTX 4 |
| #define | NUM_TRANSFORM_SIZE_CTX 3 |
| #define | NUM_IPR_CTX 2 |
| #define | NUM_CIPR_CTX 4 |
| #define | NUM_CBP_CTX 4 |
| #define | NUM_BCBP_CTX 4 |
| #define | NUM_MAP_CTX 15 |
| #define | NUM_LAST_CTX 15 |
| #define | NUM_ONE_CTX 5 |
| #define | NUM_ABS_CTX 5 |
| #define | MAXSLICEPERPICTURE 100 |
| #define | ET_SIZE 300 |
Typedefs | |
| typedef EncodingEnvironment * | EncodingEnvironmentPtr |
| typedef BiContextType * | BiContextTypePtr |
| typedef struct pix_pos | PixelPos |
| typedef struct DecRefPicMarking_s | DecRefPicMarking_t |
| typedef struct syntaxelement | SyntaxElement |
| typedef struct macroblock | Macroblock |
| typedef struct datapartition | DataPartition |
| typedef struct pic_motion_params2 | PicMotionParams2 |
Enumerations | |
| enum | ColorPlane { PLANE_Y = 0, PLANE_U = 1, PLANE_V = 2, PLANE_G = 0, PLANE_B = 1, PLANE_R = 2 } |
| enum | { LIST_0 = 0, LIST_1 = 1, BI_PRED = 2, BI_PRED_L0 = 3, BI_PRED_L1 = 4 } |
| enum | { ERROR_SAD = 0, ERROR_SSE = 1, ERROR_SATD = 2, ERROR_PSATD = 3 } |
| enum | { ME_Y_ONLY = 0, ME_YUV_FP = 1, ME_YUV_FP_SP = 2 } |
| enum | { DISTORTION_MSE = 0 } |
| enum | PAR_DP_TYPE { PAR_DP_1, PAR_DP_3 } |
| enum | PAR_OF_TYPE { PAR_OF_ANNEXB, PAR_OF_RTP } |
| enum | CodingType { FRAME_CODING, FIELD_CODING, ADAPTIVE_CODING, FRAME_MB_PAIR_CODING } |
| enum | SE_type { SE_HEADER, SE_PTYPE, SE_MBTYPE, SE_REFFRAME, SE_INTRAPREDMODE, SE_MVD, SE_CBP, SE_LUM_DC_INTRA, SE_CHR_DC_INTRA, SE_LUM_AC_INTRA, SE_CHR_AC_INTRA, SE_LUM_DC_INTER, SE_CHR_DC_INTER, SE_LUM_AC_INTER, SE_CHR_AC_INTER, SE_DELTA_QUANT, SE_BFRAME, SE_EOS, SE_MAX_ELEMENTS } |
| enum | IntraInterDecision { INTER_MB, INTRA_MB_4x4, INTRA_MB_16x16 } |
| enum | BitCountType { BITS_HEADER, BITS_TOTAL_MB, BITS_MB_MODE, BITS_INTER_MB, BITS_CBP_MB, BITS_COEFF_Y_MB, BITS_COEFF_UV_MB, BITS_COEFF_CB_MB, BITS_COEFF_CR_MB, BITS_DELTA_QUANT_MB, BITS_STUFFING, MAX_BITCOUNTER_MB } |
| enum | SliceMode { NO_SLICES, FIXED_MB, FIXED_RATE, CALL_BACK } |
| enum | SymbolMode { CAVLC, CABAC } |
| enum | SearchType { FULL_SEARCH = -1, FAST_FULL_SEARCH = 0, UM_HEX = 1, UM_HEX_SIMPLE = 2, EPZS = 3 } |
| enum | PictureStructure { FRAME, TOP_FIELD, BOTTOM_FIELD } |
| enum | SliceType { P_SLICE = 0, B_SLICE = 1, I_SLICE = 2, SP_SLICE = 3, SI_SLICE = 4, NUM_SLICE_TYPES = 5 } |
| enum | MELevel { F_PEL, H_PEL, Q_PEL } |
| enum | REF_ACCESS_TYPE { FAST_ACCESS = 0, UMV_ACCESS = 1 } |
| enum | Component_Type { IS_LUMA = 0, IS_CHROMA = 1 } |
| enum | RCModeType { RC_MODE_0 = 0, RC_MODE_1 = 1, RC_MODE_2 = 2, RC_MODE_3 = 3 } |
| enum | { SSE = 0, SSE_RGB = 1, PSNR = 2, PSNR_RGB = 3, SSIM = 4, SSIM_RGB = 5, MS_SSIM = 6, MS_SSIM_RGB = 7, TOTAL_DIST_TYPES = 8 } |
Functions | |
| void | intrapred_4x4 (Macroblock *currMB, ColorPlane pl, int CurrPixX, int CurrPixY, int *left_available, int *up_available, int *all_available) |
| void | intrapred_16x16 (Macroblock *currMB, ColorPlane pl) |
| int | dct_8x8 (Macroblock *currMB, ColorPlane pl, int b8, int *coeff_cost, int intra) |
| int | dct_8x8_cavlc (Macroblock *currMB, ColorPlane pl, int b8, int *coeff_cost, int intra) |
| int | dct_8x8_ls (Macroblock *currMB, ColorPlane pl, int b8, int *coeff_cost, int intra) |
| void | copyblock_sp (Macroblock *currMB, ColorPlane pl, int pos_mb1, int pos_mb2) |
| int | dct_chroma_sp (Macroblock *currMB, int uv, int i11, int is_cavlc) |
| int | dct_chroma_sp2 (Macroblock *currMB, int uv, int i11, int is_cavlc) |
| int | distortion4x4 (int *) |
| int | distortion8x8 (int *) |
| void | FindSkipModeMotionVector (Macroblock *currMB) |
| void | Get_Direct_Motion_Vectors (Macroblock *currMB) |
| void | PartitionMotionSearch (Macroblock *currMB, int, int, int *) |
| int | BIDPartitionCost (Macroblock *currMB, int, int, char[2], int) |
| int | BPredPartitionCost (Macroblock *currMB, int, int, short, short, int, int) |
| int | GetDirectCostMB (Macroblock *currMB, int bslice) |
| int | GetDirectCost8x8 (Macroblock *currMB, int, int *) |
| void | poc_based_ref_management_frame_pic (int current_pic_num) |
| void | poc_based_ref_management_field_pic (int current_pic_num) |
| int | picture_coding_decision (Picture *picture1, Picture *picture2, int qp) |
| unsigned | CeilLog2 (unsigned uiVal) |
| int | init_global_buffers (void) |
| void | free_global_buffers (void) |
| void | no_mem_exit (char *where) |
| void | free_img (void) |
| int | get_mem_ACcoeff_new (int ******cofAC, int chroma) |
| int | get_mem_ACcoeff (int *****) |
| int | get_mem_DCcoeff (int ****) |
| void | free_mem_ACcoeff (int ****) |
| void | free_mem_ACcoeff_new (int *****cofAC) |
| void | free_mem_DCcoeff (int ***) |
| void | error (char *text, int code) |
| byte | field_flag_inference (Macroblock *currMB) |
| void | set_mbaff_parameters (Macroblock *currMB) |
| void | UpdatePixelMap (void) |
| int64 | compute_SSE (imgpel **imgRef, imgpel **imgSrc, int xRef, int xSrc, int ySize, int xSize) |
| int | CalculateFrameNumber (ImageParameters *img) |
| void | encode_one_macroblock_low (Slice *currSlice, Macroblock *currMB) |
| void | encode_one_macroblock_high (Slice *currSlice, Macroblock *currMB) |
| void | encode_one_macroblock_highfast (Slice *currSlice, Macroblock *currMB) |
| void | encode_one_macroblock_highloss (Slice *currSlice, Macroblock *currMB) |
| int | is_bipred_enabled (int mode) |
| void | update_qp (ImageParameters *img, Macroblock *currMB) |
| void | select_plane (ColorPlane color_plane) |
| void | select_dct (ImageParameters *img, Macroblock *currMB) |
| void | store_coding_state_cs_cm (Slice *currSlice, Macroblock *currMB) |
| void | reset_coding_state_cs_cm (Slice *currSlice, Macroblock *currMB) |
| void | set_slice_type (ImageParameters *img, int slice_type) |
| void | free_encoder_memory (ImageParameters *img) |
| int | check_for_SI16 (void) |
| void | output_SP_coefficients (void) |
| void | read_SP_coefficients (void) |
| void | Init_redundant_frame (void) |
| void | Set_redundant_frame (void) |
| void | encode_one_redundant_frame (void) |
| void | change_plane_JV (int nplane) |
| void | make_frame_picture_JV (void) |
Variables | |
| enum { ... } | distortion_types |
| Picture * | p_frame_pic |
| Picture ** | frame_pic |
| Picture ** | field_pic |
| Picture * | frame_pic_si |
| long * | Bit_Buffer |
| unsigned long | total_frame_buffer |
| ImageData | imgData1 |
| ImageData | imgData |
| imgpel ** | pImgOrg [MAX_PLANE] |
| imgpel ** | pCurImg |
| int ** | imgY_sub_tmp |
| int ** | PicPos |
| unsigned int | log2_max_frame_num_minus4 |
| unsigned int | log2_max_pic_order_cnt_lsb_minus4 |
| unsigned int | max_frame_num |
| unsigned int | max_pic_order_cnt_lsb |
| int64 | me_tot_time |
| int64 | me_time |
| pic_parameter_set_rbsp_t * | active_pps |
| seq_parameter_set_rbsp_t * | active_sps |
| int | dsr_new_search_range |
| byte | MBPairIsField |
| int *** | wp_weight |
| int *** | wp_offset |
| int **** | wbp_weight |
| int | luma_log_weight_denom |
| int | chroma_log_weight_denom |
| int | wp_luma_round |
| int | wp_chroma_round |
| imgpel ** | imgY_com |
| imgpel *** | imgUV_com |
| char *** | direct_ref_idx |
| char ** | direct_pdir |
| byte ** | pixel_map |
| byte ** | refresh_map |
| int | intras |
| int64 | tot_time |
| char | errortext [ET_SIZE] |
| char | b8_ipredmode8x8 [4][4] |
| char | b8_intra_pred_modes8x8 [16] |
| GOP_DATA * | gop_structure |
| RD_DATA * | rdopt |
| RD_DATA | rddata_top_frame_mb |
| RD_DATA | rddata_bot_frame_mb |
| RD_DATA | rddata_top_field_mb |
| RD_DATA | rddata_bot_field_mb |
| RD_DATA | rddata_trellis_best |
| RD_DATA | rddata_trellis_curr |
| short ***** | tmp_mv8 |
| short ***** | tmp_pmv8 |
| int *** | motion_cost8 |
| InputParameters * | params |
| ImageParameters * | img |
| DistortionParams * | dist |
| FILE * | p_log |
| FILE * | p_trace |
| int | p_dec |
| int | coeff_cost_cr [MAX_PLANE] |
| int | cmp_cbp [3] |
| int | i16x16mode |
| int | curr_cbp [2] |
| int64 | cur_cbp_blk [MAX_PLANE] |
| int | CbCr_predmode_8x8 [4] |
| int(* | pDCT_4x4 )(Macroblock *currMB, ColorPlane pl, int block_x, int block_y, int *coeff_cost, int intra, int is_cavlc) |
| int(* | pDCT_16x16 )(Macroblock *currMB, ColorPlane pl, int, int is_cavlc) |
| int(* | pDCT_8x8 )(Macroblock *currMB, ColorPlane pl, int b8, int *coeff_cost, int intra) |
| int(* | dct_cr_4x4 [2])(Macroblock *currMB, int uv, int i11, int is_cavlc) |
| int * | refbits |
| int **** | motion_cost |
| double * | mb16x16_cost_frame |
| void(* | encode_one_macroblock )(Slice *currSlice, Macroblock *currMB) |
| int ** | lrec |
| int *** | lrec_uv |
| int | si_frame_indicator |
| int | sp2_frame_indicator |
| int | number_sp2_frames |
| int | giRDOpt_B8OnlyFlag |
| imgpel ** | imgY_tmp |
| imgpel ** | imgUV_tmp [2] |
| int | frameNuminGOP |
| int | redundant_coding |
| int | key_frame |
| int | redundant_ref_idx |
| int | img_pad_size_uv_x |
| int | img_pad_size_uv_y |
| unsigned char | chroma_mask_mv_y |
| unsigned char | chroma_mask_mv_x |
| int | chroma_shift_y |
| int | chroma_shift_x |
| int | shift_cr_x |
| int | shift_cr_x2 |
| int | shift_cr_y |
| int | img_padded_size_x |
| int | img_padded_size_x2 |
| int | img_padded_size_x4 |
| int | img_padded_size_x_m8 |
| int | img_padded_size_x_m8x8 |
| int | img_padded_size_x_m4x4 |
| int | img_cr_padded_size_x |
| int | img_cr_padded_size_x_m8 |
| int | img_cr_padded_size_x2 |
| int | img_cr_padded_size_x4 |
| int | start_me_refinement_hp |
| int | start_me_refinement_qp |
| int | ipmode_DPCM |
| int | lossless_res [4][4] |
| int | Motion_Selected |
| int | Intra_Selected |
Definition in file global.h.
| #define ET_SIZE 300 |
size of error text buffer
Definition at line 567 of file global.h.
Referenced by arienco_delete_encoding_environment(), Configure(), encode_one_slice(), encode_one_slice_MBAFF(), end_macroblock(), GetConfigFileContent(), interpret_gop_structure(), LevelCheck(), no_mem_exit(), OpenFiles(), ParseContent(), ParseMatrix(), ParseQOffsetMatrix(), PatchInp(), ProfileCheck(), read_slice_group_info(), ReadFrameConcatenated(), report(), report_frame_statistic(), report_log_mode(), report_stats(), start_sequence(), terminate_sequence(), and TestEncoderParams().
| typedef struct datapartition DataPartition |
DataPartition.
| typedef struct DecRefPicMarking_s DecRefPicMarking_t |
Buffer structure for decoded reference picture marking commands.
| typedef struct macroblock Macroblock |
Macroblock.
| typedef struct pic_motion_params2 PicMotionParams2 |
definition of pic motion parameters
| typedef struct syntaxelement SyntaxElement |
Syntax Element.
| enum CodingType |
| enum MELevel |
| enum PAR_DP_TYPE |
| enum PAR_OF_TYPE |
| enum REF_ACCESS_TYPE |
| enum SE_type |
| int BIDPartitionCost | ( | Macroblock * | currMB, | |
| int | , | |||
| int | , | |||
| char | [2], | |||
| int | ||||
| ) |
Motion Cost for Bidirectional modes.
Definition at line 1117 of file mv-search.c.
References ImageParameters::all_mv, InputParameters::blc_size, distortion4x4(), distortion8x8(), LumaPrediction(), ImageParameters::mb_pred, ImageParameters::opix_x, ImageParameters::opix_y, InputParameters::part_size, pCurImg, and InputParameters::Transform8x8Mode.
Referenced by list_prediction_cost().

| int BPredPartitionCost | ( | Macroblock * | currMB, | |
| int | , | |||
| int | , | |||
| short | , | |||
| short | , | |||
| int | , | |||
| int | ||||
| ) |
Motion Cost for Bidirectional modes.
Definition at line 689 of file mv-search.c.
References ImageParameters::bipred_mv, InputParameters::blc_size, distortion4x4(), distortion8x8(), LumaPredictionBi(), ImageParameters::mb_pred, ImageParameters::opix_x, ImageParameters::opix_y, InputParameters::part_size, pCurImg, and InputParameters::Transform8x8Mode.
Referenced by list_prediction_cost().

| int CalculateFrameNumber | ( | ImageParameters * | p_img | ) |
Calculates the absolute frame number in the source file out of various variables in img-> and params->.
Definition at line 2041 of file image.c.
References InputParameters::adaptive_idr_period, ImageParameters::b_frame_to_code, ImageParameters::base_dist, GOP_DATA::display_no, InputParameters::EnableIDRGOP, ImageParameters::frame_interval, ImageParameters::frame_no, InputParameters::frame_skip, ImageParameters::frm_number, ImageParameters::gop_number, InputParameters::HierarchicalCoding, InputParameters::idr_period, InputParameters::intra_delay, InputParameters::last_frame, ImageParameters::lastIDRnumber, ImageParameters::lastIntraNumber, InputParameters::no_frames, ImageParameters::number, InputParameters::NumberBFrames, ImageParameters::rewind_frame, ImageParameters::start_frame_no, and ImageParameters::start_tr_gop.
Referenced by prepare_first_layer(), and prepare_second_layer().
| unsigned CeilLog2 | ( | unsigned | uiVal | ) |
| void change_plane_JV | ( | int | nplane | ) |
Change color plane for 4:4:4 Independent Mode.
Definition at line 3858 of file macroblock.c.
References ImageParameters::colour_plane_id, enc_frame_picture_JV, ImageParameters::mb_data, ImageParameters::mb_data_JV, and pCurImg.
Referenced by encode_one_slice(), and encode_one_slice_MBAFF().
| int check_for_SI16 | ( | void | ) |
Checks whether a primary SP slice macroblock was encoded as I16.
Definition at line 1196 of file mode_decision.c.
References ImageParameters::pix_x, and ImageParameters::pix_y.
Referenced by init_enc_mb_params().
| void copyblock_sp | ( | Macroblock * | currMB, | |
| ColorPlane | pl, | |||
| int | block_x, | |||
| int | block_y | |||
| ) |
The routine performs transform,quantization,inverse transform, adds the diff. to the prediction and writes the result to the decoded luma frame. Includes the RD constrained quantization also.
Definition at line 2456 of file block.c.
References ImageParameters::bitdepth_luma_qp_scale, ImageParameters::max_imgpel_value, ImageParameters::mb_ores, ImageParameters::mb_pred, ImageParameters::mb_rres, storable_picture::p_curr_img, ImageParameters::pix_x, ImageParameters::pix_y, and macroblock::qpsp.
Referenced by LumaResidualCoding(), and LumaResidualCoding8x8().
| int dct_8x8 | ( | Macroblock * | currMB, | |
| ColorPlane | pl, | |||
| int | b8, | |||
| int * | coeff_cost, | |||
| int | intra | |||
| ) |
The routine performs transform,quantization,inverse transform, adds the diff. to the prediction and writes the result to the decoded luma frame. Includes the RD constrained quantization also.
Definition at line 1548 of file transform8x8.c.
References ImageParameters::AdaptiveRounding, macroblock::ar_mode, ImageParameters::ARCofAdj8x8, COEFF_COST8x8, ImageParameters::cofAC, copy_8x8block(), InputParameters::disthres, FIELD_SCAN8x8, macroblock::is_field_mode, ImageParameters::max_imgpel_value, ImageParameters::mb_ores, ImageParameters::mb_pred, ImageParameters::mb_rres, storable_picture::p_curr_img, ImageParameters::pix_x, ImageParameters::pix_y, macroblock::qp_scaled, and SNGL_SCAN8x8.

| int dct_8x8_cavlc | ( | Macroblock * | currMB, | |
| ColorPlane | pl, | |||
| int | b8, | |||
| int * | coeff_cost, | |||
| int | intra | |||
| ) |
The routine performs transform,quantization,inverse transform, adds the diff. to the prediction and writes the result to the decoded luma frame. Includes the RD constrained quantization also. Used for CAVLC.
Definition at line 1614 of file transform8x8.c.
References ImageParameters::AdaptiveRounding, macroblock::ar_mode, ImageParameters::ARCofAdj8x8, COEFF_COST8x8, ImageParameters::cofAC, copy_8x8block(), InputParameters::disthres, FIELD_SCAN8x8, macroblock::is_field_mode, ImageParameters::max_imgpel_value, ImageParameters::mb_ores, ImageParameters::mb_pred, ImageParameters::mb_rres, storable_picture::p_curr_img, ImageParameters::pix_x, ImageParameters::pix_y, macroblock::qp_scaled, and SNGL_SCAN8x8.

| int dct_chroma_sp | ( | Macroblock * | currMB, | |
| int | uv, | |||
| int | cr_cbp, | |||
| int | is_cavlc | |||
| ) |
Transform,quantization,inverse transform for chroma. The main reason why this is done in a separate routine is the additional 2x2 transform of DC-coeffs. This routine is called once for each of the chroma components.
Definition at line 1958 of file block.c.
References _CHROMA_COEFF_COST_, ImageParameters::AdaptiveRounding, macroblock::ar_mode, ImageParameters::ARCofAdj4x4, ImageParameters::bitdepth_chroma_qp_scale, macroblock::cbp_blk, COEFF_COST4x4, ImageParameters::cofAC, ImageParameters::cofDC, InputParameters::disthres, FIELD_SCAN, hor_offset, storable_picture::imgUV, macroblock::is_field_mode, macroblock::luma_transform_size_8x8_flag, ImageParameters::max_imgpel_value_comp, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, ImageParameters::mb_ores, ImageParameters::mb_pred, ImageParameters::mb_rres, macroblock::mb_type, ImageParameters::num_blk8x8_uv, ImageParameters::pix_c_x, ImageParameters::pix_c_y, macroblock::qpc, SCAN_YUV422, SNGL_SCAN, YUV420, YUV422, and ImageParameters::yuv_format.
Referenced by ChromaResidualCoding().
| int dct_chroma_sp2 | ( | Macroblock * | currMB, | |
| int | uv, | |||
| int | cr_cbp, | |||
| int | is_cavlc | |||
| ) |
Eric Setton Encoding of the chroma of a secondary SP / SI frame. For an SI frame the predicted block should only come from spatial pred. The original image signal is the error coefficients of a primary SP in the raw data stream the difference with the primary SP are :
Definition at line 2657 of file block.c.
References ImageParameters::bitdepth_chroma_qp_scale, macroblock::cbp_blk, COEFF_COST4x4, ImageParameters::cofAC, ImageParameters::cofDC, InputParameters::disthres, FIELD_SCAN, storable_picture::imgUV, macroblock::is_field_mode, ImageParameters::max_imgpel_value, MAX_VALUE, ImageParameters::mb_pred, ImageParameters::mb_rres, ImageParameters::pix_c_x, ImageParameters::pix_c_y, macroblock::qpc, macroblock::qpsp, and SNGL_SCAN.
Referenced by ChromaResidualCoding().
| int distortion4x4 | ( | int * | ) |
Calculate SA(T)D.
Definition at line 61 of file me_distortion.c.
References HadamardSAD4x4(), InputParameters::ModeDecisionMetric, and ImageParameters::quad.
Referenced by BIDPartitionCost(), BPredPartitionCost(), GetBestTransformP8x8(), GetDirectCost8x8(), GetSkipCostMB(), IntraChromaPrediction(), IntraChromaRDDecision(), and TransformDecision().

| int distortion8x8 | ( | int * | ) |
Calculate SA(T)D for 8x8.
Definition at line 95 of file me_distortion.c.
References HadamardSAD8x8(), InputParameters::ModeDecisionMetric, and ImageParameters::quad.
Referenced by BIDPartitionCost(), BPredPartitionCost(), compute_comp_cost8x8(), GetBestTransformP8x8(), GetDirectCost8x8(), GetSkipCostMB(), and TransformDecision().

| void encode_one_macroblock_high | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
Mode Decision for a macroblock.
Definition at line 35 of file md_high.c.
References InputParameters::AdaptiveRounding, macroblock::all_blk_8x8, ImageParameters::b8x8info, Block8x8Info::bipred8x8me, macroblock::c_ipred_mode, macroblock::cbp, InputParameters::ChromaIntraDisable, ImageParameters::cofAC, compute_mode_RD_cost(), InputParameters::CtxAdptLagrangeMult, ImageParameters::currentSlice, determine_prediction_list(), InputParameters::FastCrIntraDecision, field_flag_inference(), FindSkipModeMotionVector(), Get_Direct_Motion_Vectors(), init_enc_mb_params(), ImageParameters::intra_block, IntraChromaPrediction(), IntraChromaRDDecision(), InputParameters::IntraDisableInterOnly, is_bipred_enabled(), list_prediction_cost(), macroblock::luma_transform_size_8x8_flag, macroblock::mb_nr, ImageParameters::mb_pred, macroblock::mb_type, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::MbaffFrameFlag, RD_DATA::min_dcost, RD_DATA::min_rdcost, storable_picture::motion, ImageParameters::num_blk8x8_uv, ImageParameters::nz_coeff, ImageParameters::opix_x, ImageParameters::opix_y, ImageParameters::P444_joined, PartitionMotionSearch(), macroblock::PrevMB, RandomIntra(), rc_store_diff(), rc_store_mad(), InputParameters::RCEnable, InputParameters::RCUpdateMode, reset_adaptive_rounding(), reset_coding_state(), reset_mb_nz_coeff(), InputParameters::RestrictRef, InputParameters::SearchMode, set_block8x8_info(), set_stored_macroblock_parameters(), set_subblock8x8_info(), SetRefAndMotionVectors(), InputParameters::SkipIntraInInterSlices, smpUMHEX_decide_intrabk_SAD(), smpUMHEX_skip_intrabk_SAD(), store_coding_state(), submacroblock_mode_decision(), Slice::symbol_mode, InputParameters::Transform8x8Mode, ImageParameters::type, UMHEX_decide_intrabk_SAD(), update_qp_cbp(), InputParameters::UseConstrainedIntraPred, macroblock::valid_8x8, YUV400, and ImageParameters::yuv_format.
Referenced by init_rdopt().

| void encode_one_macroblock_highfast | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
Mode Decision for a macroblock.
Definition at line 93 of file md_highfast.c.
References InputParameters::AdaptiveRounding, macroblock::all_blk_8x8, ImageParameters::all_mv, ImageParameters::b8x8info, Block8x8Info::bipred8x8me, ImageParameters::block_x, ImageParameters::block_y, macroblock::c_ipred_mode, macroblock::cbp, InputParameters::ChromaIntraDisable, compute_mode_RD_cost(), InputParameters::CtxAdptLagrangeMult, ImageParameters::current_mb_nr, ImageParameters::currentSlice, determine_prediction_list(), InputParameters::EarlySkipEnable, fast_mode_intra_decision(), InputParameters::FastCrIntraDecision, field_flag_inference(), FindSkipModeMotionVector(), Get_Direct_Motion_Vectors(), init_enc_mb_params(), ImageParameters::intra_block, IntraChromaPrediction(), IntraChromaRDDecision(), InputParameters::IntraDisableInterOnly, is_bipred_enabled(), list_prediction_cost(), macroblock::luma_transform_size_8x8_flag, ImageParameters::mb_pred, macroblock::mb_type, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::MbaffFrameFlag, RD_DATA::min_dcost, RD_DATA::min_rdcost, storable_picture::motion, pic_motion_params::mv, ImageParameters::num_blk8x8_uv, ImageParameters::nz_coeff, ImageParameters::opix_x, ImageParameters::opix_y, ImageParameters::P444_joined, PartitionMotionSearch(), macroblock::PrevMB, InputParameters::ProfileIDC, RandomIntra(), rc_store_diff(), rc_store_mad(), InputParameters::RCEnable, InputParameters::RCUpdateMode, pic_motion_params::ref_idx, reset_adaptive_rounding(), reset_coding_state(), reset_mb_nz_coeff(), InputParameters::RestrictRef, InputParameters::SearchMode, InputParameters::SelectiveIntraEnable, set_block8x8_info(), set_stored_macroblock_parameters(), set_subblock8x8_info(), SetRefAndMotionVectors(), InputParameters::SkipIntraInInterSlices, smpUMHEX_decide_intrabk_SAD(), smpUMHEX_skip_intrabk_SAD(), store_coding_state(), submacroblock_mode_decision(), Slice::symbol_mode, InputParameters::Transform8x8Mode, ImageParameters::type, UMHEX_decide_intrabk_SAD(), update_qp_cbp(), InputParameters::UseConstrainedIntraPred, YUV400, and ImageParameters::yuv_format.
Referenced by init_rdopt().

| void encode_one_macroblock_highloss | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
Mode Decision for a macroblock with error resilience.
Definition at line 38 of file md_highloss.c.
References InputParameters::AdaptiveRounding, macroblock::all_blk_8x8, ImageParameters::b8x8info, Block8x8Info::bipred8x8me, macroblock::c_ipred_mode, macroblock::cbp, InputParameters::ChromaIntraDisable, ImageParameters::cofAC, compute_mode_RD_cost(), InputParameters::CtxAdptLagrangeMult, ImageParameters::current_mb_nr, ImageParameters::currentSlice, determine_prediction_list(), InputParameters::FastCrIntraDecision, field_flag_inference(), FindSkipModeMotionVector(), Get_Direct_Motion_Vectors(), init_enc_mb_params(), ImageParameters::intra_block, IntraChromaPrediction(), IntraChromaRDDecision(), InputParameters::IntraDisableInterOnly, is_bipred_enabled(), list_prediction_cost(), macroblock::luma_transform_size_8x8_flag, ImageParameters::mb_pred, macroblock::mb_type, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::MbaffFrameFlag, RD_DATA::min_dcost, RD_DATA::min_rdcost, storable_picture::motion, ImageParameters::nal_reference_idc, ImageParameters::num_blk8x8_uv, ImageParameters::nz_coeff, ImageParameters::opix_x, ImageParameters::opix_y, ImageParameters::P444_joined, PartitionMotionSearch(), macroblock::PrevMB, RandomIntra(), rc_store_diff(), rc_store_mad(), InputParameters::RCEnable, InputParameters::RCUpdateMode, InputParameters::rdopt, reset_adaptive_rounding(), reset_coding_state(), reset_mb_nz_coeff(), InputParameters::RestrictRef, InputParameters::SearchMode, set_block8x8_info(), set_stored_macroblock_parameters(), set_subblock8x8_info(), SetRefAndMotionVectors(), InputParameters::SkipIntraInInterSlices, smpUMHEX_decide_intrabk_SAD(), smpUMHEX_skip_intrabk_SAD(), store_coding_state(), submacroblock_mode_decision(), Slice::symbol_mode, InputParameters::Transform8x8Mode, ImageParameters::type, UMHEX_decide_intrabk_SAD(), update_qp_cbp(), InputParameters::UseConstrainedIntraPred, macroblock::valid_8x8, YUV400, and ImageParameters::yuv_format.
Referenced by init_rdopt().

| void encode_one_macroblock_low | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
Mode Decision for a macroblock.
have_direct
Definition at line 43 of file md_low.c.
References ImageParameters::AdaptiveRounding, InputParameters::AdaptiveRounding, macroblock::all_blk_8x8, ImageParameters::all_mv, macroblock::ar_mode, macroblock::b8mode, ImageParameters::b8x8info, Block8x8Info::bipred8x8me, ImageParameters::block_x, ImageParameters::block_y, macroblock::cbp, ChromaResidualCoding(), ImageParameters::cofAC, InputParameters::CtxAdptLagrangeMult, ImageParameters::current_mb_nr, ImageParameters::currentSlice, determine_prediction_list(), field_flag_inference(), FindSkipModeMotionVector(), Get_Direct_Motion_Vectors(), GetBestTransformP8x8(), GetDirectCostMB(), I16Offset(), ImageParameters::i16offset, storable_picture::imgUV, storable_picture::imgY, init_enc_mb_params(), ImageParameters::intra_block, macroblock::intra_pred_modes, macroblock::intra_pred_modes8x8, IntraChromaPrediction(), intrapred_16x16(), InputParameters::IntraProfile, ImageParameters::ipredmode, ImageParameters::ipredmode8x8, is_bipred_enabled(), list_prediction_cost(), macroblock::luma_transform_size_8x8_flag, LumaResidualCoding(), ImageParameters::mb_pred, macroblock::mb_type, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::MbaffFrameFlag, RD_DATA::min_dcost, RD_DATA::min_rdcost, Mode_Decision_for_Intra4x4Macroblock(), Mode_Decision_for_Intra8x8Macroblock(), storable_picture::motion, ImageParameters::mpr_16x16, pic_motion_params::mv, macroblock::NoMbPartLessThan8x8Flag, ImageParameters::opix_x, ImageParameters::opix_y, ImageParameters::P444_joined, PartitionMotionSearch(), ImageParameters::pix_x, ImageParameters::pix_y, macroblock::PrevMB, RandomIntra(), rc_store_diff(), rc_store_mad(), InputParameters::RCEnable, InputParameters::RCUpdateMode, InputParameters::RDOQ_QP_Num, pic_motion_params::ref_idx, reset_adaptive_rounding(), reset_coding_state(), reset_mb_nz_coeff(), InputParameters::RestrictRef, InputParameters::SearchMode, select_plane(), set_block8x8_info(), set_mbaff_parameters(), set_subblock8x8_info(), SetCoeffAndReconstruction8x8(), SetModesAndRefframeForBlocks(), SetMotionVectorsMB(), SetRefAndMotionVectors(), smpUMHEX_decide_intrabk_SAD(), smpUMHEX_skip_intrabk_SAD(), store_coding_state(), submacroblock_mode_decision_low(), Slice::symbol_mode, InputParameters::Transform8x8Mode, TransformDecision(), ImageParameters::type, UMHEX_decide_intrabk_SAD(), update_offset_params(), update_qp_cbp(), InputParameters::UseConstrainedIntraPred, InputParameters::UseRDOQuant, YUV400, YUV444, and ImageParameters::yuv_format.
Referenced by init_rdopt().

| void encode_one_redundant_frame | ( | void | ) |
encode on redundant frame.
Definition at line 2013 of file lencod.c.
References ImageParameters::currentPicture, encode_one_frame(), ImageParameters::redundant_pic_cnt, set_slice_type(), and ImageParameters::type.
Referenced by encode_sequence().

| void error | ( | char * | text, | |
| int | code | |||
| ) |
Error handling procedure. Print error message to stderr and exit with supplied code.
| text | Error message | |
| code | Exit code |
Definition at line 37 of file filehandle.c.
References flush_dpb().
Referenced by adaptive_memory_management(), arienco_delete_encoding_environment(), bslice_16x16_termination_control(), buf2img_basic(), buf2img_bitshift(), buf2img_endian(), check_num_ref(), Configure(), dec_ref_pic_marking(), encode_one_frame(), encode_one_slice(), encode_one_slice_MBAFF(), end_macroblock(), FmoGenerateMapUnitToSliceGroupMap(), free_mem2D(), free_mem2Ddouble(), free_mem2Dint(), free_mem2Dint64(), free_mem2Dlm(), free_mem2Dmp(), free_mem2Dmv(), free_mem2Dodouble(), free_mem2Doint(), free_mem2Dolm(), free_mem2Dpel(), free_mem2Dshort(), free_mem2Duint16(), free_mem3D(), free_mem3Ddouble(), free_mem3Dint(), free_mem3Dint64(), free_mem3Dmp(), free_mem3Dmv(), free_mem3Dodouble(), free_mem3Doint(), free_mem3Dpel(), free_mem3Dshort(), free_mem3Duint16(), free_mem4D(), free_mem4Dint(), free_mem4Dmv(), free_mem4Dpel(), free_mem4Dshort(), free_mem4Duint16(), free_mem5Dint(), free_mem5Dmv(), free_mem5Dpel(), free_mem5Dshort(), free_mem6Dshort(), free_mem7Dshort(), free_offset_mem2Dshort(), GenerateSequenceParameterSet(), get_picture_type(), get_smallest_poc(), getDpbSize(), getMaxFs(), getMaxMBPS(), img2buf(), init_dpb(), Init_redundant_frame(), init_slice(), interpret_gop_structure(), LevelCheck(), mm_assign_long_term_frame_idx(), no_mem_exit(), OpenFiles(), output_one_frame_from_dpb(), output_SP_coefficients(), ParseContent(), ParseMatrix(), ParseQOffsetMatrix(), PatchInp(), predict_nnz(), ProfileCheck(), read_slice_group_info(), ReadCharField(), ReadFrameConcatenated(), ReadFrameData(), ReadFrameSeparate(), ReadIntField(), ReadTextField(), remove_frame_from_dpb(), reorder_ref_pic_list(), report_frame_statistic(), report_log_mode(), report_stats(), RestoreMVBlock8x8(), start_sequence(), store_picture_in_dpb(), StoreMVBlock8x8(), terminate_sequence(), TestEncoderParams(), updateMADModel(), updateRCModel(), write_out_picture(), and writeCoeff4x4_CAVLC().

| byte field_flag_inference | ( | Macroblock * | currMB | ) |
skip macroblock field inference
Definition at line 2160 of file rdopt.c.
References ImageParameters::mb_data, macroblock::mb_field, macroblock::mbAddrA, macroblock::mbAddrB, macroblock::mbAvailA, and macroblock::mbAvailB.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), RDCost_for_macroblocks(), and writeMBLayer().
| void FindSkipModeMotionVector | ( | Macroblock * | currMB | ) |
Find motion vector for the Skip mode.
Definition at line 1254 of file mv-search.c.
References ImageParameters::all_mv, pix_pos::available, get_neighbors(), GetMotionVectorPredictor(), pix_pos::mb_addr, ImageParameters::mb_data, macroblock::mb_field, storable_picture::motion, pic_motion_params::mv, pix_pos::pos_x, pix_pos::pos_y, and pic_motion_params::ref_idx.
Referenced by BlockMotionSearch(), encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().

| void free_encoder_memory | ( | ImageParameters * | img | ) |
Free memory allocated for the encoder.
Definition at line 635 of file lencod.c.
References clear_gop_structure(), Clear_Motion_Search_Module(), clear_rdopt(), CloseExplicitSeqFile(), CloseFiles(), InputParameters::ExplicitSeqCoding, flush_dpb(), FmoUninit(), free_colocated(), free_dpb(), free_global_buffers(), free_img(), FreeParameterSets(), InputParameters::HierarchicalCoding, InputParameters::input_file1, p_dec, p_trace, report(), terminate_sequence(), and uninit_out_buffer().
Referenced by main(), and report_stats_on_error().

| void free_global_buffers | ( | void | ) |
Free allocated memory of frame size related global buffers buffers are defined in global.h, allocated memory is allocated in int get_mem4global_buffers().
Definition at line 1521 of file lencod.c.
References ImageParameters::b8x8info, ImageParameters::bitdepth_luma_qp_scale, InputParameters::BRefPictures, InputParameters::CtxAdptLagrangeMult, direct_pdir, direct_ref_idx, InputParameters::DistortionYUVtoRGB, EPZSDelete(), free_errdo_mem(), free_mem2D(), free_mem2Dint(), free_mem2Dodouble(), free_mem2Dolm(), free_mem2Dpel(), free_mem3D(), free_mem3Dint(), free_mem3Dodouble(), free_mem3Doint(), free_mem3Dpel(), free_mem4Dint(), free_orig_planes(), free_picture(), free_QMatrix(), free_QOffsets(), ImageParameters::frm_iter, InputParameters::GenerateMultiplePPS, imgUV_com, imgY_com, imgY_sub_tmp, ImageParameters::intra_block, InputParameters::IntraProfile, ImageParameters::ipredmode, ImageParameters::ipredmode8x8, ImageParameters::lambda, ImageParameters::lambda_md, ImageParameters::lambda_me, ImageParameters::lambda_mf, ImageParameters::lambda_mf_factor, ImageParameters::mb_data, ImageParameters::mb_data_JV, ImageParameters::nz_coeff, pixel_map, InputParameters::ProfileIDC, rc_free_memory(), InputParameters::RCEnable, InputParameters::rdopt, InputParameters::redundant_pic_flag, refresh_map, InputParameters::RestrictRef, InputParameters::SearchMode, InputParameters::si_frame_indicator, smpUMHEX_free_mem(), InputParameters::sp_periodicity, UMHEX_free_mem(), InputParameters::UseConstrainedIntraPred, InputParameters::WeightedBiprediction, InputParameters::WeightedPrediction, InputParameters::WPMCPrecision, wpxFreeWPXObject(), YUV400, and ImageParameters::yuv_format.
Referenced by free_encoder_memory().

| void free_img | ( | void | ) |
Free the Image structures.
Definition at line 1131 of file lencod.c.
References InputParameters::AdaptiveRounding, ImageParameters::all_mv, ImageParameters::ARCofAdj4x4, ImageParameters::ARCofAdj8x8, ImageParameters::bipred_mv, InputParameters::BiPredMotionEstimation, ImageParameters::cofAC, ImageParameters::cofDC, DeleteFrameMemory(), free_mem3Dint(), free_mem3Dpel(), free_mem4Dint(), free_mem4Dpel(), free_mem5Dshort(), free_mem_ACcoeff(), free_mem_bipred_mv(), free_mem_DCcoeff(), free_mem_mv(), InputParameters::IntraProfile, ImageParameters::max_imgpel_value_comp, ImageParameters::mb_ores, ImageParameters::mb_pred, ImageParameters::mb_rres, InputParameters::MbInterlace, ImageParameters::mpr_16x16, ImageParameters::mpr_4x4, ImageParameters::mpr_8x8, ImageParameters::quad, rddata_bot_field_mb, rddata_bot_frame_mb, InputParameters::RDOQ_CP_MV, InputParameters::RDOQ_QP_Num, InputParameters::Transform8x8Mode, and InputParameters::UseRDOQuant.
Referenced by free_encoder_memory().

| void free_mem_ACcoeff | ( | int **** | ) |
Free memory of AC coefficients.
Definition at line 1795 of file lencod.c.
References free_mem4Dint().
Referenced by clear_rdopt(), and free_img().

| void free_mem_ACcoeff_new | ( | int ***** | cofAC | ) |
Free memory of AC coefficients.
Definition at line 1806 of file lencod.c.
References free_mem5Dint().
Referenced by clear_rdopt().

| void free_mem_DCcoeff | ( | int *** | ) |
Free memory of DC coefficients.
Definition at line 1817 of file lencod.c.
References free_mem3Dint().
Referenced by clear_rdopt(), and free_img().

| void Get_Direct_Motion_Vectors | ( | Macroblock * | currMB | ) |
Calculate Direct Motion Vectors *****.
invalid index. Default to zero even though this case should not happen
Definition at line 1547 of file mv-search.c.
References ImageParameters::all_mv, pix_pos::available, colocated_params::bottom, ImageParameters::current_mb_nr, direct_pdir, direct_ref_idx, ImageParameters::direct_spatial_mv_pred_flag, colocated_params::frame, get_neighbors(), GetMotionVectorPredictor(), macroblock::list_offset, pix_pos::mb_addr, ImageParameters::mb_data, macroblock::mb_field, ImageParameters::MbaffFrameFlag, storable_picture::motion, motion_params::moving_block, motion_params::mv, pic_motion_params::mv, ImageParameters::mvscale, ImageParameters::num_ref_idx_l0_active, ImageParameters::opix_x, ImageParameters::opix_y, out_of_bounds_mvs(), ImageParameters::pix_x, ImageParameters::pix_y, pix_pos::pos_x, pix_pos::pos_y, motion_params::ref_idx, pic_motion_params::ref_idx, motion_params::ref_pic_id, storable_picture::ref_pic_num, colocated_params::top, and YUV400.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().

| int get_mem_ACcoeff | ( | int ***** | ) |
Allocate memory for AC coefficients.
Definition at line 1756 of file lencod.c.
References get_mem4Dint(), and ImageParameters::num_blk8x8_uv.
Referenced by init_img(), and init_rdopt().

| int get_mem_ACcoeff_new | ( | int ****** | cofAC, | |
| int | chroma | |||
| ) |
Allocate memory for AC coefficients.
Definition at line 1770 of file lencod.c.
References get_mem5Dint().
Referenced by init_rdopt().

| int get_mem_DCcoeff | ( | int **** | ) |
Allocate memory for DC coefficients.
Definition at line 1782 of file lencod.c.
References get_mem3Dint().
Referenced by init_img(), and init_rdopt().

| int GetDirectCost8x8 | ( | Macroblock * | currMB, | |
| int | , | |||
| int * | ||||
| ) |
Get cost for direct mode for an 8x8 block.
Definition at line 1333 of file mv-search.c.
References direct_pdir, direct_ref_idx, distortion4x4(), distortion8x8(), LumaPrediction(), ImageParameters::mb_pred, ImageParameters::opix_x, ImageParameters::opix_y, pCurImg, InputParameters::rdopt, and InputParameters::Transform8x8Mode.
Referenced by GetDirectCostMB(), and submacroblock_mode_decision_low().

| int GetDirectCostMB | ( | Macroblock * | currMB, | |
| int | bslice | |||
| ) |
Get cost for direct mode for an macroblock.
Definition at line 1396 of file mv-search.c.
References GetDirectCost8x8(), InputParameters::InterSearch, and InputParameters::Transform8x8Mode.
Referenced by encode_one_macroblock_low().

| int init_global_buffers | ( | void | ) |
Dynamic memory allocation of frame size related global buffers buffers are defined in global.h, allocated memory must be freed in void free_global_buffers().
Definition at line 1315 of file lencod.c.
References allocate_errdo_mem(), InputParameters::BRefPictures, chroma_mc_setup(), InputParameters::ChromaMCBuffer, direct_pdir, direct_ref_idx, InputParameters::DistortionYUVtoRGB, EPZSInit(), ImageParameters::FrameSizeInMbs, ImageParameters::frm_iter, InputParameters::GenerateMultiplePPS, get_mem2D(), get_mem2Dint(), get_mem2Dpel(), get_mem3D(), get_mem3Dint(), get_mem3Dpel(), get_mem4Dint(), ImageParameters::height, ImageParameters::height_blk, ImageParameters::height_cr, ImageParameters::height_padded, IMG_PAD_SIZE, imgUV_com, imgY_com, imgY_sub_tmp, init_orig_buffers(), InputParameters::IntraProfile, malloc_picture(), no_mem_exit(), InputParameters::NumberBFrames, InputParameters::PicInterlace, ImageParameters::PicWidthInMbs, pixel_map, InputParameters::ProfileIDC, rc_allocate_memory(), InputParameters::RCEnable, InputParameters::rdopt, InputParameters::redundant_pic_flag, refresh_map, InputParameters::RestrictRef, InputParameters::SearchMode, InputParameters::si_frame_indicator, smpUMHEX_get_mem(), smpUMHEX_init(), InputParameters::sp_periodicity, UMHEX_get_mem(), InputParameters::WeightedBiprediction, InputParameters::WeightedPrediction, ImageParameters::width, ImageParameters::width_blk, ImageParameters::width_cr, ImageParameters::width_padded, InputParameters::WPMCPrecision, wpxInitWPXObject(), YUV400, and ImageParameters::yuv_format.
Referenced by init_encoder().

| void Init_redundant_frame | ( | void | ) |
initialize key frames and corresponding redundant frames.
Definition at line 1900 of file lencod.c.
References error(), ImageParameters::frm_number, InputParameters::num_ref_frames, InputParameters::NumberBFrames, InputParameters::NumRedundantHierarchy, InputParameters::PicInterlace, InputParameters::PrimaryGOPLength, ImageParameters::redundant_pic_cnt, InputParameters::redundant_pic_flag, and InputParameters::Verbose.
Referenced by encode_sequence().

| void intrapred_16x16 | ( | Macroblock * | currMB, | |
| ColorPlane | pl | |||
| ) |
16x16 based luma prediction
< pixel position p(0,-1)
< pixel positions p(-1, -1..15)
Definition at line 542 of file block.c.
References pix_pos::available, ImageParameters::dc_pred_value, ImageParameters::intra_block, ImageParameters::max_imgpel_value, pix_pos::mb_addr, ImageParameters::mb_size, ImageParameters::mpr_16x16, storable_picture::p_curr_img, pix_pos::pos_x, pix_pos::pos_y, and InputParameters::UseConstrainedIntraPred.
Referenced by encode_one_macroblock_low(), and Intra16x16_Mode_Decision().
| void intrapred_4x4 | ( | Macroblock * | currMB, | |
| ColorPlane | pl, | |||
| int | img_x, | |||
| int | img_y, | |||
| int * | left_available, | |||
| int * | up_available, | |||
| int * | all_available | |||
| ) |
Make intra 4x4 prediction according to all 9 prediction modes. The routine uses left and upper neighbouring points from previous coded blocks to do this (if available). Notice that inaccessible neighbouring points are signalled with a negative value in the predmode array .
Definition at line 233 of file block.c.
References pix_pos::available, ImageParameters::dc_pred_value, ImageParameters::intra_block, pix_pos::mb_addr, ImageParameters::mb_size, ImageParameters::mpr_4x4, storable_picture::p_curr_img, pix_pos::pos_x, pix_pos::pos_y, and InputParameters::UseConstrainedIntraPred.
Referenced by Mode_Decision_for_4x4IntraBlocks_JM_High(), and Mode_Decision_for_4x4IntraBlocks_JM_Low().
| int is_bipred_enabled | ( | int | mode | ) |
Determines whether bi prediction is enabaled for current mode.
Definition at line 1278 of file mode_decision.c.
References InputParameters::BiPredMotionEstimation, and InputParameters::BiPredSearch.
Referenced by BlockMotionSearch(), ChromaPrediction(), ChromaPrediction4x4(), encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), LumaPrediction(), set_stored_macroblock_parameters(), SetRefAndMotionVectors(), submacroblock_mode_decision(), submacroblock_mode_decision_low(), and writeMotionVector8x8().
| void make_frame_picture_JV | ( | void | ) |
Make one frame picture from 4:4:4 plane.
Definition at line 3872 of file macroblock.c.
References copy_storable_param_JV(), enc_frame_picture_JV, free_storable_picture(), ImageParameters::height, and ImageParameters::width.
Referenced by frame_picture().

| void no_mem_exit | ( | char * | where | ) |
Exit program if memory allocation failed (using error()).
| where | string indicating which memory allocation failed |
Definition at line 976 of file memalloc.c.
Referenced by alloc_colocated(), alloc_frame_store(), alloc_img(), alloc_ref_pic_list_reordering_buffer(), alloc_storable_picture(), allocate_QMatrix(), AllocateFrameMemory(), allocEPZScolocated(), allocEPZSpattern(), AllocNALU(), AllocPPS(), AllocSPS(), arienco_create_encoding_environment(), Configure(), create_coding_state(), create_contexts_MotionInfo(), create_contexts_TextureInfo(), create_hierarchy(), FinalizeSpareMBMap(), GeneratePic_parameter_set_rbsp(), GeneratePictureParameterSet(), GenerateSEImessage_rbsp(), GenerateSeq_parameter_set_rbsp(), get_mem2D(), get_mem2Ddouble(), get_mem2Dint(), get_mem2Dint64(), get_mem2Dlm(), get_mem2Dmp(), get_mem2Dmv(), get_mem2Dodouble(), get_mem2Doint(), get_mem2Dolm(), get_mem2Dpel(), get_mem2Dshort(), get_mem2Duint16(), get_mem3D(), get_mem3Ddouble(), get_mem3Dint(), get_mem3Dint64(), get_mem3Dmp(), get_mem3Dmv(), get_mem3Dodouble(), get_mem3Doint(), get_mem3Dpel(), get_mem3Dshort(), get_mem3Duint16(), get_mem4D(), get_mem4Dint(), get_mem4Dmv(), get_mem4Dpel(), get_mem4Dshort(), get_mem4Duint16(), get_mem5Dint(), get_mem5Dmv(), get_mem5Dpel(), get_mem5Dshort(), get_mem6Dshort(), get_mem7Dshort(), get_offset_mem2Dshort(), GetConfigFileContent(), init_dpb(), init_global_buffers(), init_gop_structure(), init_img(), init_lists(), Init_Motion_Search_Module(), init_top_bot_planes(), InitializeFastFullIntegerSearch(), InitSparePicture(), InitSubseqInfo(), malloc_picture(), malloc_slice(), poc_based_ref_management_field_pic(), poc_based_ref_management_frame_pic(), RandomIntraInit(), rc_alloc_generic(), rc_alloc_quadratic(), read_slice_group_info(), smpUMHEX_get_mem(), UMHEX_get_mem(), UnifiedOneForthPix(), UnifiedOneForthPix_JV(), wpxInitWPXObject(), write_out_picture(), and WriteRTPNALU().
| void output_SP_coefficients | ( | void | ) |
Brief Output SP frames coefficients
Definition at line 2389 of file image.c.
References error(), ImageParameters::height, ImageParameters::height_cr, InputParameters::sp_output_filename, ImageParameters::width, and ImageParameters::width_cr.
Referenced by encode_one_frame().

| void PartitionMotionSearch | ( | Macroblock * | currMB, | |
| int | , | |||
| int | , | |||
| int * | ||||
| ) |
Motion search for a partition.
Definition at line 1438 of file mv-search.c.
References ImageParameters::all_mv, ImageParameters::block_x, ImageParameters::block_y, BlockMotionSearch(), InputParameters::full_search, macroblock::list_offset, macroblock::luma_transform_size_8x8_flag, storable_picture::motion, pic_motion_params::mv, InputParameters::part_size, InputParameters::RDOQ_CP_MV, pic_motion_params::ref_idx, InputParameters::search_range, InputParameters::Transform8x8Mode, and ImageParameters::type.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), submacroblock_mode_decision(), and submacroblock_mode_decision_low().

| int picture_coding_decision | ( | Picture * | picture1, | |
| Picture * | picture2, | |||
| int | qp | |||
| ) |
Picture Coding Decision.
Definition at line 44 of file rdpicdecision.c.
References InputParameters::NumberBFrames, rd_pic_decision(), and ImageParameters::type.
Referenced by rdPictureCoding().

| void poc_based_ref_management_field_pic | ( | int | current_pic_num | ) |
POC-based reference management (FIELD).
Definition at line 339 of file explicit_gop.c.
References frame_store::bottom_field, ImageParameters::dec_ref_pic_marking_buffer, DecRefPicMarking_s::difference_of_pic_nums_minus1, decoded_picture_buffer::fs, frame_store::is_long_term, frame_store::is_reference, decoded_picture_buffer::ltref_frames_in_buffer, DecRefPicMarking_s::memory_management_control_operation, DecRefPicMarking_s::Next, no_mem_exit(), storable_picture::pic_num, frame_store::poc, decoded_picture_buffer::ref_frames_in_buffer, ImageParameters::structure, frame_store::top_field, and decoded_picture_buffer::used_size.
Referenced by init_slice().

| void poc_based_ref_management_frame_pic | ( | int | current_pic_num | ) |
POC-based reference management (FRAME).
Definition at line 295 of file explicit_gop.c.
References ImageParameters::dec_ref_pic_marking_buffer, DecRefPicMarking_s::difference_of_pic_nums_minus1, frame_store::frame, decoded_picture_buffer::fs, frame_store::is_long_term, frame_store::is_reference, decoded_picture_buffer::ltref_frames_in_buffer, DecRefPicMarking_s::memory_management_control_operation, DecRefPicMarking_s::Next, no_mem_exit(), storable_picture::pic_num, storable_picture::poc, frame_store::poc, decoded_picture_buffer::ref_frames_in_buffer, and decoded_picture_buffer::used_size.
Referenced by init_slice().

| void read_SP_coefficients | ( | void | ) |
Brief Read SP frames coefficients
Definition at line 2441 of file image.c.
References ImageParameters::frame_no, ImageParameters::height, ImageParameters::height_cr, InputParameters::qp2start, ImageParameters::size, InputParameters::sp2_input_filename1, InputParameters::sp2_input_filename2, ImageParameters::width, and ImageParameters::width_cr.
Referenced by encode_one_frame().
| void reset_coding_state_cs_cm | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
restore coding state (for rd-optimized mode decision), used for 8x8 transformation
Definition at line 2567 of file rdopt.c.
References reset_coding_state().
Referenced by Mode_Decision_for_8x8IntraBlocks_JM_High().

| void select_plane | ( | ColorPlane | color_plane | ) |
Brief Select appropriate image plane (for 444 coding)
Definition at line 2500 of file image.c.
References ImageParameters::curr_prd, ImageParameters::curr_res, ImageParameters::dc_pred_value, ImageParameters::dc_pred_value_comp, ImageParameters::max_imgpel_value, ImageParameters::max_imgpel_value_comp, ImageParameters::mb_pred, ImageParameters::mb_rres, storable_picture::p_curr_img, storable_picture::p_curr_img_sub, storable_picture::p_img, storable_picture::p_img_sub, and pCurImg.
Referenced by encode_one_macroblock_low(), Intra16x16_Mode_Decision(), LumaResidualCoding8x8(), Mode_Decision_for_4x4IntraBlocks_JM_High(), Mode_Decision_for_4x4IntraBlocks_JM_Low(), Mode_Decision_for_8x8IntraBlocks_JM_High(), Mode_Decision_for_8x8IntraBlocks_JM_Low(), RDCost_for_4x4IntraBlocks(), RDCost_for_8x8IntraBlocks(), and UnifiedOneForthPix().
| void set_mbaff_parameters | ( | Macroblock * | currMB | ) |
Sets MBAFF RD parameters.
Definition at line 2457 of file rdopt.c.
References macroblock::b8mode, RD_DATA::b8mode, macroblock::b8pdir, RD_DATA::b8pdir, macroblock::bipred_me, InputParameters::BiPredMERefinements, ImageParameters::block_x, ImageParameters::block_y, macroblock::cbp, RD_DATA::cbp, macroblock::cbp_blk, RD_DATA::cbp_blk, ImageParameters::cofAC, RD_DATA::cofAC, ImageParameters::cofDC, RD_DATA::cofDC, ImageParameters::i16offset, RD_DATA::i16offset, storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes, RD_DATA::intra_pred_modes, macroblock::intra_pred_modes8x8, RD_DATA::intra_pred_modes8x8, RD_DATA::ipredmode, ImageParameters::ipredmode, macroblock::luma_transform_size_8x8_flag, RD_DATA::luma_transform_size_8x8_flag, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, macroblock::mb_type, RD_DATA::mb_type, RD_DATA::mode, storable_picture::motion, ImageParameters::num_blk8x8_uv, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, RD_DATA::rec_mb_cr, RD_DATA::rec_mbY, pic_motion_params::ref_idx, RD_DATA::refar, ImageParameters::type, YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_macroblock_low().
| void Set_redundant_frame | ( | void | ) |
allocate redundant frames in a primary GOP.
Definition at line 1946 of file lencod.c.
References InputParameters::NumRedundantHierarchy, and InputParameters::PrimaryGOPLength.
Referenced by encode_sequence().
| void set_slice_type | ( | ImageParameters * | img, | |
| int | slice_type | |||
| ) |
Sets slice type.
Definition at line 163 of file image.c.
References InputParameters::RCMaxQP, ImageParameters::RCMaxQP, InputParameters::RCMinQP, ImageParameters::RCMinQP, and ImageParameters::type.
Referenced by encode_one_redundant_frame(), ExplicitUpdateImgParams(), field_picture(), rdPictureCoding(), and SetImgType().
| void store_coding_state_cs_cm | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
store coding state (for rd-optimized mode decision), used for 8x8 transformation
Definition at line 2556 of file rdopt.c.
References store_coding_state().

| void update_qp | ( | ImageParameters * | img, | |
| Macroblock * | currMB | |||
| ) |
updates chroma QP according to luma QP and bit depth
Definition at line 355 of file macroblock.c.
References ImageParameters::bitdepth_luma_qp_scale, macroblock::qp, and macroblock::qp_scaled.
Referenced by copy_rdopt_data(), start_macroblock(), and update_qp_cbp().
| void UpdatePixelMap | ( | void | ) |
Updates the pixel map that shows, which reference frames are reliable for each MB-area of the picture.
Definition at line 275 of file rdopt.c.
References ImageParameters::height, InputParameters::num_ref_frames, pixel_map, refresh_map, ImageParameters::type, and ImageParameters::width.
Referenced by encode_one_frame().
| char** direct_pdir |
direct mode reference index buffer
Definition at line 558 of file global.h.
Referenced by free_global_buffers(), Get_Direct_Motion_Vectors(), GetDirectCost8x8(), init_global_buffers(), RDCost_for_8x8blocks(), RDCost_for_macroblocks(), SetModesAndRefframeForBlocks(), submacroblock_mode_decision(), and submacroblock_mode_decision_low().
| char*** direct_ref_idx |
direct mode reference index buffer
Definition at line 557 of file global.h.
Referenced by decode_one_b8block(), free_global_buffers(), Get_Direct_Motion_Vectors(), GetDirectCost8x8(), init_global_buffers(), RDCost_for_8x8blocks(), SetModesAndRefframeForBlocks(), SetRefAndMotionVectors(), submacroblock_mode_decision(), and submacroblock_mode_decision_low().
Dynamic Search Range. ///////////////////////////////////////////////////////////////////////.
Definition at line 538 of file global.h.
Referenced by UMHEXSetMotionVectorPredictor().
| char errortext[ET_SIZE] |
buffer for error message for exit with error()
Definition at line 568 of file global.h.
Referenced by arienco_delete_encoding_environment(), Configure(), encode_one_slice(), encode_one_slice_MBAFF(), end_macroblock(), GetConfigFileContent(), Init_QMatrix(), Init_QOffsetMatrix(), interpret_gop_structure(), LevelCheck(), no_mem_exit(), OpenFiles(), ParseContent(), ParseMatrix(), ParseQOffsetMatrix(), PatchInp(), ProfileCheck(), read_slice_group_info(), ReadFrameConcatenated(), report(), report_frame_statistic(), report_log_mode(), report_stats(), start_sequence(), terminate_sequence(), and TestEncoderParams().
| imgpel*** imgUV_com |
Encoded croma images.
Definition at line 555 of file global.h.
Referenced by combine_field(), find_distortion(), free_global_buffers(), and init_global_buffers().
| imgpel** imgY_com |
Encoded luma images.
Definition at line 554 of file global.h.
Referenced by combine_field(), find_distortion(), free_global_buffers(), and init_global_buffers().
| int** imgY_sub_tmp |
Y picture temporary component (Quarter pel).
Definition at line 524 of file global.h.
Referenced by free_global_buffers(), getHorSubImageSixTap(), getVerSubImageSixTapTmp(), and init_global_buffers().
| int intras |
Counts the intra updates in each frame.
Definition at line 563 of file global.h.
Referenced by rdPictureCoding(), and write_macroblock().
For MB level field/frame coding tools.
Definition at line 542 of file global.h.
Referenced by encode_one_slice_MBAFF().
| int p_dec |
decoded image file handle
Definition at line 1366 of file global.h.
Referenced by free_encoder_memory(), information_init(), main(), output_one_frame_from_dpb(), PatchInp(), replace_top_pic_with_frame(), and store_picture_in_dpb().
| FILE* p_log |
| FILE* p_trace |
Trace file.
Definition at line 1365 of file global.h.
Referenced by free_encoder_memory(), PatchInp(), write_macroblock(), and WriteAnnexbNALU().
| imgpel** pCurImg |
Reference image. Luma for other profiles, can be any component for 4:4:4.
Definition at line 523 of file global.h.
Referenced by BIDPartitionCost(), BlockMotionSearch(), BPredPartitionCost(), change_plane_JV(), dct_16x16(), dct_16x16_ls(), distortion_fld(), distortionSSE(), EstimateWPBSliceAlg0(), EstimateWPBSliceAlg1(), EstimateWPBSliceAlg2(), EstimateWPPSliceAlg0(), EstimateWPPSliceAlg1(), EstimateWPPSliceAlg2(), fast_mode_intra_decision(), find_distortion(), find_sad_16x16_JM(), GetBestTransformP8x8(), GetDirectCost8x8(), GetSkipCostMB(), LumaResidualCoding8x8(), Mode_Decision_for_4x4IntraBlocks_JM_High(), Mode_Decision_for_4x4IntraBlocks_JM_Low(), Mode_Decision_for_8x8IntraBlocks_JM_High(), Mode_Decision_for_8x8IntraBlocks_JM_Low(), put_buffer_bot(), put_buffer_frame(), put_buffer_top(), rc_store_diff(), RDCost_for_4x4IntraBlocks(), RDCost_for_8x8blocks(), RDCost_for_8x8IntraBlocks(), RDCost_for_macroblocks(), select_plane(), set_MB_parameters(), TestWPBSliceAlg0(), TestWPBSliceAlg1(), TestWPBSliceAlg2(), TestWPPSliceAlg0(), TestWPPSliceAlg1(), TestWPPSliceAlg2(), and TransformDecision().
Shows the latest reference frame that is reliable for each pixel.
Definition at line 561 of file global.h.
Referenced by CheckReliabilityOfRef(), free_global_buffers(), init_global_buffers(), and UpdatePixelMap().
For MB level field/frame coding tools.
Definition at line 1352 of file global.h.
Referenced by encode_one_slice_MBAFF(), free_img(), and init_img().
For MB level field/frame coding tools.
Definition at line 1351 of file global.h.
Referenced by encode_one_slice_MBAFF(), free_img(), and init_img().
Stores the new values for pixel_map.
Definition at line 562 of file global.h.
Referenced by free_global_buffers(), init_global_buffers(), and UpdatePixelMap().