ArticleslgStudy

science

Macroblock

Macroblock is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Macroblock rather than just read about it. In short: The macroblock is a processing unit in image and video compression formats based on linear block transforms, typically the discrete cosine transform (DCT). A macroblock typically consists of 16×16 samples, and is further subdivided into transform blocks, and may be further subdivided into prediction blocks.

Key takeaways

  • Macroblock belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Macroblock to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Macroblock from memory before moving on to harder problems.

Reference excerpt

The macroblock is a processing unit in image and video compression formats based on linear block transforms, typically the discrete cosine transform (DCT). A macroblock typically consists of 16×16 samples, and is further subdivided into transform blocks, and may be further subdivided into prediction blocks. Formats which are based on macroblocks include JPEG, where they are called MCU blocks, H.261, MPEG-1 Part 2, H.262/MPEG-2 Part 2, H.263, MPEG-4 Part 2, and H.264/MPEG-4 AVC. In H.265/HEVC, the macroblock as a basic processing unit has been replaced by the coding tree unit.

Technical details

Transform blocks A macroblock is divided into transform blocks, which serve as input to the linear block transform, e.g. the DCT. In H.261, the first video codec to use macroblocks, transform blocks have a fixed size of 8×8 samples. In the YCbCr color space with 4:2:0 chroma subsampling, a 16×16 macroblock consists of 16×16 luma (Y) samples and 8×8 chroma (Cb and Cr) samples. These samples are split into four Y blocks, one Cb block and one Cr block. This design is also used in JPEG and most other macroblock-based video codecs with a fixed transform block size, such as MPEG-1 Part 2 and H.262/MPEG-2 Part 2. In other chroma subsampling formats, e.g. 4:0:0, 4:2:2, or 4:4:4, the number of chroma samples in a macroblock will be smaller or larger, and the grouping of chroma samples into blocks will differ accordingly. In more modern macroblock-based video coding standards such as H.263 and H.264/AVC, transform blocks can be of sizes other than 8×8 samples. For instance, in H.264/AVC main profile, the transform block size is 4×4. In H.264/AVC High profile, the transform block size can be either 4×4 or 8×8, adapted on a per-macroblock basis.

Prediction blocks Distinct from the division into transform blocks, a macroblock can be split into prediction blocks. In early standards such as H.261, MPEG-1 Part 2, and H.262/MPEG-2 Part 2, motion compensation is performed with one motion vector per macroblock. In more modern standards such as H.264/AVC, a macroblock can be split into multiple variable-sized prediction blocks, called partitions. In an inter-predicted macroblock in H.264/AVC, a separate motion vector is specified for each partition. Correspondingly, in an intra-predicted macroblock, where samples are predicted by extrapolating from the edges of neighboring blocks, the predicted direction is specified on a per-partition basis. In H.264/AVC, prediction partition size ranges from 4×4 to 16×16 samples for both inter-prediction (motion compensation) and intra-prediction.

Bitstream representation A possible bitstream representation of a macroblock in a video codec which uses motion compensation and transform coding is given below. It is similar to the format used in H.261.

+------+------+-------+--------+-----+----+----+--------+ | ADDR | TYPE | QUANT | VECTOR | CBP | b0 | b1 | ... b5 | +------+------+-------+--------+-----+----+----+--------+

ADDR — address of block in image TYPE — identifies type of macroblock (intra frame, inter frame, bi-directional inter frame) QUANT — quantization value to vary quantization VECTOR — motion vector CBP — Coded Block Pattern, this is bit mask indicating for which blocks coefficients are present. bN — the blocks (4 Y, 1 Cr, 1 Cb)

Macroblocking

The term macroblocking is commonly used to refer to block coding artifacts.

See also JPEG, H.261, MPEG-1 Part 2, H.262/MPEG-2 Part 2, H.263 and H.264 Coding tree unit Discrete cosine transform Video compression picture types Compression artifact Deblocking filter Pixelation

References

Worked examples

Example 1 — a first encounter with Macroblock

Start with the simplest possible case. Write down what Macroblock claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Macroblock before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Macroblock ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Macroblock

In research
Macroblock appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Macroblock in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Macroblock is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data compression, Image compression, Video compression, so understanding it makes those chapters shorter.
In everyday life
Look for Macroblock outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Macroblock in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Macroblock means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Macroblock out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Macroblock in simple terms?

The macroblock is a processing unit in image and video compression formats based on linear block transforms, typically the discrete cosine transform (DCT). A macroblock typically consists of 16×16 samples, and is further subdivided into transform blocks, and may be further subdivided into predictio…

Why does Macroblock matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Macroblock?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Macroblock.

Tags

  • Data compression
  • Image compression
  • Video compression

Keep exploring