Documentation
¶
Overview ¶
Package encodetest runs hardware encoders on synthetic GPU frames for the encode, decode and player tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Device ¶
Device opens a D3D11 device on the first adapter whose name contains match, or skips the test when there is none.
Types ¶
type Result ¶
type Result struct {
Latency bench.Summary // ms from Encode's call to its return
Kbps float64 // output bit rate over the measured frames
Keyframes int
// AllocsPerFrame is Go heap allocations per measured frame, process wide.
AllocsPerFrame float64
Packets [][]byte // every packet, warm-up included, when Keep is set
}
Result summarizes an encode run.
type Run ¶
type Run struct {
Frames int // measured frames, after a 30-frame warm-up
Paced bool // submit at cfg.FPS instead of back to back
FPS int
// ForceKey lists frame indexes (warm-up included) to force as keyframes;
// frame 0 always is.
ForceKey map[int]bool
Keep bool
// Each, when set, runs after each frame with its index and packet.
Each func(i int, pkt encode.Packet)
}
Run options.