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. WPF 反射加载Geometry几何图形数据图标

    相信大家在阅读WPF相关GitHub开源项目源码时都会看见一串串这种数据 这种Geometry数据就是几何图形数据 为什么要用Geometry数据做图标? 有一种做法是使用ttf字体文件代替,不过使用 ...

  2. 基于Centos7xELK+Kafka集群部署方案

    本次集群部署使用ELK版本统一为6.8.10,kafka为2.12-2.51 均可在官网下载 elasticsearch下载地址:https://www.elastic.co/cn/downloads ...

  3. Java 读取Word文本/段落格式属性

    本文介绍通过Java后端程序代码来读取Word文本和段落格式的方法. 本次测试环境如下: Word版本:2013 编译环境:IntelliJ IDEA2018 Work库:free spire.doc ...

  4. KeyError:‘uid' Python常见错误

    使用不存在的字典键值 检查字典和要查的内容 如有不正确改正即可

  5. K8S 上部署 Redis-cluster 三主三从 集群

    介绍 Redis代表REmote DIctionary Server是一种开源的内存中数据存储,通常用作数据库,缓存或消息代理.它可以存储和操作高级数据类型,例如列表,地图,集合和排序集合. 由于Re ...

  6. String 的不可变真的是因为 final 吗?

    尽人事,听天命.博主东南大学硕士在读,热爱健身和篮球,乐于分享技术相关的所见所得,关注公众号 @ 飞天小牛肉,第一时间获取文章更新,成长的路上我们一起进步 本文已收录于 「CS-Wiki」Gitee ...

  7. C++并发与多线程学习笔记--线程之间调度

    condition_variable wait() notify_one notify_all condition_variable 条件变量的实际用途: 比如有两个线程A和B,在线程A中等待一个条件 ...

  8. [Fundamental of Power Electronics]-PART II-8. 变换器传递函数-8.2 变换器传递函数分析

    8.2 变换器传递函数分析 接下来,让我们推导基本变换器传递函数中的极点,零点和渐近线增益的解析表达式. 8.2.1 示例:Buck-boost变换器的传递函数 Buck-boost变换器的小信号等效 ...

  9. 一个诡异的MySQL查询超时问题,居然隐藏着存在了两年的BUG

    这一周线上碰到一个诡异的BUG. 线上有个定时任务,这个任务需要查询一个表几天范围内的一些数据做一些处理,每隔十分钟执行一次,直至成功. 通过日志发现,从凌晨5:26分开始到5:56任务执行了三次,三 ...

  10. 虚拟机装好centos7没网解决办法

    输入ip查询命名 ip addr  也可以输入 ifconfig(centOs7没有ifconfig命令)查看ip,但此命令会出现3个条目,centos的ip地址是ens33条目中的inet值. 发现 ...