• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarpelesLab / gowebp / 24428650643
93%

Build:
DEFAULT BRANCH: main
Ran 14 Apr 2026 11:46PM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2026 11:46PM UTC coverage: 93.081% (-2.5%) from 95.577%
24428650643

push

github

MagicalTux
fix: BT.601 limited-range YCbCr color type (BT601YCbCrColor)

WebP's VP8 stores pixels in limited-range BT.601 per RFC 6386 (luma
16-235, chroma 16-240). Go's stdlib image/color.YCbCrToRGB applies
the JFIF (full-range) inverse regardless, which shifts RGB output by
2-5 units per channel on VP8 content. Previously we just documented
this in the README and asked users to be careful.

Now handled automatically: Decode wraps VP8 results in a new
*BT601YCbCr (or *BT601NYCbCrA for ALPH-bearing sources) whose At()
method uses the correct limited-range inverse:

  R = clip((298·(Y-16) + 409·(Cr-128) + 128) >> 8)
  G = clip((298·(Y-16) - 100·(Cb-128) - 208·(Cr-128) + 128) >> 8)
  B = clip((298·(Y-16) + 516·(Cb-128) + 128) >> 8)

New exports:
  - BT601YCbCrColor       — single-pixel spec-correct YCbCr color
  - BT601NYCbCrAColor     — same with alpha
  - BT601YCbCr / BT601NYCbCrA — image wrappers around the stdlib
    types; embedded field is accessible for zero-copy plane access
  - BT601YCbCrColorModel / BT601NYCbCrAColorModel

Test evidence: same VP8 pixel YUV(137,157,103) decoded to
  - BT601YCbCrColor.RGBA() → (101, 150, 199)  — correct (source was
    RGB 100,150,200)
  - stdlib color.YCbCrToRGB → (102, 145, 188) — 5-12 units off

VP8L (lossless) passes through unchanged since it decodes directly
to NRGBA without going through YCbCr.

This is a behavioral change: callers who type-asserted
\`Decode(r).(*image.YCbCr)\` now see \`*gowebp.BT601YCbCr\` instead.
They can unwrap via the embedded .YCbCr field.

37 of 109 new or added lines in 2 files covered. (33.94%)

13 existing lines in 1 file now uncovered.

2973 of 3194 relevant lines covered (93.08%)

108574.05 hits per line

Uncovered Changes

Lines Coverage ∆ File
65
26.97
bt601.go
7
60.0
-32.0% reader.go

Coverage Regressions

Lines Coverage ∆ File
13
60.0
-32.0% reader.go
Jobs
ID Job ID Ran Files Coverage
1 24428650643.1 14 Apr 2026 11:46PM UTC 13
93.08
GitHub Action Run
Source Files on build 24428650643
  • Tree
  • List 13
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24428650643
  • 7017fe18 on github
  • Prev Build on main (#24428524917)
  • Next Build on main (#24432513569)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc