Introduction to x265 Rate Control Algorithm
The rate control in x265 is the same as x264's implementation, which is mostly empirical. It includes one two-pass and three one-pass modes(ABR, CRF and CQP). We describe ABR and CRF modes below.
Average Bitrate(ABR)
This is a one-pass scheme which produces near-constant quality within a specified file size. The ABR mode is implemented as follows:
- Run a fast motion estimation algorithm over a half-resolution version of current frame and then get SATD[i].
- Calculate blurred complexity of current frame according to SATD[i].
blurredComplexity [i] = cplxsum [i] / ( cplxcount [i] )
cplxsum [i] = cplxsum [i - 1] ∗ 0.5 + SATD [i]
cplxcount [i] = cplxcount [i - 1] ∗ 0.5 + 1 - Calculate qscale of current frame according to blurredComplexity [i] .
qscale [i] = blurredComplexity [i] ^ (1 - qcomp) - Clip qscale [i] twice in order to get it more accurate.
qscale [i] = qscale[i] / rateFactor[i]
qscale [i] = qscale[i] ∗ overflow
rateFactor [i] = wanted_bits_windows[i] / cplxsum[i]
overflow = clip3f(1 + (totalBits - wanted_bits) / abr_buffer, 0.5, 2) - Call clipQscale function to guarantee that the buffer is in a reasonable state by the end of the lookahead.
- Calculate QP according to qscale.
QP = 12 + 6 * log2 (qscale[i] / 0.85)
Constant Rate Factor(CRF)
The CRF mode is a one-pass mode that is optimal if the user specifies quality instead of bitrate. It is the same as ABR, except that the scaling factor is a constant and no overflow compensation is done. The steps are given below:
- Run a fast motion estimation algorithm over a half-resolution version of current frame and then get SATD[i].
- Calculate blurred complexity of current frame according to SATD[i].
blurredComplexity [i] = cplxsum [i] / ( cplxcount [i] )
cplxsum [i] = cplxsum [i - 1] ∗ 0.5 + SATD [i]
cplxcount [i] = cplxcount [i - 1] ∗ 0.5 + 1 - Calculate qscale of current frame according to blurredComplexity [i].
qscale [i] = blurredComplexity [i] ^ (1 - qcomp) - Scale qscale [i] with a constant.
qscale [i] = qscale[i] / rateFactor - Call clipQscale function to guarantee that the buffer is in a reasonable state by the end of the lookahead.
- Calculate QP according to qscale.
QP = 12 + 6 * log2 (qscale[i] / 0.85)
Introduction to x265 Rate Control Algorithm的更多相关文章
- ieee80211 phy1: Failed to select rate control algorithm
/************************************************************************ * ieee80211 phy1: Failed t ...
- A Gentle Introduction to the Gradient Boosting Algorithm for Machine Learning
A Gentle Introduction to the Gradient Boosting Algorithm for Machine Learning by Jason Brownlee on S ...
- VBV Rate Control
Part 1 <06/05/07 12:08pm> Manao | he is negating a float by printing it, adding a "-" ...
- Deep Learning-Based Video Coding: A Review and A Case Study
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! 1.Abstract: 本文主要介绍的是2015年以来关于深度图像/视频编码的代表性工作,主要可以分为两类:深度编码方案以及基于传统编码方 ...
- 嵌入式系统添加无线wifi模块
开发环境:fl2440开发板,linux3.0内核,交叉编译器路径/opt/buildroot-2011.11/arm920t/usr/bin/arm-linux-,无线网卡RT3070 平时开发板联 ...
- FreeBSD_11-系统管理——{Part_4 - 内核参数定制}
特别提醒:自行定制的内核,必須经过全方位测试无誤后,方能用于生产环境 基于:/usr/src/sys/amd64/conf/GENERIC cpu HAMMER ident TEST_kernel # ...
- S3C2440实现wifi、3G上网和迷你无线路由的制作(一)
S3C2440实现wifi.3G上网和迷你无线路由的制作 fulinux 凌云实验室 本文将通过ARM.linux平台,借助RT2070/RT3070芯片的无线模块(或使用RT2070/RT3070芯 ...
- ubuntu12.04下编译Linux tina 2.1/android经验
用的是osboxes下的vdi. 编译Linux 1. 不能在root用户下操作 2. 执行 make kernel_menuconfig 报错,需要 apt-get install zlib1g z ...
- 使用RT3070使开发板上网
原文地址:http://www.cnblogs.com/NickQ/p/8973880.html 使开发板上网 USB驱动部分 在arch/arm/mach-s3c2440/mach-smdk2440 ...
随机推荐
- 快速了解C# 8.0中“可空引用类型(Nullable reference type)”语言特性
Visual C# 8.0中引入了可空引用类型(Nullable reference type),通过编译器提供的强大功能,帮助开发人员尽可能地规避由空引用带来的代码问题.这里我大致介绍一下可空引用类 ...
- C语言之预处理详解
C语言之预处理详解 纲要: 预定义符号 #define #define定义标识符 #define定义宏 #define的替换规则 #与## 几点注意#undef 带副作用的宏参数 宏和函数的对比 命名 ...
- Elasticsearch 分页查询
目录 前言 from + size search after scroll api 总结 参考资料 前言 我们在实际工作中,有很多分页的需求,商品分页.订单分页等,在MySQL中我们可以使用limit ...
- kubernetes中有状态应用的优雅缩容
将有状态的应用程序部署到Kubernetes是棘手的. StatefulSet使它变得容易得多,但是它们仍然不能解决所有问题.最大的挑战之一是如何缩小StatefulSet而不将数据留在断开连接的Pe ...
- Database | 浅谈Query Optimization (1)
综述 由于SQL是声明式语言(declarative),用户只告诉了DBMS想要获取什么,但没有指出如何计算.因此,DBMS需要将SQL语句转换成可执行的查询计划(Query Plan).但是对同样的 ...
- Class类文件结构--访问标志
访问标志的位置:在常量池结束之后的两个字节(16位)表示访问标志access_flags. 访问标志的作用:用于标识类或者接口层次的访问信息:比如该Class是类还是接口,是否为public类型.是否 ...
- spring-cloud-sleuth分布式服务跟踪
通过之前的 Spring Cloud 组件学习, 实际上我们已经能够通过使用它们搭建起一 个基础的微服务架构系统来实现业务需求了. 但是, 随着业务的发展, 系统规模也会变得越来越大, 各微服务间的调 ...
- (十七)VMware Harbor 垃圾清理
1. 在线垃圾清理 注意:从Harbor中删除镜像时不释放空间,垃圾收集是通过从清单中不再引用文件系统中删除blob来释放空间的任务. 注意:在执行垃圾收集时,Harbor将进入只读模式,并且禁止对d ...
- day19.进程通信与线程1
1 进程Queue介绍 1 进程间数据隔离,两个进程进行通信,借助于Queue 2 进程间通信:IPC -借助于Queue实现进程间通信 -借助于文件 -借助于数据库 -借助于消息队列:rabbitm ...
- JavaScript遍历对象方法总结
前言 本篇内容将按照下图展开: 遍历Object Object最常见的遍历方法方法就是使用for...in...,但其有一定的局限性,比如只能遍历可枚举属性.虽然Object无法直接使用for循环和f ...