# 运动补偿

运动补偿是一种视频压缩技术，它通过估计物体运动，从先前已编码的相邻帧预测每一帧，从而使编码器只需传输运动矢量和少量的残差预测误差，而不必传输像素本身。结合对残差的变换编码，它是所有主要视频编码标准的帧间预测引擎。其价值在最早的论文中即已量化：与使用系数帧差的传统帧间变换编码器相比，运动补偿系数预测大幅降低了编码器码率；与简单的帧差预测相比，基于位移的预测进一步降低了码率。

| 关键事实 | 数值 | 来源 |
|---|---|---|
| 运动补偿预测的码率降低（1979年研究） | 相比帧差变换编码降低20–40%；相比帧差预测降低22–50% | <sup>[1](https://doi.org/10.1002/j.1538-7305.1979.tb02277.x)</sup>, <sup>[2](https://doi.org/10.1002/j.1538-7305.1979.tb02238.x)</sup> |
| 典型预测块 | 8×8或16×16像素，共用一个运动矢量 | <sup>[3](https://ittc.ku.edu/~jsv/Papers/HLV98.optimizationsOfficial.pdf)</sup> |
| 全搜索运动估计开销 | 每个宏块 \( O(p^{2} \cdot N^{2}) \) 次运算（\( N \) = 块尺寸，\( p \) = 搜索范围） | <sup>[4](https://people.cs.rutgers.edu/~elgammal/classes/cs334/slide10_short.pdf)</sup> |
| 运动估计占编码器计算量的比例（H.264） | 超过95%；编码器需要超过300 GIPS | <sup>[5](https://cdn.intechopen.com/pdfs/33733/InTech-H_264_motion_estimation_and_applications.pdf)</sup> |
| HEVC相对H.264/AVC的增益 | 同等感知质量下约节省50%码率 | <sup>[6](https://wseas.com/journals/sp/2015/a645814-445.pdf)</sup> |
| 标准化中最精细的亚像素精度 | VVC仿射预测中的1/16像素 | <sup>[7](https://www.mdpi.com/2079-9292/8/9/993)</sup> |

## 工作原理

混合视频编码将块匹配运动补偿（BMMC）与残差的变换编码相结合；这一设计为H.261、H.263和MPEG系列标准所采用。当前帧被划分为若干块，通常为8×8或16×16像素，块内像素共用一个运动矢量。<sup>[3](https://ittc.ku.edu/~jsv/Papers/HLV98.optimizationsOfficial.pdf)</sup>每个块通过平移参考帧中形状相同的区域来预测；这种块平移模型将矢量置于整数或分数像素网格上。<sup>[8](https://www.ittc.ku.edu/~jsv/Papers/HoV02.VC_book.pdf)</sup>残差，即原始块与其预测值之差，用二维DCT后接可变长熵编码器进行编码。<sup>[3](https://ittc.ku.edu/~jsv/Papers/HLV98.optimizationsOfficial.pdf)</sup>DCT本身由艾哈迈德、纳塔拉詹和拉奥于1974年发表。<sup>[9](https://doi.org/10.1109/t-c.1974.223784)</sup>

帧具有不同的预测类型。I帧是自包含的帧内编码图像，也是随机接入点；P帧由过去的I帧或P帧前向预测编码；B帧由过去和未来的参考帧双向预测编码。帧经过重排，使所有参考帧都排在使用它们的帧之前，这引入了延迟，并需要两个帧缓冲区。<sup>[8](https://www.ittc.ku.edu/~jsv/Papers/HoV02.VC_book.pdf)</sup>双向编码提供最高的压缩率，且解码顺序与显示顺序不同。<sup>[10](https://www.cse.fau.edu/~borko/Chapter9_mc.pdf)</sup>由于预测沿运动轨迹进行，而运动轨迹上的相关性接近最大，因此预测误差很小，编码代价低廉。<sup>[11](https://booksite.elsevier.com/samplechapters/9780123814203/Woods_11.2_through_11.3.pdf)</sup>

## 实现方法

**块匹配**在参考帧中为每个块搜索最佳匹配。一个参考实现会检查搜索范围 \( [-S; S] \times [-S; S] \)（默认 \( S = 8 \)）内的所有矢量 \( (m_{x}, m_{y}) \)，并选取使绝对差之和最小的矢量，

\[ DSAD(m_{x}, m_{y}) = \sum_{x,y \in B} \left| s[x,y] - s_{\mathrm{prev}}[x + m_{x}, y + m_{y}] \right| \]

参见文献。<sup>[12](http://www.inf.fu-berlin.de/lehre/SS22/ImageVideoCoding/slides/Ex11.pdf)</sup>在一项直接比较中，最小化SSD所得补偿图像的PSNR仅比最小化SAD所得高0.16 dB <sup>[13](https://mmnet.wp.imt.fr/files/2016/12/poly_me.pdf)</sup>，这就是无乘法的SAD在实践中占主导的原因；H.264参考软件使用SA(T)D，即变换后残差数据的绝对差之和，最终精化则使用率失真优化。<sup>[5](https://cdn.intechopen.com/pdfs/33733/InTech-H_264_motion_estimation_and_applications.pdf)</sup>

MAD准则为 \( MAD(i,j) = (1/N^{2}) \sum_{k,l} |C(x+k, y+l) - R(x+i+k, y+j+l)| \)，其中 \( i, j \in [-p, p] \)；全搜索每个宏块的开销为 \( (2p+1)^{2} \cdot N^{2} \cdot 3 \) 次运算，即 \( O(p^{2} \cdot N^{2}) \)。<sup>[4](https://people.cs.rutgers.edu/~elgammal/classes/cs334/slide10_short.pdf)</sup>由于传输矢量需要比特，编码器最小化拉格朗日代价 \( J(m_{x}, m_{y}) = DSAD(m_{x}, m_{y}) + \sqrt{\lambda} \cdot R(m_{x}, m_{y}) \)，其中 \( R \) 是矢量的比特代价，矢量与分量中值预测器 \( \hat{m}_{x} = \mathrm{median}(m_{Ax}, m_{Bx}, m_{Cx}) \) 的差值经熵编码。<sup>[12](http://www.inf.fu-berlin.de/lehre/SS22/ImageVideoCoding/slides/Ex11.pdf)</sup>已证明，率约束运动估计的率失真性能显著优于仅最小化预测误差。<sup>[3](https://ittc.ku.edu/~jsv/Papers/HLV98.optimizationsOfficial.pdf)</sup>

## 起源

早期方法完全避开了运动矢量。条件补充帧间编码由哈斯克尔、芒茨和坎迪于1972年发表在《IEEE会刊》上，它将传输信息集中于通过检查帧间差异检测到的运动区域。<sup>[14](https://doi.org/10.1109/proc.1972.8778)</sup>卡福里奥和罗卡于1976年在《IEEE信息论汇刊》上发表了测量电视图像小位移的方法。<sup>[15](https://doi.org/10.1109/tit.1976.1055602)</sup>

运动补偿预测是一种编码概念。内特拉瓦利和斯图勒的《运动补偿变换编码》发表在《贝尔系统技术期刊》上，在DCT之后于变换域进行预测<sup>[1](https://doi.org/10.1002/j.1538-7305.1979.tb02277.x)</sup>，位移则通过最小化预测误差泛函的递归算法估计。<sup>[2](https://doi.org/10.1002/j.1538-7305.1979.tb02238.x)</sup>历史记述对于哪项工作将运动补偿加入混合变换-DPCM结构存在分歧：一份关于H.264发展史的美国专利商标局（USPTO）记录指出，该结构通过将运动补偿加入时间DPCM而得到显著增强<sup>[16](https://ptacts.uspto.gov/ptacts/public-informations/petitions/1556179/download-documents?artifactId=U5YgOZ6FmUteuFPGlaUtc6X9imGYnflrvFbWeSYIxl5JjGqXmbZk2VI)</sup>，而历史综述则将这一概念的引入归功于内特拉瓦利和斯图勒1979年的论文。<sup>[17](https://www.vcodex.com/video-coding-history)</sup>现代编解码器模型——对矩形块进行带亚像素插值的运动补偿预测、DCT编码、之字形扫描、游程-幅值编码与[霍夫曼编码](https://www.edgepedia.org/zh/huffman-coding)以及量化器码率控制——到1985年已完备。<sup>[17](https://www.vcodex.com/video-coding-history)</sup>H.261于1988年11月获批，采用图像间预测与变换编码的混合方案，编码器端运动补偿可选，每个8×8块一个矢量。<sup>[18](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.261-198811-S%21%21PDF-E&lang=s&type=items)</sup>

## 变体

**分数像素精度。** 具有分数像素精度的运动补偿预测由B. 吉罗德于1993年发表在《IEEE通信汇刊》上。<sup>[19](https://doi.org/10.1109/26.223785)</sup>对参考帧进行插值并搜索分数位置可提高效率，因为物体很少按整数像素移动；四分之一像素精度足以应对高运动序列，而半像素精度通常足以应对低运动内容。<sup>[20](https://www.eurasip.org/Proceedings/Eusipco/Eusipco2014/HTML/papers/1569925505.pdf)</sup>H.264/AVC用6抽头FIR滤波器插值半像素亮度，通过平均得到四分之一像素；HEVC使用基于DCT的插值滤波器，每个插值值的运算量几乎翻倍。<sup>[21](https://web.pkusz.edu.cn/ldm/files/2013/01/6.A-Comparison-of-Fractional-pel-Interpolation-Filters-in-HEVC-and-H.264AVC.pdf)</sup>VVC将仿射子块矢量精化至1/16像素精度。<sup>[7](https://www.mdpi.com/2079-9292/8/9/993)</sup>

**重叠与多假设预测。** OBMC将每个像素的预测形成为当前块矢量和相邻块矢量所产生的预测值的加权和，从而平滑速度场并减少块效应；H.263的高级预测模式每个宏块使用四个8×8矢量而非一个16×16矢量<sup>[22](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.263-199802-S%21%21PDF-E&lang=s&type=items)</sup>。<sup>[11](https://booksite.elsevier.com/samplechapters/9780123814203/Woods_11.2_through_11.3.pdf)</sup>OBMC的估计论表述由奥查德和沙利文于1994年发表在《[IEEE图像处理汇刊](https://www.edgepedia.org/zh/ieee-transactions-on-image-processing)》上。<sup>[23](https://doi.org/10.1109/83.334974)</sup>AV1对尺寸≥8×8且具有单一运动矢量的帧间块使用带升余弦窗权重的OBMC。<sup>[24](https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Appendix-Overlapped-Block-Motion-Compensation.md)</sup>多假设运动补偿预测的效率由B. 吉罗德于2000年在《IEEE图像处理汇刊》上分析。<sup>[25](https://doi.org/10.1109/83.821595)</sup>

**全局、仿射与变形模型。** 刚性平面片的三维运动参数估计由R. 蔡和T. 黄于1981年发表在《IEEE声学、语音与信号处理汇刊》上。<sup>[26](https://doi.org/10.1109/tassp.1981.1163710)</sup>当整个场景一致运动时，如摄像机平移、缩放或旋转，全局运动补偿很有帮助。<sup>[27](https://www.iieta.org/journals/isi/paper/10.18280/isi.290307)</sup>VVC应用基于块的4参数和6参数仿射运动补偿，从控制点运动矢量推导每个4×4子块的矢量。<sup>[7](https://www.mdpi.com/2079-9292/8/9/993)</sup>

**结构变体。** H.263的无限制运动矢量模式允许矢量指向图像外部，使用边缘像素。<sup>[22](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.263-199802-S%21%21PDF-E&lang=s&type=items)</sup>H.264/AVC支持最多5个参考帧和7种块模式（16×16至4×4）。<sup>[28](https://cecs.uci.edu/~papers/icme05/defevent/papers/cr1275.pdf)</sup>PRISM由普里、马宗达和拉姆钱德兰于2007年发表在《IEEE图像处理汇刊》上，将运动估计移至解码器端。<sup>[29](https://doi.org/10.1109/tip.2007.904949)</sup>

## 应用

运动补偿用于所有分发质量的视频编码格式，因为它实现最小的预测误差，从而更易于编码。<sup>[11](https://booksite.elsevier.com/samplechapters/9780123814203/Woods_11.2_through_11.3.pdf)</sup>效率阶梯十分陡峭：H.264/AVC通过更丰富的帧间和帧内预测超越了H.263、MPEG-2和MPEG-4，而HEVC在同等感知质量下约节省50%码率，尤其在高分辨率下。<sup>[6](https://wseas.com/journals/sp/2015/a645814-445.pdf)</sup>代价是计算量：在H.264中，包括分数像素估计和插值的运动估计占整个编码器计算量的95%以上，软件编码器需要超过300 GIPS。<sup>[5](https://cdn.intechopen.com/pdfs/33733/InTech-H_264_motion_estimation_and_applications.pdf)</sup>快速搜索以少量质量换取速度：三步搜索在中心及八个位置 \( \pm 2^{N-1} \) 处评估SAD，窗口为 \( \pm(2^{N}-1) \)，每次迭代步长减半<sup>[5](https://cdn.intechopen.com/pdfs/33733/InTech-H_264_motion_estimation_and_applications.pdf)</sup>，二维对数和菱形搜索是另外两种著名的经典方法。<sup>[30](https://web.stanford.edu/class/ee398a/handouts/lectures/EE398a_MotionEstimation_2012.pdf)</sup>

## 局限与替代方案

运动估计的率失真目标不是找到真实的场景运动，而是最大化压缩效率，因为矢量作为开销被传输。<sup>[13](https://mmnet.wp.imt.fr/files/2016/12/poly_me.pdf)</sup>基于块的预测假设块内像素共享一种运动，通常是限于两帧的局部优化。<sup>[31](https://openaccess.thecvf.com/content/CVPR2023/papers/Qi_Motion_Information_Propagation_for_Neural_Video_Compression_CVPR_2023_paper.pdf)</sup>混合编码在低码率下会产生块效应和振铃。<sup>[32](https://ar5iv.labs.arxiv.org/html/2101.06341)</sup>H.261用对预测块的可分离1/4、1/2、1/4环路滤波器来缓解其整数像素精度问题<sup>[18](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.261-198811-S%21%21PDF-E&lang=s&type=items)</sup>，定期发送的I帧阻止误差传播<sup>[4](https://people.cs.rutgers.edu/~elgammal/classes/cs334/slide10_short.pdf)</sup>；现代标准在运动矢量无法捕捉去遮挡或复杂运动时，将局部块切换为帧内编码。<sup>[33](https://openaccess.thecvf.com/content/CVPR2026/papers/Xiang_Real-Time_Neural_Video_Compression_with_Unified_Intra_and_Inter_Coding_CVPR_2026_paper.pdf)</sup>

**替代方案。** 无矢量的简单帧差预测的码率约为运动补偿预测的1.28至2倍，后者将帧差码率降低22–50%。<sup>[2](https://doi.org/10.1002/j.1538-7305.1979.tb02238.x)</sup>端到端神经编解码器用学习到的变形替代显式矢量：DCVC-MIP比DCVC-HEM节省12.9%码率。<sup>[31](https://openaccess.thecvf.com/content/CVPR2023/papers/Qi_Motion_Information_Propagation_for_Neural_Video_Compression_CVPR_2023_paper.pdf)</sup>VVC改进的运动预测和环路滤波带来显著增益，但编码计算量大；硬件解码器支持一度有限，自2023–2024年起不断扩大，并于2026年9月进入旗舰移动芯片组。<sup>[27](https://www.iieta.org/journals/isi/paper/10.18280/isi.290307)</sup>

## References

1. [Motion-Compensated Transform Coding (Netravali & Stuller, Bell System Technical Journal, September 1979)](https://doi.org/10.1002/j.1538-7305.1979.tb02277.x)
2. [Motion-Compensated Television Coding: Part I (Netravali & Robbins, Bell System Technical Journal, 1979)](https://doi.org/10.1002/j.1538-7305.1979.tb02238.x)
3. [Efficient Cost Measures For Motion Estimation At Low Bit Rates (IEEE Trans. Circuits and Systems for Video Technology)](https://ittc.ku.edu/~jsv/Papers/HLV98.optimizationsOfficial.pdf)
4. [Chapter 10: Video Compression with Motion Compensation (Li & Drew, Fundamentals of Multimedia, Prentice Hall 2003)](https://people.cs.rutgers.edu/~elgammal/classes/cs334/slide10_short.pdf)
5. [H.264 Motion Estimation and Applications (book chapter, InTech, 2010/2011)](https://cdn.intechopen.com/pdfs/33733/InTech-H_264_motion_estimation_and_applications.pdf)
6. [HEVC vs. H.264/AVC Standard Approach to Coder's Performance Evaluation](https://wseas.com/journals/sp/2015/a645814-445.pdf)
7. [Design of Efficient Perspective Affine Motion Estimation/Compensation for Versatile Video Coding (VVC) Standard](https://www.mdpi.com/2079-9292/8/9/993)
8. [Efficient Lossy and Lossless Algorithms for Multimedia Compression (Hoang–Vitter monograph, University of Kansas ITTC)](https://www.ittc.ku.edu/~jsv/Papers/HoV02.VC_book.pdf)
9. [N. Ahmed, T. Natarajan, K.R. Rao (1974). Discrete Cosine Transform. IEEE Transactions on Computers.](https://doi.org/10.1109/t-c.1974.223784)
10. [Video Presentation and Compression (Furht, FAU book chapter)](https://www.cse.fau.edu/~borko/Chapter9_mc.pdf)
11. [Digital Video Processing, Chapter 11.2: Motion Estimation and Motion Compensation (Woods, Elsevier)](https://booksite.elsevier.com/samplechapters/9780123814203/Woods_11.2_through_11.3.pdf)
12. [Exercise 11.1: Motion Estimation and Motion-Compensated Prediction (Freie Universität Berlin, Heiko Schwarz)](http://www.inf.fu-berlin.de/lehre/SS22/ImageVideoCoding/slides/Ex11.pdf)
13. [Motion Estimation Techniques (course/review text)](https://mmnet.wp.imt.fr/files/2016/12/poly_me.pdf)
14. [B.G. Haskell, F.W. Mounts, J.C. Candy (1972). Interframe coding of videotelephone pictures. Proceedings of the IEEE.](https://doi.org/10.1109/proc.1972.8778)
15. [C. Cafforio, F. Rocca (1976). Methods for measuring small displacements of television images. IEEE Transactions on Information Theory.](https://doi.org/10.1109/tit.1976.1055602)
16. [USPTO petition document on H.264 development history](https://ptacts.uspto.gov/ptacts/public-informations/petitions/1556179/download-documents?artifactId=U5YgOZ6FmUteuFPGlaUtc6X9imGYnflrvFbWeSYIxl5JjGqXmbZk2VI)
17. [Video Coding History, Vcodex BV](https://www.vcodex.com/video-coding-history)
18. [CCITT Recommendation H.261 (11/1988), Codec for Audiovisual Services at n × 384 kbit/s](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.261-198811-S%21%21PDF-E&lang=s&type=items)
19. [B. Girod (1993). Motion-compensating prediction with fractional-pel accuracy. IEEE Transactions on Communications.](https://doi.org/10.1109/26.223785)
20. [Fast Motion Estimation Discarding Low-Impact Fractional Blocks (EUSIPCO 2014)](https://www.eurasip.org/Proceedings/Eusipco/Eusipco2014/HTML/papers/1569925505.pdf)
21. [A Comparison of Fractional-pel Interpolation Filters in HEVC and H.264/AVC](https://web.pkusz.edu.cn/ldm/files/2013/01/6.A-Comparison-of-Fractional-pel-Interpolation-Filters-in-HEVC-and-H.264AVC.pdf)
22. [ITU-T Recommendation H.263 (02/1998)](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.263-199802-S%21%21PDF-E&lang=s&type=items)
23. [M.T. Orchard, G.J. Sullivan (1994). Overlapped block motion compensation: an estimation-theoretic approach. IEEE Transactions on Image Processing.](https://doi.org/10.1109/83.334974)
24. [SVT-AV1 Appendix: Overlapped Block Motion Compensation](https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Appendix-Overlapped-Block-Motion-Compensation.md)
25. [B. Girod (2000). Efficiency analysis of multihypothesis motion-compensated prediction for video coding. IEEE Transactions on Image Processing.](https://doi.org/10.1109/83.821595)
26. [R. Tsai, T. Huang (1981). Estimating three-dimensional motion parameters of a rigid planar patch. IEEE Transactions on Acoustics Speech and Signal Processing.](https://doi.org/10.1109/tassp.1981.1163710)
27. [A Comprehensive Literature Review on Image and Video Compression: Trends, Algorithms, and Techniques](https://www.iieta.org/journals/isi/paper/10.18280/isi.290307)
28. [A Quarter Pel Full Search Block Motion Estimation Architecture for H.264/AVC (ICME 2005)](https://cecs.uci.edu/~papers/icme05/defevent/papers/cr1275.pdf)
29. [Rohit Puri, Abhik Majumdar, Kannan Ramchandran (2007). PRISM: A Video Coding Paradigm With Motion Estimation at the Decoder. IEEE Transactions on Image Processing.](https://doi.org/10.1109/tip.2007.904949)
30. [EE398a: Motion Estimation for Video Coding (Stanford lecture notes, Girod)](https://web.stanford.edu/class/ee398a/handouts/lectures/EE398a_MotionEstimation_2012.pdf)
31. [Motion Information Propagation for Neural Video Compression (Qi et al., CVPR 2023)](https://openaccess.thecvf.com/content/CVPR2023/papers/Qi_Motion_Information_Propagation_for_Neural_Video_Compression_CVPR_2023_paper.pdf)
32. [Advances In Video Compression System Using Deep Neural Network: A Review And Case Studies](https://ar5iv.labs.arxiv.org/html/2101.06341)
33. [Real-Time Neural Video Compression with Unified Intra and Inter Coding (UI²C)](https://openaccess.thecvf.com/content/CVPR2026/papers/Xiang_Real-Time_Neural_Video_Compression_with_Unified_Intra_and_Inter_Coding_CVPR_2026_paper.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/motion-compensation

English original: https://www.edgepedia.org/motion-compensation
