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++11正则表达式
- APP | edxposed框架+trustmealredy模块抓包小程序
出品|MS08067实验室(www.ms08067.com) 本文作者:ketchup(Ms08067实验室 SRSP TEAM小组成员) 一.下载edxposed框架,由于安卓5.0版本以下的不支持 ...
- DFS 深搜专题 入门典例 -- 凌宸1642
DFS 深搜专题 入门典例 -- 凌宸1642 深度优先搜索 是一种 枚举所有完整路径以遍历所有情况的搜索方法 ,使用 递归 可以很好的实现 深度优先搜索. 1 最大价值 题目描述 有 n 件物品 ...
- BUAA_2021_SE_Pair_Work_#3_Review
结对项目第三阶段博客 项目 内容 这个作业属于哪个课程 2021春季计算机学院软件工程(罗杰 任健) 这个作业的要求在哪里 结对项目-第三阶段 我在这个课程的目标是 通过课程学习,完成第一个可以称之为 ...
- 消息中间件rabbitMQ
1 为什么使用消息队列啊? 其实就是问问你消息队列都有哪些使用场景,然后你项目里具体是什么场景,说说你在这个场景里用消息队列是什么 面试官问你这个问题,期望的一个回答是说,你们公司有个什么业务场景,这 ...
- babel配置文件.babelrc详解
一:理解 babel之配置文件.babelrc 基本配置项 1. 什么是babel? 它是干什么用的? ES6是2015年发布的下一代javascript语言标准,它引入了新的语法和API,使我们编写 ...
- OO_UNIT4_SUMMARY
经过一个学期的学习,OO课程终于落下帷幕.本次博客会首先对第四单元作业的架构进行分析,再对OO课程进行总体回顾,最后是个人的建议与体会. 一.第四单元三次作业架构设计 1.第一次作业 第一次作业是对类 ...
- 1144 The Missing Number
Given N integers, you are supposed to find the smallest positive integer that is NOT in the given li ...
- ESXI的使用
一台物理裸机服务器装上了ESXI就有了灵魂 vmware esxi的安装 多网段站群服务器 参考教程 安装ESXi VMware ESXI 6.5安装教程 物理机下安装 VMware ESXi 6.7 ...
- Python实现Paramiko的二次封装
Paramiko是一个用于执行SSH命令的Python第三方库,使用该库可实现自动化运维的所有任务,如下是一些常用代码的封装方式,多数代码为半成品,只是敲代码时的备份副本防止丢失,仅供参考,目前本人巡 ...