Why JPEG compression processes image by 8x8 blocks?

后端 未结 2 1017
盖世英雄少女心
盖世英雄少女心 2020-12-18 00:32

Why JPEG compression processes image by 8x8 blocks instead of applying Discrete Cosine Transform to the whole image?

2条回答
  •  借酒劲吻你
    2020-12-18 01:07

    Because, that would take "forever" to decode. I don't remember fully now, but I think you need at least as many coefficients as there are pixels in the block. If you code the whole image as a single block I think you need to, for every pixel, iterate through all the DCT coefficients.

    I'm not very good at big O calculations but I guess the complexity would be O("forever"). ;-)

    For modern video codecs I think they've started using 16x16 blocks instead.

提交回复
热议问题