- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 363 for fdct (0.14 sec)
-
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) -
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) -
src/image/jpeg/writer.go
} } // writeBlock writes a block of pixel data using the given quantization table, // returning the post-quantized DC value of the DCT-transformed block. b is in // natural (not zig-zag) order. func (e *encoder) writeBlock(b *block, q quantIndex, prevDC int32) int32 { fdct(b) // Emit the DC delta. dc := div(b[0], 8*int32(e.quant[q][0])) e.emitHuffRLE(huffIndex(2*q+0), 0, dc-prevDC) // Emit the AC components.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 17.1K bytes - Viewed (0) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/internal/facts/facts.go
// TODO(adonovan): audit for other possibilities. logf("no object for path: %v; discarding %s", err, f.Fact) continue } key.obj = obj logf("read %T fact %s for %v", f.Fact, f.Fact, key.obj) } else { // package fact logf("read %T fact %s for %v", f.Fact, f.Fact, factPkg) } m[key] = f.Fact } } return &Set{pkg: d.pkg, m: m}, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 12.1K bytes - Viewed (0) -
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) -
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) -
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) -
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)