Context-adaptive variable-length coding

Context-adaptive variable-length coding (CAVLC) is a form of entropy coding used in H.264/MPEG-4 AVC video encoding. It is an inherently lossless compression technique, like almost all entropy-coders. In H.264/MPEG-4 AVC, it is used to encode residual, zig-zag order, blocks of transform coefficients. It is an alternative to context-based adaptive binary arithmetic coding (CABAC). CAVLC requires considerably less processing to decode than CABAC, although it does not compress the data quite as effectively. CAVLC is supported in all H.264 profiles, unlike CABAC which is not supported in Baseline and Extended profiles.

CAVLC is used to encode residual, zig-zag ordered 4×4 (and 2×2) blocks of transform coefficients. CAVLC is designed to take advantage of several characteristics of quantized 4×4 blocks:

  • After prediction, transformation and quantization, blocks are typically sparse (containing mostly zeros).
  • The highest non-zero coefficients after zig-zag scan are often sequences of +/− 1. CAVLC signals the number of high-frequency +/−1 coefficients in a compact way.
  • The number of non-zero coefficients in neighbouring blocks is correlated. The number of coefficients is encoded using a look-up table; the choice of look-up table depends on the number of non-zero coefficients in neighbouring blocks.
  • The level (magnitude) of non-zero coefficients tends to be higher at the start of the reordered array (near the DC coefficient) and lower towards the higher frequencies. CAVLC takes advantage of this by adapting the choice of VLC look-up table for the “level” parameter depending on recently coded level magnitudes.

Coded elements

Parameters that required to be encoded and transmitted include the following table:

Parameters Description
Macroblock type Prediction method for each coded macroblock
Coded block pattern Indicates which blocks within a macroblock contain coded coefficients
Quantizer parameter reference frame Transmitted as a delta value from the previous value of QP
Reference frame index Identify reference frame(s) for inter prediction
Motion vector Transmitted as a difference (mvd) from predicted motion vector
Residual data Coefficient data for each 4×4 or 2×2 block

CAVLC examples

Element Value Code
coeff_token TotalCoeffs=5, T1s=3 0000100
T1 sign (4) + 0
T1 sign (3) - 1
T1 sign (2) - 1
Level (1) +1 (use Level_VLC0) 1
Level (0) +3 (use Level_VLC1) 0010
TotalZeros 3 111
run_before(4) ZerosLeft=3; run_before=1 10
run_before(3) ZerosLeft=2; run_before=0 1
run_before(2) ZerosLeft=2; run_before=0 1
run_before(1) ZerosLeft=2; run_before=1 01
run_before(0) ZerosLeft=1; run_before=1 No code required; last coefficient.
Code Element Value Output array
0000100 coeff_token Total Coeffs=5, T1s=3 Empty
0 T1 sign + 1
1 T1 sign - −1, 1
1 T1 sign - −1, −1, 1
1 Level +1 1, −1, −1, 1
0010 Level +3 3, 1, −1, −1, 1
111 TotalZeros 3 3, 1, −1, −1, 1
10 run_before 1 3, 1, −1, −1, 0, 1
1 run_before 0 3, 1, −1, −1, 0, 1
1 run_before 0 3, 1, −1, −1, 0, 1
01 run_before 1 3, 0, 1, −1, −1, 0, 1

In all following examples, we assume that table Num-VLC0 is used to encode coeff_token.

0, 3, 0, 1, −1, −1, 0, 1, 0… TotalCoeffs = 5 (indexed from highest frequency [4] to lowest frequency [0])

TotalZeros = 3

T1s = 3 (in fact there are 4 trailing ones but only 3 can be encoded as a “special case”)

Encoding:

The transmitted bitstream for this block is 000010001110010111101101.

Decoding: The output array is “built up” from the decoded values as shown below. Values added to the output array at each stage are underlined.

The decoder has inserted two zeros; however, TotalZeros is equal to 3 and so another 1 zero is inserted before the lowest coefficient, making the final output array: 0, 3, 0, 1, −1, −1, 0, 1

See also

References


Read other articles:

Halaman ini berisi artikel tentang Serial Disney+. Untuk karakter Marvel Cinematic Universe, lihat Loki (Marvel Cinematic Universe). LokiGenre Aksi-petualangan Misteri kriminal Fantasi Drama prosedural Fiksi ilmiah Pahlawan super PembuatMichael WaldronBerdasarkanMarvel ComicsSutradaraKate HerronPemeran Tom Hiddleston Gugu Mbatha-Raw Wunmi Mosaku Eugene Cordero Tara Strong Owen Wilson Sophia Di Martino Sasha Lane Jack Veal DeObia Oparei Richard E. Grant Jonathan Majors Penata musikNatali...

