codec: grade numeric results and freeness levels
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 29 Oct 2021 13:26:59 +0000 (15:26 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Nov 2021 03:14:15 +0000 (04:14 +0100)
codec.inc.pl

index a76b04d0a0c9e4b7dd17750f88a76b184e52d57a..2e157fcb88c468972fca9aefd99857e4803b4884 100644 (file)
@@ -199,18 +199,36 @@ feature => {
        },
        max_dimensions => {
                name => 'maximum image dimensions',
+               score => {
+                       jpeg => 3,
+                       png  => 4,
+                       jp2k => 5,
+                       webp => 1,
+                       heic => 2,
+                       avif => 3,
+                       jxl  => 4,
+               },
                data => {
                        jpeg => '65k²',  # 2**16
                        png  => '2G²',   # 2**31
                        jp2k => '4G²',   # 2**32
                        webp => '16k²',  # 2**14
-                       heic => '8k×4k+', # 2**13
-                       avif => '8k×4k+',
+                       heic => '8k×4k+', # 8193x4320
+                       avif => '65k²+',  # 2**16, 8193x4320 with profile
                        jxl  => '1G²',   # 2**30
                },
        },
        max_bitdepth => {
                name => 'precision (max. bit depth)',
+               score => {
+                       jpeg => 2,
+                       png  => 4,
+                       jp2k => 5,
+                       webp => 2,
+                       heic => 3,
+                       avif => 3,
+                       jxl  => 5,
+               },
                data => {
                        jpeg => 8,
                        png  => 16,
@@ -247,6 +265,15 @@ feature => {
        },
        max_channels => {
                name => 'maximum number of channels',
+               score => {
+                       jpeg => 2,
+                       png  => 2,
+                       jp2k => 5,
+                       webp => 2,
+                       heic => 3,
+                       avif => 3,
+                       jxl  => 4,
+               },
                data => {
                        jpeg => 4, # cmyk
                        png  => 4, # cmyk
@@ -271,9 +298,9 @@ feature => {
        animation => {
                name => 'supports animation',
                score => {
-                       jpeg => 'n',
-                       png  => 'y',
-                       jp2k => 'n',
+                       jpeg => 2,
+                       png  => 4,
+                       jp2k => 2,
                        webp => 'y',
                        heic => 'y',
                        avif => 'y',
@@ -378,13 +405,14 @@ feature => {
        royalties => {
                name => 'royalty-free',
                score => {
-                       jpeg => 'y',
-                       png  => 'y',
-                       jp2k => 'y',
-                       webp => 'y',
-                       heic => 'n',
-                       avif => 'y',
-                       jxl  => 'y',
+                       jpeg => 5,
+                       png  => 5,
+                       gif  => 5, # patents expired
+                       jp2k => 3, # specs not freely available
+                       webp => 4, # submarine risk
+                       heic => 'n', # patents enforced
+                       avif => 4,
+                       jxl  => 4,
                },
        },
 },