高压缩视频中出现块的原因/用途/原因是什么?

发布于 2024-07-25 09:58:54 字数 293 浏览 4 评论 0原文

请耐心等待,因为我没有太多地使用压缩算法,所以这对你们中的一些人来说可能是显而易见的。 当某些流媒体视频开始滞后时,我总是注意到这一点。 我在查看这个问题时才意识到我很好奇:

Twitter 图像编码挑战

我不是在谈论像素本身,而是在谈论压缩产生的类似网格的布局。 这表明了什么样的算法或技术? 你能告诉我什么吗?

Be patient since I haven't worked with compression algorithms much so this may be obvious to some of you. Something I've always noticed when some streaming video starts to lag. I only realized I was curious when looking over this question:

Twitter image encoding challenge

I'm not talking about the pixels themselves but rather the grid like layout that results from the compression. What sort of algorithm or technique is this indicative of? What can you tell me about it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

╰◇生如夏花灿烂 2024-08-01 09:58:54

看看这篇关于 MPEG-2 的维基百科文章。 引用其中的一部分:

简单地说,原始帧被分为 8 像素 x 8 像素块。 每个块中的数据通过离散余弦变换进行变换。 结果是一个 8 x 8 的系数矩阵。 该变换将空间变化转换为频率变化,但不会改变块中的信息; 通过应用反余弦变换可以精确地重新创建原始块。

换句话说,您看到的网格状结构是将此 DCT 应用于 8x8 像素块的直接效果。

Take a look at this Wikipedia article on MPEG-2. To quote a part of it:

Briefly, the raw frame is divided into 8 pixel by 8 pixel blocks. The data in each block is transformed by a discrete cosine transform. The result is an 8 by 8 matrix of coefficients. The transform converts spatial variations into frequency variations, but it does not change the information in the block; the original block can be recreated exactly by applying the inverse cosine transform.

In other words, the grid-like structure you see is a direct effect of this DCT being applied to the 8x8 blocks of pixels.

可爱暴击 2024-08-01 09:58:54

区块的基本原理与位置/频率权衡有关。 在谱域压缩 (DCT) 之前,图像被分成块,以便伪影由于压缩更加局部化。 在标准 JPEG 中,整个图片中的块的大小是恒定的。 对于 JPEG2000 等更新的格式,使用小波将块适应图片。 我不熟悉视频格式的详细信息,但原理是相同的。

这与音频编码 (mp3) 的现象相同:不是计算整个音频文件的频谱,而是将文件分割为几个样本的某些部分(对于 44.1 kHz 信号,通常为数百个样本)。 同样,如果压缩数据损坏(网络、损坏的文件),您会听到由于缺少窗口而产生的噪音。

The rationale for blocks is linked to the location/frequency trade off. The image is divided into blocks before the compression in the spectral domain (DCT) so that the artefacts due to the compression are more localized. In standard JPEG, the blocks are of constant size on the whole picture. For more recent formats like JPEG2000, the blocks are adapted to the picture, using wavelets. I am not familiar with video formats details, but the rationale is the same.

This is the same phenomenon for audio coding (mp3): instead of computing the spectrum on the whole audio file, you split the file into some sections of a few samples (a few hundred generally for 44.1 kHz signals). And similarly, if there is corruption of the compressed data (network, corrupted file), you will hear noises which are due to missing windows.

硪扪都還晓 2024-08-01 09:58:54

这称为宏阻止

It's called Macroblocking.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文