x264源码分析--参数deterministic

本文介绍了一个针对x264编码器中场景切割分析的实现细节,包括如何通过线程优化设置来减少多线程环境下的开销,以及如何进行帧分析以识别场景变化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

OPT2("deterministic", "n-deterministic")

        p->b_deterministic = atobool(value);//是否允许非确定性时线程优化

默认是开启的,可以减少多线程的开销。

void x264_slicetype_analyse( x264_t *h, int intra_minigop )
{

for( framecnt = 0; framecnt < i_max_search; framecnt++ )

        frames[framecnt+1] = h->lookahead->next.list[framecnt];

}

/* Where A-F are scenes: AAAAABBCCDDEEFFFFFF
         * If each of BB ... EE are shorter than (maxp1-p0), they are
         * detected as flashes and not considered scenecuts.
         * Instead, the first F frame becomes a scenecut.
         * If the video ends before F, no frame becomes a scenecut. */
        for( int curp0 = p0; curp0 <= maxp1; curp0++ )
            if( origmaxp1 > i_max_search || (curp0 < maxp1 && scenecut_internal( h, a, frames, curp0, maxp1, 0 )) )
                /* If cur_p0 is the p0 of a scenecut, it cannot be the p1 of a scenecut. */

                    frames[curp0]->b_scenecut = 0;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值