x264 - x264_reference_hierarchy_reset
来源:互联网 发布:mac的输入法快捷键 编辑:程序博客网 时间:2024/06/03 21:22
static inline void x264_reference_hierarchy_reset( x264_t *h )
{
int ref;
int b_hasdelayframe = 0;
// 非参考B帧一般是IS_DISPOSABLE
/* look for delay frames -- chain must only contain frames that are disposable */
for( int i = 0; h->frames.current[i] && IS_DISPOSABLE( h->frames.current[i]->i_type ); i++ )
b_hasdelayframe |= h->frames.current[i]->i_coded
!= h->frames.current[i]->i_frame + h->sps->vui.i_num_reorder_frames;
/* This function must handle b-pyramid and clear frames for open-gop */
if( h->param.i_bframe_pyramid != X264_B_PYRAMID_STRICT && !b_hasdelayframe && h->frames.i_poc_last_open_gop == -1 )
return;
/* Remove last BREF. There will never be old BREFs in the
* dpb during a BREF decode when pyramid == STRICT */
// 标记要清除的参考帧, BREF 帧 或
// h->frames.reference[ref]->i_poc < h->frames.i_poc_last_open_gop
// 参考帧
// 并设置list0重序标志
for( ref = 0; h->frames.reference[ref]; ref++ )
{
if( ( h->param.i_bframe_pyramid == X264_B_PYRAMID_STRICT
&& h->frames.reference[ref]->i_type == X264_TYPE_BREF )
|| ( h->frames.reference[ref]->i_poc < h->frames.i_poc_last_open_gop
&& h->sh.i_type != SLICE_TYPE_B ) )
{
int diff = h->i_frame_num - h->frames.reference[ref]->i_frame_num;
h->sh.mmco[h->sh.i_mmco_command_count].i_difference_of_pic_nums = diff;
h->sh.mmco[h->sh.i_mmco_command_count++].i_poc = h->frames.reference[ref]->i_poc;
x264_frame_push_unused( h, x264_frame_shift( &h->frames.reference[ref] ) );
h->b_ref_reorder[0] = 1;
ref--;
}
}
// 计算list0 清除参考帧的数目(从距离远者开始清除)
/* Prepare room in the dpb for the delayed display time of the later b-frame's */
if( h->param.i_bframe_pyramid )
h->sh.i_mmco_remove_from_end = X264_MAX( ref + 2 - h->frames.i_max_dpb, 0 );
}
- x264 - x264_reference_hierarchy_reset
- x264
- x264 - x264.mb.i_neighbour8
- X264 笔记
- 编译x264
- x264编译
- x264 git
- x264优化
- X264设定
- X264分析
- X264设定
- 编译x264
- x264编译
- x264记录
- x264 encode
- 编译x264
- x264 - x264_frame_init_lowres
- X264 - lookahead
- mysql 字段类型总结---字段类型总表
- SPAIA
- object references an unsaved transient instance - save the transient instance before flushing
- php获取分类下面的所有子类方法
- HDOJ 1054 Strategic Game
- x264 - x264_reference_hierarchy_reset
- Response.Write 调用 JS文件中自定义的函数,jquery、js调用iframe父窗口与子窗口元素的方法
- C#多线程(二)
- 二分查找算法(递归和非递归)
- 黑马程序员java基础String、StringBuffer、StringBuilder笔记
- x264 - x264_reference_build_list
- 带有头结点的循环单链表的相关操作
- tomcat从 http转成https,并且去掉端口号
- 【尚观】Android游戏与应用开发最佳学习之路_转载来学习Android