Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for slowPaeth (0.11 sec)

  1. src/image/png/paeth_test.go

    import (
    	"bytes"
    	"math/rand"
    	"testing"
    )
    
    func slowAbs(x int) int {
    	if x < 0 {
    		return -x
    	}
    	return x
    }
    
    // slowPaeth is a slow but simple implementation of the Paeth function.
    // It is a straight port of the sample code in the PNG spec, section 9.4.
    func slowPaeth(a, b, c uint8) uint8 {
    	p := int(a) + int(b) - int(c)
    	pa := slowAbs(p - int(a))
    	pb := slowAbs(p - int(b))
    	pc := slowAbs(p - int(c))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 2.2K bytes
    - Viewed (0)
  2. src/image/jpeg/huffman.go

    			if d.bytes.nUnreadable != 0 {
    				d.unreadByteStuffedByte()
    			}
    			goto slowPath
    		}
    	}
    	if v := h.lut[(d.bits.a>>uint32(d.bits.n-lutSize))&0xff]; v != 0 {
    		n := (v & 0xff) - 1
    		d.bits.n -= int32(n)
    		d.bits.m >>= n
    		return uint8(v >> 8), nil
    	}
    
    slowPath:
    	for i, code := 0, int32(0); i < maxCodeLength; i++ {
    		if d.bits.n == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top