1
0
mirror of https://github.com/golang/go synced 2024-11-24 07:50:13 -07:00

image/png: remove unnecessary function call

paeth(0, x, 0) == x for any uint8 value.

LGTM=nigeltao
R=golang-codereviews, bradfitz, nigeltao
CC=golang-codereviews
https://golang.org/cl/105290049
This commit is contained in:
Rui Ueyama 2014-06-23 10:29:56 +10:00 committed by Nigel Tao
parent a200e0b8fd
commit 9cddb48643

View File

@ -188,7 +188,7 @@ func filter(cr *[nFilter][]byte, pr []byte, bpp int) int {
// The Paeth filter.
sum = 0
for i := 0; i < bpp; i++ {
cdat4[i] = cdat0[i] - paeth(0, pdat[i], 0)
cdat4[i] = cdat0[i] - pdat[i]
sum += abs8(cdat4[i])
}
for i := bpp; i < n; i++ {