Mexican psychologist This article may rely excessively on sources too closely associated with the subject, potentially preventing the article from being verifiable and neutral. Please help improve it by replacing them with more appropriate citations to reliable, independent, third-party sources. (January 2019) (Learn how and when to remove this template message) Marisa Carrasco is a Mexican psychologist, who is a professor of psychology and neural science at New York University. She uses huma...

Texto de la ley en el boletín oficial del Reich, el Reichsgesetzblatt. La ley habilitante del 24 de marzo de 1933 (en alemán: Ermächtigungsgesetz vom 24. März 1933), oficialmente la Ley para el remedio de las necesidades del Pueblo y del Reich (en alemán: Gesetz zur Behebung der Not von Volk und Reich) fue la ley habilitante aprobada por el Reichstag el 23 de marzo de 1933 que cedió de facto todo el poder legislativo a Adolf Hitler quebrando la separación de poderes de la República de...

Parish of Latvia Parish of LatviaTērvete Parishparish of Latvia Coat of arms56°28′36″N 23°20′28″E / 56.4766°N 23.341°E / 56.4766; 23.341 CountryLatviaArea[1] • Total92.52 km2 (35.72 sq mi) • Land90.3 km2 (34.9 sq mi) • Water2.22 km2 (0.86 sq mi)Population (1 January 2023)[2] • Total1,850 • Density20/km2 (52/sq mi) Tērvete Pari...

Proposal 2A proposal to amend the state constitution to ban affirmative action programs that give preferential treatment to groups or individuals based on their race, gender, color, ethnicity or national origin for public employment, education or contracting purposes.Results Choice Votes % Yes 2,141,010 57.92% No 1,555,691 42.08% Valid votes 3,696,701 100.00% Invalid or blank votes 0 0.00% Total votes 3,696,701 100.00% County Results Yes   70–80%   60–70%   5...

2012 Indian film The HitlistTheatrical release posterDirected byBalaScreenplay byBalaProduced byBalaStarringBalaDhruv SharmaAishwarya DevanNarrated byMohanlalCinematographyMadhu NeelakandanEdited bySamjith MohammedMusic byAlphons JosephProductioncompanyArunachalam PicturesDistributed byCelebs & Red CarpetRelease date 7 December 2012 (2012-12-07) Running time134 minutesCountryIndiaLanguageMalayalam The Hitlist is a 2012 Indian Malayalam-language action thriller film written,...

German television channel This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: MTV Germany – news · newspapers · books · scholar · JSTOR (June 2020) (Learn how and when to remove this template message) Television channel MTV GermanyCountryGermanyHeadquartersBerlin, GermanyProgrammingLanguage(s)German EnglishPictu...

1958 Indian filmRaja NandiniTheatrical release posterDirected byVedantam RaghavayyaWritten byMalladi Ramakrishna Sastry(story / dialogues)Screenplay byVedantam RaghavayyaProduced byM. Ramakrishna RaoMidde Jagannatha RaoStarringN. T. Rama RaoAnjali DeviCinematographyM. A. RehmanC. Nageswara RaoEdited byN. S. PrakasamMusic byT. V. RajuProductioncompanyJalaruha Productions[1]Release date 4 July 1958 (1958-07-04) Running time140 minutesCountryIndiaLanguageTelugu Raja Nandin...

2018 concert tour by Kylie Minogue This article is about the promotional tour. For the concert tour, see Golden Tour. Kylie Presents: GoldenPromotional tour by Kylie MinoguePromotional handbill for the tourAssociated albumGoldenStart date13 March 2018 (2018-03-13)End date25 June 2018 (2018-06-25)Legs2No. of shows5 in Europe1 in North America6 totalKylie Minogue concert chronology A Kylie Christmas(2015–16) Kylie Presents Golden(2018) Golden Tour(2018–2019) Ky...

Anatomical structure in a developing embryo The archenteron, also called the gastrocoel or the primitive digestive tube, is the internal cavity of the primitive gastrointestinal tract that forms during gastrulation in a developing animal embryo. It develops into the endoderm and mesoderm of the animal. Formation in sea urchins Further information: Gastrulation As primary mesenchyme cells detach from the vegetal pole in the gastrula and enter the fluid-filled cavity in the center (the blastoco...

Fictional character in Red Dwarf For other people named Dave Lister, see Dave Lister (disambiguation). Fictional character David ListerRed Dwarf characterThe Last HumanFirst appearanceThe EndCreated byRob Grant and Doug NaylorPortrayed byCraig CharlesIn-universe informationAliasLister of Smeg, Cloister the Stupid, Sebastian DoyleNicknameListy, Dave, Skipper, Dave Cinzano Bianco Lister, Spanners, Davey BoySpeciesHumanGenderMaleOccupationTechnician, Third ClassBum (self-proclaimed)[1]Fa...

Odendisa RunestoneCreatedc. 1050DiscoveredFläckebo Parish, Västmanland, SwedenRundata IDVs 24RunemasterRed-BalliText – NativeSee articleTranslationSee article The Odendisa Runestone (Swedish: Odendisastenen), sometimes called the Hassmyra Runestone, is a Viking Age runestone erected at Hassmyra, Västmanland, Sweden. It is exceptional in that it has a metric inscription, and in commemorating a woman. The stone is first described in the 1660s. According to tradition, a farmer discovered th...

Baba HouseEstablished4 September 2008; 15 years ago (2008-09-04)Location157 Neil Road(1°16′37″N 103°50′14.32″E / 1.27694°N 103.8373111°E / 1.27694; 103.8373111)Singapore 088883TypePeranakan HeritageDirectorMrs Christine KhorCuratorFoo Su LingPeter LeePublic transit access EW16  NE3  TE17  Outram Park(1°16′50″N 103°50′22″E / 1.28056°N 103.83944°E / 1.28056; 103.83944)Singapor...

Tank Amerika Serikat M1A1 Abrams Tank adalah kendaraan tempur lapis baja yang bergerak menggunakan roda berbentuk rantai. Ciri utama tank adalah pelindungnya yang biasanya adalah lapisan baja yang berat, senjatanya yang merupakan meriam besar yang terletak di bagian kepala, serta mobilitas yang tinggi untuk bergerak dengan lancar di segala medan. Meskipun tank adalah kendaraan yang mahal dan membutuhkan persediaan logistik yang banyak, tank adalah senjata darat paling tangguh dan serba-bisa p...

Democratic caucus in the 2000 election Main article: 2000 Democratic Party presidential primaries 2000 Iowa Democratic presidential caucuses ← 1992 January 24th, 2000 2004 → NH →57 Democratic National Convention delegates (47 pledged; 10 unpledged)The number of pledged delegates won is determined by the number of state delegate equivalents (SDEs) won[a]   Candidate Al Gore Bill Bradley Home state Tennessee New Jersey Delegate count 29 18...

Argishtikhinili Արգիշտիխինիլի Monumento de Armenia Vista del montículo por encima de las ruinas de ArgishtikhiniliUbicaciónPaís  ArmeniaLocalidad ArmeniaUbicación 15 kilómetros al suroeste de la ciudad de Armavir, ArmeniaCoordenadas 40°06′09″N 43°59′18″E / 40.1025, 43.9883CaracterísticasTipo Bien culturalConstruido por Argishti IMateriales Piedra basaltoEstado En ruinas[editar datos en Wikidata] Argishtikhinili (en ururtiano: ar...

Questa voce sull'argomento calciatori messicani è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Christian Bermúdez Nazionalità  Messico Altezza 163 cm Calcio Ruolo Centrocampista Squadra  Atlante Carriera Giovanili 2006 Atlante Squadre di club1 2006-2012 Atlante178 (29)2012-2014 América53 (6)2014 Querétaro16 (1)2014-2015 Jaguares19 (0)2015-2016→  Puebla46 (6...

У этого термина существуют и другие значения, см. Песок (значения). Дюны песка в Марокко Тяжёлые минералы (тёмные) в кварцевом песке пляжа (Ченнаи, Индия) Песок из государственного парка «Коралловые розовые песчаные дюны»[en], Юта Крупным планом чёрный вулканический песок и�...

Tượng Nguyễn Sinh Sắc trong nhà trưng bày Khu di tích Nguyễn Sinh Sắc tọa lạc số 137, đường Phạm Hữu Lầu, thuộc phường 4, thành phố Cao Lãnh, tỉnh Đồng Tháp, Việt Nam. Đây là nơi an nghỉ của Phó bảng Nguyễn Sinh Sắc (1862–1929), là một nhà nho yêu nước, và là thân sinh của Chủ tịch Hồ Chí Minh. Di tích được xếp hạng cấp quốc gia ngày 9 tháng 4 năm 1992. Giới thiệu Đền thờ Nguyễn Sin...

Aquinas beralih ke halaman ini. Untuk kegunaan lain, lihat Aquinas (disambiguasi). Santo Thomas AquinasLatar sebuah altar di Ascoli Piceno, Italia, karya Carlo Crivelli (abad ke-15)Pujangga GerejaLahir1225Roccasecca, Kerajaan SisiliaMeninggal7 Maret 1274 – 1225; umur -50–-49 tahunFossanova, Negara GerejaDihormati diGereja KatolikKomuni AnglikanLutheranismeKanonisasi18 Juli 1323, Avignon, Negara Gereja oleh Paus Yohanes XXIITempat ziarahGereja Jacobins, Toulouse, PrancisPesta2...