Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for fdct (0.04 sec)

  1. src/image/jpeg/fdct.go

    	fix_2_053119869 = 16819
    	fix_2_562915447 = 20995
    	fix_3_072711026 = 25172
    )
    
    const (
    	constBits     = 13
    	pass1Bits     = 2
    	centerJSample = 128
    )
    
    // fdct performs a forward DCT on an 8x8 block of coefficients, including a
    // level shift.
    func fdct(b *block) {
    	// Pass 1: process rows.
    	for y := 0; y < 8; y++ {
    		y8 := y * 8
    		s := b[y8 : y8+8 : y8+8] // Small cap improves performance, see https://golang.org/issue/27857
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 23:18:37 UTC 2019
    - 6K bytes
    - Viewed (0)
  2. src/image/jpeg/dct_test.go

    			got[j] = got[j]/8 + 128
    		}
    		if differ(&got, &want) {
    			t.Errorf("i=%d: IDCT(FDCT)\nsrc\n%s\ngot\n%s\nwant\n%s\n", i, &b, &got, &want)
    		}
    	}
    
    	// Check that the optimized and slow FDCT implementations agree.
    	// The fdct function already does a scale and level shift.
    	for i, b := range blocks {
    		got, want := b, b
    		fdct(&got)
    		for j := range want {
    			want[j] = (want[j] - 128) * 8
    		}
    		slowFDCT(&want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  3. test/typeparam/fact.go

    package main
    
    import "fmt"
    
    func fact[T interface{ ~int | ~int64 | ~float64 }](n T) T {
    	if n == 1 {
    		return 1
    	}
    	return n * fact(n-1)
    }
    
    func main() {
    	const want = 120
    
    	if got := fact(5); got != want {
    		panic(fmt.Sprintf("got %d, want %d", got, want))
    	}
    
    	if got := fact[int64](5); got != want {
    		panic(fmt.Sprintf("got %d, want %d", got, want))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 618 bytes
    - Viewed (0)
  4. src/image/jpeg/idct.go

    		s[5] = (x0 - x4) >> 8
    		s[6] = (x3 - x2) >> 8
    		s[7] = (x7 - x1) >> 8
    	}
    
    	// Vertical 1-D IDCT.
    	for x := 0; x < 8; x++ {
    		// Similar to the horizontal 1-D IDCT case, if all the AC components are zero, then the IDCT is trivial.
    		// However, after performing the horizontal 1-D IDCT, there are typically non-zero AC components, so
    		// we do not bother to check for the all-zero case.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 23:18:37 UTC 2019
    - 5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/analysis.go

    	ImportPackageFact func(pkg *types.Package, fact Fact) bool
    
    	// ExportObjectFact associates a fact of type *T with the obj,
    	// replacing any previous fact of that type.
    	//
    	// ExportObjectFact panics if it is called after the pass is
    	// complete, or if obj does not belong to the package being analyzed.
    	// ExportObjectFact is not concurrency-safe.
    	ExportObjectFact func(obj types.Object, fact Fact)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. test/peano.go

    	check(mul(gen(3), zero()), 0)
    	check(mul(zero(), gen(4)), 0)
    	check(mul(gen(3), add1(zero())), 3)
    	check(mul(add1(zero()), gen(4)), 4)
    	check(mul(gen(3), gen(4)), 12)
    
    	check(fact(zero()), 1)
    	check(fact(add1(zero())), 1)
    	check(fact(gen(5)), 120)
    }
    
    // -------------------------------------
    // Factorial
    
    var results = [...]int{
    	1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800,
    	39916800, 479001600,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 30 19:39:18 UTC 2018
    - 2.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/validate.go

    // that the Doc is not empty;
    // that the Run is non-nil;
    // that the Requires graph is acyclic;
    // that analyzer fact types are unique;
    // that each fact type is a pointer.
    //
    // Analyzer names need not be unique, though this may be confusing.
    func Validate(analyzers []*Analyzer) error {
    	// Map each fact type to its sole generating analyzer.
    	factTypes := make(map[reflect.Type]*Analyzer)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:52:54 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  8. test/typeparam/factimp.dir/main.go

    package main
    
    import (
    	"./a"
    	"fmt"
    )
    
    func main() {
    	const want = 120
    
    	if got := a.Fact(5); got != want {
    		panic(fmt.Sprintf("got %d, want %d", got, want))
    	}
    
    	if got := a.Fact[int64](5); got != want {
    		panic(fmt.Sprintf("got %d, want %d", got, want))
    	}
    
    	if got := a.Fact(5.0); got != want {
    		panic(fmt.Sprintf("got %f, want %f", got, want))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 516 bytes
    - Viewed (0)
  9. test/strength.go

    package main
    
    import "fmt"
    
    func testMul(fact, bits int) string {
    	n := fmt.Sprintf("testMul_%d_%d", fact, bits)
    	fmt.Printf("func %s(s int%d) {\n", n, bits)
    
    	want := 0
    	for i := 0; i < 200; i++ {
    		fmt.Printf(`	if want, got := int%d(%d), s*%d; want != got {
    		failed = true
    		fmt.Printf("got %d * %%d == %%d, wanted %d\n",  s, got)
    	}
    `, bits, want, i, i, want)
    		want += fact
    	}
    
    	fmt.Printf("}\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Sep 08 17:28:20 UTC 2019
    - 1K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivate.java

                throws MisconfiguredToolchainException {
            List<ToolchainPrivate> toRet = new ArrayList<>();
    
            ToolchainFactory fact = factories.get(type);
            if (fact == null) {
                logger.error("Missing toolchain factory for type: " + type + ". Possibly caused by misconfigured project.");
            } else {
                List<ToolchainModel> availableToolchains =
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 08:39:32 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top