From 9fece77b261e6dd26ec03b40c005352e84b50aaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:02:16 +0000 Subject: [PATCH] build(deps): bump golang.org/x/image from 0.15.0 to 0.21.0 Bumps [golang.org/x/image](https://github.com/golang/image) from 0.15.0 to 0.21.0. - [Commits](https://github.com/golang/image/compare/v0.15.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/image dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 13 +- vendor/golang.org/x/image/LICENSE | 4 +- vendor/golang.org/x/image/draw/impl.go | 1232 +++++++++++------------ vendor/golang.org/x/image/draw/scale.go | 46 +- vendor/golang.org/x/text/LICENSE | 4 +- vendor/modules.txt | 4 +- 7 files changed, 653 insertions(+), 654 deletions(-) diff --git a/go.mod b/go.mod index c8d74220..d25ac62a 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/dreamscached/minequery/v2 v2.5.0 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/shirou/gopsutil v3.21.11+incompatible + golang.org/x/image v0.21.0 golang.org/x/sys v0.18.0 - golang.org/x/image v0.15.0 ) require ( @@ -20,7 +20,7 @@ require ( github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/text v0.19.0 // indirect ) replace github.com/chzyer/readline => ./gitmod/readline diff --git a/go.sum b/go.sum index 8d8d9691..5c4acb45 100644 --- a/go.sum +++ b/go.sum @@ -12,7 +12,6 @@ github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= @@ -27,8 +26,12 @@ github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5I github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s= +golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -36,10 +39,6 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= -golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -55,8 +54,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/vendor/golang.org/x/image/LICENSE b/vendor/golang.org/x/image/LICENSE index 6a66aea5..2a7cf70d 100644 --- a/vendor/golang.org/x/image/LICENSE +++ b/vendor/golang.org/x/image/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/image/draw/impl.go b/vendor/golang.org/x/image/draw/impl.go index 94ee8265..fcd19943 100644 --- a/vendor/golang.org/x/image/draw/impl.go +++ b/vendor/golang.org/x/image/draw/impl.go @@ -778,8 +778,8 @@ func (nnInterpolator) transform_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rec d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -800,8 +800,8 @@ func (nnInterpolator) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -825,8 +825,8 @@ func (nnInterpolator) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -849,8 +849,8 @@ func (nnInterpolator) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -874,8 +874,8 @@ func (nnInterpolator) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rec d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -898,8 +898,8 @@ func (nnInterpolator) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -942,8 +942,8 @@ func (nnInterpolator) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -986,8 +986,8 @@ func (nnInterpolator) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1030,8 +1030,8 @@ func (nnInterpolator) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1074,8 +1074,8 @@ func (nnInterpolator) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr i d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1095,8 +1095,8 @@ func (nnInterpolator) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr im d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1115,8 +1115,8 @@ func (nnInterpolator) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1136,8 +1136,8 @@ func (nnInterpolator) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1159,8 +1159,8 @@ func (nnInterpolator) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1199,8 +1199,8 @@ func (nnInterpolator) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1241,8 +1241,8 @@ func (nnInterpolator) transform_Image_Image_Over(dst Image, dr, adr image.Rectan dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1281,8 +1281,8 @@ func (nnInterpolator) transform_Image_Image_Src(dst Image, dr, adr image.Rectang dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -1559,7 +1559,7 @@ func (ablInterpolator) scale_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rectan swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -1577,7 +1577,7 @@ func (ablInterpolator) scale_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rectan d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -1596,15 +1596,15 @@ func (ablInterpolator) scale_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rectan s10i := (sr.Min.Y+int(sy0)-src.Rect.Min.Y)*src.Stride + (sr.Min.X + int(sx1) - src.Rect.Min.X) s10ru := uint32(src.Pix[s10i]) * 0x101 s10r := float64(s10ru) - s10r = xFrac1*s00r + xFrac0*s10r + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X + int(sx0) - src.Rect.Min.X) s01ru := uint32(src.Pix[s01i]) * 0x101 s01r := float64(s01ru) s11i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X + int(sx1) - src.Rect.Min.X) s11ru := uint32(src.Pix[s11i]) * 0x101 s11r := float64(s11ru) - s11r = xFrac1*s01r + xFrac0*s11r - s11r = yFrac1*s10r + yFrac0*s11r + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) pr := uint32(s11r) out := uint8(pr >> 8) dst.Pix[d+0] = out @@ -1623,7 +1623,7 @@ func (ablInterpolator) scale_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rect swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -1641,7 +1641,7 @@ func (ablInterpolator) scale_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -1672,10 +1672,10 @@ func (ablInterpolator) scale_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rect s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X+int(sx0)-src.Rect.Min.X)*4 s01au := uint32(src.Pix[s01i+3]) * 0x101 s01ru := uint32(src.Pix[s01i+0]) * s01au / 0xff @@ -1694,14 +1694,14 @@ func (ablInterpolator) scale_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rect s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -1723,7 +1723,7 @@ func (ablInterpolator) scale_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Recta swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -1741,7 +1741,7 @@ func (ablInterpolator) scale_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Recta d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -1772,10 +1772,10 @@ func (ablInterpolator) scale_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Recta s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X+int(sx0)-src.Rect.Min.X)*4 s01au := uint32(src.Pix[s01i+3]) * 0x101 s01ru := uint32(src.Pix[s01i+0]) * s01au / 0xff @@ -1794,14 +1794,14 @@ func (ablInterpolator) scale_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Recta s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -1822,7 +1822,7 @@ func (ablInterpolator) scale_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Recta swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -1840,7 +1840,7 @@ func (ablInterpolator) scale_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Recta d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -1871,10 +1871,10 @@ func (ablInterpolator) scale_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Recta s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X+int(sx0)-src.Rect.Min.X)*4 s01ru := uint32(src.Pix[s01i+0]) * 0x101 s01gu := uint32(src.Pix[s01i+1]) * 0x101 @@ -1893,14 +1893,14 @@ func (ablInterpolator) scale_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Recta s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -1922,7 +1922,7 @@ func (ablInterpolator) scale_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectan swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -1940,7 +1940,7 @@ func (ablInterpolator) scale_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectan d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -1971,10 +1971,10 @@ func (ablInterpolator) scale_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectan s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.Stride + (sr.Min.X+int(sx0)-src.Rect.Min.X)*4 s01ru := uint32(src.Pix[s01i+0]) * 0x101 s01gu := uint32(src.Pix[s01i+1]) * 0x101 @@ -1993,14 +1993,14 @@ func (ablInterpolator) scale_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectan s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2021,7 +2021,7 @@ func (ablInterpolator) scale_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Re swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2039,7 +2039,7 @@ func (ablInterpolator) scale_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2110,9 +2110,9 @@ func (ablInterpolator) scale_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Re s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.YStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) s01j := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.CStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) @@ -2171,12 +2171,12 @@ func (ablInterpolator) scale_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Re s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2196,7 +2196,7 @@ func (ablInterpolator) scale_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Re swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2214,7 +2214,7 @@ func (ablInterpolator) scale_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2285,9 +2285,9 @@ func (ablInterpolator) scale_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Re s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.YStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) s01j := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.CStride + ((sr.Min.X+int(sx0))/2 - src.Rect.Min.X/2) @@ -2346,12 +2346,12 @@ func (ablInterpolator) scale_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Re s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2371,7 +2371,7 @@ func (ablInterpolator) scale_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Re swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2389,7 +2389,7 @@ func (ablInterpolator) scale_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2460,9 +2460,9 @@ func (ablInterpolator) scale_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Re s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.YStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) s01j := ((sr.Min.Y+int(sy1))/2-src.Rect.Min.Y/2)*src.CStride + ((sr.Min.X+int(sx0))/2 - src.Rect.Min.X/2) @@ -2521,12 +2521,12 @@ func (ablInterpolator) scale_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Re s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2546,7 +2546,7 @@ func (ablInterpolator) scale_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Re swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2564,7 +2564,7 @@ func (ablInterpolator) scale_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2635,9 +2635,9 @@ func (ablInterpolator) scale_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Re s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sr.Min.Y+int(sy1)-src.Rect.Min.Y)*src.YStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) s01j := ((sr.Min.Y+int(sy1))/2-src.Rect.Min.Y/2)*src.CStride + (sr.Min.X + int(sx0) - src.Rect.Min.X) @@ -2696,12 +2696,12 @@ func (ablInterpolator) scale_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Re s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2721,7 +2721,7 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr imag swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2739,7 +2739,7 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr imag d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2762,10 +2762,10 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr imag s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)) s01r := float64(s01u.R) s01g := float64(s01u.G) @@ -2776,14 +2776,14 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr imag s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} pa1 := (0xffff - uint32(p.A)) * 0x101 dst.Pix[d+0] = uint8((uint32(dst.Pix[d+0])*pa1/0xffff + uint32(p.R)) >> 8) @@ -2802,7 +2802,7 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2820,7 +2820,7 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2843,10 +2843,10 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)) s01r := float64(s01u.R) s01g := float64(s01u.G) @@ -2857,14 +2857,14 @@ func (ablInterpolator) scale_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} dst.Pix[d+0] = uint8(p.R >> 8) dst.Pix[d+1] = uint8(p.G >> 8) @@ -2882,7 +2882,7 @@ func (ablInterpolator) scale_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rect swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2900,7 +2900,7 @@ func (ablInterpolator) scale_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -2923,10 +2923,10 @@ func (ablInterpolator) scale_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rect s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)).RGBA() s01r := float64(s01ru) s01g := float64(s01gu) @@ -2937,14 +2937,14 @@ func (ablInterpolator) scale_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rect s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -2966,7 +2966,7 @@ func (ablInterpolator) scale_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Recta swMinus1, shMinus1 := sw-1, sh-1 for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -2984,7 +2984,7 @@ func (ablInterpolator) scale_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Recta d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -3007,10 +3007,10 @@ func (ablInterpolator) scale_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Recta s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)).RGBA() s01r := float64(s01ru) s01g := float64(s01gu) @@ -3021,14 +3021,14 @@ func (ablInterpolator) scale_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Recta s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3052,7 +3052,7 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, a dstColorRGBA64 := color.RGBA64{} for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -3069,7 +3069,7 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, a } for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -3106,10 +3106,10 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, a s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)) if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sr.Min.X+int(sx0), smp.Y+sr.Min.Y+int(sy1)).RGBA() @@ -3134,14 +3134,14 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, a s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} q := dst.RGBA64At(dr.Min.X+int(dx), dr.Min.Y+int(dy)) if dstMask != nil { @@ -3172,7 +3172,7 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, ad dstColorRGBA64 := color.RGBA64{} for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -3189,7 +3189,7 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, ad } for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -3226,10 +3226,10 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, ad s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)) if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sr.Min.X+int(sx0), smp.Y+sr.Min.Y+int(sy1)).RGBA() @@ -3254,14 +3254,14 @@ func (ablInterpolator) scale_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, ad s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} if dstMask != nil { q := dst.RGBA64At(dr.Min.X+int(dx), dr.Min.Y+int(dy)) @@ -3295,7 +3295,7 @@ func (ablInterpolator) scale_Image_Image_Over(dst Image, dr, adr image.Rectangle dstColor := color.Color(dstColorRGBA64) for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -3312,7 +3312,7 @@ func (ablInterpolator) scale_Image_Image_Over(dst Image, dr, adr image.Rectangle } for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -3349,10 +3349,10 @@ func (ablInterpolator) scale_Image_Image_Over(dst Image, dr, adr image.Rectangle s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)).RGBA() if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sr.Min.X+int(sx0), smp.Y+sr.Min.Y+int(sy1)).RGBA() @@ -3377,14 +3377,14 @@ func (ablInterpolator) scale_Image_Image_Over(dst Image, dr, adr image.Rectangle s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3419,7 +3419,7 @@ func (ablInterpolator) scale_Image_Image_Src(dst Image, dr, adr image.Rectangle, dstColor := color.Color(dstColorRGBA64) for dy := int32(adr.Min.Y); dy < int32(adr.Max.Y); dy++ { - sy := (float64(dy)+0.5)*yscale - 0.5 + sy := float64((float64(dy)+0.5)*yscale) - 0.5 // If sy < 0, we will clamp sy0 to 0 anyway, so it doesn't matter if // we say int32(sy) instead of int32(math.Floor(sy)). Similarly for // sx, below. @@ -3436,7 +3436,7 @@ func (ablInterpolator) scale_Image_Image_Src(dst Image, dr, adr image.Rectangle, } for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { - sx := (float64(dx)+0.5)*xscale - 0.5 + sx := float64((float64(dx)+0.5)*xscale) - 0.5 sx0 := int32(sx) xFrac0 := sx - float64(sx0) xFrac1 := 1 - xFrac0 @@ -3473,10 +3473,10 @@ func (ablInterpolator) scale_Image_Image_Src(dst Image, dr, adr image.Rectangle, s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sr.Min.X+int(sx0), sr.Min.Y+int(sy1)).RGBA() if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sr.Min.X+int(sx0), smp.Y+sr.Min.Y+int(sy1)).RGBA() @@ -3501,14 +3501,14 @@ func (ablInterpolator) scale_Image_Image_Src(dst Image, dr, adr image.Rectangle, s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3543,8 +3543,8 @@ func (ablInterpolator) transform_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -3583,15 +3583,15 @@ func (ablInterpolator) transform_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Re s10i := (sy0-src.Rect.Min.Y)*src.Stride + (sx1 - src.Rect.Min.X) s10ru := uint32(src.Pix[s10i]) * 0x101 s10r := float64(s10ru) - s10r = xFrac1*s00r + xFrac0*s10r + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) s01i := (sy1-src.Rect.Min.Y)*src.Stride + (sx0 - src.Rect.Min.X) s01ru := uint32(src.Pix[s01i]) * 0x101 s01r := float64(s01ru) s11i := (sy1-src.Rect.Min.Y)*src.Stride + (sx1 - src.Rect.Min.X) s11ru := uint32(src.Pix[s11i]) * 0x101 s11r := float64(s11ru) - s11r = xFrac1*s01r + xFrac0*s11r - s11r = yFrac1*s10r + yFrac0*s11r + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) pr := uint32(s11r) out := uint8(pr >> 8) dst.Pix[d+0] = out @@ -3608,8 +3608,8 @@ func (ablInterpolator) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image. d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -3660,10 +3660,10 @@ func (ablInterpolator) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image. s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sy1-src.Rect.Min.Y)*src.Stride + (sx0-src.Rect.Min.X)*4 s01au := uint32(src.Pix[s01i+3]) * 0x101 s01ru := uint32(src.Pix[s01i+0]) * s01au / 0xff @@ -3682,14 +3682,14 @@ func (ablInterpolator) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image. s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3709,8 +3709,8 @@ func (ablInterpolator) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -3761,10 +3761,10 @@ func (ablInterpolator) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.R s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sy1-src.Rect.Min.Y)*src.Stride + (sx0-src.Rect.Min.X)*4 s01au := uint32(src.Pix[s01i+3]) * 0x101 s01ru := uint32(src.Pix[s01i+0]) * s01au / 0xff @@ -3783,14 +3783,14 @@ func (ablInterpolator) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.R s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3809,8 +3809,8 @@ func (ablInterpolator) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -3861,10 +3861,10 @@ func (ablInterpolator) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.R s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sy1-src.Rect.Min.Y)*src.Stride + (sx0-src.Rect.Min.X)*4 s01ru := uint32(src.Pix[s01i+0]) * 0x101 s01gu := uint32(src.Pix[s01i+1]) * 0x101 @@ -3883,14 +3883,14 @@ func (ablInterpolator) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.R s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -3910,8 +3910,8 @@ func (ablInterpolator) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Re d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -3962,10 +3962,10 @@ func (ablInterpolator) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Re s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01i := (sy1-src.Rect.Min.Y)*src.Stride + (sx0-src.Rect.Min.X)*4 s01ru := uint32(src.Pix[s01i+0]) * 0x101 s01gu := uint32(src.Pix[s01i+1]) * 0x101 @@ -3984,14 +3984,14 @@ func (ablInterpolator) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Re s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4010,8 +4010,8 @@ func (ablInterpolator) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr imag d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4102,9 +4102,9 @@ func (ablInterpolator) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr imag s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sy1-src.Rect.Min.Y)*src.YStride + (sx0 - src.Rect.Min.X) s01j := (sy1-src.Rect.Min.Y)*src.CStride + (sx0 - src.Rect.Min.X) @@ -4163,12 +4163,12 @@ func (ablInterpolator) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr imag s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4186,8 +4186,8 @@ func (ablInterpolator) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr imag d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4278,9 +4278,9 @@ func (ablInterpolator) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr imag s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sy1-src.Rect.Min.Y)*src.YStride + (sx0 - src.Rect.Min.X) s01j := (sy1-src.Rect.Min.Y)*src.CStride + ((sx0)/2 - src.Rect.Min.X/2) @@ -4339,12 +4339,12 @@ func (ablInterpolator) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr imag s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4362,8 +4362,8 @@ func (ablInterpolator) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr imag d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4454,9 +4454,9 @@ func (ablInterpolator) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr imag s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sy1-src.Rect.Min.Y)*src.YStride + (sx0 - src.Rect.Min.X) s01j := ((sy1)/2-src.Rect.Min.Y/2)*src.CStride + ((sx0)/2 - src.Rect.Min.X/2) @@ -4515,12 +4515,12 @@ func (ablInterpolator) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr imag s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4538,8 +4538,8 @@ func (ablInterpolator) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr imag d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4630,9 +4630,9 @@ func (ablInterpolator) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr imag s10r := float64(s10ru) s10g := float64(s10gu) s10b := float64(s10bu) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) s01i := (sy1-src.Rect.Min.Y)*src.YStride + (sx0 - src.Rect.Min.X) s01j := ((sy1)/2-src.Rect.Min.Y/2)*src.CStride + (sx0 - src.Rect.Min.X) @@ -4691,12 +4691,12 @@ func (ablInterpolator) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr imag s11r := float64(s11ru) s11g := float64(s11gu) s11b := float64(s11bu) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4714,8 +4714,8 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4758,10 +4758,10 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sx0, sy1) s01r := float64(s01u.R) s01g := float64(s01u.G) @@ -4772,14 +4772,14 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} pa1 := (0xffff - uint32(p.A)) * 0x101 dst.Pix[d+0] = uint8((uint32(dst.Pix[d+0])*pa1/0xffff + uint32(p.R)) >> 8) @@ -4796,8 +4796,8 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr i d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4840,10 +4840,10 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr i s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sx0, sy1) s01r := float64(s01u.R) s01g := float64(s01u.G) @@ -4854,14 +4854,14 @@ func (ablInterpolator) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr i s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} dst.Pix[d+0] = uint8(p.R >> 8) dst.Pix[d+1] = uint8(p.G >> 8) @@ -4877,8 +4877,8 @@ func (ablInterpolator) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image. d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -4921,10 +4921,10 @@ func (ablInterpolator) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image. s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sx0, sy1).RGBA() s01r := float64(s01ru) s01g := float64(s01gu) @@ -4935,14 +4935,14 @@ func (ablInterpolator) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image. s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -4962,8 +4962,8 @@ func (ablInterpolator) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -5006,10 +5006,10 @@ func (ablInterpolator) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.R s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sx0, sy1).RGBA() s01r := float64(s01ru) s01g := float64(s01gu) @@ -5020,14 +5020,14 @@ func (ablInterpolator) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.R s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -5049,8 +5049,8 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, d dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -5107,10 +5107,10 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, d s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sx0, sy1) if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sx0, smp.Y+sy1).RGBA() @@ -5135,14 +5135,14 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, d s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} q := dst.RGBA64At(dr.Min.X+int(dx), dr.Min.Y+int(dy)) if dstMask != nil { @@ -5171,8 +5171,8 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -5229,10 +5229,10 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr s10g := float64(s10u.G) s10b := float64(s10u.B) s10a := float64(s10u.A) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01u := src.RGBA64At(sx0, sy1) if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sx0, smp.Y+sy1).RGBA() @@ -5257,14 +5257,14 @@ func (ablInterpolator) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr s11g := float64(s11u.G) s11b := float64(s11u.B) s11a := float64(s11u.A) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) p := color.RGBA64{uint16(s11r), uint16(s11g), uint16(s11b), uint16(s11a)} if dstMask != nil { q := dst.RGBA64At(dr.Min.X+int(dx), dr.Min.Y+int(dy)) @@ -5295,8 +5295,8 @@ func (ablInterpolator) transform_Image_Image_Over(dst Image, dr, adr image.Recta dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -5353,10 +5353,10 @@ func (ablInterpolator) transform_Image_Image_Over(dst Image, dr, adr image.Recta s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sx0, sy1).RGBA() if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sx0, smp.Y+sy1).RGBA() @@ -5381,14 +5381,14 @@ func (ablInterpolator) transform_Image_Image_Over(dst Image, dr, adr image.Recta s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -5420,8 +5420,8 @@ func (ablInterpolator) transform_Image_Image_Src(dst Image, dr, adr image.Rectan dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -5478,10 +5478,10 @@ func (ablInterpolator) transform_Image_Image_Src(dst Image, dr, adr image.Rectan s10g := float64(s10gu) s10b := float64(s10bu) s10a := float64(s10au) - s10r = xFrac1*s00r + xFrac0*s10r - s10g = xFrac1*s00g + xFrac0*s10g - s10b = xFrac1*s00b + xFrac0*s10b - s10a = xFrac1*s00a + xFrac0*s10a + s10r = float64(xFrac1*s00r) + float64(xFrac0*s10r) + s10g = float64(xFrac1*s00g) + float64(xFrac0*s10g) + s10b = float64(xFrac1*s00b) + float64(xFrac0*s10b) + s10a = float64(xFrac1*s00a) + float64(xFrac0*s10a) s01ru, s01gu, s01bu, s01au := src.At(sx0, sy1).RGBA() if srcMask != nil { _, _, _, ma := srcMask.At(smp.X+sx0, smp.Y+sy1).RGBA() @@ -5506,14 +5506,14 @@ func (ablInterpolator) transform_Image_Image_Src(dst Image, dr, adr image.Rectan s11g := float64(s11gu) s11b := float64(s11bu) s11a := float64(s11au) - s11r = xFrac1*s01r + xFrac0*s11r - s11g = xFrac1*s01g + xFrac0*s11g - s11b = xFrac1*s01b + xFrac0*s11b - s11a = xFrac1*s01a + xFrac0*s11a - s11r = yFrac1*s10r + yFrac0*s11r - s11g = yFrac1*s10g + yFrac0*s11g - s11b = yFrac1*s10b + yFrac0*s11b - s11a = yFrac1*s10a + yFrac0*s11a + s11r = float64(xFrac1*s01r) + float64(xFrac0*s11r) + s11g = float64(xFrac1*s01g) + float64(xFrac0*s11g) + s11b = float64(xFrac1*s01b) + float64(xFrac0*s11b) + s11a = float64(xFrac1*s01a) + float64(xFrac0*s11a) + s11r = float64(yFrac1*s10r) + float64(yFrac0*s11r) + s11g = float64(yFrac1*s10g) + float64(yFrac0*s11g) + s11b = float64(yFrac1*s10b) + float64(yFrac0*s11b) + s11a = float64(yFrac1*s10a) + float64(yFrac0*s11a) pr := uint32(s11r) pg := uint32(s11g) pb := uint32(s11b) @@ -5783,7 +5783,7 @@ func (z *kernelScaler) scaleX_Gray(tmp [][4]float64, src *image.Gray, sr image.R for _, c := range z.horizontal.contribs[s.i:s.j] { pi := (sr.Min.Y+int(y)-src.Rect.Min.Y)*src.Stride + (sr.Min.X + int(c.coord) - src.Rect.Min.X) pru := uint32(src.Pix[pi]) * 0x101 - pr += float64(pru) * c.weight + pr += float64(float64(pru) * c.weight) } pr *= s.invTotalWeightFFFF tmp[t] = [4]float64{ @@ -5808,10 +5808,10 @@ func (z *kernelScaler) scaleX_NRGBA(tmp [][4]float64, src *image.NRGBA, sr image pru := uint32(src.Pix[pi+0]) * pau / 0xff pgu := uint32(src.Pix[pi+1]) * pau / 0xff pbu := uint32(src.Pix[pi+2]) * pau / 0xff - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight - pa += float64(pau) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) + pa += float64(float64(pau) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -5835,10 +5835,10 @@ func (z *kernelScaler) scaleX_RGBA(tmp [][4]float64, src *image.RGBA, sr image.R pgu := uint32(src.Pix[pi+1]) * 0x101 pbu := uint32(src.Pix[pi+2]) * 0x101 pau := uint32(src.Pix[pi+3]) * 0x101 - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight - pa += float64(pau) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) + pa += float64(float64(pau) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -5883,9 +5883,9 @@ func (z *kernelScaler) scaleX_YCbCr444(tmp [][4]float64, src *image.YCbCr, sr im pbu = 0xffff } - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -5930,9 +5930,9 @@ func (z *kernelScaler) scaleX_YCbCr422(tmp [][4]float64, src *image.YCbCr, sr im pbu = 0xffff } - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -5977,9 +5977,9 @@ func (z *kernelScaler) scaleX_YCbCr420(tmp [][4]float64, src *image.YCbCr, sr im pbu = 0xffff } - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -6024,9 +6024,9 @@ func (z *kernelScaler) scaleX_YCbCr440(tmp [][4]float64, src *image.YCbCr, sr im pbu = 0xffff } - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -6054,10 +6054,10 @@ func (z *kernelScaler) scaleX_RGBA64Image(tmp [][4]float64, src image.RGBA64Imag pu.B = uint16(uint32(pu.B) * ma / 0xffff) pu.A = uint16(uint32(pu.A) * ma / 0xffff) } - pr += float64(pu.R) * c.weight - pg += float64(pu.G) * c.weight - pb += float64(pu.B) * c.weight - pa += float64(pu.A) * c.weight + pr += float64(float64(pu.R) * c.weight) + pg += float64(float64(pu.G) * c.weight) + pb += float64(float64(pu.B) * c.weight) + pa += float64(float64(pu.A) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -6085,10 +6085,10 @@ func (z *kernelScaler) scaleX_Image(tmp [][4]float64, src image.Image, sr image. pbu = pbu * ma / 0xffff pau = pau * ma / 0xffff } - pr += float64(pru) * c.weight - pg += float64(pgu) * c.weight - pb += float64(pbu) * c.weight - pa += float64(pau) * c.weight + pr += float64(float64(pru) * c.weight) + pg += float64(float64(pgu) * c.weight) + pb += float64(float64(pbu) * c.weight) + pa += float64(float64(pau) * c.weight) } tmp[t] = [4]float64{ pr * s.invTotalWeightFFFF, @@ -6108,10 +6108,10 @@ func (z *kernelScaler) scaleY_RGBA_Over(dst *image.RGBA, dr, adr image.Rectangle var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6145,10 +6145,10 @@ func (z *kernelScaler) scaleY_RGBA_Src(dst *image.RGBA, dr, adr image.Rectangle, var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6179,10 +6179,10 @@ func (z *kernelScaler) scaleY_RGBA64Image_Over(dst RGBA64Image, dr, adr image.Re var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6226,10 +6226,10 @@ func (z *kernelScaler) scaleY_RGBA64Image_Src(dst RGBA64Image, dr, adr image.Rec var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6275,10 +6275,10 @@ func (z *kernelScaler) scaleY_Image_Over(dst Image, dr, adr image.Rectangle, tmp var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6322,10 +6322,10 @@ func (z *kernelScaler) scaleY_Image_Src(dst Image, dr, adr image.Rectangle, tmp var pr, pg, pb, pa float64 for _, c := range z.vertical.contribs[s.i:s.j] { p := &tmp[c.coord*z.dw+dx] - pr += p[0] * c.weight - pg += p[1] * c.weight - pb += p[2] * c.weight - pa += p[3] * c.weight + pr += float64(p[0] * c.weight) + pg += float64(p[1] * c.weight) + pb += float64(p[2] * c.weight) + pa += float64(p[3] * c.weight) } if pr > pa { @@ -6384,8 +6384,8 @@ func (q *Kernel) transform_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rectangl d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -6447,7 +6447,7 @@ func (q *Kernel) transform_RGBA_Gray_Src(dst *image.RGBA, dr, adr image.Rectangl if w := xWeights[kx-ix] * yWeight; w != 0 { pi := (ky-src.Rect.Min.Y)*src.Stride + (kx - src.Rect.Min.X) pru := uint32(src.Pix[pi]) * 0x101 - pr += float64(pru) * w + pr += float64(float64(pru) * w) } } } @@ -6483,8 +6483,8 @@ func (q *Kernel) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rectan d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -6549,10 +6549,10 @@ func (q *Kernel) transform_RGBA_NRGBA_Over(dst *image.RGBA, dr, adr image.Rectan pru := uint32(src.Pix[pi+0]) * pau / 0xff pgu := uint32(src.Pix[pi+1]) * pau / 0xff pbu := uint32(src.Pix[pi+2]) * pau / 0xff - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -6603,8 +6603,8 @@ func (q *Kernel) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Rectang d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -6669,10 +6669,10 @@ func (q *Kernel) transform_RGBA_NRGBA_Src(dst *image.RGBA, dr, adr image.Rectang pru := uint32(src.Pix[pi+0]) * pau / 0xff pgu := uint32(src.Pix[pi+1]) * pau / 0xff pbu := uint32(src.Pix[pi+2]) * pau / 0xff - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -6718,8 +6718,8 @@ func (q *Kernel) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Rectang d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -6784,10 +6784,10 @@ func (q *Kernel) transform_RGBA_RGBA_Over(dst *image.RGBA, dr, adr image.Rectang pgu := uint32(src.Pix[pi+1]) * 0x101 pbu := uint32(src.Pix[pi+2]) * 0x101 pau := uint32(src.Pix[pi+3]) * 0x101 - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -6838,8 +6838,8 @@ func (q *Kernel) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectangl d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -6904,10 +6904,10 @@ func (q *Kernel) transform_RGBA_RGBA_Src(dst *image.RGBA, dr, adr image.Rectangl pgu := uint32(src.Pix[pi+1]) * 0x101 pbu := uint32(src.Pix[pi+2]) * 0x101 pau := uint32(src.Pix[pi+3]) * 0x101 - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -6953,8 +6953,8 @@ func (q *Kernel) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7040,9 +7040,9 @@ func (q *Kernel) transform_RGBA_YCbCr444_Src(dst *image.RGBA, dr, adr image.Rect pbu = 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) } } } @@ -7077,8 +7077,8 @@ func (q *Kernel) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7164,9 +7164,9 @@ func (q *Kernel) transform_RGBA_YCbCr422_Src(dst *image.RGBA, dr, adr image.Rect pbu = 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) } } } @@ -7201,8 +7201,8 @@ func (q *Kernel) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7288,9 +7288,9 @@ func (q *Kernel) transform_RGBA_YCbCr420_Src(dst *image.RGBA, dr, adr image.Rect pbu = 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) } } } @@ -7325,8 +7325,8 @@ func (q *Kernel) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Rect d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7412,9 +7412,9 @@ func (q *Kernel) transform_RGBA_YCbCr440_Src(dst *image.RGBA, dr, adr image.Rect pbu = 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) } } } @@ -7449,8 +7449,8 @@ func (q *Kernel) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr image. d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7511,10 +7511,10 @@ func (q *Kernel) transform_RGBA_RGBA64Image_Over(dst *image.RGBA, dr, adr image. for kx := ix; kx < jx; kx++ { if w := xWeights[kx-ix] * yWeight; w != 0 { pu := src.RGBA64At(kx, ky) - pr += float64(pu.R) * w - pg += float64(pu.G) * w - pb += float64(pu.B) * w - pa += float64(pu.A) * w + pr += float64(float64(pu.R) * w) + pg += float64(float64(pu.G) * w) + pb += float64(float64(pu.B) * w) + pa += float64(float64(pu.A) * w) } } } @@ -7565,8 +7565,8 @@ func (q *Kernel) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image.R d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7627,10 +7627,10 @@ func (q *Kernel) transform_RGBA_RGBA64Image_Src(dst *image.RGBA, dr, adr image.R for kx := ix; kx < jx; kx++ { if w := xWeights[kx-ix] * yWeight; w != 0 { pu := src.RGBA64At(kx, ky) - pr += float64(pu.R) * w - pg += float64(pu.G) * w - pb += float64(pu.B) * w - pa += float64(pu.A) * w + pr += float64(float64(pu.R) * w) + pg += float64(float64(pu.G) * w) + pb += float64(float64(pu.B) * w) + pa += float64(float64(pu.A) * w) } } } @@ -7676,8 +7676,8 @@ func (q *Kernel) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rectan d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7738,10 +7738,10 @@ func (q *Kernel) transform_RGBA_Image_Over(dst *image.RGBA, dr, adr image.Rectan for kx := ix; kx < jx; kx++ { if w := xWeights[kx-ix] * yWeight; w != 0 { pru, pgu, pbu, pau := src.At(kx, ky).RGBA() - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -7792,8 +7792,8 @@ func (q *Kernel) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Rectang d := (dr.Min.Y+int(dy)-dst.Rect.Min.Y)*dst.Stride + (dr.Min.X+adr.Min.X-dst.Rect.Min.X)*4 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7854,10 +7854,10 @@ func (q *Kernel) transform_RGBA_Image_Src(dst *image.RGBA, dr, adr image.Rectang for kx := ix; kx < jx; kx++ { if w := xWeights[kx-ix] * yWeight; w != 0 { pru, pgu, pbu, pau := src.At(kx, ky).RGBA() - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -7906,8 +7906,8 @@ func (q *Kernel) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, adr dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -7975,10 +7975,10 @@ func (q *Kernel) transform_RGBA64Image_RGBA64Image_Over(dst RGBA64Image, dr, adr pu.B = uint16(uint32(pu.B) * ma / 0xffff) pu.A = uint16(uint32(pu.A) * ma / 0xffff) } - pr += float64(pu.R) * w - pg += float64(pu.G) * w - pb += float64(pu.B) * w - pa += float64(pu.A) * w + pr += float64(float64(pu.R) * w) + pg += float64(float64(pu.G) * w) + pb += float64(float64(pu.B) * w) + pa += float64(float64(pu.A) * w) } } } @@ -8041,8 +8041,8 @@ func (q *Kernel) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, adr dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -8110,10 +8110,10 @@ func (q *Kernel) transform_RGBA64Image_RGBA64Image_Src(dst RGBA64Image, dr, adr pu.B = uint16(uint32(pu.B) * ma / 0xffff) pu.A = uint16(uint32(pu.A) * ma / 0xffff) } - pr += float64(pu.R) * w - pg += float64(pu.G) * w - pb += float64(pu.B) * w - pa += float64(pu.A) * w + pr += float64(float64(pu.R) * w) + pg += float64(float64(pu.G) * w) + pb += float64(float64(pu.B) * w) + pa += float64(float64(pu.A) * w) } } } @@ -8178,8 +8178,8 @@ func (q *Kernel) transform_Image_Image_Over(dst Image, dr, adr image.Rectangle, dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -8247,10 +8247,10 @@ func (q *Kernel) transform_Image_Image_Over(dst Image, dr, adr image.Rectangle, pbu = pbu * ma / 0xffff pau = pau * ma / 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } @@ -8313,8 +8313,8 @@ func (q *Kernel) transform_Image_Image_Src(dst Image, dr, adr image.Rectangle, d dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx := d2s[0]*dxf + d2s[1]*dyf + d2s[2] - sy := d2s[3]*dxf + d2s[4]*dyf + d2s[5] + sx := float64(d2s[0]*dxf) + float64(d2s[1]*dyf) + d2s[2] + sy := float64(d2s[3]*dxf) + float64(d2s[4]*dyf) + d2s[5] if !(image.Point{int(sx) + bias.X, int(sy) + bias.Y}).In(sr) { continue } @@ -8382,10 +8382,10 @@ func (q *Kernel) transform_Image_Image_Src(dst Image, dr, adr image.Rectangle, d pbu = pbu * ma / 0xffff pau = pau * ma / 0xffff } - pr += float64(pru) * w - pg += float64(pgu) * w - pb += float64(pbu) * w - pa += float64(pau) * w + pr += float64(float64(pru) * w) + pg += float64(float64(pgu) * w) + pb += float64(float64(pbu) * w) + pa += float64(float64(pau) * w) } } } diff --git a/vendor/golang.org/x/image/draw/scale.go b/vendor/golang.org/x/image/draw/scale.go index ba1bdf3c..aef200b2 100644 --- a/vendor/golang.org/x/image/draw/scale.go +++ b/vendor/golang.org/x/image/draw/scale.go @@ -182,9 +182,9 @@ var ( // Computer Graphics", Computer Graphics, Vol. 22, No. 4, pp. 221-228. CatmullRom = &Kernel{2, func(t float64) float64 { if t < 1 { - return (1.5*t-2.5)*t*t + 1 + return float64((float64(1.5*t)-2.5)*t*t) + 1 } - return ((-0.5*t+2.5)*t-4)*t + 2 + return float64((float64(float64(float64(-0.5*t)+2.5)*t)-4)*t) + 2 }} // TODO: a Kaiser-Bessel kernel? @@ -247,7 +247,7 @@ func newDistrib(q *Kernel, dw, sw int32) distrib { // source column or row. n, sources := int32(0), make([]source, dw) for x := range sources { - center := (float64(x)+0.5)*scale - 0.5 + center := float64((float64(x)+0.5)*scale) - 0.5 i := int32(math.Floor(center - halfWidth)) if i < 0 { i = 0 @@ -302,7 +302,7 @@ func abs(f float64) float64 { // ftou converts the range [0.0, 1.0] to [0, 0xffff]. func ftou(f float64) uint16 { - i := int32(0xffff*f + 0.5) + i := int32(float64(0xffff*f) + 0.5) if i > 0xffff { return 0xffff } @@ -332,12 +332,12 @@ func fffftou(f float64) uint16 { func invert(m *f64.Aff3) f64.Aff3 { m00 := +m[3*1+1] m01 := -m[3*0+1] - m02 := +m[3*1+2]*m[3*0+1] - m[3*1+1]*m[3*0+2] + m02 := +float64(m[3*1+2]*m[3*0+1]) - float64(m[3*1+1]*m[3*0+2]) m10 := -m[3*1+0] m11 := +m[3*0+0] - m12 := +m[3*1+0]*m[3*0+2] - m[3*1+2]*m[3*0+0] + m12 := +float64(m[3*1+0]*m[3*0+2]) - float64(m[3*1+2]*m[3*0+0]) - det := m00*m11 - m10*m01 + det := float64(m00*m11) - float64(m10*m01) return f64.Aff3{ m00 / det, @@ -351,12 +351,12 @@ func invert(m *f64.Aff3) f64.Aff3 { func matMul(p, q *f64.Aff3) f64.Aff3 { return f64.Aff3{ - p[3*0+0]*q[3*0+0] + p[3*0+1]*q[3*1+0], - p[3*0+0]*q[3*0+1] + p[3*0+1]*q[3*1+1], - p[3*0+0]*q[3*0+2] + p[3*0+1]*q[3*1+2] + p[3*0+2], - p[3*1+0]*q[3*0+0] + p[3*1+1]*q[3*1+0], - p[3*1+0]*q[3*0+1] + p[3*1+1]*q[3*1+1], - p[3*1+0]*q[3*0+2] + p[3*1+1]*q[3*1+2] + p[3*1+2], + float64(p[3*0+0]*q[3*0+0]) + float64(p[3*0+1]*q[3*1+0]), + float64(p[3*0+0]*q[3*0+1]) + float64(p[3*0+1]*q[3*1+1]), + float64(p[3*0+0]*q[3*0+2]) + float64(p[3*0+1]*q[3*1+2]) + p[3*0+2], + float64(p[3*1+0]*q[3*0+0]) + float64(p[3*1+1]*q[3*1+0]), + float64(p[3*1+0]*q[3*0+1]) + float64(p[3*1+1]*q[3*1+1]), + float64(p[3*1+0]*q[3*0+2]) + float64(p[3*1+1]*q[3*1+2]) + p[3*1+2], } } @@ -371,8 +371,8 @@ func transformRect(s2d *f64.Aff3, sr *image.Rectangle) (dr image.Rectangle) { for i, p := range ps { sxf := float64(p.X) syf := float64(p.Y) - dx := int(math.Floor(s2d[0]*sxf + s2d[1]*syf + s2d[2])) - dy := int(math.Floor(s2d[3]*sxf + s2d[4]*syf + s2d[5])) + dx := int(math.Floor(float64(s2d[0]*sxf) + float64(s2d[1]*syf) + s2d[2])) + dy := int(math.Floor(float64(s2d[3]*sxf) + float64(s2d[4]*syf) + s2d[5])) // The +1 adjustments below are because an image.Rectangle is inclusive // on the low end but exclusive on the high end. @@ -428,8 +428,8 @@ func transform_Uniform(dst Image, dr, adr image.Rectangle, d2s *f64.Aff3, src *i d := dst.PixOffset(dr.Min.X+adr.Min.X, dr.Min.Y+int(dy)) for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -450,8 +450,8 @@ func transform_Uniform(dst Image, dr, adr image.Rectangle, d2s *f64.Aff3, src *i dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -479,8 +479,8 @@ func transform_Uniform(dst Image, dr, adr image.Rectangle, d2s *f64.Aff3, src *i d := dst.PixOffset(dr.Min.X+adr.Min.X, dr.Min.Y+int(dy)) for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx, d = dx+1, d+4 { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } @@ -505,8 +505,8 @@ func transform_Uniform(dst Image, dr, adr image.Rectangle, d2s *f64.Aff3, src *i dyf := float64(dr.Min.Y+int(dy)) + 0.5 for dx := int32(adr.Min.X); dx < int32(adr.Max.X); dx++ { dxf := float64(dr.Min.X+int(dx)) + 0.5 - sx0 := int(d2s[0]*dxf+d2s[1]*dyf+d2s[2]) + bias.X - sy0 := int(d2s[3]*dxf+d2s[4]*dyf+d2s[5]) + bias.Y + sx0 := int(float64(d2s[0]*dxf)+float64(d2s[1]*dyf)+d2s[2]) + bias.X + sy0 := int(float64(d2s[3]*dxf)+float64(d2s[4]*dyf)+d2s[5]) + bias.Y if !(image.Point{sx0, sy0}).In(sr) { continue } diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE index 6a66aea5..2a7cf70d 100644 --- a/vendor/golang.org/x/text/LICENSE +++ b/vendor/golang.org/x/text/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/modules.txt b/vendor/modules.txt index ed4e4c87..44e42ca4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -38,7 +38,7 @@ github.com/tklauser/numcpus # github.com/yusufpapurcu/wmi v1.2.4 ## explicit; go 1.16 github.com/yusufpapurcu/wmi -# golang.org/x/image v0.15.0 +# golang.org/x/image v0.21.0 ## explicit; go 1.18 golang.org/x/image/draw golang.org/x/image/math/f64 @@ -47,7 +47,7 @@ golang.org/x/image/math/f64 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/text v0.14.0 +# golang.org/x/text v0.19.0 ## explicit; go 1.18 golang.org/x/text/encoding golang.org/x/text/encoding/internal