MPEG4压缩如何工作? [英] How does MPEG4 compression work?

查看:204
本文介绍了MPEG4压缩如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以用简单明了的方式解释MPEG4如何压缩数据。我最感兴趣的视频。我知道有不同的标准或部分。

解决方案

MPEG-4是一个巨大的压缩方法标准,并且采用许多技术来实现其能够实现的高压缩率。一般来说,视频压缩涉及丢弃尽可能多的信息,同时具有对最终用户的观看体验的最小影响。例如,使用二次抽样YUV而不是RGB,可以立即将视频大小缩小一半。这是可能的,因为人眼对颜色的敏感度比对亮度的敏感度低。在YUV中,Y值是亮度,U和V值表示颜色。因此,您可以丢弃一些减少文件大小的颜色信息,而不会让观察者注意到任何差异。



之后,大多数压缩技术利用2个冗余尤其是。第一个是时间冗余,第二个是空间冗余。



时间冗余注意,视频序列中的连续帧非常相似。通常,视频将以每秒20-30帧的顺序,并且在1/30秒内没有什么变化。拿起任何DVD并暂停它,然后在一帧上移动它,并注意这两个图像是多么相似。因此,MPEG-4(和其他压缩标准)不是独立地对每个帧进行编码,而是仅仅对连续帧之间的差异进行编码(使用运动估计以找出框架之间的差异)



空间冗余优势在于,一般来说,跨图像的颜色分布往往是相当低的频率。这意味着相邻像素倾向于具有相似的颜色。例如,在穿着红色跳线的图像中,代表跳线的所有像素将具有非常相似的颜色。可以使用DCT将像素值变换到频率空间中,其中一些高频信息可以被丢弃。然后,当执行逆DCT(解码期间)时,图像现在没有丢弃高频信息。



要查看丢弃高频信息的效果,请打开MS绘画并绘制一系列重叠的水平和垂直黑线。将图像保存为JPEG(也使用DCT进行压缩)。现在放大模式,注意线的边缘不再如锐利,并且有点模糊。这是因为一些高频信息(从黑色到白色的转换)在压缩期间被丢弃。 阅读本文以获得有关漂亮图片的解释



要进一步阅读,这本书是相当好,如果有点重量的数学。


Can anyone explain in a simple clear way how MPEG4 works to compress data. I'm mostly interested in video. I know there are different standards or parts to it. I'm just looking for the predominant overall compression method, if there is one with MPEG4.

解决方案

MPEG-4 is a huge standard, and employs many techniques to achieve the high compression rates that it is capable of.

In general, video compression is concerned with throwing away as much information as possible whilst having a minimal effect on the viewing experience for an end user. For example, using subsampled YUV instead of RGB cuts the video size in half straight away. This is possible as the human eye is less sensitive to colour than it is to brightness. In YUV, the Y value is brightness, and the U and V values represent colour. Therefore, you can throw away some of the colour information which reduces the file size, without the viewer noticing any difference.

After that, most compression techniques take advantage of 2 redundancies in particular. The first is temporal redundancy and the second is spatial redundancy.

Temporal redundancy notes that successive frames in a video sequence are very similar. Typically a video would be in the order of 20-30 frames per second, and nothing much changes in 1/30 of a second. Take any DVD and pause it, then move it on one frame and note how similar the 2 images are. So, instead of encoding each frame independently, MPEG-4 (and other compression standards) only encode the difference between successive frames (using motion estimation to find the difference between frames)

Spatial redundancy takes advantage of the fact that in general the colour spread across images tends to be quite low frequency. By this I mean that neighbouring pixels tend to have similar colours. For example, in an image of you wearing a red jumper, all of the pixels that represent your jumper would have very similar colour. It is possible to use the DCT to transform the pixel values into the frequency space, where some high frequency information can be thrown away. Then, when the reverse DCT is performed (during decoding), the image is now without the thrown away high-frequency information.

To view the effects of throwing away high frequency information, open MS paint and draw a series of overlapping horizontal and vertical black lines. Save the image as a JPEG (which also uses DCT for compression). Now zoom in on the pattern, notice how the edges of the lines are not as sharp anymore and are kinda blurry. This is because some high frequency information (the transition from black to white) has been thrown away during compression. Read this for an explanation with nice pictures

For further reading, this book is quite good, if a little heavy on the maths.

这篇关于MPEG4压缩如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