Updated October 2026: a direct CABAC vs CAVLC answer and FAQ, AV2 (finalized May 2026) and the H.267 call for proposals, a corrected CAVLC worked example and how AV1 really carries probabilities between frames.

Why this matters

Entropy coding is one of those topics where a five-minute conversation with the right person saves a project a year of confusion. A product manager who can tell CAVLC from CABAC stops asking "why is the H.264 file noticeably bigger on Baseline profile" — part of the answer is that Baseline forbids CABAC, and CABAC alone saves 9–14% of the bitrate. A founder who knows that AV1 ships a non-binary arithmetic coder borrowed from the Daala research project understands why AV1 hardware decoders have to hold more probability state than HEVC ones. A streaming engineer who can read the difference between a CABAC re-init at a slice header and an AV1 frame that inherited the wrong probability tables can debug a corrupted live stream in an hour instead of a week. This article is the long-form version of that five-minute conversation. We start from Shannon and Huffman, build up to CABAC, walk through AV1's range coder and what AV2 changed in 2026, and end with a clean comparison table you can take into your next codec selection meeting.

CABAC vs CAVLC: the short answer

CABAC compresses better; CAVLC decodes cheaper. CABAC (context-adaptive binary arithmetic coding) produces a 9–14% smaller bitstream than CAVLC (context-adaptive variable-length coding) at the same quality, according to the 2003 CABAC paper by Marpe, Schwarz and Wiegand. CAVLC pays whole bits per codeword but parses faster and needs far less decoder state. In H.264 the encoder picks one with a single flag, entropy_coding_mode_flag, in the picture parameter set; HEVC and VVC have no CAVLC at all.

CAVLC CABAC
How it codes Variable-length codewords from tables picked by neighbour context Binary arithmetic coding driven by adaptive context models
Bits per symbol Whole bits, at least 1 per codeword Fractions of a bit for predictable decisions
Compression Reference point 9–14% lower bitrate at the same quality (Marpe et al., 2003)
Decoder cost Low: a few table lookups per block Higher: bins decode one after another, each depending on the last
H.264 profiles The only option in Constrained Baseline, Baseline and Extended; also allowed in Main and High Main, High and the professional profiles
HEVC and VVC Not available The only entropy coder
Typical use Baseline-only and low-power decoders, encoders that trade size for speed Nearly every H.264 Main and High stream, all HEVC and VVC

The rule of thumb for 2026: if every device you target decodes H.264 Main or High profile, use CABAC. Keep CAVLC for Baseline-only endpoints, or for the rare pipeline where encoder or decoder CPU is the hard limit and a 9–14% larger file is an acceptable price.

What "entropy coding" actually means

Entropy coding is the lossless last stage of a video encoder: it turns the symbols the earlier stages produce into the fewest possible bits, giving frequent symbols short codes and rare symbols long ones. An entropy encoder is the block that does this; the decoder runs its exact mirror image.

Every preceding stage of a video encoder — prediction, transform, quantization, reordering and run-length packaging — produces a sequence of symbols. Symbols include motion-vector differences, prediction modes, run-level pairs, coded-block flags, the position of the last non-zero coefficient, and a hundred other small integers that describe how the next block should be reconstructed. Entropy coding takes that symbol sequence and writes it into the bitstream using as few bits as possible without losing any information.

The key insight, due to Claude Shannon in 1948, is that the minimum average number of bits required to send a symbol is the entropy of its probability distribution: H = -Σ p(x) log₂ p(x), measured in bits per symbol. A perfectly fair coin needs 1 bit per flip. A coin that lands heads 90% of the time needs only 0.47 bits per flip — but only if the encoder is allowed to use fractional bits and amortise them across many flips. A binary code that uses a whole number of bits per symbol cannot get below 1 bit per coin flip, no matter how skewed the coin.

