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:

  1. Run a fast motion estimation algorithm over a half-resolution version of current frame and then get SATD[i].
  2. 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
  3. Calculate qscale of current frame according to blurredComplexity [i] .
     qscale [i] =  blurredComplexity [i] ^ (1 - qcomp)
  4. 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)
  5. Call clipQscale function to guarantee that the buffer is in a reasonable state by the end of the lookahead.
  6. 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:

  1. Run a fast motion estimation algorithm over a half-resolution version of current frame and then get SATD[i].
  2. 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
  3. Calculate qscale of current frame according to blurredComplexity [i].
     qscale [i] =  blurredComplexity [i] ^ (1 - qcomp)
  4. Scale qscale [i] with a constant.
    qscale [i] =  qscale[i] / rateFactor
  5. Call clipQscale function to guarantee that the buffer is in a reasonable state by the end of the lookahead.
  6. Calculate QP according to qscale.
    QP = 12 + 6 * log2 (qscale[i] / 0.85)

Introduction to x265 Rate Control Algorithm的更多相关文章

  1. ieee80211 phy1: Failed to select rate control algorithm

    /************************************************************************ * ieee80211 phy1: Failed t ...

  2. 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 ...

  3. VBV Rate Control

    Part 1 <06/05/07 12:08pm> Manao | he is negating a float by printing it, adding a "-" ...

  4. Deep Learning-Based Video Coding: A Review and A Case Study

    郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! 1.Abstract: 本文主要介绍的是2015年以来关于深度图像/视频编码的代表性工作,主要可以分为两类:深度编码方案以及基于传统编码方 ...

  5. 嵌入式系统添加无线wifi模块

    开发环境:fl2440开发板,linux3.0内核,交叉编译器路径/opt/buildroot-2011.11/arm920t/usr/bin/arm-linux-,无线网卡RT3070 平时开发板联 ...

  6. FreeBSD_11-系统管理——{Part_4 - 内核参数定制}

    特别提醒:自行定制的内核,必須经过全方位测试无誤后,方能用于生产环境 基于:/usr/src/sys/amd64/conf/GENERIC cpu HAMMER ident TEST_kernel # ...

  7. S3C2440实现wifi、3G上网和迷你无线路由的制作(一)

    S3C2440实现wifi.3G上网和迷你无线路由的制作 fulinux 凌云实验室 本文将通过ARM.linux平台,借助RT2070/RT3070芯片的无线模块(或使用RT2070/RT3070芯 ...

  8. ubuntu12.04下编译Linux tina 2.1/android经验

    用的是osboxes下的vdi. 编译Linux 1. 不能在root用户下操作 2. 执行 make kernel_menuconfig 报错,需要 apt-get install zlib1g z ...

  9. 使用RT3070使开发板上网

    原文地址:http://www.cnblogs.com/NickQ/p/8973880.html 使开发板上网 USB驱动部分 在arch/arm/mach-s3c2440/mach-smdk2440 ...

随机推荐

  1. 阿里一面CyclicBarrier和CountDownLatch的区别是啥

    引言 前面一篇文章我们<Java高并发编程基础三大利器之CountDownLatch>它有一个缺点,就是它的计数器只能够使用一次,也就是说当计数器(state)减到为 0的时候,如果 再有 ...

  2. Android Studio 之 EditText

    EditText 简介 •简介 EditText是一个非常重要的组件,可以说它是用户和Android应用进行数据传输窗户: 有了它就等于有了一扇和Android应用传输的门,通过它用户可以把数据传给A ...

  3. .Net Core 路由处理

    用户请求接口路由,应用返回处理结果.应用中如何匹配请求的数据呢?为何能如此精确的找到对应的处理方法?今天就谈谈这个路由.路由负责匹配传入的HTTP请求,将这些请求发送到可以执行的终结点.终结点在应用中 ...

  4. 使用Vanilla框架制作时间倒数器 ——JavaScript

    一.制作时间倒数器要求以及思路:   1.首先创建三个输入字段,分别是小时,分钟和秒,以及"开始"按钮.输入的初始值必须为0h 5m 0s.当用户输入小时,分钟和秒并单击" ...

  5. “改造” VS Code 编辑器,一起写个插件吧!

    作者:HelloGitHub-小夏(首发于 HelloGitHub 公众号) 作为一个靠代码作为"生计"的开发者,bug 写的好不好,编辑器真的很重要!那么 Visual Stud ...

  6. 什么?女神发了朋友圈,快来围观之Java设计模式:观察者模式

    目录 观察者模式 示例 定义 设计原则 意图 主要解决问题 何时使用 优缺点 女神和追求者的故事 Java中的实现 观察者模式 示例 微信公众号,关注就可以收到推送的消息,取消关注就不会收到 定义 定 ...

  7. 1019 General Palindromic Number

    A number that will be the same when it is written forwards or backwards is known as a Palindromic Nu ...

  8. php 日志处理工具 SeasLog 的使用

    首先附上seaslog github地址: https://github.com/Neeke/SeasLog/blob/master/README_zh.md php官方文档地址: https://w ...

  9. hdu4279 找规律+小想法

    题意:      蛋疼的题意,最后是泽神给我讲的题意,题意是对于一个数来说,如果他不能整除另一个数同时他和另一个数非互质,那么另一个数就是这个数的特别数,如10 的特别数有 4 6 8三个,同时题目还 ...

  10. 使用EasySYS搭建驱动开发基本框架

    提供EasySYS的下载地址:http://bbs.pediy.com/showthread.php?p=956643,看雪上有提供下载,自行百度. EasySYS你能够帮我们快速的搭建驱动的开发框架 ...