AI Glossary / MLOps and deployment / Intermediate
Coding tree unit
Definition
A coding tree unit, or CTU, is a top-level picture-partitioning unit used in video coding, notably HEVC. It groups a luma coding tree block, corresponding chroma blocks where present and associated syntax, and can be subdivided into smaller coding structures.
What it means
Video codecs divide pictures into manageable regions so they can choose predictions, transforms and coding parameters. In HEVC, CTUs provide a large starting structure that can adapt to local content through subdivision. A smooth area may be handled differently from a detailed or moving area. The CTU is not the same as one pixel, one transform coefficient or a whole frame. The term also appears in later coding standards, but their partitioning details differ. This entry focuses on the HEVC context unless another standard is explicitly named.
How it works
The encoder organizes a picture into CTUs and makes permitted partitioning decisions. In HEVC, the luma coding tree block size can be selected from supported square sizes, commonly discussed as 16, 32 or 64 samples per side. Its coding tree can split into smaller coding units. Prediction and transform structures then describe how the content is represented within the permitted syntax.
The encoder searches among choices to balance bitrate, distortion and computational cost. The decoder reads the signaled structure and reconstructs the picture accordingly. A larger starting block allows flexibility but does not mean the entire CTU must use one prediction or one transform. Picture boundaries and chroma sampling require additional handling defined by the standard.
Three practical examples
- An HEVC encoder uses large coding regions in smooth areas and finer partitions where detail or motion requires them.
- A video-analysis tool displays CTU boundaries to inspect how an encoded frame is partitioned.
- A codec-performance study measures how partition-search choices affect encoding time, bitrate and reconstruction quality.
Think of it this way
Think of dividing a large floor plan into large zones, then subdividing selected zones into smaller rooms where needed. The initial zone provides organization without forcing every area to have the same internal structure. The analogy does not capture all dependencies between prediction, transform and coding syntax, which follow precise codec rules.
Worked example
Consider a 1,920 × 1,080 luma picture using 64 × 64 CTUs. The horizontal count is ceiling(1,920/64) = 30. The vertical count is ceiling(1,080/64) = 17, so the picture spans 30 × 17 = 510 CTU positions.
The last row extends beyond the visible picture height in the regular grid, so boundary handling is required according to the codec. Each CTU may contain different internal partitions. The count therefore does not tell you the number of transform blocks, motion vectors or bits. Two frames with the same dimensions and CTU size can have very different coding complexity and compressed sizes.
Illustrative case study
In a fictional video-platform experiment, engineers inspect a screen recording containing large flat areas and small moving text. They compare encoder settings that spend different amounts of effort searching partitions within CTUs. One setting encodes faster, while another achieves a different bitrate - quality balance on the test material. The team evaluates text readability and latency alongside file size. This case illustrates why CTU structure is part of a broader encoder decision process rather than a standalone quality setting.
Common misconceptions and mistakes
A CTU is not always one indivisible compression block. CTU size alone does not determine bitrate or visible quality. Coding units, prediction units and transform units are related but distinct concepts in HEVC. Another mistake is transferring every HEVC partitioning rule to a later codec just because it also uses the term CTU. Standards and profiles should be identified before interpreting an encoded structure or configuring a decoder.
Business use
For businesses handling video, CTUs usually matter through codec efficiency, processing load and implementation compatibility. Evaluate complete encoder configurations on representative content, including motion, texture and text. Measure latency and resource use when real-time operation matters. If a diagnostic tool exposes CTU statistics, connect them to specific questions such as partition-search cost or artifact location rather than presenting block counts as a general quality score.
People also ask
Is a CTU the same as a macroblock?
It plays a related organizing role in HEVC, but its size and tree-based internal structure differ from earlier macroblock designs.
Does a 64 × 64 CTU use one transform?
Not necessarily. Its internal coding and transform structures can be subdivided according to the standard.
Are all CTUs encoded with the same number of bits?
No. Content and coding decisions can produce very different bit requirements.
Check your understanding
A picture contains 510 CTUs. Can that number alone determine its compressed file size?
Answer: No. The bits depend on prediction, partitions, quantization, residual data and other syntax, all of which vary with content and encoder decisions.
Related terms
- Macroblock
- HEVC
- coding tree block
- coding unit
- prediction unit
- transform unit
- quadtree
- video coding
- rate–distortion optimization
Learn next
Learn coding, prediction and transform units next. Inspect one encoded frame with a partition viewer and distinguish the top-level CTU grid from the smaller structures used to represent its content.
More in MLOps and deployment
- Cloud computing - Cloud computing provides computing resources as network-accessible services that users can obtain and release on demand.
- Cloud resource elasticity - Cloud resource elasticity is the ability to expand and release computing resources as demand changes.
- Code-excited linear prediction - Code-excited linear prediction, or CELP, is a speech-coding approach that represents speech using a predictive synthesis filter driven by a selected...
- Cognitive computing - Cognitive computing is a broad term for computing approaches intended to support tasks associated with human cognition, such as interpreting language...
- Color space - A color space is a defined system for representing colors with numerical coordinates and an interpretation of those coordinates.
- Companding - Companding combines compression and expansion of a signal's amplitude range.
Sources
ITU-T, H.265 High Efficiency Video Coding recommendation: https://www.itu.int/rec/T-REC-H.265 ITU-T, H.265 2014 specification: https://www.itu.int/rec/dologin_pub.asp?id=T-REC-H.265-201410-S%21%21PDF-E&lang=e&type=items Primary standards search excerpts consulted; full syntax and editorial review remain pending.
Previous: Coded aperture Next: Coefficient matrix