encode

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Overview

Package encode provides common code to run Chrome binary tests for video encoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAccelVideoPerfTest

func RunAccelVideoPerfTest(ctxForDefer context.Context, s *testing.State, opts TestOptions) error

RunAccelVideoPerfTest runs video_encode_accelerator_perf_tests with the specified video file. - Uncapped performance: the specified test video is encoded for 300 frames by the hardware encoder as fast as possible. This provides an estimate of the decoder's max performance (e.g. the maximum FPS). - Capped performance: the specified test video is encoded for 300 frames by the hardware encoder at 30fps. This is used to measure cpu usage and power consumption in the practical case. - Quality performance: the specified test video is encoded for 300 frames and computes the SSIM and PSNR metrics of the encoded stream. - Multiple concurrent performance: the specified test video is encoded with multiple concurrent encoders as fast as possible.

func RunAccelVideoTest

func RunAccelVideoTest(ctxForDefer context.Context, s *testing.State, opts TestOptions)

RunAccelVideoTest runs all tests in video_encode_accelerator_tests.

func TestData

func TestData(webmFileName string) []string

TestData returns the files used in video.EncodeAccel(Perf), the webm file and the json file returned by encode.YUVJSONFileNameFor().

func YUVJSONFileNameFor

func YUVJSONFileNameFor(webMFileName string) string

YUVJSONFileNameFor returns the json file name used in video.EncodeAccel with |webmMFileName|. For example, if |webMFileName| is bear-320x192.vp9.webm, then bear-320x192.yuv.json is returned.

Types

type TestOptions

type TestOptions struct {
	// contains filtered or unexported fields
}

TestOptions is the options for runAccelVideoTest.

func MakeBitrateTestOptions

func MakeBitrateTestOptions(webMName string, profile videotype.CodecProfile, bitrate int) TestOptions

MakeBitrateTestOptions creates TestOptions from webMName and codec. spatialLayers and temporalLayers are set to 1. Sets bitrate for testing quality changes.

func MakeTestOptions

func MakeTestOptions(webMName string, profile videotype.CodecProfile) TestOptions

MakeTestOptions creates TestOptions from webMName and profile. spatialLayers and temporalLayers are set to 1.

func MakeTestOptionsWithNoGlobalVaapiLock

func MakeTestOptionsWithNoGlobalVaapiLock(webMName string, profile videotype.CodecProfile) TestOptions

MakeTestOptionsWithNoGlobalVaapiLock creates TestOptions from webMName and profile. spatialLayers and temporalLayers are set to 1. Always disables the global VAAPI lock.

func MakeTestOptionsWithSVCLayers

func MakeTestOptionsWithSVCLayers(webMName string, profile videotype.CodecProfile, svc string) TestOptions

MakeTestOptionsWithSVCLayers creates TestOptions from webMName, profile, svc. svc is the string defined in https://w3c.github.io/webrtc-svc/#scalabilitymodes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL