Home | History | Annotate | Download | only in png

Lines Matching refs:cr

46 	cr      [nFilter][]uint8
203 // The return value is the index of the filter and also of the row in cr that has had it applied.
204 func filter(cr *[nFilter][]byte, pr []byte, bpp int) int {
209 cdat0 := cr[0][1:]
210 cdat1 := cr[1][1:]
211 cdat2 := cr[2][1:]
212 cdat3 := cr[3][1:]
213 cdat4 := cr[4][1:]
333 // cr[*] and pr are the bytes for the current and previous row.
334 // cr[0] is unfiltered (or equivalently, filtered with the ftNone filter).
335 // cr[ft], for non-zero filter types ft, are buffers for transforming cr[0] under the
337 // The +1 is for the per-row filter type, which is at cr[*][0].
340 for i := range e.cr {
341 if cap(e.cr[i]) < sz {
342 e.cr[i] = make([]uint8, sz)
344 e.cr[i] = e.cr[i][:sz]
346 e.cr[i][0] = uint8(i)
348 cr := e.cr
369 copy(cr[0][1:], gray.Pix[offset:offset+b.Dx()])
373 cr[0][i] = c.Y
379 cr0 := cr[0]
407 copy(cr[0][1:], paletted.Pix[offset:offset+b.Dx()])
411 cr[0][i] = pi.ColorIndexAt(x, y)
418 copy(cr[0][1:], nrgba.Pix[offset:offset+b.Dx()*4])
423 cr[0][i+0] = c.R
424 cr[0][i+1] = c.G
425 cr[0][i+2] = c.B
426 cr[0][i+3] = c.A
433 cr[0][i+0] = uint8(c.Y >> 8)
434 cr[0][i+1] = uint8(c.Y)
441 cr[0][i+0] = uint8(r >> 8)
442 cr[0][i+1] = uint8(r)
443 cr[0][i+2] = uint8(g >> 8)
444 cr[0][i+3] = uint8(g)
445 cr[0][i+4] = uint8(b >> 8)
446 cr[0][i+5] = uint8(b)
453 cr[0][i+0] = uint8(c.R >> 8)
454 cr[0][i+1] = uint8(c.R)
455 cr[0][i+2] = uint8(c.G >> 8)
456 cr[0][i+3] = uint8(c.G)
457 cr[0][i+4] = uint8(c.B >> 8)
458 cr[0][i+5] = uint8(c.B)
459 cr[0][i+6] = uint8(c.A >> 8)
460 cr[0][i+7] = uint8(c.A)
471 f = filter(&cr, pr, bpp)
475 if _, err := e.zw.Write(cr[f]); err != nil {
480 pr, cr[0] = cr[0], pr