edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB6c956a2Tahinli2 months ago3708 commits
| 1 | //! Chroma upsampling, shared by the two formats that subsample it. |
| 2 | //! |
| 3 | //! Both JPEG and VP8 store chroma at half resolution and both are decoded by |
| 4 | //! their reference implementations with the triangle ("fancy") filter — the |
| 5 | //! 9/3/3/1 weighting a separable 3:1 pass in each direction produces. Pixel |
| 6 | //! replication is cheaper and visibly wrong: it puts a two-pixel staircase on |
| 7 | //! every saturated colour edge, and costs about a decibel against the source. |
| 8 | |
| 9 | /// Triangle ("fancy") upsampling of one component to full resolution. |
| 10 | /// |
| 11 | /// The 3:1 weighting is the same filter libjpeg uses, which is why a 4:2:0 |
| 12 | /// photo decoded here and by the incumbent differ by rounding rather than by a |
| 13 | /// visible staircase on every colour edge. |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 |