mp3 => {
name => '<abbr title="MPEG-1 Audio Layer III">MP3</abbr>',
available => 1991,
+ generation => 0,
},
vorbis => {
name => 'Vorbis',
available => 2000,
+ generation => 1,
},
opus => {
name => 'Opus',
available => 2012,
+ generation => 1,
},
aac => {
name => '<abbr title="Advanced Audio Coding">AAC</abbr>',
available => 1997,
+ generation => 1,
},
atrac => {
name => '<abbr title="Adaptive Transform Acoustic Coding">ATRAC</abbr>',
available => 1992,
+ generation => 0,
},
},
feature => {
jpeg => {
name => '<abbr title="Joint Photographic Experts Group">JPEG</abbr>',
available => 1992,
+ generation => 0,
},
gif => {
name => '<abbr title="Graphics Interchange Format">GIF</abbr>',
available => 1987,
+ generation => 0,
},
png => {
name => '<abbr title="Portable Network Graphics">PNG</abbr>',
available => 1996,
+ generation => 1,
},
jp2k => {
name => 'JPEG 2000',
available => 2000,
+ generation => 1,
},
webp => {
name => 'WebP',
available => 2010,
+ generation => 1,
},
heic => {
name => '<abbr title="High Efficiency Image Container (HEVC in HEIF)">HEIC</abbr>',
available => 2015,
+ generation => 2,
},
avif => {
name => '<abbr title="AV1 Image File Format">AVIF</abbr>',
available => 2019,
+ generation => 2,
},
jxl => {
name => 'JPEG XL',
available => 2021,
+ generation => 2,
},
pnm => {
name => '<abbr title="Portable aNyMap">PNM</abbr>',
available => 1988,
+ generation => 0,
},
},
feature => {
<div class="section">
<table class="mapped">
- <col><colgroup span=3><colgroup span=2><colgroup span=3>
-<thead><tr><th rowspan=2>feature
<:
my @codecs = sort {
$info->{codec}->{$a}->{available} <=> $info->{codec}->{$b}->{available}
} keys $info->{codec}->%*;
+my @codeccols = @{$info->{codec}}{@codecs};
-print '<th>', $_->{name} for @{$info->{codec}}{@codecs};
-print "\n<tr>";
-print '<td>', $_->{available} for @{$info->{codec}}{@codecs};
+{
+ print '<col>';
+ my @spans;
+ $spans[ $_->{generation} ]++ for @codeccols;
+ print "<colgroup span=$_>" for @spans;
+}
+say '<thead><tr><th rowspan=2>';
+say "\t", '<th>', $_->{name} for @codeccols;
+print '<tr>';
+print '<td>', $_->{available} for @codeccols;
say '</thead>';
while (defined (my $feat = shift @feat)) {