Skip to content
Joe Drago edited this page Sep 11, 2020 · 3 revisions

RGB -> YUV -> RGB Codepoint Drift

This shows the output of avifyuv, whose drift mode brute forces every possible RGB value for each combination of (RGB bit depth [8,10,12], YUV bit depth [8,10,12], matrixCoefficients[0,1,9]). It then tallies all possible values by the amount of drift in the tree below. A drift of 1 means the most any single channel was different from the source was 1 codepoint, and a drift of 0 means the roundtrip conversion was lossless.

avifyuv -v -m drift

  avif version: 0.8.1
  [ 256/ 256] RGB depth: 8, YUV depth: 8, matrixCoeffs: 1
   * RGB depth: 8, YUV depth: 8, matrixCoeffs: 1, maxDrift:  1
     * drift:  0 ->      4140918 /     16777216 pixels (24.68 %)
     * drift:  1 ->     12636298 /     16777216 pixels (75.32 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 8, matrixCoeffs: 6
   * RGB depth: 8, YUV depth: 8, matrixCoeffs: 6, maxDrift:  1
     * drift:  0 ->      3999874 /     16777216 pixels (23.84 %)
     * drift:  1 ->     12777342 /     16777216 pixels (76.16 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 8, matrixCoeffs: 9
   * RGB depth: 8, YUV depth: 8, matrixCoeffs: 9, maxDrift:  1
     * drift:  0 ->      4134479 /     16777216 pixels (24.64 %)
     * drift:  1 ->     12642737 /     16777216 pixels (75.36 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 8, matrixCoeffs: 0
   * RGB depth: 8, YUV depth: 8, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 10, matrixCoeffs: 1
   * RGB depth: 8, YUV depth: 10, matrixCoeffs: 1, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 10, matrixCoeffs: 6
   * RGB depth: 8, YUV depth: 10, matrixCoeffs: 6, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 10, matrixCoeffs: 9
   * RGB depth: 8, YUV depth: 10, matrixCoeffs: 9, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 10, matrixCoeffs: 0
   * RGB depth: 8, YUV depth: 10, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 12, matrixCoeffs: 1
   * RGB depth: 8, YUV depth: 12, matrixCoeffs: 1, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 12, matrixCoeffs: 6
   * RGB depth: 8, YUV depth: 12, matrixCoeffs: 6, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 12, matrixCoeffs: 9
   * RGB depth: 8, YUV depth: 12, matrixCoeffs: 9, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [ 256/ 256] RGB depth: 8, YUV depth: 12, matrixCoeffs: 0
   * RGB depth: 8, YUV depth: 12, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->     16777216 /     16777216 pixels (100.00 %)
  [1024/1024] RGB depth: 10, YUV depth: 10, matrixCoeffs: 1
   * RGB depth: 10, YUV depth: 10, matrixCoeffs: 1, maxDrift:  1
     * drift:  0 ->    263351536 /   1073741824 pixels (24.53 %)
     * drift:  1 ->    810390288 /   1073741824 pixels (75.47 %)
  [1024/1024] RGB depth: 10, YUV depth: 10, matrixCoeffs: 6
   * RGB depth: 10, YUV depth: 10, matrixCoeffs: 6, maxDrift:  1
     * drift:  0 ->    254274600 /   1073741824 pixels (23.68 %)
     * drift:  1 ->    819467224 /   1073741824 pixels (76.32 %)
  [1024/1024] RGB depth: 10, YUV depth: 10, matrixCoeffs: 9
   * RGB depth: 10, YUV depth: 10, matrixCoeffs: 9, maxDrift:  1
     * drift:  0 ->    262958007 /   1073741824 pixels (24.49 %)
     * drift:  1 ->    810783817 /   1073741824 pixels (75.51 %)
  [1024/1024] RGB depth: 10, YUV depth: 10, matrixCoeffs: 0
   * RGB depth: 10, YUV depth: 10, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->   1073741824 /   1073741824 pixels (100.00 %)
  [1024/1024] RGB depth: 10, YUV depth: 12, matrixCoeffs: 1
   * RGB depth: 10, YUV depth: 12, matrixCoeffs: 1, maxDrift:  0
     * drift:  0 ->   1073741824 /   1073741824 pixels (100.00 %)
  [1024/1024] RGB depth: 10, YUV depth: 12, matrixCoeffs: 6
   * RGB depth: 10, YUV depth: 12, matrixCoeffs: 6, maxDrift:  0
     * drift:  0 ->   1073741824 /   1073741824 pixels (100.00 %)
  [1024/1024] RGB depth: 10, YUV depth: 12, matrixCoeffs: 9
   * RGB depth: 10, YUV depth: 12, matrixCoeffs: 9, maxDrift:  0
     * drift:  0 ->   1073741824 /   1073741824 pixels (100.00 %)
  [1024/1024] RGB depth: 10, YUV depth: 12, matrixCoeffs: 0
   * RGB depth: 10, YUV depth: 12, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->   1073741824 /   1073741824 pixels (100.00 %)
  [4096/4096] RGB depth: 12, YUV depth: 12, matrixCoeffs: 1
   * RGB depth: 12, YUV depth: 12, matrixCoeffs: 1, maxDrift:  1
     * drift:  0 ->  16827794937 /  68719476736 pixels (24.49 %)
     * drift:  1 ->  51891681799 /  68719476736 pixels (75.51 %)
  [4096/4096] RGB depth: 12, YUV depth: 12, matrixCoeffs: 6
   * RGB depth: 12, YUV depth: 12, matrixCoeffs: 6, maxDrift:  1
     * drift:  0 ->  16246154304 /  68719476736 pixels (23.64 %)
     * drift:  1 ->  52473322432 /  68719476736 pixels (76.36 %)
  [4096/4096] RGB depth: 12, YUV depth: 12, matrixCoeffs: 9
   * RGB depth: 12, YUV depth: 12, matrixCoeffs: 9, maxDrift:  1
     * drift:  0 ->  16802826849 /  68719476736 pixels (24.45 %)
     * drift:  1 ->  51916649887 /  68719476736 pixels (75.55 %)
  [4096/4096] RGB depth: 12, YUV depth: 12, matrixCoeffs: 0
   * RGB depth: 12, YUV depth: 12, matrixCoeffs: 0, maxDrift:  0
     * drift:  0 ->  68719476736 /  68719476736 pixels (100.00 %)
Clone this wiki locally