homerHEVC代码阅读(8)——基础结构之henc_thread_t
来源:互联网 发布:mac格式化u盘为f32 编辑:程序博客网 时间:2024/06/03 14:15
henc_thread_t是编码器线程类
// 编码器线程类// 还有一些属性的含义还不清楚,以后补充struct henc_thread_t{ // 所属的编码器引擎 hvenc_engine_t*enc_engine; // 索引 uintindex; // 是否启用wfpp宫内 intwfpp_enable; // wfpp线程的数量 intwfpp_num_threads; // 信号量,用于通知有一个帧到来了,synchro_sem[0]表示I帧,synchro_sem[1]表示B或P帧 hmr_sem_tsynchro_sem[2];// 0 for intra_frame synchronization, 1 for inter frame synchronization hmr_sem_ptrsynchro_signal[2];// 0 for intra_frame synchronization, 1 for inter frame synchronization hmr_sem_ptrsynchro_wait[2];// 0 for intra_frame synchronization, 1 for inter frame synchronization intnum_wait_sem; intdbg_sem_post_cnt; // 比特流 bitstream_t*bs; //header info // 视频参数集 vps_t*vps; // 序列参数集 sps_t*sps; // 图像参数集 pps_t*pps; // 编码器的配置,不再赘述 //Encoder Cfg //Encoding layer intpict_width[3], pict_height[3]; intpict_width_in_ctu, pict_height_in_ctu; intpict_total_ctu; intctu_width[3], ctu_height[3]; //intctu_group_size; //cfg intmax_cu_size; intmax_cu_size_shift;//log2 of max cu size intmax_cu_size_shift_chroma; intmax_intra_tr_depth; intmax_inter_tr_depth; intmax_pred_partition_depth;//, max_inter_pred_depth;//max depth for prediction intmotion_estimation_precision; // 当前CU的分割数 intnum_partitions_in_cu; intnum_partitions_in_cu_shift; intmincu_mintr_shift_diff;//log2//g_uiAddCUDepth // 最大cu的深度 intmax_cu_depth;//m_uiMaxCUDepth // 最小cu的尺寸 intmin_cu_size; intmin_cu_size_shift;//log2 intmin_tu_size_shift;//log2 intmax_tu_size_shift;//log2 // 档次 intprofile; // 比特深度 intbit_depth; // 率失真模式 intrd_mode; // 性能模式 intperformance_mode; // 帧内预测中CU的分割数 uintnum_intra_partitions; // 帧间预测中CU的分割数 uintnum_total_partitions; // 总的CTU的数量 uintnum_total_ctus; int*partition_depth_start;//start of depths in the partition_info list //cu_partition_info_t*partition_info;//recursive structure list to store the state of the recursive computing stages //current processing state and buffers // 当前的cu和下一个cu intcu_current, cu_next; // 当前cu的坐标 intcu_current_x, cu_current_y; // 这些窗口的含义暂时还不清楚 wnd_tcurr_mbs_wnd;//original MBs to be coded wnd_tprediction_wnd;//prediction applied to original MBs wnd_tresidual_wnd;//residual after substracting prediction wnd_tresidual_dec_wnd;//decoded residual. output of inverse transform wnd_ttransform_quant_wnd_[NUM_QUANT_WNDS];//windows to be used with pointers wnd_t*transform_quant_wnd[NUM_QUANT_WNDS];//for transform coefficients and quantification wnd_titransform_iquant_wnd;//for itransform coefficients and iquantification wnd_tdecoded_mbs_wnd_[NUM_DECODED_WNDS];//windows to be used with pointers wnd_t*decoded_mbs_wnd[NUM_DECODED_WNDS]; //deblock filter //cu_partition_info_t* deblock_partition_info;//recursive structure list to store the state of the recursive computing stages uint8_t*deblock_edge_filter[2]; uint8_t*deblock_filter_strength_bs[2]; //sao int16_t*sao_sign_line_buff1;//m_signLineBuf1; int16_t*sao_sign_line_buff2; //m_signLineBuf2; //quarter precission buffers // 量化器精度的缓冲区 wnd_tfiltered_block_wnd[4][4]; wnd_tfiltered_block_temp_wnd[4]; //intra predicition // 下面的一些属性用于帧内预测 // 改变量用于存放当前cu左边一列和上边一行的数据 int16_t(*adi_pred_buff);//this buffer holds the left column and top row for intra pred (bottom2top and left2right) // 同上 int16_t(*adi_filtered_pred_buff);//this buffer holds the left column and top row for intra pred (bottom2top and left2right) // 用于帧内预测的中间buffer int16_t(*top_pred_buff);//intermediate buffer to calculate intra prediction samples int16_t(*left_pred_buff);//intermediate buffer to calculate intra prediction samples int16_t(*bottom_pred_buff);//intermediate buffer to calculate intra prediction samples int16_t(*right_pred_buff);//intermediate buffer to calculate intra prediction samples intadi_size;//size of adi buffer int16_t(*pred_aux_buff); intpred_aux_buff_size;//size of aux buffer int16_t(*aux_buff); uint8_t(*cabac_aux_buff); intcabac_aux_buff_size; //ctu_info_t*curr_ctu_group_info;//this is supposed to be a small window matching the processing grain uint8_t*cbf_buffs[NUM_PICT_COMPONENTS][MAX_PARTITION_DEPTH]; uint8_t*cbf_buffs_chroma[NUM_PICT_COMPONENTS];//processing aux buffers uint8_t*intra_mode_buffs[NUM_PICT_COMPONENTS][MAX_PARTITION_DEPTH]; uint8_t*tr_idx_buffs[MAX_PARTITION_DEPTH]; //inter 帧间预测 // amvp的候选列表 mv_candiate_list_tamvp_candidates[2]; // merge模式的候选列表 mv_candiate_list_tmerge_mvp_candidates[2]; // 搜索mv的候选列表 mv_candiate_list_tmv_search_candidates;//non normative candidate list for motion_search //rd,率失真 // CTU信息 ctu_info_t*ctu_rd;//[MAX_MB_GROUP_SIZE]; // enc_env_t实际就是sbac enc_env_t*ee;//encoding enviroment of the processing element // 比特计数器 enc_env_t*ec;//encoding counter of the processing element // 上下文模型 context_model_t*aux_contexts; // 二进制模型 binary_model_taux_bm; //rate distortion // 率失真 rate_distortion_trd; uint32_tacc_dist; //rate control // 速率控制 // 已经编码的CTU个数 uintnum_encoded_ctus;//num CABAC encoded ctus // 比特数 uintnum_bits; // 目标图像的大小 uinttarget_pict_size; intacc_qp; intwrite_qp_flag; intcurr_ref_qp;//for qp modification when cbf=0 intfound_zero_cbf;//for qp modification when cbf=0 // 底层函数对象 low_level_funcs_t*funcs;};
0 0
- homerHEVC代码阅读(8)——基础结构之henc_thread_t
- homerHEVC代码阅读(12)——基础结构之其他结构
- homerHEVC代码阅读(3)——基础结构之HVENC_Cfg
- homerHEVC代码阅读(4)——基础结构之stream_t
- homerHEVC代码阅读(5)——基础结构之bitstream_t与nalu_t
- homerHEVC代码阅读(6)——基础结构之hvenc_enc_t
- homerHEVC代码阅读(7)——基础结构之hvenc_engine_t
- homerHEVC代码阅读(9)——基础结构之low_level_funcs_t
- homerHEVC代码阅读(10)——基础结构之picture_t、slice_t、ctu_info_t
- homerHEVC代码阅读(11)——基础结构之output_set_t、video_frame_t
- homerHEVC代码阅读(13)——基础结构之encoder_in_out_t
- homerHEVC代码阅读(14)——基础结构之ref_pic_set_t、rate_control_t、rate_distortion_t
- homerHEVC代码阅读(15)——基础结构之enc_env_t
- homerHEVC代码阅读(16)——基础结构之entropy_model_t、context_model_buff_t、context_model_t、binary_model_t
- homerHEVC代码阅读(17)——基础结构之cu_partition_info_t
- homerHEVC代码阅读(18)——基础结构之mv_candiate_list_t,motion_vector_t,temporal_info_t,wnd_t
- homerHEVC代码阅读(19)——基础结构之vps_t,sps_t,pps_t
- homerHEVC代码阅读(20)——基础结构之profiler_t,profile_tier_t,profile_tier_level_t
- UIScrollView
- oracle事务隔离机制
- HDU 搬砖
- LeetCode -- Find the Duplicate Number
- 使用SIGALRM信号为阻塞操作设置超时
- homerHEVC代码阅读(8)——基础结构之henc_thread_t
- static变量与普通变量的区别
- Codeforces 600A Extract Numbers 【模拟】
- Spark DAGScheduler模块源码解析(转自:http://guozhongxin.com/tag/spark.html)
- hpuoj 1722: 感恩节KK专场——与学妹滑雪 (最短路&精度)
- 浅谈c#委托的四种用法及lambda匿名委托
- uva 562 Dividing coins 01背包
- spring 使用classpath方式加载hibernate映射文件
- Eigen+suitesparse for windows 安装