Entropy coders solve that fractional-bit problem in two different ways. Variable-length codes (Huffman, Exp-Golomb, CAVLC) approximate the Shannon limit with a fixed table of codewords, each codeword being some integer number of bits. They are simple, fast, and parallel-friendly, and they pay an efficiency penalty because every codeword costs at least one whole bit. Arithmetic codes (CABAC, AV1's range coder) treat the whole message as a single fractional number between zero and one and accumulate bits incrementally as that interval shrinks. They can spend a fraction of a bit on a highly predictable symbol — at the cost of an internal state machine that updates after every coded bit.

Two stacked panels. The top one, 'Variable-length code (Huffman / CAVLC)', holds two columns: on the left the symbol probabilities as bars - A 0.70, B 0.15, C 0.10, D 0.05 - and on the right the codeword table, A coded as 0 in one bit, B as 10 in two bits, C as 110 in three bits, D as 111 in three bits. Under them the bitstream for the message A A A B A C, drawn as one strip cut into six segments whose widths are their bit costs: 0, 0, 0, 10, 0, 110. A line reads: nine bits for six symbols; the message itself carries 8.1 bits. The bottom panel, 'Arithmetic code (CABAC / AV1 range coder)', has six rows, each rescaling the previous interval to full width and shading the slice of the symbol just coded. Step 1, A 0.70, leaves [0.0000, 0.7000); step 2, A, leaves [0.0000, 0.4900); step 3, A, leaves [0.0000, 0.3430); step 4, B 0.15, leaves [0.2401, 0.2916); step 5, A, leaves [0.2401, 0.2761); step 6, C 0.10, leaves [0.2707, 0.2743). Below: the final interval is 8.1 bits wide and nine bits pin it down. A closing note reads that the codeword table costs 1.45 bits per symbol against a source entropy of 1.32 bits, so the arithmetic coder lands within 1% of the entropy while the table pays about 10% Figure 1. The two families of entropy coder. Variable-length codes pick a whole-bit codeword per symbol; arithmetic codes track a single fractional number and accumulate bits as the interval shrinks.

A short history

Entropy coding predates video by decades. David Huffman published his algorithm for optimal prefix codes in 1952 as a course assignment at MIT, and it became the default lossless compression for everything from PKZIP to JPEG. Arithmetic coding was invented independently by Jorma Rissanen at IBM (1976) and by Richard Pasco in his PhD thesis (1976), and it was patented heavily through the 1980s — which is why JPEG used Huffman and not arithmetic by default, even though the spec defined both. IBM's Q-Coder (1988) and the QM-Coder (1993) made arithmetic coding practical on the hardware of the time.

CABAC arrived in H.264/AVC in 2003, designed by Detlev Marpe, Heiko Schwarz, and Thomas Wiegand at Fraunhofer HHI. It combined binary arithmetic coding with context modelling — the idea that the probability of the next bit depends on the bits already seen in the local neighbourhood. CABAC delivered roughly 9–14% better compression than H.264's CAVLC at the same quality, at the price of a serial decoding loop that is harder to speed up in hardware. HEVC kept CABAC and dropped CAVLC entirely. AV1 (2018) replaced VP9's binary boolean coder with a non-binary, multi-symbol range coder ported from the Daala research codec — which can encode several values per symbol and adapts probabilities per symbol rather than per frame. VVC (2020) stayed with binary CABAC but reworked the probability estimator: each context keeps two estimates, one adapting fast and one slowly, and codes with their average. AV2, finalized in 2026, kept AV1's multi-symbol engine and retuned how its probabilities adapt.

A vertical timeline: nine milestone cards alternate left and right of a central line, each tied to it by a short connector and a node. 1948, Shannon: entropy bounds lossless codes. 1952, Huffman: optimal prefix codes. 1976, Rissanen and Pasco: arithmetic coding invented. 1988, IBM Q-Coder: arithmetic coding in hardware. 1993, JPEG: Huffman default, patents bite. 2003, H.264 CABAC: binary arithmetic with context models. 2013, HEVC: CABAC only, with eight times fewer context-coded bins in the worst case. 2018, AV1: Daala multi-symbol range coder. 2020, VVC: CABAC with a two-rate estimator. A closing line reads that every codec since H.264 codes arithmetically and each one adds finer context modelling Figure 2. Seventy-two years of entropy coding, from Shannon to VVC.

The pattern is one of slow, monotonic improvement. Every codec since H.264 has been arithmetic-only; every new arithmetic coder has added a context-modelling trick that takes the bitrate a percent or two closer to the entropy of the source.

How CAVLC works — variable-length coding with a twist

CAVLC, short for Context-Adaptive Variable-Length Coding, is the only entropy coder allowed in H.264's Constrained Baseline, Baseline and Extended profiles. Main, High and the professional profiles allow it too, but in practice it is chosen when the decoder is a battery-powered device — a 2007-era smartphone, a low-end set-top box — or when the encoder cares more about speed than about file size.

CAVLC is not just Huffman. It is a small family of variable-length codewords whose choice depends on the context — specifically, on what the encoder just coded. The encoder transmits a coefficient block in five steps, each using a different VLC table chosen by the running state. Below, we walk through each step on a worked example.

Assume the zig-zag scan of one 4×4 luma block produced this list of coefficients, in order from DC outwards:

0, 3, 0, 1, -1, -1, 0, 1, 0, ...  (rest are zeros)

The non-zero values are at scan positions 1, 3, 4, 5, 7. There are 5 non-zero coefficients in total. Four of them have absolute value 1. The last three in scan order — the 1 at position 7 and the two -1 values at positions 5 and 4 — are the trailing ones: the ±1 values just before the final run of zeros. CAVLC counts at most three, so the 1 at position 3 is coded as an ordinary level.

Step 1 — coeff_token. The encoder transmits a single codeword that encodes two numbers at once: the total number of non-zero coefficients (here, 5) and the number of trailing ones (here, 3, which is also the most CAVLC signals). The codeword is read from one of four tables; the table is picked using the average number of non-zero coefficients in the two neighbouring 4×4 blocks above and to the left. Common neighbour states get a small (1–6 bit) codeword; rare states get a larger one.

Step 2 — trailing ones signs. For each trailing one, the encoder transmits one bit: 0 for positive, 1 for negative. Three trailing ones → three bits.

Step 3 — non-trailing levels. The remaining non-zero coefficients (here, two of them: the 1 at position 3 and the 3 at position 1, coded in reverse scan order) are coded as signed integers using one of seven VLC tables. The starting table is picked by an initial rule and shifts up as the magnitude of each successive level grows. A small first level keeps the encoder on a table tuned for small numbers; a large first level pushes it onto a table that codes large numbers cheaply at the price of larger codewords for small ones. This adaptation is the "context" in CAVLC — the table itself is the state.

Step 4 — total_zeros. The encoder transmits the total number of zeros before the last non-zero coefficient (here, 3 — the zeros at scan positions 0, 2 and 6). This is a fixed VLC table indexed by the number of non-zero coefficients from Step 1.

Step 5 — run_before. For each non-zero coefficient (working backwards from the last one), the encoder transmits the number of zeros that precede it. The VLC table for run_before is indexed by the remaining number of zeros — the encoder runs out of "zero budget" quickly and the codewords get cheaper.

Add up the bits and the larger levels dominate the cost; the run-coding overhead is small because the tables are tightly tuned.

The cleverness of CAVLC is that it uses the freshly-coded data as the context for the next step. The encoder does not need to consult global state, the decoder does not need to maintain it, and the whole block can be parsed in five short bursts of table lookups. That is why CAVLC suited the low-cost hardware decoders of the 2003–2010 era — it parses with a handful of table lookups per block and parallelises across blocks.

A top-to-bottom flow. The first block is the worked example: one 4x4 luma block in scan order, coefficients 0, 3, 0, 1, -1, -1, 0, 1 followed by eight zeros - five non-zero values, three trailing ones, the last one at position 7. An arrow leads into five step blocks, each with its bit cost on the right. Step 1, coeff_token: TotalCoeffs = 5, TrailingOnes = 3, six bits. Step 2, trailing-one signs: plus, minus, minus coded as 0, 1, 1, three bits. Step 3, non-trailing levels: level 3 from VLC table 1, five bits. Step 4, total_zeros: three zeros before the last non-zero, three bits. Step 5, run_before: 0, 2, 0, 1, 0 read back to front, seven bits. A final block totals them: 6 + 3 + 5 + 3 + 7 = 24 bits. A closing line reads that the same block costs about 20 bits in CABAC and about 18 in AV1's range coder Figure 3. CAVLC codes a 4×4 block in five short steps. The choice of VLC table at each step depends on what the encoder just coded, which is what makes it "context adaptive".

How CABAC works — binary arithmetic coding with a brain

CABAC, short for Context-Adaptive Binary Arithmetic Coding, sits at the heart of H.264 High profile, all of HEVC, and all of VVC. It is the most studied entropy coder in modern video and it has three moving parts: binarisation, context modelling, and binary arithmetic coding. They run as a small pipeline on every symbol.

Binarisation turns every input symbol — a motion vector difference, a prediction mode, a coefficient value — into a string of bits called bins. Some bins are coded with a fixed bypass mode that costs exactly one bit each (used when the symbol is genuinely random, like the trailing magnitude bits of a large coefficient). Most bins go through the full arithmetic-coding path. The binarisation rule for each symbol is fixed by the standard: signed Exp-Golomb for motion vector differences, truncated unary for prediction modes, and so on. The point of binarisation is to reduce a many-valued alphabet (which would need a complicated arithmetic coder) to a two-valued alphabet (which needs only one).

Context modelling picks a probability model for each bin based on its position in the symbol and on recently-coded neighbours. H.264 and HEVC each define several hundred context models across coefficients, prediction modes, motion data and flags. Each context is a small piece of state — in H.264 and HEVC a 6-bit probability state plus the value of the more probable bin. The encoder picks the right context for the current bin, reads its probability, and hands the (bin, probability) pair to the arithmetic engine. The decoder mirrors the choice. Picking the right context is what separates CABAC from generic arithmetic coding — a context that says "the bin we are about to code is the significance flag of a coefficient at diagonal position 3 in a 4×4 sub-block whose top-left neighbour has 2 non-zero coefficients" predicts P(bin = 1) far more accurately than a single global probability would.

Binary arithmetic coding maintains a single interval — a low and a high value — that represents the message coded so far. When the encoder emits a bin, it splits the current interval in two pieces sized by the probability of 0 and 1, picks the piece corresponding to the actual bin, and shrinks the interval to that piece. Once the interval sits entirely in the lower or upper half of the range, its leading bit can no longer change, so the encoder writes that bit and doubles the interval — a step called renormalisation. A symbol with probability 0.9 shrinks the interval by 10%, which corresponds to writing only 0.15 bits on average — far less than the 1-bit minimum of a variable-length code. The probability estimate for each context is updated after every bin: a state machine moves "up" toward more confident predictions when the predicted bin arrives, and "down" otherwise. In H.264 and HEVC the state machine has 64 states; in VVC each context keeps two probability estimates, one fast and one slow, and codes with their average.

The combined effect is measurable. CABAC codes the same H.264 content with 9–14% fewer bits than CAVLC at the same visual quality (Marpe, Schwarz and Wiegand, 2003; Sze and Budagavi quote the same range in their HEVC analysis). The throughput cost is real too: CABAC decoders process bins sequentially, each context lookup depending on the bin before it, and that serial dependency is the main thing a hardware CABAC decoder has to engineer around.

A row of three blocks joined left to right by arrows. Binarisation: one symbol becomes a string of bins. Context modelling: each bin picks one of several hundred models. Arithmetic coding: a binary interval split, with bits leaving on every halving. Below, a worked example for mv_diff = -7. After binarisation the bins are 1 1 1 0 followed by a separate sign bin 1. After context tagging they carry ctx18, ctx19, ctx20, ctx21 and a bypass bin. After arithmetic coding the interval [0, 1] narrows to [0.62, 0.65]. Under that, a bar running from 0 to 1 with a narrow band shaded at [0.62, 0.65] and labelled. A closing line reads: five bins, four context picks and one bypass, about five bits out Figure 4. CABAC's three-stage pipeline. Every symbol is first binarised, then each bin is tagged with a context, then the arithmetic engine shrinks an interval and writes bits when the interval crosses a halving boundary.

The cost of CABAC is its serial throughput. Every bin's context lookup depends on the bin before it; the context's state update depends on the actual bin value; and the arithmetic engine's interval update depends on both. A high-bitrate 4K stream pushes millions of bins per second through that loop. HEVC's designers attacked the problem at the source: Sze and Budagavi report that HEVC cuts the worst-case number of context-coded bins by more than 8× against H.264 — a coefficient level, for example, drops from up to 14 context-coded bins to 1 or 2 — and moves the rest to cheap bypass coding.

AV1's range coder — non-binary, per-symbol adaptive

AV1's entropy stage looks different from CABAC at every level. The arithmetic engine is a range coder — an arithmetic coder that works on integer ranges rather than fractions, which suits fixed-point hardware. The "binary" part is dropped: AV1 codes symbols of up to 16 alphabet values directly, without first binarising them. The probability estimator updates per symbol, not per frame — the moment the decoder reads a transform coefficient, the probability of the next coefficient is recomputed.

The arithmetic engine is borrowed from Daala, an experimental codec developed by Xiph.Org and Mozilla by Timothy Terriberry, Jean-Marc Valin, and others in the early 2010s. Daala had three innovations that AV1 adopted: a non-binary arithmetic coder that codes one of up to 16 symbols per call, per-symbol probability adaptation, and a low-precision fixed-point implementation that keeps the arithmetic cheap. Because one call can resolve a 16-value symbol — up to 4 bits of information — a single AV1 engine step does work that would take CABAC up to four serial bin decodes.

Per-symbol adaptation is the second big change. In H.264 / HEVC, the probability state of each context is initialised at the start of each slice from a default table and then updates as the slice is decoded. AV1 keeps a similar model but updates the probability after every coded symbol, with an adaptation rate that starts fast and slows down as the context sees more symbols. The result is that a long, statistically homogeneous frame finishes the entropy coding very close to the empirical distribution of its own symbols, and the next frame can start from those adapted tables instead of the defaults.

AV1 also carries probabilities from frame to frame. At the end of each frame the decoder stores the adapted probability tables — CDFs, cumulative distribution functions — with each reference-frame slot the frame refreshes, and there are eight slots. The next frame names one reference through primary_ref_frame and starts from that frame's saved tables instead of the defaults. VP9's older frame_context_idx scheme, with four shared context slots, is gone. The cost lands on the decoder: hardware must keep a table set per reference slot and load the right one on cue, which is one reason AV1 hardware decoders arrived years after the 2018 specification.

A worked example. Suppose the encoder is coding a transform coefficient from an alphabet of {0, 1, 2, 3, 4}. The current probabilities, scaled to 32768 (AV1's fixed-point base), are {16384, 8192, 4096, 2048, 2048}. The encoder picks coefficient 2 (probability 4096/32768 = 12.5%). The arithmetic engine narrows the range to the slice corresponding to symbol 2 — that costs about 3 bits — and then nudges the probability table: P(2) climbs by about 100, the other entries shrink by about 25 each. The next coefficient in the same context starts from a slightly different distribution.

How much AV1 gains from the entropy engine alone is hard to isolate: published comparisons measure whole codecs, where larger blocks, more transform shapes and better prediction dominate. What the engine clearly buys is fewer serial steps per symbol and faster adaptation inside a frame; what that is worth in bits depends on the content and the encoder.

A three-column table. The columns are the stage, CABAC as used in H.264, HEVC and VVC, and the AV1 range coder derived from Daala. Input symbol: value 7 from an open alphabet against value 7 from a 16-value alphabet. Binarisation: four bins, 1 1 1 0, against none, the value is coded directly. Context lookup: four context picks against one CDF pick. Engine calls: four binary updates in series against one multi-symbol update. Adaptation: a state update per bin against a 15-bit CDF update per symbol. Two closing lines read that AV1 needs one engine call where CABAC needs four and adapts after every symbol, and that the price lands on the decoder, which has more tables to hold and more state to switch Figure 5. CABAC vs AV1's range coder. CABAC processes binary bins through a context lookup; AV1 processes multi-valued symbols directly and adapts the table after every call.

A common pitfall — context model leakage across slices

The most common entropy-coding bug in a streaming pipeline is a probability state that survives a boundary it should not. Slice headers in HEVC, frame headers in AV1, and CABAC re-initialisation flags in H.264 all exist to re-seed the entropy engine at points where the decoder might join the stream mid-flight — at a tune-in event in live streaming, at a seek event in VOD, or at a random access point in a transport stream.

If the encoder forgets to re-seed, the decoder picks up the stream with the wrong probability state. The first few symbols decode wrong because the encoder's interval no longer matches the decoder's interval. The errors propagate through the entire slice, producing the famous "blocky garbage from one point to the end of the slice" effect that anyone who has worked on live HEVC has seen at least once.

The fix is a careful audit of the encoder's IDR/CRA/BLA frame production and a corresponding audit of the decoder's slice-header parsing. In AV1 the relevant syntax is error_resilient_mode and primary_ref_frame: an error-resilient frame, or one whose primary_ref_frame is set to none, starts from the default probability tables instead of inherited ones. In HEVC, CABAC re-initialises at the start of every slice and tile, cabac_init_flag picks the initialisation table, and entry_point_offsets tell a parallel decoder where each substream starts. In H.264 it is cabac_init_idc at the slice header. Get those right and the entropy stage becomes invisible. Get them wrong and the stream looks broken in ways that are very hard to diagnose without bit-level tooling.

What changed in 2026: AV2, new editions and the road to H.267

AV2 is the first new entropy-coding design to ship since VVC. The Alliance for Open Media released the final AV2 specification in June 2026 (version 1.0.0 is dated 28 May 2026), with libavm as the reference software. AV2 keeps AV1's multi-symbol arithmetic coder and its 15-bit probability tables, so the engine itself did not change; the work went into what feeds it (Nalci et al., Transform and Entropy Coding in AV2, 2026).

Three changes matter if you read or decode AV2 bitstreams. First, a per-context adaptation parameter lets each context adapt faster or slower across three stages of its life, using only bit shifts. Second, large coefficient levels move from AV1's Exp-Golomb codes to adaptive truncated Rice codes whose parameter follows the size of recent levels. Third, each transform block splits into a low-frequency region with its own, richer contexts and a default region. By applying bypass coding selectively, the AV2 authors kept the throughput cost of the new coefficient coding at about 5% against AV1, for under 0.1% loss in coding efficiency, and kept probability-table memory within 0.5 KB of AV1.

On the ITU-T and MPEG side, the standards behind CAVLC and CABAC get maintenance editions without changing their entropy coders: H.264 reached edition 16 in June 2026 and H.265 edition 11 in January 2026. The next real change is H.267. JVET issued its joint call for proposals for video coding beyond VVC in July 2026; submissions are due by the end of October 2026, they will be evaluated in January 2027, and the first version of the standard is targeted for the end of 2029 (MPEG, 2026). JVET's exploration model, ECM, stays with CABAC-style binary arithmetic coding, and its version 20 reports roughly 28% average bitrate savings over VVC's reference encoder in random-access tests of natural content — a whole-codec figure, not an entropy-stage one.

A comparative table

Across the codecs that matter in 2026, the entropy stage tells a story of finer probability modelling paid for with more decoder work.

Codec (year) Entropy coder Alphabet Probability model Adaptation
MPEG-2 (1995) Fixed VLC tables (DPCM for DC) Per-symbol VLC Fixed tables None
H.264 / AVC Baseline, Extended (2003) CAVLC Per-symbol VLC VLC table picked by neighbour counts and coded levels Table switching inside each block
H.264 / AVC Main, High (2003) CABAC (CAVLC allowed) Binary bins Several hundred contexts, 64-state estimator Per bin, reset every slice
HEVC (2013) CABAC only Binary bins 64-state estimator, more than 8× fewer worst-case context-coded bins than H.264 Per bin, reset every slice and tile
AV1 (2018) Multi-symbol range coder (from Daala) Up to 16 values per symbol 15-bit CDF per context Per symbol; tables inherited via primary_ref_frame
VVC (2020) CABAC only Binary bins Two estimates per context, fast and slow, averaged Per bin, reset every slice
AV2 (2026) Multi-symbol range coder Up to 16 values per symbol 15-bit CDFs, per-context adaptation rate Per symbol, rate tuned per context

Two observations land from this table. First, the big step was CAVLC to CABAC in 2003, worth 9–14%; every design since has refined context modelling and adaptation rather than changing the engine. Second, the industry has split into two camps: the ITU-T and MPEG line (H.264, HEVC, VVC, and so far ECM on the way to H.267) stays with binary CABAC, while the AOMedia line (AV1, AV2) codes multi-value symbols directly. Both are in production, and a decoder team that supports both carries two very different entropy engines.

CABAC and CAVLC: questions people ask

Is CABAC better than CAVLC?

For file size, yes: CABAC produces a 9–14% smaller bitstream than CAVLC at the same quality (Marpe et al., 2003). CAVLC wins only where decoding speed or power matters more than size, because it parses without CABAC's serial bin-by-bin loop.

What is CAVLC?

CAVLC (context-adaptive variable-length coding) is the simpler of H.264's two entropy coders. It codes each 4×4 block of coefficients with variable-length codewords and picks the table for each step from what the neighbouring blocks and the already-coded values look like.

What is CABAC?

CABAC (context-adaptive binary arithmetic coding) turns every syntax element into binary decisions, gives each decision a probability from a context model that adapts as it codes, and packs the result with an arithmetic coder that can spend a fraction of a bit per decision. It is used in H.264 Main and High profiles and is the only entropy coder in HEVC and VVC.

Which H.264 profiles support CABAC?

Main, High and the professional High profiles support CABAC. Constrained Baseline, Baseline and Extended allow only CAVLC, which is one reason a Baseline-profile file is larger than a High-profile file at the same quality.

Do HEVC, VVC or AV1 use CAVLC?

No. HEVC and VVC use CABAC only. AV1 and AV2 use neither: they code multi-value symbols with a range coder descended from the Daala project.

What is entropy coding in video?

Entropy coding is the final, lossless stage of a video encoder that converts prediction modes, motion vectors and quantised coefficients into the fewest possible bits by giving frequent values short codes. The two families are variable-length codes (CAVLC, Exp-Golomb) and arithmetic codes (CABAC, the AV1 and AV2 range coder).

What is an entropy encoder?

An entropy encoder is the component that performs entropy coding: it takes the symbols the encoder has decided on and writes them as compactly as their probabilities allow. The matching entropy decoder must track exactly the same probabilities, which is why one missed re-initialisation corrupts everything after it.

↓ Free download: Entropy Coder Selection Cheat SheetOne page with CAVLC, CABAC, AV1's range coder and VVC's multi-rate estimator side by side, plus the debugging hints for live pipelines.

Where Fora Soft fits in

We build the conferencing, OTT, surveillance, e-learning, and telemedicine pipelines around H.264, HEVC, and increasingly AV1, and we read entropy-coded bitstreams on every project. When a customer's live HEVC feed shows blocky garbage that starts at the same point in every GOP, the first place we look is the CABAC re-initialisation at the slice header. When a customer's AV1 file decodes correctly in one player and falls apart in another, the trail usually leads to the probability tables a frame inherits through primary_ref_frame and a player that does not carry them over correctly. Twenty years of bitstream debugging across H.263, MPEG-2, MPEG-4 Part 2, H.264, HEVC, VP8, VP9, and AV1 have taught us that the entropy stage is the last place a bug should live and the first place a debugger should look. That bitstream-level debugging is part of our custom video and audio processing development, and when the fault is in a player already in production, our video software troubleshooting and optimization service traces it to the exact syntax element.

Video Encoding: A Complete Guide to Video Compression - book cover

The book

Video Encoding: A Complete Guide to Video Compression

This article stops at the shape of each coder; the book spells out the bitstream. It works through the H.264 VLC tables behind coeff_token, total_zeros and run_before, the CABAC binarisation rules and context templates of HEVC and VVC, the Daala-derived range coder and per-symbol adaptation of AV1, and the re-initialisation points — cabac_init_idc, slice headers, error_resilient_mode — where a live stream goes to pieces when they are wrong. Volume 1 of the seven-volume Fora Soft Video Engineering Handbook, 1,522 pages, written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Does your stream fall apart from one point to the end of the slice?

Send us a capture and we will read the bitstream itself: whether the entropy state is re-seeded at every point a decoder can join, which syntax element the parser lost, and how many bits per frame the entropy stage is actually spending. If the answer is a codec or profile change instead — CAVLC to CABAC, HEVC to AV1 — the same read tells you what it is worth on your own content. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →

See our case studies

References

  1. Shannon, C. E. "A Mathematical Theory of Communication." Bell System Technical Journal, 27, 379–423, 1948. The foundational paper that defines entropy and bounds the achievable compression of any lossless code.
  2. Huffman, D. A. "A Method for the Construction of Minimum-Redundancy Codes." Proceedings of the IRE, 40(9), 1098–1101, 1952. The original algorithm for optimal prefix codes that underlies every variable-length entropy coder.
  3. Rissanen, J. J. "Generalized Kraft Inequality and Arithmetic Coding." IBM Journal of Research and Development, 20(3), 198–203, 1976. One of the two independent inventions of practical arithmetic coding.
  4. Marpe, D., Schwarz, H., and Wiegand, T. "Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard." IEEE Transactions on Circuits and Systems for Video Technology, 13(7), 620–636, 2003. The original CABAC paper.
  5. Richardson, I. E. G. "H.264/AVC Context Adaptive Variable Length Coding (CAVLC)." Vcodex BV technical note. https://www.vcodex.com/h264avc-context-adaptive-variable-length-coding
  6. Sze, V., and Budagavi, M. "High Throughput CABAC Entropy Coding in HEVC." IEEE Transactions on Circuits and Systems for Video Technology, 22(12), 1778–1791, 2012. https://dspace.mit.edu/handle/1721.1/100315
  7. Han, J., Li, B., Mukherjee, D., et al. "A Technical Overview of AV1." Proceedings of the IEEE, 109(9), 1435–1462, 2021. https://arxiv.org/pdf/2008.06091
  8. Valin, J.-M., Terriberry, T. B., Egge, N., et al. "Daala: Building A Next-Generation Video Codec From Unconventional Technology." IEEE International Workshop on Multimedia Signal Processing, 2016. https://arxiv.org/pdf/1608.01947
  9. Schwarz, H., Coban, M., Karczewicz, M., et al. "Quantization and Entropy Coding in the VVC Standard." IEEE Transactions on Circuits and Systems for Video Technology, 31(10), 3891–3906, 2021. http://www.ecodis.de/video/schwarz_tcsvt_vvc_rev2.pdf
  10. ITU-T Recommendation H.264 | ISO/IEC 14496-10. Advanced Video Coding for Generic Audiovisual Services, edition 16 (V16), June 2026. https://www.itu.int/rec/T-REC-H.264
  11. ITU-T Recommendation H.265 | ISO/IEC 23008-2. High Efficiency Video Coding, edition 11 (V11), January 2026. https://www.itu.int/rec/T-REC-H.265
  12. AOMedia. AV1 Bitstream & Decoding Process Specification, version 1.0.0 errata 1, January 2019. https://aomediacodec.github.io/av1-spec/av1-spec.pdf
  13. Alliance for Open Media. "Alliance for Open Media Releases AV2 Codec." Press release, June 2026. https://aomedia.org/press%20releases/Alliance-for-Open-Media-Releases-AV2-Codec/
  14. Nalci, A., Egilmez, H. E., Krishnan, M. P., et al. "Transform and Entropy Coding in AV2." arXiv:2601.02712, 2026. https://arxiv.org/abs/2601.02712
  15. Sze, V., and Budagavi, M. HEVC CABAC throughput analysis: context-coded bin counts per syntax element, AVC vs HEVC. MIT EEMS preprint, 2013. https://eems.mit.edu/wp-content/uploads/2013/11/sze_sips_2013.pdf
  16. MPEG. "155th meeting of MPEG" — joint call for proposals for video coding beyond VVC (JVET-AQ2021), 2026. https://www.mpeg.org/155th-meeting-of-mpeg/
  17. Ofinno. "JVET Issues the Joint Call for Proposals for Video Coding beyond VVC," 2026 (ECM 20 performance summary). https://ofinno.com/standards-readout/jvet-issues-the-joint-call-for-proposals-for-video-coding-beyond-vvc/