📄 global.h
字号:
int EPZSSubPelThresScale;
int chroma_qp_index_offset;
#ifdef _FULL_SEARCH_RANGE_
int full_search;
#endif
#ifdef _ADAPT_LAST_GROUP_
int last_frame;
#endif
#ifdef _CHANGE_QP_
int qpN2, qpB2, qp2start;
int qp02, qpBRS2Offset;
#endif
int rdopt;
int CtxAdptLagrangeMult; //!< context adaptive lagrangian multiplier
int FastCrIntraDecision;
int disthres;
int nobskip;
#ifdef _LEAKYBUCKET_
int NumberLeakyBuckets;
char LeakyBucketRateFile[FILE_NAME_SIZE];
char LeakyBucketParamFile[FILE_NAME_SIZE];
#endif
int PicInterlace; //!< picture adaptive frame/field
int MbInterlace; //!< macroblock adaptive frame/field
int IntraBottom; //!< Force Intra Bottom at GOP periods.
int LossRateA; //!< assumed loss probablility of partition A (or full slice), in per cent, used for loss-aware R/D optimization
int LossRateB; //!< assumed loss probablility of partition B, in per cent, used for loss-aware R/D
int LossRateC; //!< assumed loss probablility of partition C, in per cent, used for loss-aware R/D
int NoOfDecoders;
int RestrictRef;
int NumFramesInELSubSeq;
int RandomIntraMBRefresh; //!< Number of pseudo-random intra-MBs per picture
int LFSendParameters;
int LFDisableIdc;
int LFAlphaC0Offset;
int LFBetaOffset;
int SparePictureOption;
int SPDetectionThreshold;
int SPPercentageThreshold;
// FMO
char SliceGroupConfigFileName[FILE_NAME_SIZE]; //!< Filename for config info fot type 0, 2, 6
int num_slice_groups_minus1; //!< "FmoNumSliceGroups" in encoder.cfg, same as FmoNumSliceGroups, which should be erased later
int slice_group_map_type;
int *top_left; //!< top_left and bottom_right store values indicating foregrounds
int *bottom_right;
byte *slice_group_id; //!< slice_group_id is for slice group type being 6
int *run_length_minus1; //!< run_length_minus1 is for slice group type being 0
int slice_group_change_direction_flag;
int slice_group_change_rate_minus1;
int slice_group_change_cycle;
int redundant_pic_flag; //! encoding of redundant pictures
int pic_order_cnt_type; //! POC type
int context_init_method;
int model_number;
int Transform8x8Mode;
int ReportFrameStats;
int DisplayEncParams;
int Verbose;
//! Rate Control on JVT standard
int RCEnable;
int bit_rate;
int SeinitialQP;
unsigned int basicunit;
int channel_type;
int RCUpdateMode;
double RCIoverPRatio;
double RCBoverPRatio;
double RCISliceBitRatio;
double RCBSliceBitRatio[RC_MAX_TEMPORAL_LEVELS];
int RCMinQP[5];
int RCMaxQP[5];
int RCMaxQPChange;
int ScalingMatrixPresentFlag;
int ScalingListPresentFlag[12];
// Search Algorithm
SearchType SearchMode;
int UMHexDSR;//!< Dynamic Search Range
int UMHexScale;
//////////////////////////////////////////////////////////////////////////
// Fidelity Range Extensions
int BitDepthLuma;
int BitDepthChroma;
int img_height_cr;
int img_width_cr;
int rgb_input_flag;
int cb_qp_index_offset;
int cr_qp_index_offset;
// Lossless Coding
int lossless_qpprime_y_zero_flag;
// Lambda Params
int UseExplicitLambdaParams;
double LambdaWeight[6];
double FixedLambda[6];
char QOffsetMatrixFile[FILE_NAME_SIZE]; //!< Quantization Offset matrix cfg file
int OffsetMatrixPresentFlag; //!< Enable Explicit Quantization Offset Matrices
int AdaptiveRounding; //!< Adaptive Rounding parameter based on JVT-N011
int AdaptRoundingFixed; //!< Global rounding for all qps
int AdaptRndPeriod; //!< Set period for adaptive rounding of JVT-N011 in MBs
int AdaptRndChroma;
int AdaptRndWFactor[2][5]; //!< Weighting factors for luma component based on reference indicator and slice type
int AdaptRndCrWFactor[2][5]; //!< Weighting factors for chroma components based on reference indicator and slice type
// Fast Mode Decision
int EarlySkipEnable;
int SelectiveIntraEnable;
int DisposableP;
int DispPQPOffset;
//Redundant picture
int NumRedundantHierarchy; //!< number of entries to allocate redundant pictures in a GOP
int PrimaryGOPLength; //!< GOP length of primary pictures
int NumRefPrimary; //!< number of reference frames for primary picture
// Chroma interpolation and buffering
int ChromaMCBuffer;
int ChromaMEEnable;
int ChromaMEWeight;
int MEErrorMetric[3];
int ModeDecisionMetric;
// tone mapping SEI message
int ToneMappingSEIPresentFlag;
char ToneMappingFile[FILE_NAME_SIZE]; //!< ToneMapping SEI message cfg file
int separate_colour_plane_flag;
double WeightY;
double WeightCb;
double WeightCr;
int EnableVUISupport;
// VUI parameters
VUIParameters VUI;
// end of VUI parameters
} InputParameters;
//! ImageParameters
typedef struct
{
int number; //!< current image number to be encoded (in first layer)
int frm_number;
int cur_frm_number; //!< current image number to be encoded (in all layers)
int idr_gop_number; //!< current idr image number to be encoded
int rewind_frame; //!< current image number to be encoded
int pn; //!< picture number
int LevelIndex; //!< mapped level idc
int current_mb_nr;
int current_slice_nr;
int type;
int structure; //!< picture structure
int base_dist;
int num_ref_frames; //!< number of reference frames to be used
int max_num_references; //!< maximum number of reference pictures that may occur
int qp; //!< quant for the current frame
int qpsp; //!< quant for the prediction frame of SP-frame
int RCMinQP;
int RCMaxQP;
float framerate;
int width; //!< Number of pels
int width_padded; //!< Width in pels of padded picture
int width_blk; //!< Number of columns in blocks
int width_cr; //!< Number of pels chroma
int height; //!< Number of lines
int height_padded; //!< Number in lines of padded picture
int height_blk; //!< Number of lines in blocks
int height_cr; //!< Number of lines chroma
int height_cr_frame; //!< Number of lines chroma frame
int size; //!< Luma Picture size in pels
int size_cr; //!< Chroma Picture size in pels
int subblock_x; //!< current subblock horizontal
int subblock_y; //!< current subblock vertical
int is_intra_block;
int is_v_block;
int mb_y_upd;
int mb_y_intra; //!< which GOB to intra code
int block_c_x; //!< current block chroma vertical
char **ipredmode; //!< intra prediction mode
char **ipredmode8x8; //!< help storage for 8x8 modes, inserted by YV
int cod_counter; //!< Current count of number of skipped macroblocks in a row
int ***nz_coeff; //!< number of coefficients per block (CAVLC)
int mb_x; //!< current MB horizontal
int mb_y; //!< current MB vertical
int block_x; //!< current block horizontal
int block_y; //!< current block vertical
int pix_x; //!< current pixel horizontal
int pix_y; //!< current pixel vertical
int pix_c_x; //!< current pixel chroma horizontal
int pix_c_y; //!< current pixel chroma vertical
int opix_x; //!< current original picture pixel horizontal
int opix_y; //!< current original picture pixel vertical
int opix_c_x; //!< current original picture pixel chroma horizontal
int opix_c_y; //!< current original picture pixel chroma vertical
// prediction/residual buffers
imgpel mpr_4x4 [MAX_PLANE][9][16][16]; //!< prediction samples for 4x4 intra prediction modes
imgpel mpr_8x8 [MAX_PLANE][9][16][16]; //!< prediction samples for 8x8 intra prediction modes
imgpel mpr_16x16[MAX_PLANE][5][16][16]; //!< prediction samples for 16x16 intra prediction modes (and chroma)
imgpel mpr [MAX_PLANE][16][16]; //!< current best prediction mode
int m7 [MAX_PLANE][16][16]; //!< the diff pixel values between the original macroblock/block and its prediction
int (*curr_res)[16]; //!< pointer to current residual
imgpel (*curr_prd)[16]; //!< pointer to current prediction
int ****cofAC; //!< AC coefficients [8x8block][4x4block][level/run][scan_pos]
int ***cofDC; //!< DC coefficients [yuv][level/run][scan_pos]
int ***fadjust4x4; //!< Transform coefficients for 4x4 luma. Excludes DC for I16x16
int ***fadjust8x8; //!< Transform coefficients for 8x8 luma
int ****fadjust4x4Cr; //!< Transform coefficients for 4x4 chroma. Excludes DC chroma.
int ****fadjust8x8Cr; //!< Transform coefficients for 4x4 chroma within 8x8 inter blocks.
Picture *currentPicture; //!< The coded picture currently in the works (typically p_frame_pic, field_pic[0], or field_pic[1])
Slice *currentSlice; //!< pointer to current Slice data struct
Macroblock *mb_data; //!< array containing all MBs of a whole frame
int *quad; //!< Array containing square values,used for snr computation */ /* Values are limited to 5000 for pixel differences over 70 (sqr(5000)).
int *intra_block;
int tr;
int fld_type; //!< top or bottom field
unsigned int fld_flag;
unsigned int rd_pass;
int direct_intraP_ref[4][4];
int pstruct_next_P;
int imgtr_next_P_frm;
int imgtr_last_P_frm;
int imgtr_next_P_fld;
int imgtr_last_P_fld;
// B pictures
double b_interval;
int p_interval;
int b_frame_to_code;
int fw_mb_mode;
int bw_mb_mode;
short****** pred_mv; //!< motion vector predictors for all block types and all reference frames
short****** all_mv; //!< replaces local all_mv
short****** bipred_mv1; //!< Biprediction MVs
short****** bipred_mv2; //!< Biprediction MVs
short bi_pred_me[MAXMODE];
int LFDisableIdc;
int LFAlphaC0Offset;
int LFBetaOffset;
int direct_spatial_mv_pred_flag; //!< Direct Mode type to be used (0: Temporal, 1: Spatial)
int num_ref_idx_l0_active;
int num_ref_idx_l1_active;
int field_mode; //!< For MB level field/frame -- field mode on flag
int top_field; //!< For MB level field/frame -- top field flag
int mvscale[6][MAX_REFERENCE_PICTURES];
int buf_cycle;
int i16offset;
int layer; //!< which layer this picture belonged to
int old_layer; //!< old layer number
int NoResidueDirect;
int AdaptiveRounding; //!< Adaptive Rounding parameter based on JVT-N011
int redundant_pic_cnt; // JVT-D101
int MbaffFrameFlag; //!< indicates frame with mb aff coding
//the following should probably go in sequence parameters
unsigned int pic_order_cnt_type;
// for poc mode 1
Boolean delta_pic_order_always_zero_flag;
int offset_for_non_ref_pic;
int offset_for_top_to_bottom_field;
unsigned int num_ref_frames_in_pic_order_cnt_cycle;
int offset_for_ref_frame[1];
//the following is for slice header syntax elements of poc
// for poc mode 0.
unsigned int pic_order_cnt_lsb;
int delta_pic_order_cnt_bottom;
// for poc mode 1.
int delta_pic_order_cnt[2];
int frm_iter; // frame variations to create (useful for multiple coding passes)
unsigned int field_picture;
signed int toppoc; //!< poc for this frame or field
signed int bottompoc; //!< for completeness - poc of bottom field of a frame (always = poc+1)
signed int framepoc; //!< min (toppoc, bottompoc)
signed int ThisPOC; //!< current picture POC
unsigned int frame_num; //!< frame_num for this frame
unsigned int PicWidthInMbs;
unsigned int PicHeightInMapUnits;
unsigned int FrameHeightInMbs;
unsigned int PicSizeInMbs;
unsigned int FrameSizeInMbs;
//the following should probably go in picture parameters
Boolean pic_order_present_flag; // ????????
//the following are sent in the slice header
// int delta_pic_order_cnt[2];
int nal_reference_idc;
int adaptive_ref_pic_buffering_flag;
int no_output_of_prior_pics_flag;
int long_term_reference_flag;
DecRefPicMarking_t *dec_ref_pic_marking_buffer;
int model_number;
// rate control variables
int NumberofCodedMacroBlocks;
int BasicUnitQP;
int NumberofMBTextureBits;
int NumberofMBHeaderBits;
unsigned int BasicUnit;
int write_macroblock;
int bot_MB;
int write_mbaff_frame;
int DeblockCall;
int last_pic_bottom_field;
int last_has_mmco_5;
int pre_frame_num;
int slice_group_change_cycle;
int pic_unit_size_on_disk;
int bitdepth_luma;
int bitdepth_chroma;
int bitdepth_scale[2];
int bitdepth_luma_qp_scale;
int bitdepth_chroma_qp_scale;
int bitdepth_lambda_scale;
int max_bitCount;
int max_qp_delta;
int min_qp_delta;
// Lagrangian Parameters
double **lambda_md; //!< Mode decision Lambda
double ***lambda_me; //!< Motion Estimation Lambda
int ***lambda_mf; //!< Integer formatted Motion Estimation Lambda
double **lambda_mf_factor; //!< Motion Estimation Lamda Scale Factor
unsigned int dc_pred_value_comp[MAX_PLANE]; //!< component value for DC prediction (depends on component pel bit depth)
unsigned int dc_pred_value; //!< DC prediction value for current component
int max_imgpel_value_comp[MAX_PLANE]; //!< max value that one picture element (pixel) can take (depends on pic_unit_bitdepth)
int max_imgpel_value; //!< max value that one picture element (pixel) can take (depends on pic_unit_bitdepth)
int num_blk8x8_uv;
int num_cdc_coeff;
int yuv_format;
int lossless_qpprime_flag;
int mb_cr_size_x;
int mb_cr_size_y;
int mb_size[MAX_PLANE][2];
int chroma_qp_offset[2]; //!< offset for qp for chroma [0-Cb, 1-Cr]
int auto_crop_right;
int auto_crop_bottom;
short checkref;
int last_valid_reference;
int bytes_in_picture;
int AverageFrameQP;
int SumFrameQP;
int GopLevels;
int ChromaArrayType;
Macroblock *mb_data_JV[MAX_PLANE]; //!< mb_data to be used during 4:4:4 independent mode encoding
int colour_plane_id; //!< colour_plane_id of the current coded slice (valid only when separate_colour_plane_flag is 1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -