什么是自适应量化

自适应量化就是根据宏块的复杂度来调整每个宏块量化时的量化参数。

看一下x264对于相应的参数说明

aq-mode

自适应量化模式(Adaptive Quantization Mode)
默认: 1
若关闭AQ,x264倾向于对低细节度的平滑区域使用过低码率,AQ可以更好把码率分配到各个宏块中. 该选项改变AQ重新安排码率的幅度:

  • 0: 禁止AQ
  • 1: 允许AQ在整个视频中和帧内重新分配码率
  • 2: 自方差AQ(实验阶段),尝试逐帧调整强度

参见:--aq-strength

aq-strength

自适应量化强度(Adaptive Quantization Strength)
默认: 1.0
设置AQ偏向于低细节度(“平滑”)宏块的强度。不允许为负值。建议选值不超过0.0~2.0范围。
参见:--aq-mode

那为什么需要AQ呢?

看x264开发者的在分析VP8时的一段论述非常经典(http://x264dev.multimedia.cx/archives/377 )

Quantization

For quantization, the core process is basically the same among all MPEG-like video formats, and VP8 is no exception. The primary ways that video formats tend to differentiate themselves here is by varying quantization scaling factors. There are two ways in which this is primarily done: frame-based offsets that apply to all coefficients or just some portion of them, and macroblock-level offsets. VP8 primarily uses the former; in a scheme much less flexible than H.264′s custom quantization matrices, it allows for adjusting the quantizer of luma DC, luma AC, chroma DC, and so forth, separately. The latter (macroblock-level quantizer choice) can, in theory, be done using its “segmentation map” features, albeit very hackily and not very efficiently.

The killer mistake that VP8 has made here is not making macroblock-level quantization a core feature of VP8. Algorithms that take advantage of macroblock-level quantization are known as “adaptive quantization” and are absolutely critical to competitive visual quality. My implementation of variance-based adaptive quantization (before, after) in x264 still stands to this day as the single largest visual quality gain in x264 history. Encoder comparisons have showed over and over that encoders without adaptive quantization simply cannot compete.

Thus, while adaptive quantization is possible in VP8, the only way to implement it is to define one segment map for every single quantizer that one wants and to code the segment map index for every macroblock. This is inefficient and cumbersome; even the relatively suboptimal MPEG-style delta quantizer system would be a better option.  Furthermore, only 4 segment maps are allowed, for a maximum of 4 quantizers per frame.

Verdict on Quantization: Lack of well-integrated adaptive quantization is going to be a killer when the time comes to implement psy optimizations. Overall, much worse.

大致的意思如下:

对于量化来说,所有的MPEG类的视频格式的核心过程都一样,VP8也不例外.不同视频的区别之处只在于使用不同的量化缩放比例因子。基本上只有两个方法:基于帧的量化参数和基于宏块的量化参数. VP8 主要用了前者; 这就比H.264的定制量化矩阵死板多了。H264允许分别为亮度DC,亮度AC,色度DC,色度AC等等分别定义量化矩阵。VP8虽然可以通过自己的"segmentation map"来达到基于宏块改变量化参数,但是效率低下,晦涩难懂。

VP8的致命失误是没有把基于宏块级别的量化当作核心特性。利用宏块量化的算法,也就是“自适应量化”,对提高视频质量非常关键. 我在x264实现特性“基于方差自适应量化“到今天,在x264历史上仍然是最大视频质量提升。编码器比赛已经一次又一次的表明没有自适应量化就直接出局了。

x264 自适应量化模式 (AQ Adaptive Quantization) 初探相关推荐

  1. AutoSAR Adaptive platform 初探

    AutoSAR Adaptive platform初探 博主逐步开始探索Adaptive platform,如果你也是初学者,那博主可以跟你作回同窗了,一起先来看看,这个平台内都有哪些值得我们CARE ...

  2. Python使用openCV把原始彩色图像转化为灰度图、使用OpenCV把图像二值化(仅仅包含黑色和白色的简化版本)、基于自适应阈值预处理(adaptive thresholding)方法

    Python使用openCV把原始彩色图像转化为灰度图.使用OpenCV把图像二值化(仅仅包含黑色和白色的简化版本).基于自适应阈值预处理(adaptive thresholding)方法 目录

  3. TensorFlow2实现空间自适应归一化(Spatial Adaptive Normalization, SPADE)

    TensorFlow2实现空间自适应归一化(Spatial Adaptive Normalization, SPADE) 空间自适应归一化(Spatial Adaptive Normalization ...

  4. 车辆ACC控制,在未检测到前车的情况下自车处于定速巡航状态,当有前车切入时,则切换为自适应巡航模式

    车辆ACC控制,在未检测到前车的情况下自车处于定速巡航状态,当有前车切入时,则切换为自适应巡航模式,采用mpc控制算法,在保证较小加速度保证舒适型性的同时尽快较小车间距误差和速度误差. 采用的是car ...

  5. 同城两中心自适应同步模式部署

    本文介绍同城两中心的部署模式,相关架构.示例配置.副本方法.启用该模式的方法. 简介 TiDB 在 on-premises 部署的场景下,通常采用多中心部署方案,以保证高可用和容灾能力.多中心部署方案 ...

  6. 学习矢量量化(Learning Vector Quantization, LVQ)

    学习矢量量化(Learning Vector Quantization,LVQ),是一种用于模式分类的有监督的学习算法,也是一种结构简单.功能强大的有监督的神经网络分类算法.主要的类型有LVQ1.LV ...

  7. 帧间编码的预测自适应量化系数扫描排序

    自适应扫描顺序算法的实现步骤分三步: 对于每帧之间的预测,初始化为一组二维数组{S1[n][n] ,S2[n][n],--, Sm[n][n]},其中m是多少帧间预测模式,n是转换的每个维度的大小. ...

  8. MySQL(七):InnoDB 自适应Hash索引(Adaptive Hash Index)

    文章目录 1.简述 2.AHI(Adaptive Hash index)创建条件及注意事项 3.AHI(Adaptive Hash index)监控 3.1.通过 *show engine innod ...

  9. 【从零开始vnpy量化投资】一. vnpy初探 - 注册、安装、运行策略

    @[从零开始vnpy量化投资]vnpy初探 - 注册.安装.运行策略 vnpy简介 以下内容摘自vnpy.com官方,https://www.vnpy.com/ 功能介绍 作为一套基于Python的量 ...

最新文章

  1. vim学习笔记(四)
  2. 程序员的技能树,决定了一生职业的高度
  3. 如何在Mysql的Docker容器启动时初始化数据库
  4. 云原生存储系列文章(一):云原生应用的基石
  5. linux中的keeplived源码装,keepalived源码安装及主备配置
  6. hdu 5340(manacher+枚举)
  7. 2019 年 8 月编程语言排行榜,Java涨幅不行!
  8. java多态+多态中隐含的问题
  9. 信号扫描_图文并茂,一文读懂信号源
  10. StyleGAN_LatentEditor-master(Image2StyleGAN):如何将图像嵌入到 StyleGAN 潜在空间中?代码运行过程
  11. windows cmd install nscp
  12. linux mxnet 查询_mxnet c_predict_api的Go绑定实现 – go-mxnet-predi...
  13. openssl req
  14. C# Winform 防止MDI子窗体重复打开
  15. mysql数字辅助表_关于数字的经典SQL编程问题:数字辅助表
  16. 线程令牌桶的实现及条件变量改进版本
  17. 计算机中常用的声音编辑工具有哪些,电脑常用音频剪辑软件
  18. FFmpeg压缩音频和添加字幕的命令
  19. PyCharm 的调试功能
  20. 【耀杨闯荡华儿街】(面试官)曹阿门:给我讲讲多线程;耀杨:md心态崩了~

热门文章

  1. ASP.Net请求处理机制初步探索之旅
  2. 分享几个阿里云盘资源搜索平台
  3. 三种IP核总线接口比较分析
  4. MANIFEST.MF文件详解
  5. Dhtml,html,xhtml的区别
  6. 微信小程序与后台交互案例
  7. 集成学习(XGBoost,LightGBM,CatBoost)
  8. 牛顿3种方法解重根情形对比
  9. [SWPUCTF 2021 新生赛]
  10. 强!Java实现MSN Messenger聊天