nvenc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nvenc provides low-level Go bindings for the NVIDIA video encoder.

NVENC is reached differently from the rest of the CUDA libraries. The shared library exports two symbols, CreateInstance and GetMaxSupportedVersion; every other entry point arrives as a function pointer that the driver writes into a FunctionList. Fill in the list's Version field with the constant for the API revision the program was built against, pass it to CreateInstance, then call Bind once to turn the table into callable Go functions.

The structures here carry the layout the compiler measured for the vendored headers, and layout_test.go asserts every field offset. A structure passed to the driver must have its Version field set to the matching *Ver constant: the driver reads that field first and rejects a structure whose revision it does not recognise, so a zero Version is the most common way for a correct-looking call to fail.

What this package does not do: it does not manage an encode session, allocate input or bitstream buffers, or drive the encode loop. It is the ABI, not a codec. The nvenc_physical build tag selects a hardware test that requires a compatible driver API version, a CUDA device, and FFmpeg for independent decoding.

Example

Example fills in the function table and lists the codecs the encoder supports. It returns early when the NVENC library is not available.

This is the shape of every NVENC program: the shared library exports only two symbols, so the driver writes the rest of the entry points into a FunctionList whose Version says which API revision the caller was built against. Bind turns that table into callable Go functions. Opening a session then takes a current CUDA context from the driver package.

package main

import (
	"fmt"
	"unsafe"

	"github.com/tmc/lib/nvidia/nvenc"
)

func main() {
	var max uint32
	if _, err := nvenc.GetMaxSupportedVersion(&max); err != nil {
		fmt.Println("NVENC unavailable:", err)
		return
	}

	list := nvenc.FunctionList{Version: nvenc.FunctionListVer}
	if status, err := nvenc.CreateInstance(&list); err != nil {
		fmt.Println("create instance:", err)
		return
	} else if status != nvenc.Success {
		fmt.Println("create instance:", nvenc.Err(status))
		return
	}
	api, err := nvenc.Bind(&list)
	if err != nil {
		fmt.Println("bind:", err)
		return
	}

	// session is the encoder session opened against a CUDA context; see
	// NvEncOpenEncodeSession and NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS.
	var session unsafe.Pointer

	var count uint32
	if status := api.NvEncGetEncodeGUIDCount(session, &count); status != nvenc.Success {
		fmt.Println("guid count:", nvenc.Err(status))
		return
	}
	guids := make([]nvenc.GUID, count)
	if status := api.NvEncGetEncodeGUIDs(session, &guids[0], count, &count); status != nvenc.Success {
		fmt.Println("guids:", nvenc.Err(status))
		return
	}
	fmt.Printf("API %#x, %d encode GUIDs\n", max, count)
}

Index

Examples

Constants

View Source
const (
	APIMajorVersion              = 0xd        // NVENCAPI_MAJOR_VERSION
	APIMinorVersion              = 0x0        // NVENCAPI_MINOR_VERSION
	APIVersion                   = 0xd        // NVENCAPI_VERSION
	InfiniteGoplength            = 0xffffffff // NVENC_INFINITE_GOPLENGTH
	FunctionListVer              = 0x7002000d // NV_ENCODE_API_FUNCTION_LIST_VER
	CapsParamVer                 = 0x7001000d // NV_ENC_CAPS_PARAM_VER
	ConfigVer                    = 0xf009000d // NV_ENC_CONFIG_VER
	CreateBitstreamBufferVer     = 0x7001000d // NV_ENC_CREATE_BITSTREAM_BUFFER_VER
	CreateInputBufferVer         = 0x7002000d // NV_ENC_CREATE_INPUT_BUFFER_VER
	CreateMvBufferVer            = 0x7002000d // NV_ENC_CREATE_MV_BUFFER_VER
	EncodeOutParamsVer           = 0x7001000d // NV_ENC_ENCODE_OUT_PARAMS_VER
	EventParamsVer               = 0x7002000d // NV_ENC_EVENT_PARAMS_VER
	FencePointD3d12Ver           = 0x7001000d // NV_ENC_FENCE_POINT_D3D12_VER
	InitializeParamsVer          = 0xf007000d // NV_ENC_INITIALIZE_PARAMS_VER
	InputResourceD3d12Ver        = 0x7001000d // NV_ENC_INPUT_RESOURCE_D3D12_VER
	LockBitstreamVer             = 0xf002000d // NV_ENC_LOCK_BITSTREAM_VER
	LockInputBufferVer           = 0x7001000d // NV_ENC_LOCK_INPUT_BUFFER_VER
	LookaheadPicParamsVer        = 0x7002000d // NV_ENC_LOOKAHEAD_PIC_PARAMS_VER
	MapInputResourceVer          = 0x7004000d // NV_ENC_MAP_INPUT_RESOURCE_VER
	MeonlyParamsVer              = 0x7004000d // NV_ENC_MEONLY_PARAMS_VER
	OpenEncodeSessionExParamsVer = 0x7001000d // NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER
	OutputResourceD3d12Ver       = 0x7001000d // NV_ENC_OUTPUT_RESOURCE_D3D12_VER
	OutputStatsBlockVer          = 0x7001000d // NV_ENC_OUTPUT_STATS_BLOCK_VER
	OutputStatsRowVer            = 0x7001000d // NV_ENC_OUTPUT_STATS_ROW_VER
	PicParamsMvcVer              = 0x7001000d // NV_ENC_PIC_PARAMS_MVC_VER
	PicParamsVer                 = 0xf007000d // NV_ENC_PIC_PARAMS_VER
	PresetConfigVer              = 0xf005000d // NV_ENC_PRESET_CONFIG_VER
	RcParamsVer                  = 0x7001000d // NV_ENC_RC_PARAMS_VER
	ReconfigureParamsVer         = 0xf002000d // NV_ENC_RECONFIGURE_PARAMS_VER
	RegisterResourceVer          = 0x7005000d // NV_ENC_REGISTER_RESOURCE_VER
	RestoreEncoderStateParamsVer = 0x7002000d // NV_ENC_RESTORE_ENCODER_STATE_PARAMS_VER
	SequenceParamPayloadVer      = 0x7001000d // NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER
	StatVer                      = 0x7002000d // NV_ENC_STAT_VER
	MaxSeqHdrLen                 = 0x200      // NV_MAX_SEQ_HDR_LEN
	MaxTileColsAV1               = 0x40       // NV_MAX_TILE_COLS_AV1
	MaxTileRowsAV1               = 0x40       // NV_MAX_TILE_ROWS_AV1
)

Constants evaluated by the compiler from the header's macros, so that a value here is the value the C preprocessor produces rather than one transcribed by hand.

Variables

View Source
var AV1ProfileMainGUID = GUID{Data1: 0x5f2a39f5, Data2: 0xf14e, Data3: 0x4f95, Data4: [8]uint8{0x9a, 0x9e, 0xb7, 0x6d, 0x56, 0x8f, 0xcf, 0x97}}

AV1ProfileMainGUID is NV_ENC_AV1_PROFILE_MAIN_GUID.

View Source
var CodecAV1GUID = GUID{Data1: 0xa352289, Data2: 0xaa7, Data3: 0x4759, Data4: [8]uint8{0x86, 0x2d, 0x5d, 0x15, 0xcd, 0x16, 0xd2, 0x54}}

CodecAV1GUID is NV_ENC_CODEC_AV1_GUID.

View Source
var CodecH264GUID = GUID{Data1: 0x6bc82762, Data2: 0x4e63, Data3: 0x4ca4, Data4: [8]uint8{0xaa, 0x85, 0x1e, 0x50, 0xf3, 0x21, 0xf6, 0xbf}}

CodecH264GUID is NV_ENC_CODEC_H264_GUID.

View Source
var CodecHevcGUID = GUID{Data1: 0x790cdc88, Data2: 0x4522, Data3: 0x4d7b, Data4: [8]uint8{0x94, 0x25, 0xbd, 0xa9, 0x97, 0x5f, 0x76, 0x3}}

CodecHevcGUID is NV_ENC_CODEC_HEVC_GUID.

View Source
var CodecProfileAutoselectGUID = GUID{Data1: 0xbfd6f8e7, Data2: 0x233c, Data3: 0x4341, Data4: [8]uint8{0x8b, 0x3e, 0x48, 0x18, 0x52, 0x38, 0x3, 0xf4}}

CodecProfileAutoselectGUID is NV_ENC_CODEC_PROFILE_AUTOSELECT_GUID.

View Source
var H264ProfileBaselineGUID = GUID{Data1: 0x727bcaa, Data2: 0x78c4, Data3: 0x4c83, Data4: [8]uint8{0x8c, 0x2f, 0xef, 0x3d, 0xff, 0x26, 0x7c, 0x6a}}

H264ProfileBaselineGUID is NV_ENC_H264_PROFILE_BASELINE_GUID.

View Source
var H264ProfileConstrainedHighGUID = GUID{Data1: 0xaec1bd87, Data2: 0xe85b, Data3: 0x48f2, Data4: [8]uint8{0x84, 0xc3, 0x98, 0xbc, 0xa6, 0x28, 0x50, 0x72}}

H264ProfileConstrainedHighGUID is NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID.

View Source
var H264ProfileHigh10GUID = GUID{Data1: 0x8f0c337e, Data2: 0x186c, Data3: 0x48e9, Data4: [8]uint8{0xa6, 0x9d, 0x7a, 0x83, 0x34, 0x8, 0x97, 0x58}}

H264ProfileHigh10GUID is NV_ENC_H264_PROFILE_HIGH_10_GUID.

View Source
var H264ProfileHigh422GUID = GUID{Data1: 0xff3242e9, Data2: 0x613c, Data3: 0x4295, Data4: [8]uint8{0xa1, 0xe8, 0x2a, 0x7f, 0xe9, 0x4d, 0x81, 0x33}}

H264ProfileHigh422GUID is NV_ENC_H264_PROFILE_HIGH_422_GUID.

View Source
var H264ProfileHigh444GUID = GUID{Data1: 0x7ac663cb, Data2: 0xa598, Data3: 0x4960, Data4: [8]uint8{0xb8, 0x44, 0x33, 0x9b, 0x26, 0x1a, 0x7d, 0x52}}

H264ProfileHigh444GUID is NV_ENC_H264_PROFILE_HIGH_444_GUID.

View Source
var H264ProfileHighGUID = GUID{Data1: 0xe7cbc309, Data2: 0x4f7a, Data3: 0x4b89, Data4: [8]uint8{0xaf, 0x2a, 0xd5, 0x37, 0xc9, 0x2b, 0xe3, 0x10}}

H264ProfileHighGUID is NV_ENC_H264_PROFILE_HIGH_GUID.

View Source
var H264ProfileMainGUID = GUID{Data1: 0x60b5c1d4, Data2: 0x67fe, Data3: 0x4790, Data4: [8]uint8{0x94, 0xd5, 0xc4, 0x72, 0x6d, 0x7b, 0x6e, 0x6d}}

H264ProfileMainGUID is NV_ENC_H264_PROFILE_MAIN_GUID.

View Source
var H264ProfileProgressiveHighGUID = GUID{Data1: 0xb405afac, Data2: 0xf32b, Data3: 0x417b, Data4: [8]uint8{0x89, 0xc4, 0x9a, 0xbe, 0xed, 0x3e, 0x59, 0x78}}

H264ProfileProgressiveHighGUID is NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID.

View Source
var H264ProfileStereoGUID = GUID{Data1: 0x40847bf5, Data2: 0x33f7, Data3: 0x4601, Data4: [8]uint8{0x90, 0x84, 0xe8, 0xfe, 0x3c, 0x1d, 0xb8, 0xb7}}

H264ProfileStereoGUID is NV_ENC_H264_PROFILE_STEREO_GUID.

View Source
var HevcProfileFrextGUID = GUID{Data1: 0x51ec32b5, Data2: 0x1b4c, Data3: 0x453c, Data4: [8]uint8{0x9c, 0xbd, 0xb6, 0x16, 0xbd, 0x62, 0x13, 0x41}}

HevcProfileFrextGUID is NV_ENC_HEVC_PROFILE_FREXT_GUID.

View Source
var HevcProfileMain10GUID = GUID{Data1: 0xfa4d2b6c, Data2: 0x3a5b, Data3: 0x411a, Data4: [8]uint8{0x80, 0x18, 0xa, 0x3f, 0x5e, 0x3c, 0x9b, 0xe5}}

HevcProfileMain10GUID is NV_ENC_HEVC_PROFILE_MAIN10_GUID.

View Source
var HevcProfileMainGUID = GUID{Data1: 0xb514c39a, Data2: 0xb55b, Data3: 0x40fa, Data4: [8]uint8{0x87, 0x8f, 0xf1, 0x25, 0x3b, 0x4d, 0xfd, 0xec}}

HevcProfileMainGUID is NV_ENC_HEVC_PROFILE_MAIN_GUID.

View Source
var PresetP1GUID = GUID{Data1: 0xfc0a8d3e, Data2: 0x45f8, Data3: 0x4cf8, Data4: [8]uint8{0x80, 0xc7, 0x29, 0x88, 0x71, 0x59, 0xe, 0xbf}}

PresetP1GUID is NV_ENC_PRESET_P1_GUID.

View Source
var PresetP2GUID = GUID{Data1: 0xf581cfb8, Data2: 0x88d6, Data3: 0x4381, Data4: [8]uint8{0x93, 0xf0, 0xdf, 0x13, 0xf9, 0xc2, 0x7d, 0xab}}

PresetP2GUID is NV_ENC_PRESET_P2_GUID.

View Source
var PresetP3GUID = GUID{Data1: 0x36850110, Data2: 0x3a07, Data3: 0x441f, Data4: [8]uint8{0x94, 0xd5, 0x36, 0x70, 0x63, 0x1f, 0x91, 0xf6}}

PresetP3GUID is NV_ENC_PRESET_P3_GUID.

View Source
var PresetP4GUID = GUID{Data1: 0x90a7b826, Data2: 0xdf06, Data3: 0x4862, Data4: [8]uint8{0xb9, 0xd2, 0xcd, 0x6d, 0x73, 0xa0, 0x86, 0x81}}

PresetP4GUID is NV_ENC_PRESET_P4_GUID.

View Source
var PresetP5GUID = GUID{Data1: 0x21c6e6b4, Data2: 0x297a, Data3: 0x4cba, Data4: [8]uint8{0x99, 0x8f, 0xb6, 0xcb, 0xde, 0x72, 0xad, 0xe3}}

PresetP5GUID is NV_ENC_PRESET_P5_GUID.

View Source
var PresetP6GUID = GUID{Data1: 0x8e75c279, Data2: 0x6299, Data3: 0x4ab6, Data4: [8]uint8{0x83, 0x2, 0xb, 0x21, 0x5a, 0x33, 0x5c, 0xf5}}

PresetP6GUID is NV_ENC_PRESET_P6_GUID.

View Source
var PresetP7GUID = GUID{Data1: 0x84848c12, Data2: 0x6f71, Data3: 0x4c13, Data4: [8]uint8{0x93, 0x1b, 0x53, 0xe2, 0x83, 0xf5, 0x79, 0x74}}

PresetP7GUID is NV_ENC_PRESET_P7_GUID.

Functions

func Close

func Close() error

Close unloads the library and clears every bound function pointer.

The function pointers are package-level state, so Close must not be called concurrently with any other call into this package: doing so is a use-after-free. It is meant for test teardown, not for reclaiming a live library.

func Err

func Err(s Status) error

Err converts a Status to an error, returning nil for Success.

func Has

func Has(symbol string) bool

Has reports whether the named C symbol resolved in the loaded library, loading it first if necessary. It returns false if the library failed to load.

func Load

func Load(path string) error

Load opens the shared library from path, or from the default search list when path is empty, and binds every symbol it exports.

Load is idempotent: calling it again with the same path, or with an empty path, returns nil. Calling it with a different path after a successful load returns *LibraryConflictError rather than replacing the library. After a failed load, Load retries.

func Loaded

func Loaded() bool

Loaded reports whether the library is currently loaded. It does not trigger a load.

func Path

func Path() string

Path returns the path or name the loaded library was opened from, or the empty string if no library is loaded.

func Symbols

func Symbols() []string

Symbols returns the C symbols this package binds, in sorted order. It does not load the library: it is the list of what would be looked up.

Types

type API

type API struct {
	NvEncOpenEncodeSession         func(unsafe.Pointer, uint32, *unsafe.Pointer) Status                  // PNVENCOPENENCODESESSION
	NvEncGetEncodeGUIDCount        func(unsafe.Pointer, *uint32) Status                                  // PNVENCGETENCODEGUIDCOUNT
	NvEncGetEncodeProfileGUIDCount func(unsafe.Pointer, GUID, *uint32) Status                            // PNVENCGETENCODEPROFILEGUIDCOUNT
	NvEncGetEncodeProfileGUIDs     func(unsafe.Pointer, GUID, *GUID, uint32, *uint32) Status             // PNVENCGETENCODEPROFILEGUIDS
	NvEncGetEncodeGUIDs            func(unsafe.Pointer, *GUID, uint32, *uint32) Status                   // PNVENCGETENCODEGUIDS
	NvEncGetInputFormatCount       func(unsafe.Pointer, GUID, *uint32) Status                            // PNVENCGETINPUTFORMATCOUNT
	NvEncGetInputFormats           func(unsafe.Pointer, GUID, *BufferFormat, uint32, *uint32) Status     // PNVENCGETINPUTFORMATS
	NvEncGetEncodeCaps             func(unsafe.Pointer, GUID, *CapsParam, *int32) Status                 // PNVENCGETENCODECAPS
	NvEncGetEncodePresetCount      func(unsafe.Pointer, GUID, *uint32) Status                            // PNVENCGETENCODEPRESETCOUNT
	NvEncGetEncodePresetGUIDs      func(unsafe.Pointer, GUID, *GUID, uint32, *uint32) Status             // PNVENCGETENCODEPRESETGUIDS
	NvEncGetEncodePresetConfig     func(unsafe.Pointer, GUID, GUID, *PresetConfig) Status                // PNVENCGETENCODEPRESETCONFIG
	NvEncInitializeEncoder         func(unsafe.Pointer, *InitializeParams) Status                        // PNVENCINITIALIZEENCODER
	NvEncCreateInputBuffer         func(unsafe.Pointer, *CreateInputBuffer) Status                       // PNVENCCREATEINPUTBUFFER
	NvEncDestroyInputBuffer        func(unsafe.Pointer, uintptr) Status                                  // PNVENCDESTROYINPUTBUFFER
	NvEncCreateBitstreamBuffer     func(unsafe.Pointer, *CreateBitstreamBuffer) Status                   // PNVENCCREATEBITSTREAMBUFFER
	NvEncDestroyBitstreamBuffer    func(unsafe.Pointer, uintptr) Status                                  // PNVENCDESTROYBITSTREAMBUFFER
	NvEncEncodePicture             func(unsafe.Pointer, *PicParams) Status                               // PNVENCENCODEPICTURE
	NvEncLockBitstream             func(unsafe.Pointer, *LockBitstream) Status                           // PNVENCLOCKBITSTREAM
	NvEncUnlockBitstream           func(unsafe.Pointer, uintptr) Status                                  // PNVENCUNLOCKBITSTREAM
	NvEncLockInputBuffer           func(unsafe.Pointer, *LockInputBuffer) Status                         // PNVENCLOCKINPUTBUFFER
	NvEncUnlockInputBuffer         func(unsafe.Pointer, uintptr) Status                                  // PNVENCUNLOCKINPUTBUFFER
	NvEncGetEncodeStats            func(unsafe.Pointer, *Stat) Status                                    // PNVENCGETENCODESTATS
	NvEncGetSequenceParams         func(unsafe.Pointer, *SequenceParamPayload) Status                    // PNVENCGETSEQUENCEPARAMS
	NvEncRegisterAsyncEvent        func(unsafe.Pointer, *EventParams) Status                             // PNVENCREGISTERASYNCEVENT
	NvEncUnregisterAsyncEvent      func(unsafe.Pointer, *EventParams) Status                             // PNVENCUNREGISTERASYNCEVENT
	NvEncMapInputResource          func(unsafe.Pointer, *MapInputResource) Status                        // PNVENCMAPINPUTRESOURCE
	NvEncUnmapInputResource        func(unsafe.Pointer, uintptr) Status                                  // PNVENCUNMAPINPUTRESOURCE
	NvEncDestroyEncoder            func(unsafe.Pointer) Status                                           // PNVENCDESTROYENCODER
	NvEncInvalidateRefFrames       func(unsafe.Pointer, uint64) Status                                   // PNVENCINVALIDATEREFFRAMES
	NvEncOpenEncodeSessionEx       func(*OpenEncodeSessionExParams, *unsafe.Pointer) Status              // PNVENCOPENENCODESESSIONEX
	NvEncRegisterResource          func(unsafe.Pointer, *RegisterResource) Status                        // PNVENCREGISTERRESOURCE
	NvEncUnregisterResource        func(unsafe.Pointer, uintptr) Status                                  // PNVENCUNREGISTERRESOURCE
	NvEncReconfigureEncoder        func(unsafe.Pointer, *ReconfigureParams) Status                       // PNVENCRECONFIGUREENCODER
	NvEncCreateMVBuffer            func(unsafe.Pointer, *CreateMvBuffer) Status                          // PNVENCCREATEMVBUFFER
	NvEncDestroyMVBuffer           func(unsafe.Pointer, uintptr) Status                                  // PNVENCDESTROYMVBUFFER
	NvEncRunMotionEstimationOnly   func(unsafe.Pointer, *MeonlyParams) Status                            // PNVENCRUNMOTIONESTIMATIONONLY
	NvEncGetLastErrorString        func(unsafe.Pointer) unsafe.Pointer                                   // PNVENCGETLASTERROR
	NvEncSetIOCudaStreams          func(unsafe.Pointer, uintptr, uintptr) Status                         // PNVENCSETIOCUDASTREAMS
	NvEncGetEncodePresetConfigEx   func(unsafe.Pointer, GUID, GUID, TuningInfo, *PresetConfig) Status    // PNVENCGETENCODEPRESETCONFIGEX
	NvEncGetSequenceParamEx        func(unsafe.Pointer, *InitializeParams, *SequenceParamPayload) Status // PNVENCGETSEQUENCEPARAMEX
	NvEncRestoreEncoderState       func(unsafe.Pointer, *RestoreEncoderStateParams) Status               // PNVENCRESTOREENCODERSTATE
	NvEncLookaheadPicture          func(unsafe.Pointer, *LookaheadPicParams) Status                      // PNVENCLOOKAHEADPICTURE
}

API is a bound NVENC function table.

NVENC does not export its entry points as symbols. A caller fills in a FunctionList with NvEncodeAPICreateInstance, and the driver writes a pointer to each entry point into it. Bind turns that table into callable Go functions once, so that the cost of building a call trampoline is paid at setup rather than on every encoded frame.

A nil field is an entry point this driver does not implement, or one whose signature cannot be called on this architecture. Check before calling: an older driver leaves the newer table slots zero.

func Bind

func Bind(list *FunctionList) (*API, error)

Bind binds every non-nil entry in the table.

It reports an error if the table's version field is zero, which is what a FunctionList that was never passed to CreateInstance looks like, and is the one mistake that would otherwise produce a table of calls into address zero.

type AV1PartSize

type AV1PartSize int32

AV1PartSize corresponds to C NV_ENC_AV1_PART_SIZE.

const (
	AV1PartSizeAutoselect AV1PartSize = 0 // NV_ENC_AV1_PART_SIZE_AUTOSELECT
	AV1PartSize4x4        AV1PartSize = 1 // NV_ENC_AV1_PART_SIZE_4x4
	AV1PartSize8x8        AV1PartSize = 2 // NV_ENC_AV1_PART_SIZE_8x8
	AV1PartSize16x16      AV1PartSize = 3 // NV_ENC_AV1_PART_SIZE_16x16
	AV1PartSize32x32      AV1PartSize = 4 // NV_ENC_AV1_PART_SIZE_32x32
	AV1PartSize64x64      AV1PartSize = 5 // NV_ENC_AV1_PART_SIZE_64x64
)

func (AV1PartSize) String

func (e AV1PartSize) String() string

String returns the constant name, or a numeric representation for unknown values.

type BframeRefMode

type BframeRefMode int32

BframeRefMode corresponds to C NV_ENC_BFRAME_REF_MODE.

const (
	BframeRefModeDisabled BframeRefMode = 0x0 // NV_ENC_BFRAME_REF_MODE_DISABLED
	BframeRefModeEach     BframeRefMode = 0x1 // NV_ENC_BFRAME_REF_MODE_EACH
	BframeRefModeMiddle   BframeRefMode = 0x2 // NV_ENC_BFRAME_REF_MODE_MIDDLE
)

func (BframeRefMode) String

func (e BframeRefMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type BindFailure

type BindFailure struct {
	Symbol string
	Err    error
}

BindFailure names a symbol the loaded library exports but that could not be bound, and why.

func BindFailures

func BindFailures() []BindFailure

BindFailures returns the symbols the loaded library exports that could not be bound, sorted by symbol name, or nil if every exported symbol bound. Calling one of these reports *SymbolError with the same Err.

A load that reports no error can still leave symbols unbound: the library is fine and the signatures are not representable here. Call this after Load to find that out at once rather than one call site at a time. It does not trigger a load, and returns nil if none has happened.

type BitDepth

type BitDepth int32

BitDepth corresponds to C NV_ENC_BIT_DEPTH.

const (
	BitDepthInvalid BitDepth = 0  // NV_ENC_BIT_DEPTH_INVALID
	BitDepth8       BitDepth = 8  // NV_ENC_BIT_DEPTH_8
	BitDepth10      BitDepth = 10 // NV_ENC_BIT_DEPTH_10
)

func (BitDepth) String

func (e BitDepth) String() string

String returns the constant name, or a numeric representation for unknown values.

type BufferFormat

type BufferFormat int32

BufferFormat corresponds to C NV_ENC_BUFFER_FORMAT.

const (
	BufferFormatUndefined   BufferFormat = 0x00000000 // NV_ENC_BUFFER_FORMAT_UNDEFINED
	BufferFormatNV12        BufferFormat = 0x00000001 // NV_ENC_BUFFER_FORMAT_NV12
	BufferFormatYV12        BufferFormat = 0x00000010 // NV_ENC_BUFFER_FORMAT_YV12
	BufferFormatIyuv        BufferFormat = 0x00000100 // NV_ENC_BUFFER_FORMAT_IYUV
	BufferFormatYuv444      BufferFormat = 0x00001000 // NV_ENC_BUFFER_FORMAT_YUV444
	BufferFormatYuv42010bit BufferFormat = 0x00010000 // NV_ENC_BUFFER_FORMAT_YUV420_10BIT
	BufferFormatYuv44410bit BufferFormat = 0x00100000 // NV_ENC_BUFFER_FORMAT_YUV444_10BIT
	BufferFormatArgb        BufferFormat = 0x01000000 // NV_ENC_BUFFER_FORMAT_ARGB
	BufferFormatArgb10      BufferFormat = 0x02000000 // NV_ENC_BUFFER_FORMAT_ARGB10
	BufferFormatAyuv        BufferFormat = 0x04000000 // NV_ENC_BUFFER_FORMAT_AYUV
	BufferFormatAbgr        BufferFormat = 0x10000000 // NV_ENC_BUFFER_FORMAT_ABGR
	BufferFormatAbgr10      BufferFormat = 0x20000000 // NV_ENC_BUFFER_FORMAT_ABGR10
	BufferFormatU8          BufferFormat = 0x40000000 // NV_ENC_BUFFER_FORMAT_U8
	BufferFormatNV16        BufferFormat = 0x40000001 // NV_ENC_BUFFER_FORMAT_NV16
	BufferFormatP210        BufferFormat = 0x40000002 // NV_ENC_BUFFER_FORMAT_P210
)

func (BufferFormat) String

func (e BufferFormat) String() string

String returns the constant name, or a numeric representation for unknown values.

type BufferUsage

type BufferUsage int32

BufferUsage corresponds to C NV_ENC_BUFFER_USAGE.

const (
	InputImage         BufferUsage = 0x0 // NV_ENC_INPUT_IMAGE
	OutputMotionVector BufferUsage = 0x1 // NV_ENC_OUTPUT_MOTION_VECTOR
	OutputBitstream    BufferUsage = 0x2 // NV_ENC_OUTPUT_BITSTREAM
	OutputRecon        BufferUsage = 0x4 // NV_ENC_OUTPUT_RECON
)

func (BufferUsage) String

func (e BufferUsage) String() string

String returns the constant name, or a numeric representation for unknown values.

type Caps

type Caps int32

Caps corresponds to C NV_ENC_CAPS.

const (
	CapsNumMaxBframes               Caps = 0  // NV_ENC_CAPS_NUM_MAX_BFRAMES
	CapsSupportedRatecontrolModes   Caps = 1  // NV_ENC_CAPS_SUPPORTED_RATECONTROL_MODES
	CapsSupportFieldEncoding        Caps = 2  // NV_ENC_CAPS_SUPPORT_FIELD_ENCODING
	CapsSupportMonochrome           Caps = 3  // NV_ENC_CAPS_SUPPORT_MONOCHROME
	CapsSupportFmo                  Caps = 4  // NV_ENC_CAPS_SUPPORT_FMO
	CapsSupportQpelmv               Caps = 5  // NV_ENC_CAPS_SUPPORT_QPELMV
	CapsSupportBdirectMode          Caps = 6  // NV_ENC_CAPS_SUPPORT_BDIRECT_MODE
	CapsSupportCabac                Caps = 7  // NV_ENC_CAPS_SUPPORT_CABAC
	CapsSupportAdaptiveTransform    Caps = 8  // NV_ENC_CAPS_SUPPORT_ADAPTIVE_TRANSFORM
	CapsSupportStereoMvc            Caps = 9  // NV_ENC_CAPS_SUPPORT_STEREO_MVC
	CapsNumMaxTemporalLayers        Caps = 10 // NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS
	CapsSupportHierarchicalPframes  Caps = 11 // NV_ENC_CAPS_SUPPORT_HIERARCHICAL_PFRAMES
	CapsSupportHierarchicalBframes  Caps = 12 // NV_ENC_CAPS_SUPPORT_HIERARCHICAL_BFRAMES
	CapsLevelMin                    Caps = 14 // NV_ENC_CAPS_LEVEL_MIN
	CapsSeparateColourPlane         Caps = 15 // NV_ENC_CAPS_SEPARATE_COLOUR_PLANE
	CapsSupportTemporalSvc          Caps = 18 // NV_ENC_CAPS_SUPPORT_TEMPORAL_SVC
	CapsSupportDynResChange         Caps = 19 // NV_ENC_CAPS_SUPPORT_DYN_RES_CHANGE
	CapsSupportDynBitrateChange     Caps = 20 // NV_ENC_CAPS_SUPPORT_DYN_BITRATE_CHANGE
	CapsSupportDynForceConstqp      Caps = 21 // NV_ENC_CAPS_SUPPORT_DYN_FORCE_CONSTQP
	CapsSupportDynRcmodeChange      Caps = 22 // NV_ENC_CAPS_SUPPORT_DYN_RCMODE_CHANGE
	CapsSupportSubframeReadback     Caps = 23 // NV_ENC_CAPS_SUPPORT_SUBFRAME_READBACK
	CapsSupportConstrainedEncoding  Caps = 24 // NV_ENC_CAPS_SUPPORT_CONSTRAINED_ENCODING
	CapsSupportIntraRefresh         Caps = 25 // NV_ENC_CAPS_SUPPORT_INTRA_REFRESH
	CapsSupportCustomVbvBufSize     Caps = 26 // NV_ENC_CAPS_SUPPORT_CUSTOM_VBV_BUF_SIZE
	CapsSupportDynamicSliceMode     Caps = 27 // NV_ENC_CAPS_SUPPORT_DYNAMIC_SLICE_MODE
	CapsSupportRefPicInvalidation   Caps = 28 // NV_ENC_CAPS_SUPPORT_REF_PIC_INVALIDATION
	CapsPreprocSupport              Caps = 29 // NV_ENC_CAPS_PREPROC_SUPPORT
	CapsAsyncEncodeSupport          Caps = 30 // NV_ENC_CAPS_ASYNC_ENCODE_SUPPORT
	CapsSupportYuv444Encode         Caps = 33 // NV_ENC_CAPS_SUPPORT_YUV444_ENCODE
	CapsSupportLosslessEncode       Caps = 34 // NV_ENC_CAPS_SUPPORT_LOSSLESS_ENCODE
	CapsSupportSao                  Caps = 35 // NV_ENC_CAPS_SUPPORT_SAO
	CapsSupportMeonlyMode           Caps = 36 // NV_ENC_CAPS_SUPPORT_MEONLY_MODE
	CapsSupportLookahead            Caps = 37 // NV_ENC_CAPS_SUPPORT_LOOKAHEAD
	CapsSupportTemporalAq           Caps = 38 // NV_ENC_CAPS_SUPPORT_TEMPORAL_AQ
	CapsSupport10bitEncode          Caps = 39 // NV_ENC_CAPS_SUPPORT_10BIT_ENCODE
	CapsNumMaxLtrFrames             Caps = 40 // NV_ENC_CAPS_NUM_MAX_LTR_FRAMES
	CapsSupportWeightedPrediction   Caps = 41 // NV_ENC_CAPS_SUPPORT_WEIGHTED_PREDICTION
	CapsDynamicQueryEncoderCapacity Caps = 42 // NV_ENC_CAPS_DYNAMIC_QUERY_ENCODER_CAPACITY
	CapsSupportBframeRefMode        Caps = 43 // NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE
	CapsSupportEmphasisLevelMap     Caps = 44 // NV_ENC_CAPS_SUPPORT_EMPHASIS_LEVEL_MAP
	CapsWidthMin                    Caps = 45 // NV_ENC_CAPS_WIDTH_MIN
	CapsHeightMin                   Caps = 46 // NV_ENC_CAPS_HEIGHT_MIN
	CapsSupportMultipleRefFrames    Caps = 47 // NV_ENC_CAPS_SUPPORT_MULTIPLE_REF_FRAMES
	CapsSupportAlphaLayerEncoding   Caps = 48 // NV_ENC_CAPS_SUPPORT_ALPHA_LAYER_ENCODING
	CapsNumEncoderEngines           Caps = 49 // NV_ENC_CAPS_NUM_ENCODER_ENGINES
	CapsSingleSliceIntraRefresh     Caps = 50 // NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH
	CapsDisableEncStateAdvance      Caps = 51 // NV_ENC_CAPS_DISABLE_ENC_STATE_ADVANCE
	CapsOutputReconSurface          Caps = 52 // NV_ENC_CAPS_OUTPUT_RECON_SURFACE
	CapsOutputBlockStats            Caps = 53 // NV_ENC_CAPS_OUTPUT_BLOCK_STATS
	CapsOutputRowStats              Caps = 54 // NV_ENC_CAPS_OUTPUT_ROW_STATS
	CapsSupportTemporalFilter       Caps = 55 // NV_ENC_CAPS_SUPPORT_TEMPORAL_FILTER
	CapsSupportLookaheadLevel       Caps = 56 // NV_ENC_CAPS_SUPPORT_LOOKAHEAD_LEVEL
	CapsSupportUnidirectionalB      Caps = 57 // NV_ENC_CAPS_SUPPORT_UNIDIRECTIONAL_B
	CapsSupportMvhevcEncode         Caps = 58 // NV_ENC_CAPS_SUPPORT_MVHEVC_ENCODE
	CapsSupportYuv422Encode         Caps = 59 // NV_ENC_CAPS_SUPPORT_YUV422_ENCODE
	CapsExposedCount                Caps = 60 // NV_ENC_CAPS_EXPOSED_COUNT
)

func (Caps) String

func (e Caps) String() string

String returns the constant name, or a numeric representation for unknown values.

type CapsParam

type CapsParam struct {
	Version     uint32     // uint32_t @0
	CapsToQuery Caps       // NV_ENC_CAPS @4
	Reserved    [62]uint32 // uint32_t[62] @8
}

CapsParam corresponds to C NV_ENC_CAPS_PARAM, declared in nvEncodeAPI.h:1360. Size 256, alignment 4.

type ChromaPoints

type ChromaPoints struct {
	X uint16 // uint16_t @0
	Y uint16 // uint16_t @2
}

ChromaPoints corresponds to C CHROMA_POINTS, declared in nvEncodeAPI.h:1690. Size 4, alignment 2.

type ClockTimestampSet

type ClockTimestampSet struct {
	TimeOffset uint32 // uint32_t @4
	// contains filtered or unexported fields
}

ClockTimestampSet corresponds to C NV_ENC_CLOCK_TIMESTAMP_SET, declared in nvEncodeAPI.h:1641. Size 8, alignment 4.

func (*ClockTimestampSet) CntDroppedFrames

func (s *ClockTimestampSet) CntDroppedFrames() uint32

CntDroppedFrames reads the 1-bit member cntDroppedFrames.

func (*ClockTimestampSet) CountingType

func (s *ClockTimestampSet) CountingType() uint32

CountingType reads the 1-bit member countingType.

func (*ClockTimestampSet) DiscontinuityFlag

func (s *ClockTimestampSet) DiscontinuityFlag() uint32

DiscontinuityFlag reads the 1-bit member discontinuityFlag.

func (*ClockTimestampSet) HoursValue

func (s *ClockTimestampSet) HoursValue() uint32

HoursValue reads the 5-bit member hoursValue.

func (*ClockTimestampSet) MinutesValue

func (s *ClockTimestampSet) MinutesValue() uint32

MinutesValue reads the 6-bit member minutesValue.

func (*ClockTimestampSet) NFrames

func (s *ClockTimestampSet) NFrames() uint32

NFrames reads the 8-bit member nFrames.

func (*ClockTimestampSet) Reserved2

func (s *ClockTimestampSet) Reserved2() uint32

Reserved2 reads the 4-bit member reserved2.

func (*ClockTimestampSet) SecondsValue

func (s *ClockTimestampSet) SecondsValue() uint32

SecondsValue reads the 6-bit member secondsValue.

func (*ClockTimestampSet) SetCntDroppedFrames

func (s *ClockTimestampSet) SetCntDroppedFrames(v uint32)

SetCntDroppedFrames writes the 1-bit member cntDroppedFrames. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetCountingType

func (s *ClockTimestampSet) SetCountingType(v uint32)

SetCountingType writes the 1-bit member countingType. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetDiscontinuityFlag

func (s *ClockTimestampSet) SetDiscontinuityFlag(v uint32)

SetDiscontinuityFlag writes the 1-bit member discontinuityFlag. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetHoursValue

func (s *ClockTimestampSet) SetHoursValue(v uint32)

SetHoursValue writes the 5-bit member hoursValue. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetMinutesValue

func (s *ClockTimestampSet) SetMinutesValue(v uint32)

SetMinutesValue writes the 6-bit member minutesValue. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetNFrames

func (s *ClockTimestampSet) SetNFrames(v uint32)

SetNFrames writes the 8-bit member nFrames. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetReserved2

func (s *ClockTimestampSet) SetReserved2(v uint32)

SetReserved2 writes the 4-bit member reserved2. Bits of v above the member's width are discarded.

func (*ClockTimestampSet) SetSecondsValue

func (s *ClockTimestampSet) SetSecondsValue(v uint32)

SetSecondsValue writes the 6-bit member secondsValue. Bits of v above the member's width are discarded.

type CodecConfig

type CodecConfig struct {
	Raw [1792]byte
	// contains filtered or unexported fields
}

CodecConfig corresponds to C NV_ENC_CODEC_CONFIG, declared in nvEncodeAPI.h:2167. It is a union: the members below all start at offset 0 and share the same 1792 bytes, so writing one invalidates the others. Size 1792, alignment 8.

func (*CodecConfig) Av1Config

func (u *CodecConfig) Av1Config() *ConfigAV1

Av1Config returns a pointer to the union's storage read as ConfigAV1 (C NV_ENC_CONFIG_AV1).

func (*CodecConfig) H264Config

func (u *CodecConfig) H264Config() *ConfigH264

H264Config returns a pointer to the union's storage read as ConfigH264 (C NV_ENC_CONFIG_H264).

func (*CodecConfig) H264MeOnlyConfig

func (u *CodecConfig) H264MeOnlyConfig() *ConfigH264Meonly

H264MeOnlyConfig returns a pointer to the union's storage read as ConfigH264Meonly (C NV_ENC_CONFIG_H264_MEONLY).

func (*CodecConfig) HevcConfig

func (u *CodecConfig) HevcConfig() *ConfigHevc

HevcConfig returns a pointer to the union's storage read as ConfigHevc (C NV_ENC_CONFIG_HEVC).

func (*CodecConfig) HevcMeOnlyConfig

func (u *CodecConfig) HevcMeOnlyConfig() *ConfigHevcMeonly

HevcMeOnlyConfig returns a pointer to the union's storage read as ConfigHevcMeonly (C NV_ENC_CONFIG_HEVC_MEONLY).

func (*CodecConfig) Reserved

func (u *CodecConfig) Reserved() *[320]uint32

Reserved returns a pointer to the union's storage read as [320]uint32 (C uint32_t[320]).

type CodecPicParams

type CodecPicParams struct {
	Raw [1544]byte
	// contains filtered or unexported fields
}

CodecPicParams corresponds to C NV_ENC_CODEC_PIC_PARAMS, declared in nvEncodeAPI.h:2551. It is a union: the members below all start at offset 0 and share the same 1544 bytes, so writing one invalidates the others. Size 1544, alignment 8.

func (*CodecPicParams) Av1PicParams

func (u *CodecPicParams) Av1PicParams() *PicParamsAV1

Av1PicParams returns a pointer to the union's storage read as PicParamsAV1 (C NV_ENC_PIC_PARAMS_AV1).

func (*CodecPicParams) H264PicParams

func (u *CodecPicParams) H264PicParams() *PicParamsH264

H264PicParams returns a pointer to the union's storage read as PicParamsH264 (C NV_ENC_PIC_PARAMS_H264).

func (*CodecPicParams) HevcPicParams

func (u *CodecPicParams) HevcPicParams() *PicParamsHevc

HevcPicParams returns a pointer to the union's storage read as PicParamsHevc (C NV_ENC_PIC_PARAMS_HEVC).

func (*CodecPicParams) Reserved

func (u *CodecPicParams) Reserved() *[256]uint32

Reserved returns a pointer to the union's storage read as [256]uint32 (C uint32_t[256]).

type Config

type Config struct {
	Version            uint32               // uint32_t @0
	ProfileGUID        GUID                 // GUID @4
	GopLength          uint32               // uint32_t @20
	FrameIntervalP     int32                // int32_t @24
	MonoChromeEncoding uint32               // uint32_t @28
	FrameFieldMode     ParamsFrameFieldMode // NV_ENC_PARAMS_FRAME_FIELD_MODE @32
	MvPrecision        MvPrecision          // NV_ENC_MV_PRECISION @36
	RcParams           RcParams             // NV_ENC_RC_PARAMS @40
	EncodeCodecConfig  CodecConfig          // NV_ENC_CODEC_CONFIG @168
	Reserved           [278]uint32          // uint32_t[278] @1960
	Reserved2          [64]uintptr          // void *[64] @3072
}

Config corresponds to C NV_ENC_CONFIG, declared in nvEncodeAPI.h:2182. Size 3584, alignment 8.

type ConfigAV1

type ConfigAV1 struct {
	Level       uint32      // uint32_t @0
	Tier        uint32      // uint32_t @4
	MinPartSize AV1PartSize // NV_ENC_AV1_PART_SIZE @8
	MaxPartSize AV1PartSize // NV_ENC_AV1_PART_SIZE @12

	IdrPeriod               uint32                    // uint32_t @20
	IntraRefreshPeriod      uint32                    // uint32_t @24
	IntraRefreshCnt         uint32                    // uint32_t @28
	MaxNumRefFramesInDPB    uint32                    // uint32_t @32
	NumTileColumns          uint32                    // uint32_t @36
	NumTileRows             uint32                    // uint32_t @40
	Reserved2               uint32                    // uint32_t @44
	TileWidths              uintptr                   // uint32_t * @48
	TileHeights             uintptr                   // uint32_t * @56
	MaxTemporalLayersMinus1 uint32                    // uint32_t @64
	ColorPrimaries          VuiColorPrimaries         // NV_ENC_VUI_COLOR_PRIMARIES @68
	TransferCharacteristics VuiTransferCharacteristic // NV_ENC_VUI_TRANSFER_CHARACTERISTIC @72
	MatrixCoefficients      VuiMatrixCoeffs           // NV_ENC_VUI_MATRIX_COEFFS @76
	ColorRange              uint32                    // uint32_t @80
	ChromaSamplePosition    uint32                    // uint32_t @84
	UseBFramesAsRef         BframeRefMode             // NV_ENC_BFRAME_REF_MODE @88

	FilmGrainParams   uintptr             // NV_ENC_FILM_GRAIN_PARAMS_AV1 * @96
	NumFwdRefs        NumRefFrames        // NV_ENC_NUM_REF_FRAMES @104
	NumBwdRefs        NumRefFrames        // NV_ENC_NUM_REF_FRAMES @108
	OutputBitDepth    BitDepth            // NV_ENC_BIT_DEPTH @112
	InputBitDepth     BitDepth            // NV_ENC_BIT_DEPTH @116
	LtrNumFrames      uint32              // uint32_t @120
	NumTemporalLayers uint32              // uint32_t @124
	TfLevel           TemporalFilterLevel // NV_ENC_TEMPORAL_FILTER_LEVEL @128
	Reserved1         [230]uint32         // uint32_t[230] @132

	Reserved3 [62]uintptr // void *[62] @1056
	// contains filtered or unexported fields
}

ConfigAV1 corresponds to C NV_ENC_CONFIG_AV1, declared in nvEncodeAPI.h:2060. Size 1552, alignment 8.

func (*ConfigAV1) ChromaFormatIDC

func (s *ConfigAV1) ChromaFormatIDC() uint32

ChromaFormatIDC reads the 2-bit member chromaFormatIDC.

func (*ConfigAV1) DisableSeqHdr

func (s *ConfigAV1) DisableSeqHdr() uint32

DisableSeqHdr reads the 1-bit member disableSeqHdr.

func (*ConfigAV1) EnableBitstreamPadding

func (s *ConfigAV1) EnableBitstreamPadding() uint32

EnableBitstreamPadding reads the 1-bit member enableBitstreamPadding.

func (*ConfigAV1) EnableCustomTileConfig

func (s *ConfigAV1) EnableCustomTileConfig() uint32

EnableCustomTileConfig reads the 1-bit member enableCustomTileConfig.

func (*ConfigAV1) EnableDecoderModelInfo

func (s *ConfigAV1) EnableDecoderModelInfo() uint32

EnableDecoderModelInfo reads the 1-bit member enableDecoderModelInfo.

func (*ConfigAV1) EnableFilmGrainParams

func (s *ConfigAV1) EnableFilmGrainParams() uint32

EnableFilmGrainParams reads the 1-bit member enableFilmGrainParams.

func (*ConfigAV1) EnableFrameIdNumbers

func (s *ConfigAV1) EnableFrameIdNumbers() uint32

EnableFrameIdNumbers reads the 1-bit member enableFrameIdNumbers.

func (*ConfigAV1) EnableIntraRefresh

func (s *ConfigAV1) EnableIntraRefresh() uint32

EnableIntraRefresh reads the 1-bit member enableIntraRefresh.

func (*ConfigAV1) EnableLTR

func (s *ConfigAV1) EnableLTR() uint32

EnableLTR reads the 1-bit member enableLTR.

func (*ConfigAV1) EnableTemporalSVC

func (s *ConfigAV1) EnableTemporalSVC() uint32

EnableTemporalSVC reads the 1-bit member enableTemporalSVC.

func (*ConfigAV1) EnableTimingInfo

func (s *ConfigAV1) EnableTimingInfo() uint32

EnableTimingInfo reads the 1-bit member enableTimingInfo.

func (*ConfigAV1) OutputAnnexBFormat

func (s *ConfigAV1) OutputAnnexBFormat() uint32

OutputAnnexBFormat reads the 1-bit member outputAnnexBFormat.

func (*ConfigAV1) OutputMasteringDisplay

func (s *ConfigAV1) OutputMasteringDisplay() uint32

OutputMasteringDisplay reads the 1-bit member outputMasteringDisplay.

func (*ConfigAV1) OutputMaxCll

func (s *ConfigAV1) OutputMaxCll() uint32

OutputMaxCll reads the 1-bit member outputMaxCll.

func (*ConfigAV1) RepeatSeqHdr

func (s *ConfigAV1) RepeatSeqHdr() uint32

RepeatSeqHdr reads the 1-bit member repeatSeqHdr.

func (*ConfigAV1) Reserved

func (s *ConfigAV1) Reserved() uint32

Reserved reads the 14-bit member reserved.

func (*ConfigAV1) Reserved4

func (s *ConfigAV1) Reserved4() uint32

Reserved4 reads the 2-bit member reserved4.

func (*ConfigAV1) SetChromaFormatIDC

func (s *ConfigAV1) SetChromaFormatIDC(v uint32)

SetChromaFormatIDC writes the 2-bit member chromaFormatIDC. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetDisableSeqHdr

func (s *ConfigAV1) SetDisableSeqHdr(v uint32)

SetDisableSeqHdr writes the 1-bit member disableSeqHdr. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableBitstreamPadding

func (s *ConfigAV1) SetEnableBitstreamPadding(v uint32)

SetEnableBitstreamPadding writes the 1-bit member enableBitstreamPadding. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableCustomTileConfig

func (s *ConfigAV1) SetEnableCustomTileConfig(v uint32)

SetEnableCustomTileConfig writes the 1-bit member enableCustomTileConfig. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableDecoderModelInfo

func (s *ConfigAV1) SetEnableDecoderModelInfo(v uint32)

SetEnableDecoderModelInfo writes the 1-bit member enableDecoderModelInfo. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableFilmGrainParams

func (s *ConfigAV1) SetEnableFilmGrainParams(v uint32)

SetEnableFilmGrainParams writes the 1-bit member enableFilmGrainParams. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableFrameIdNumbers

func (s *ConfigAV1) SetEnableFrameIdNumbers(v uint32)

SetEnableFrameIdNumbers writes the 1-bit member enableFrameIdNumbers. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableIntraRefresh

func (s *ConfigAV1) SetEnableIntraRefresh(v uint32)

SetEnableIntraRefresh writes the 1-bit member enableIntraRefresh. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableLTR

func (s *ConfigAV1) SetEnableLTR(v uint32)

SetEnableLTR writes the 1-bit member enableLTR. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableTemporalSVC

func (s *ConfigAV1) SetEnableTemporalSVC(v uint32)

SetEnableTemporalSVC writes the 1-bit member enableTemporalSVC. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetEnableTimingInfo

func (s *ConfigAV1) SetEnableTimingInfo(v uint32)

SetEnableTimingInfo writes the 1-bit member enableTimingInfo. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetOutputAnnexBFormat

func (s *ConfigAV1) SetOutputAnnexBFormat(v uint32)

SetOutputAnnexBFormat writes the 1-bit member outputAnnexBFormat. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetOutputMasteringDisplay

func (s *ConfigAV1) SetOutputMasteringDisplay(v uint32)

SetOutputMasteringDisplay writes the 1-bit member outputMasteringDisplay. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetOutputMaxCll

func (s *ConfigAV1) SetOutputMaxCll(v uint32)

SetOutputMaxCll writes the 1-bit member outputMaxCll. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetRepeatSeqHdr

func (s *ConfigAV1) SetRepeatSeqHdr(v uint32)

SetRepeatSeqHdr writes the 1-bit member repeatSeqHdr. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetReserved

func (s *ConfigAV1) SetReserved(v uint32)

SetReserved writes the 14-bit member reserved. Bits of v above the member's width are discarded.

func (*ConfigAV1) SetReserved4

func (s *ConfigAV1) SetReserved4(v uint32)

SetReserved4 writes the 2-bit member reserved4. Bits of v above the member's width are discarded.

type ConfigH264

type ConfigH264 struct {
	Level                      uint32                    // uint32_t @4
	IdrPeriod                  uint32                    // uint32_t @8
	SeparateColourPlaneFlag    uint32                    // uint32_t @12
	DisableDeblockingFilterIDC uint32                    // uint32_t @16
	NumTemporalLayers          uint32                    // uint32_t @20
	SpsId                      uint32                    // uint32_t @24
	PpsId                      uint32                    // uint32_t @28
	AdaptiveTransformMode      H264AdaptiveTransformMode // NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE @32
	FmoMode                    H264FmoMode               // NV_ENC_H264_FMO_MODE @36
	BdirectMode                H264BdirectMode           // NV_ENC_H264_BDIRECT_MODE @40
	EntropyCodingMode          H264EntropyCodingMode     // NV_ENC_H264_ENTROPY_CODING_MODE @44
	StereoMode                 StereoPackingMode         // NV_ENC_STEREO_PACKING_MODE @48
	IntraRefreshPeriod         uint32                    // uint32_t @52
	IntraRefreshCnt            uint32                    // uint32_t @56
	MaxNumRefFrames            uint32                    // uint32_t @60
	SliceMode                  uint32                    // uint32_t @64
	SliceModeData              uint32                    // uint32_t @68
	H264VUIParameters          ConfigH264VuiParameters   // NV_ENC_CONFIG_H264_VUI_PARAMETERS @72
	LtrNumFrames               uint32                    // uint32_t @184
	LtrTrustMode               uint32                    // uint32_t @188
	ChromaFormatIDC            uint32                    // uint32_t @192
	MaxTemporalLayers          uint32                    // uint32_t @196
	UseBFramesAsRef            BframeRefMode             // NV_ENC_BFRAME_REF_MODE @200
	NumRefL0                   NumRefFrames              // NV_ENC_NUM_REF_FRAMES @204
	NumRefL1                   NumRefFrames              // NV_ENC_NUM_REF_FRAMES @208
	OutputBitDepth             BitDepth                  // NV_ENC_BIT_DEPTH @212
	InputBitDepth              BitDepth                  // NV_ENC_BIT_DEPTH @216
	TfLevel                    TemporalFilterLevel       // NV_ENC_TEMPORAL_FILTER_LEVEL @220
	Reserved1                  [264]uint32               // uint32_t[264] @224
	Reserved2                  [64]uintptr               // void *[64] @1280
	// contains filtered or unexported fields
}

ConfigH264 corresponds to C NV_ENC_CONFIG_H264, declared in nvEncodeAPI.h:1805. Size 1792, alignment 8.

func (*ConfigH264) DisableSPSPPS

func (s *ConfigH264) DisableSPSPPS() uint32

DisableSPSPPS reads the 1-bit member disableSPSPPS.

func (*ConfigH264) DisableSVCPrefixNalu

func (s *ConfigH264) DisableSVCPrefixNalu() uint32

DisableSVCPrefixNalu reads the 1-bit member disableSVCPrefixNalu.

func (*ConfigH264) EnableConstrainedEncoding

func (s *ConfigH264) EnableConstrainedEncoding() uint32

EnableConstrainedEncoding reads the 1-bit member enableConstrainedEncoding.

func (*ConfigH264) EnableFillerDataInsertion

func (s *ConfigH264) EnableFillerDataInsertion() uint32

EnableFillerDataInsertion reads the 1-bit member enableFillerDataInsertion.

func (*ConfigH264) EnableIntraRefresh

func (s *ConfigH264) EnableIntraRefresh() uint32

EnableIntraRefresh reads the 1-bit member enableIntraRefresh.

func (*ConfigH264) EnableLTR

func (s *ConfigH264) EnableLTR() uint32

EnableLTR reads the 1-bit member enableLTR.

func (*ConfigH264) EnableScalabilityInfoSEI

func (s *ConfigH264) EnableScalabilityInfoSEI() uint32

EnableScalabilityInfoSEI reads the 1-bit member enableScalabilityInfoSEI.

func (*ConfigH264) EnableStereoMVC

func (s *ConfigH264) EnableStereoMVC() uint32

EnableStereoMVC reads the 1-bit member enableStereoMVC.

func (*ConfigH264) EnableTemporalSVC

func (s *ConfigH264) EnableTemporalSVC() uint32

EnableTemporalSVC reads the 1-bit member enableTemporalSVC.

func (*ConfigH264) EnableTimeCode

func (s *ConfigH264) EnableTimeCode() uint32

EnableTimeCode reads the 1-bit member enableTimeCode.

func (*ConfigH264) EnableVFR

func (s *ConfigH264) EnableVFR() uint32

EnableVFR reads the 1-bit member enableVFR.

func (*ConfigH264) HierarchicalBFrames

func (s *ConfigH264) HierarchicalBFrames() uint32

HierarchicalBFrames reads the 1-bit member hierarchicalBFrames.

func (*ConfigH264) HierarchicalPFrames

func (s *ConfigH264) HierarchicalPFrames() uint32

HierarchicalPFrames reads the 1-bit member hierarchicalPFrames.

func (*ConfigH264) OutputAUD

func (s *ConfigH264) OutputAUD() uint32

OutputAUD reads the 1-bit member outputAUD.

func (*ConfigH264) OutputBufferingPeriodSEI

func (s *ConfigH264) OutputBufferingPeriodSEI() uint32

OutputBufferingPeriodSEI reads the 1-bit member outputBufferingPeriodSEI.

func (*ConfigH264) OutputFramePackingSEI

func (s *ConfigH264) OutputFramePackingSEI() uint32

OutputFramePackingSEI reads the 1-bit member outputFramePackingSEI.

func (*ConfigH264) OutputPictureTimingSEI

func (s *ConfigH264) OutputPictureTimingSEI() uint32

OutputPictureTimingSEI reads the 1-bit member outputPictureTimingSEI.

func (*ConfigH264) OutputRecoveryPointSEI

func (s *ConfigH264) OutputRecoveryPointSEI() uint32

OutputRecoveryPointSEI reads the 1-bit member outputRecoveryPointSEI.

func (*ConfigH264) QpPrimeYZeroTransformBypassFlag

func (s *ConfigH264) QpPrimeYZeroTransformBypassFlag() uint32

QpPrimeYZeroTransformBypassFlag reads the 1-bit member qpPrimeYZeroTransformBypassFlag.

func (*ConfigH264) RepeatSPSPPS

func (s *ConfigH264) RepeatSPSPPS() uint32

RepeatSPSPPS reads the 1-bit member repeatSPSPPS.

func (*ConfigH264) ReservedBitFields

func (s *ConfigH264) ReservedBitFields() uint32

ReservedBitFields reads the 10-bit member reservedBitFields.

func (*ConfigH264) SetDisableSPSPPS

func (s *ConfigH264) SetDisableSPSPPS(v uint32)

SetDisableSPSPPS writes the 1-bit member disableSPSPPS. Bits of v above the member's width are discarded.

func (*ConfigH264) SetDisableSVCPrefixNalu

func (s *ConfigH264) SetDisableSVCPrefixNalu(v uint32)

SetDisableSVCPrefixNalu writes the 1-bit member disableSVCPrefixNalu. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableConstrainedEncoding

func (s *ConfigH264) SetEnableConstrainedEncoding(v uint32)

SetEnableConstrainedEncoding writes the 1-bit member enableConstrainedEncoding. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableFillerDataInsertion

func (s *ConfigH264) SetEnableFillerDataInsertion(v uint32)

SetEnableFillerDataInsertion writes the 1-bit member enableFillerDataInsertion. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableIntraRefresh

func (s *ConfigH264) SetEnableIntraRefresh(v uint32)

SetEnableIntraRefresh writes the 1-bit member enableIntraRefresh. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableLTR

func (s *ConfigH264) SetEnableLTR(v uint32)

SetEnableLTR writes the 1-bit member enableLTR. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableScalabilityInfoSEI

func (s *ConfigH264) SetEnableScalabilityInfoSEI(v uint32)

SetEnableScalabilityInfoSEI writes the 1-bit member enableScalabilityInfoSEI. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableStereoMVC

func (s *ConfigH264) SetEnableStereoMVC(v uint32)

SetEnableStereoMVC writes the 1-bit member enableStereoMVC. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableTemporalSVC

func (s *ConfigH264) SetEnableTemporalSVC(v uint32)

SetEnableTemporalSVC writes the 1-bit member enableTemporalSVC. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableTimeCode

func (s *ConfigH264) SetEnableTimeCode(v uint32)

SetEnableTimeCode writes the 1-bit member enableTimeCode. Bits of v above the member's width are discarded.

func (*ConfigH264) SetEnableVFR

func (s *ConfigH264) SetEnableVFR(v uint32)

SetEnableVFR writes the 1-bit member enableVFR. Bits of v above the member's width are discarded.

func (*ConfigH264) SetHierarchicalBFrames

func (s *ConfigH264) SetHierarchicalBFrames(v uint32)

SetHierarchicalBFrames writes the 1-bit member hierarchicalBFrames. Bits of v above the member's width are discarded.

func (*ConfigH264) SetHierarchicalPFrames

func (s *ConfigH264) SetHierarchicalPFrames(v uint32)

SetHierarchicalPFrames writes the 1-bit member hierarchicalPFrames. Bits of v above the member's width are discarded.

func (*ConfigH264) SetOutputAUD

func (s *ConfigH264) SetOutputAUD(v uint32)

SetOutputAUD writes the 1-bit member outputAUD. Bits of v above the member's width are discarded.

func (*ConfigH264) SetOutputBufferingPeriodSEI

func (s *ConfigH264) SetOutputBufferingPeriodSEI(v uint32)

SetOutputBufferingPeriodSEI writes the 1-bit member outputBufferingPeriodSEI. Bits of v above the member's width are discarded.

func (*ConfigH264) SetOutputFramePackingSEI

func (s *ConfigH264) SetOutputFramePackingSEI(v uint32)

SetOutputFramePackingSEI writes the 1-bit member outputFramePackingSEI. Bits of v above the member's width are discarded.

func (*ConfigH264) SetOutputPictureTimingSEI

func (s *ConfigH264) SetOutputPictureTimingSEI(v uint32)

SetOutputPictureTimingSEI writes the 1-bit member outputPictureTimingSEI. Bits of v above the member's width are discarded.

func (*ConfigH264) SetOutputRecoveryPointSEI

func (s *ConfigH264) SetOutputRecoveryPointSEI(v uint32)

SetOutputRecoveryPointSEI writes the 1-bit member outputRecoveryPointSEI. Bits of v above the member's width are discarded.

func (*ConfigH264) SetQpPrimeYZeroTransformBypassFlag

func (s *ConfigH264) SetQpPrimeYZeroTransformBypassFlag(v uint32)

SetQpPrimeYZeroTransformBypassFlag writes the 1-bit member qpPrimeYZeroTransformBypassFlag. Bits of v above the member's width are discarded.

func (*ConfigH264) SetRepeatSPSPPS

func (s *ConfigH264) SetRepeatSPSPPS(v uint32)

SetRepeatSPSPPS writes the 1-bit member repeatSPSPPS. Bits of v above the member's width are discarded.

func (*ConfigH264) SetReservedBitFields

func (s *ConfigH264) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 10-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*ConfigH264) SetSingleSliceIntraRefresh

func (s *ConfigH264) SetSingleSliceIntraRefresh(v uint32)

SetSingleSliceIntraRefresh writes the 1-bit member singleSliceIntraRefresh. Bits of v above the member's width are discarded.

func (*ConfigH264) SetUseConstrainedIntraPred

func (s *ConfigH264) SetUseConstrainedIntraPred(v uint32)

SetUseConstrainedIntraPred writes the 1-bit member useConstrainedIntraPred. Bits of v above the member's width are discarded.

func (*ConfigH264) SingleSliceIntraRefresh

func (s *ConfigH264) SingleSliceIntraRefresh() uint32

SingleSliceIntraRefresh reads the 1-bit member singleSliceIntraRefresh.

func (*ConfigH264) UseConstrainedIntraPred

func (s *ConfigH264) UseConstrainedIntraPred() uint32

UseConstrainedIntraPred reads the 1-bit member useConstrainedIntraPred.

type ConfigH264Meonly

type ConfigH264Meonly struct {
	Reserved1 [255]uint32 // uint32_t[255] @4
	Reserved2 [64]uintptr // void *[64] @1024
	// contains filtered or unexported fields
}

ConfigH264Meonly corresponds to C NV_ENC_CONFIG_H264_MEONLY, declared in nvEncodeAPI.h:2138. Size 1536, alignment 8.

func (*ConfigH264Meonly) BStereoEnable

func (s *ConfigH264Meonly) BStereoEnable() uint32

BStereoEnable reads the 1-bit member bStereoEnable.

func (*ConfigH264Meonly) DisableIntraSearch

func (s *ConfigH264Meonly) DisableIntraSearch() uint32

DisableIntraSearch reads the 1-bit member disableIntraSearch.

func (*ConfigH264Meonly) DisablePartition8x8

func (s *ConfigH264Meonly) DisablePartition8x8() uint32

DisablePartition8x8 reads the 1-bit member disablePartition8x8.

func (*ConfigH264Meonly) DisablePartition8x16

func (s *ConfigH264Meonly) DisablePartition8x16() uint32

DisablePartition8x16 reads the 1-bit member disablePartition8x16.

func (*ConfigH264Meonly) DisablePartition16x8

func (s *ConfigH264Meonly) DisablePartition16x8() uint32

DisablePartition16x8 reads the 1-bit member disablePartition16x8.

func (*ConfigH264Meonly) DisablePartition16x16

func (s *ConfigH264Meonly) DisablePartition16x16() uint32

DisablePartition16x16 reads the 1-bit member disablePartition16x16.

func (*ConfigH264Meonly) Reserved

func (s *ConfigH264Meonly) Reserved() uint32

Reserved reads the 26-bit member reserved.

func (*ConfigH264Meonly) SetBStereoEnable

func (s *ConfigH264Meonly) SetBStereoEnable(v uint32)

SetBStereoEnable writes the 1-bit member bStereoEnable. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetDisableIntraSearch

func (s *ConfigH264Meonly) SetDisableIntraSearch(v uint32)

SetDisableIntraSearch writes the 1-bit member disableIntraSearch. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetDisablePartition8x8

func (s *ConfigH264Meonly) SetDisablePartition8x8(v uint32)

SetDisablePartition8x8 writes the 1-bit member disablePartition8x8. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetDisablePartition8x16

func (s *ConfigH264Meonly) SetDisablePartition8x16(v uint32)

SetDisablePartition8x16 writes the 1-bit member disablePartition8x16. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetDisablePartition16x8

func (s *ConfigH264Meonly) SetDisablePartition16x8(v uint32)

SetDisablePartition16x8 writes the 1-bit member disablePartition16x8. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetDisablePartition16x16

func (s *ConfigH264Meonly) SetDisablePartition16x16(v uint32)

SetDisablePartition16x16 writes the 1-bit member disablePartition16x16. Bits of v above the member's width are discarded.

func (*ConfigH264Meonly) SetReserved

func (s *ConfigH264Meonly) SetReserved(v uint32)

SetReserved writes the 26-bit member reserved. Bits of v above the member's width are discarded.

type ConfigH264VuiParameters

type ConfigH264VuiParameters struct {
	OverscanInfoPresentFlag      uint32                    // uint32_t @0
	OverscanInfo                 uint32                    // uint32_t @4
	VideoSignalTypePresentFlag   uint32                    // uint32_t @8
	VideoFormat                  VuiVideoFormat            // NV_ENC_VUI_VIDEO_FORMAT @12
	VideoFullRangeFlag           uint32                    // uint32_t @16
	ColourDescriptionPresentFlag uint32                    // uint32_t @20
	ColourPrimaries              VuiColorPrimaries         // NV_ENC_VUI_COLOR_PRIMARIES @24
	TransferCharacteristics      VuiTransferCharacteristic // NV_ENC_VUI_TRANSFER_CHARACTERISTIC @28
	ColourMatrix                 VuiMatrixCoeffs           // NV_ENC_VUI_MATRIX_COEFFS @32
	ChromaSampleLocationFlag     uint32                    // uint32_t @36
	ChromaSampleLocationTop      uint32                    // uint32_t @40
	ChromaSampleLocationBot      uint32                    // uint32_t @44
	BitstreamRestrictionFlag     uint32                    // uint32_t @48
	TimingInfoPresentFlag        uint32                    // uint32_t @52
	NumUnitInTicks               uint32                    // uint32_t @56
	TimeScale                    uint32                    // uint32_t @60
	Reserved                     [12]uint32                // uint32_t[12] @64
}

ConfigH264VuiParameters corresponds to C NV_ENC_CONFIG_H264_VUI_PARAMETERS, declared in nvEncodeAPI.h:1724. Size 112, alignment 4.

type ConfigHevc

type ConfigHevc struct {
	Level     uint32     // uint32_t @0
	Tier      uint32     // uint32_t @4
	MinCUSize HevcCusize // NV_ENC_HEVC_CUSIZE @8
	MaxCUSize HevcCusize // NV_ENC_HEVC_CUSIZE @12

	IdrPeriod                  uint32                  // uint32_t @20
	IntraRefreshPeriod         uint32                  // uint32_t @24
	IntraRefreshCnt            uint32                  // uint32_t @28
	MaxNumRefFramesInDPB       uint32                  // uint32_t @32
	LtrNumFrames               uint32                  // uint32_t @36
	VpsId                      uint32                  // uint32_t @40
	SpsId                      uint32                  // uint32_t @44
	PpsId                      uint32                  // uint32_t @48
	SliceMode                  uint32                  // uint32_t @52
	SliceModeData              uint32                  // uint32_t @56
	MaxTemporalLayersMinus1    uint32                  // uint32_t @60
	HevcVUIParameters          ConfigH264VuiParameters // NV_ENC_CONFIG_HEVC_VUI_PARAMETERS @64
	LtrTrustMode               uint32                  // uint32_t @176
	UseBFramesAsRef            BframeRefMode           // NV_ENC_BFRAME_REF_MODE @180
	NumRefL0                   NumRefFrames            // NV_ENC_NUM_REF_FRAMES @184
	NumRefL1                   NumRefFrames            // NV_ENC_NUM_REF_FRAMES @188
	TfLevel                    TemporalFilterLevel     // NV_ENC_TEMPORAL_FILTER_LEVEL @192
	DisableDeblockingFilterIDC uint32                  // uint32_t @196
	OutputBitDepth             BitDepth                // NV_ENC_BIT_DEPTH @200
	InputBitDepth              BitDepth                // NV_ENC_BIT_DEPTH @204
	NumTemporalLayers          uint32                  // uint32_t @208
	NumViews                   uint32                  // uint32_t @212
	Reserved1                  [208]uint32             // uint32_t[208] @216
	Reserved2                  [64]uintptr             // void *[64] @1048
	// contains filtered or unexported fields
}

ConfigHevc corresponds to C NV_ENC_CONFIG_HEVC, declared in nvEncodeAPI.h:1915. Size 1560, alignment 8.

func (*ConfigHevc) ChromaFormatIDC

func (s *ConfigHevc) ChromaFormatIDC() uint32

ChromaFormatIDC reads the 2-bit member chromaFormatIDC.

func (*ConfigHevc) DisableDeblockAcrossSliceBoundary

func (s *ConfigHevc) DisableDeblockAcrossSliceBoundary() uint32

DisableDeblockAcrossSliceBoundary reads the 1-bit member disableDeblockAcrossSliceBoundary.

func (*ConfigHevc) DisableSPSPPS

func (s *ConfigHevc) DisableSPSPPS() uint32

DisableSPSPPS reads the 1-bit member disableSPSPPS.

func (*ConfigHevc) EnableAlphaLayerEncoding

func (s *ConfigHevc) EnableAlphaLayerEncoding() uint32

EnableAlphaLayerEncoding reads the 1-bit member enableAlphaLayerEncoding.

func (*ConfigHevc) EnableConstrainedEncoding

func (s *ConfigHevc) EnableConstrainedEncoding() uint32

EnableConstrainedEncoding reads the 1-bit member enableConstrainedEncoding.

func (*ConfigHevc) EnableFillerDataInsertion

func (s *ConfigHevc) EnableFillerDataInsertion() uint32

EnableFillerDataInsertion reads the 1-bit member enableFillerDataInsertion.

func (*ConfigHevc) EnableIntraRefresh

func (s *ConfigHevc) EnableIntraRefresh() uint32

EnableIntraRefresh reads the 1-bit member enableIntraRefresh.

func (*ConfigHevc) EnableLTR

func (s *ConfigHevc) EnableLTR() uint32

EnableLTR reads the 1-bit member enableLTR.

func (*ConfigHevc) EnableMVHEVC

func (s *ConfigHevc) EnableMVHEVC() uint32

EnableMVHEVC reads the 1-bit member enableMVHEVC.

func (*ConfigHevc) EnableTemporalSVC

func (s *ConfigHevc) EnableTemporalSVC() uint32

EnableTemporalSVC reads the 1-bit member enableTemporalSVC.

func (*ConfigHevc) OutputAUD

func (s *ConfigHevc) OutputAUD() uint32

OutputAUD reads the 1-bit member outputAUD.

func (*ConfigHevc) OutputBufferingPeriodSEI

func (s *ConfigHevc) OutputBufferingPeriodSEI() uint32

OutputBufferingPeriodSEI reads the 1-bit member outputBufferingPeriodSEI.

func (*ConfigHevc) OutputHevc3DReferenceDisplayInfo

func (s *ConfigHevc) OutputHevc3DReferenceDisplayInfo() uint32

OutputHevc3DReferenceDisplayInfo reads the 1-bit member outputHevc3DReferenceDisplayInfo.

func (*ConfigHevc) OutputMasteringDisplay

func (s *ConfigHevc) OutputMasteringDisplay() uint32

OutputMasteringDisplay reads the 1-bit member outputMasteringDisplay.

func (*ConfigHevc) OutputMaxCll

func (s *ConfigHevc) OutputMaxCll() uint32

OutputMaxCll reads the 1-bit member outputMaxCll.

func (*ConfigHevc) OutputPictureTimingSEI

func (s *ConfigHevc) OutputPictureTimingSEI() uint32

OutputPictureTimingSEI reads the 1-bit member outputPictureTimingSEI.

func (*ConfigHevc) OutputRecoveryPointSEI

func (s *ConfigHevc) OutputRecoveryPointSEI() uint32

OutputRecoveryPointSEI reads the 1-bit member outputRecoveryPointSEI.

func (*ConfigHevc) OutputTimeCodeSEI

func (s *ConfigHevc) OutputTimeCodeSEI() uint32

OutputTimeCodeSEI reads the 1-bit member outputTimeCodeSEI.

func (*ConfigHevc) RepeatSPSPPS

func (s *ConfigHevc) RepeatSPSPPS() uint32

RepeatSPSPPS reads the 1-bit member repeatSPSPPS.

func (*ConfigHevc) Reserved

func (s *ConfigHevc) Reserved() uint32

Reserved reads the 7-bit member reserved.

func (*ConfigHevc) Reserved3

func (s *ConfigHevc) Reserved3() uint32

Reserved3 reads the 3-bit member reserved3.

func (*ConfigHevc) SetChromaFormatIDC

func (s *ConfigHevc) SetChromaFormatIDC(v uint32)

SetChromaFormatIDC writes the 2-bit member chromaFormatIDC. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetDisableDeblockAcrossSliceBoundary

func (s *ConfigHevc) SetDisableDeblockAcrossSliceBoundary(v uint32)

SetDisableDeblockAcrossSliceBoundary writes the 1-bit member disableDeblockAcrossSliceBoundary. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetDisableSPSPPS

func (s *ConfigHevc) SetDisableSPSPPS(v uint32)

SetDisableSPSPPS writes the 1-bit member disableSPSPPS. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableAlphaLayerEncoding

func (s *ConfigHevc) SetEnableAlphaLayerEncoding(v uint32)

SetEnableAlphaLayerEncoding writes the 1-bit member enableAlphaLayerEncoding. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableConstrainedEncoding

func (s *ConfigHevc) SetEnableConstrainedEncoding(v uint32)

SetEnableConstrainedEncoding writes the 1-bit member enableConstrainedEncoding. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableFillerDataInsertion

func (s *ConfigHevc) SetEnableFillerDataInsertion(v uint32)

SetEnableFillerDataInsertion writes the 1-bit member enableFillerDataInsertion. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableIntraRefresh

func (s *ConfigHevc) SetEnableIntraRefresh(v uint32)

SetEnableIntraRefresh writes the 1-bit member enableIntraRefresh. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableLTR

func (s *ConfigHevc) SetEnableLTR(v uint32)

SetEnableLTR writes the 1-bit member enableLTR. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableMVHEVC

func (s *ConfigHevc) SetEnableMVHEVC(v uint32)

SetEnableMVHEVC writes the 1-bit member enableMVHEVC. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetEnableTemporalSVC

func (s *ConfigHevc) SetEnableTemporalSVC(v uint32)

SetEnableTemporalSVC writes the 1-bit member enableTemporalSVC. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputAUD

func (s *ConfigHevc) SetOutputAUD(v uint32)

SetOutputAUD writes the 1-bit member outputAUD. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputBufferingPeriodSEI

func (s *ConfigHevc) SetOutputBufferingPeriodSEI(v uint32)

SetOutputBufferingPeriodSEI writes the 1-bit member outputBufferingPeriodSEI. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputHevc3DReferenceDisplayInfo

func (s *ConfigHevc) SetOutputHevc3DReferenceDisplayInfo(v uint32)

SetOutputHevc3DReferenceDisplayInfo writes the 1-bit member outputHevc3DReferenceDisplayInfo. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputMasteringDisplay

func (s *ConfigHevc) SetOutputMasteringDisplay(v uint32)

SetOutputMasteringDisplay writes the 1-bit member outputMasteringDisplay. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputMaxCll

func (s *ConfigHevc) SetOutputMaxCll(v uint32)

SetOutputMaxCll writes the 1-bit member outputMaxCll. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputPictureTimingSEI

func (s *ConfigHevc) SetOutputPictureTimingSEI(v uint32)

SetOutputPictureTimingSEI writes the 1-bit member outputPictureTimingSEI. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputRecoveryPointSEI

func (s *ConfigHevc) SetOutputRecoveryPointSEI(v uint32)

SetOutputRecoveryPointSEI writes the 1-bit member outputRecoveryPointSEI. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetOutputTimeCodeSEI

func (s *ConfigHevc) SetOutputTimeCodeSEI(v uint32)

SetOutputTimeCodeSEI writes the 1-bit member outputTimeCodeSEI. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetRepeatSPSPPS

func (s *ConfigHevc) SetRepeatSPSPPS(v uint32)

SetRepeatSPSPPS writes the 1-bit member repeatSPSPPS. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetReserved

func (s *ConfigHevc) SetReserved(v uint32)

SetReserved writes the 7-bit member reserved. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetReserved3

func (s *ConfigHevc) SetReserved3(v uint32)

SetReserved3 writes the 3-bit member reserved3. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetSingleSliceIntraRefresh

func (s *ConfigHevc) SetSingleSliceIntraRefresh(v uint32)

SetSingleSliceIntraRefresh writes the 1-bit member singleSliceIntraRefresh. Bits of v above the member's width are discarded.

func (*ConfigHevc) SetUseConstrainedIntraPred

func (s *ConfigHevc) SetUseConstrainedIntraPred(v uint32)

SetUseConstrainedIntraPred writes the 1-bit member useConstrainedIntraPred. Bits of v above the member's width are discarded.

func (*ConfigHevc) SingleSliceIntraRefresh

func (s *ConfigHevc) SingleSliceIntraRefresh() uint32

SingleSliceIntraRefresh reads the 1-bit member singleSliceIntraRefresh.

func (*ConfigHevc) UseConstrainedIntraPred

func (s *ConfigHevc) UseConstrainedIntraPred() uint32

UseConstrainedIntraPred reads the 1-bit member useConstrainedIntraPred.

type ConfigHevcMeonly

type ConfigHevcMeonly struct {
	Reserved  [256]uint32 // uint32_t[256] @0
	Reserved1 [64]uintptr // void *[64] @1024
}

ConfigHevcMeonly corresponds to C NV_ENC_CONFIG_HEVC_MEONLY, declared in nvEncodeAPI.h:2157. Size 1536, alignment 8.

type ContentLightLevel

type ContentLightLevel struct {
	MaxContentLightLevel    uint16 // uint16_t @0
	MaxPicAverageLightLevel uint16 // uint16_t @2
}

ContentLightLevel corresponds to C CONTENT_LIGHT_LEVEL, declared in nvEncodeAPI.h:1713. Size 4, alignment 2.

type CreateBitstreamBuffer

type CreateBitstreamBuffer struct {
	Version            uint32      // uint32_t @0
	Size               uint32      // uint32_t @4
	MemoryHeap         MemoryHeap  // NV_ENC_MEMORY_HEAP @8
	Reserved           uint32      // uint32_t @12
	BitstreamBuffer    uintptr     // NV_ENC_OUTPUT_PTR @16
	BitstreamBufferPtr uintptr     // void * @24
	Reserved1          [58]uint32  // uint32_t[58] @32
	Reserved2          [64]uintptr // void *[64] @264
}

CreateBitstreamBuffer corresponds to C NV_ENC_CREATE_BITSTREAM_BUFFER, declared in nvEncodeAPI.h:1475. Size 776, alignment 8.

type CreateInputBuffer

type CreateInputBuffer struct {
	Version       uint32       // uint32_t @0
	Width         uint32       // uint32_t @4
	Height        uint32       // uint32_t @8
	MemoryHeap    MemoryHeap   // NV_ENC_MEMORY_HEAP @12
	BufferFmt     BufferFormat // NV_ENC_BUFFER_FORMAT @16
	Reserved      uint32       // uint32_t @20
	InputBuffer   uintptr      // NV_ENC_INPUT_PTR @24
	PSysMemBuffer uintptr      // void * @32
	Reserved1     [58]uint32   // uint32_t[58] @40
	Reserved2     [63]uintptr  // void *[63] @272
}

CreateInputBuffer corresponds to C NV_ENC_CREATE_INPUT_BUFFER, declared in nvEncodeAPI.h:1455. Size 776, alignment 8.

type CreateMvBuffer

type CreateMvBuffer struct {
	Version   uint32      // uint32_t @0
	Reserved  uint32      // uint32_t @4
	MvBuffer  uintptr     // NV_ENC_OUTPUT_PTR @8
	Reserved1 [254]uint32 // uint32_t[254] @16
	Reserved2 [63]uintptr // void *[63] @1032
}

CreateMvBuffer corresponds to C NV_ENC_CREATE_MV_BUFFER, declared in nvEncodeAPI.h:1528. Size 1536, alignment 8.

type DeviceType

type DeviceType int32

DeviceType corresponds to C NV_ENC_DEVICE_TYPE.

const (
	DeviceTypeDirectx DeviceType = 0x0 // NV_ENC_DEVICE_TYPE_DIRECTX
	DeviceTypeCuda    DeviceType = 0x1 // NV_ENC_DEVICE_TYPE_CUDA
	DeviceTypeOpengl  DeviceType = 0x2 // NV_ENC_DEVICE_TYPE_OPENGL
)

func (DeviceType) String

func (e DeviceType) String() string

String returns the constant name, or a numeric representation for unknown values.

type DisplayPicStruct

type DisplayPicStruct int32

DisplayPicStruct corresponds to C NV_ENC_DISPLAY_PIC_STRUCT.

const (
	PicStructDisplayFrame          DisplayPicStruct = 0x00 // NV_ENC_PIC_STRUCT_DISPLAY_FRAME
	PicStructDisplayFieldTopBottom DisplayPicStruct = 0x01 // NV_ENC_PIC_STRUCT_DISPLAY_FIELD_TOP_BOTTOM
	PicStructDisplayFieldBottomTop DisplayPicStruct = 0x02 // NV_ENC_PIC_STRUCT_DISPLAY_FIELD_BOTTOM_TOP
	PicStructDisplayFrameDoubling  DisplayPicStruct = 0x03 // NV_ENC_PIC_STRUCT_DISPLAY_FRAME_DOUBLING
	PicStructDisplayFrameTripling  DisplayPicStruct = 0x04 // NV_ENC_PIC_STRUCT_DISPLAY_FRAME_TRIPLING
)

func (DisplayPicStruct) String

func (e DisplayPicStruct) String() string

String returns the constant name, or a numeric representation for unknown values.

type EmphasisMapLevel

type EmphasisMapLevel int32

EmphasisMapLevel corresponds to C NV_ENC_EMPHASIS_MAP_LEVEL.

const (
	EmphasisMapLevel0 EmphasisMapLevel = 0x0 // NV_ENC_EMPHASIS_MAP_LEVEL_0
	EmphasisMapLevel1 EmphasisMapLevel = 0x1 // NV_ENC_EMPHASIS_MAP_LEVEL_1
	EmphasisMapLevel2 EmphasisMapLevel = 0x2 // NV_ENC_EMPHASIS_MAP_LEVEL_2
	EmphasisMapLevel3 EmphasisMapLevel = 0x3 // NV_ENC_EMPHASIS_MAP_LEVEL_3
	EmphasisMapLevel4 EmphasisMapLevel = 0x4 // NV_ENC_EMPHASIS_MAP_LEVEL_4
	EmphasisMapLevel5 EmphasisMapLevel = 0x5 // NV_ENC_EMPHASIS_MAP_LEVEL_5
)

func (EmphasisMapLevel) String

func (e EmphasisMapLevel) String() string

String returns the constant name, or a numeric representation for unknown values.

type EncodeOutParams

type EncodeOutParams struct {
	Version              uint32     // uint32_t @0
	BitstreamSizeInBytes uint32     // uint32_t @4
	Reserved             [62]uint32 // uint32_t[62] @8
}

EncodeOutParams corresponds to C NV_ENC_ENCODE_OUT_PARAMS, declared in nvEncodeAPI.h:1426. Size 256, alignment 4.

type EventParams

type EventParams struct {
	Version         uint32      // uint32_t @0
	Reserved        uint32      // uint32_t @4
	CompletionEvent uintptr     // void * @8
	Reserved1       [254]uint32 // uint32_t[254] @16
	Reserved2       [64]uintptr // void *[64] @1032
}

EventParams corresponds to C NV_ENC_EVENT_PARAMS, declared in nvEncodeAPI.h:2928. Size 1544, alignment 8.

type ExternalMeHint

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

ExternalMeHint corresponds to C NVENC_EXTERNAL_ME_HINT, declared in nvEncodeAPI.h:1769. Size 4, alignment 4.

func (*ExternalMeHint) Dir

func (s *ExternalMeHint) Dir() int32

Dir reads the 1-bit member dir.

func (*ExternalMeHint) LastOfMB

func (s *ExternalMeHint) LastOfMB() int32

LastOfMB reads the 1-bit member lastOfMB.

func (*ExternalMeHint) LastofPart

func (s *ExternalMeHint) LastofPart() int32

LastofPart reads the 1-bit member lastofPart.

func (*ExternalMeHint) Mvx

func (s *ExternalMeHint) Mvx() int32

Mvx reads the 12-bit member mvx.

func (*ExternalMeHint) Mvy

func (s *ExternalMeHint) Mvy() int32

Mvy reads the 10-bit member mvy.

func (*ExternalMeHint) PartType

func (s *ExternalMeHint) PartType() int32

PartType reads the 2-bit member partType.

func (*ExternalMeHint) Refidx

func (s *ExternalMeHint) Refidx() int32

Refidx reads the 5-bit member refidx.

func (*ExternalMeHint) SetDir

func (s *ExternalMeHint) SetDir(v int32)

SetDir writes the 1-bit member dir. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetLastOfMB

func (s *ExternalMeHint) SetLastOfMB(v int32)

SetLastOfMB writes the 1-bit member lastOfMB. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetLastofPart

func (s *ExternalMeHint) SetLastofPart(v int32)

SetLastofPart writes the 1-bit member lastofPart. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetMvx

func (s *ExternalMeHint) SetMvx(v int32)

SetMvx writes the 12-bit member mvx. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetMvy

func (s *ExternalMeHint) SetMvy(v int32)

SetMvy writes the 10-bit member mvy. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetPartType

func (s *ExternalMeHint) SetPartType(v int32)

SetPartType writes the 2-bit member partType. Bits of v above the member's width are discarded.

func (*ExternalMeHint) SetRefidx

func (s *ExternalMeHint) SetRefidx(v int32)

SetRefidx writes the 5-bit member refidx. Bits of v above the member's width are discarded.

type ExternalMeHintCountsPerBlocktype

type ExternalMeHintCountsPerBlocktype struct {
	Reserved1 [3]uint32 // uint32_t[3] @4
	// contains filtered or unexported fields
}

ExternalMeHintCountsPerBlocktype corresponds to C NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE, declared in nvEncodeAPI.h:1753. Size 16, alignment 4.

func (*ExternalMeHintCountsPerBlocktype) NumCandsPerBlk8x8

func (s *ExternalMeHintCountsPerBlocktype) NumCandsPerBlk8x8() uint32

NumCandsPerBlk8x8 reads the 4-bit member numCandsPerBlk8x8.

func (*ExternalMeHintCountsPerBlocktype) NumCandsPerBlk8x16

func (s *ExternalMeHintCountsPerBlocktype) NumCandsPerBlk8x16() uint32

NumCandsPerBlk8x16 reads the 4-bit member numCandsPerBlk8x16.

func (*ExternalMeHintCountsPerBlocktype) NumCandsPerBlk16x8

func (s *ExternalMeHintCountsPerBlocktype) NumCandsPerBlk16x8() uint32

NumCandsPerBlk16x8 reads the 4-bit member numCandsPerBlk16x8.

func (*ExternalMeHintCountsPerBlocktype) NumCandsPerBlk16x16

func (s *ExternalMeHintCountsPerBlocktype) NumCandsPerBlk16x16() uint32

NumCandsPerBlk16x16 reads the 4-bit member numCandsPerBlk16x16.

func (*ExternalMeHintCountsPerBlocktype) NumCandsPerSb

func (s *ExternalMeHintCountsPerBlocktype) NumCandsPerSb() uint32

NumCandsPerSb reads the 8-bit member numCandsPerSb.

func (*ExternalMeHintCountsPerBlocktype) Reserved

Reserved reads the 8-bit member reserved.

func (*ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk8x8

func (s *ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk8x8(v uint32)

SetNumCandsPerBlk8x8 writes the 4-bit member numCandsPerBlk8x8. Bits of v above the member's width are discarded.

func (*ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk8x16

func (s *ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk8x16(v uint32)

SetNumCandsPerBlk8x16 writes the 4-bit member numCandsPerBlk8x16. Bits of v above the member's width are discarded.

func (*ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk16x8

func (s *ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk16x8(v uint32)

SetNumCandsPerBlk16x8 writes the 4-bit member numCandsPerBlk16x8. Bits of v above the member's width are discarded.

func (*ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk16x16

func (s *ExternalMeHintCountsPerBlocktype) SetNumCandsPerBlk16x16(v uint32)

SetNumCandsPerBlk16x16 writes the 4-bit member numCandsPerBlk16x16. Bits of v above the member's width are discarded.

func (*ExternalMeHintCountsPerBlocktype) SetNumCandsPerSb

func (s *ExternalMeHintCountsPerBlocktype) SetNumCandsPerSb(v uint32)

SetNumCandsPerSb writes the 8-bit member numCandsPerSb. Bits of v above the member's width are discarded.

func (*ExternalMeHintCountsPerBlocktype) SetReserved

func (s *ExternalMeHintCountsPerBlocktype) SetReserved(v uint32)

SetReserved writes the 8-bit member reserved. Bits of v above the member's width are discarded.

type ExternalMeSbHint

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

ExternalMeSbHint corresponds to C NVENC_EXTERNAL_ME_SB_HINT, declared in nvEncodeAPI.h:1784. Size 6, alignment 2.

func (*ExternalMeSbHint) Bi

func (s *ExternalMeSbHint) Bi() int32

Bi reads the 1-bit member bi.

func (*ExternalMeSbHint) CuSize

func (s *ExternalMeSbHint) CuSize() int32

CuSize reads the 2-bit member cu_size.

func (*ExternalMeSbHint) Direction

func (s *ExternalMeSbHint) Direction() int32

Direction reads the 1-bit member direction.

func (*ExternalMeSbHint) LastOfCu

func (s *ExternalMeSbHint) LastOfCu() int32

LastOfCu reads the 1-bit member last_of_cu.

func (*ExternalMeSbHint) LastOfSb

func (s *ExternalMeSbHint) LastOfSb() int32

LastOfSb reads the 1-bit member last_of_sb.

func (*ExternalMeSbHint) Mvx

func (s *ExternalMeSbHint) Mvx() int32

Mvx reads the 14-bit member mvx.

func (*ExternalMeSbHint) Mvy

func (s *ExternalMeSbHint) Mvy() int32

Mvy reads the 12-bit member mvy.

func (*ExternalMeSbHint) PartitionType

func (s *ExternalMeSbHint) PartitionType() int32

PartitionType reads the 3-bit member partition_type.

func (*ExternalMeSbHint) Refidx

func (s *ExternalMeSbHint) Refidx() int32

Refidx reads the 5-bit member refidx.

func (*ExternalMeSbHint) Reserved0

func (s *ExternalMeSbHint) Reserved0() int32

Reserved0 reads the 1-bit member reserved0.

func (*ExternalMeSbHint) Reserved1

func (s *ExternalMeSbHint) Reserved1() int32

Reserved1 reads the 1-bit member reserved1.

func (*ExternalMeSbHint) SetBi

func (s *ExternalMeSbHint) SetBi(v int32)

SetBi writes the 1-bit member bi. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetCuSize

func (s *ExternalMeSbHint) SetCuSize(v int32)

SetCuSize writes the 2-bit member cu_size. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetDirection

func (s *ExternalMeSbHint) SetDirection(v int32)

SetDirection writes the 1-bit member direction. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetLastOfCu

func (s *ExternalMeSbHint) SetLastOfCu(v int32)

SetLastOfCu writes the 1-bit member last_of_cu. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetLastOfSb

func (s *ExternalMeSbHint) SetLastOfSb(v int32)

SetLastOfSb writes the 1-bit member last_of_sb. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetMvx

func (s *ExternalMeSbHint) SetMvx(v int32)

SetMvx writes the 14-bit member mvx. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetMvy

func (s *ExternalMeSbHint) SetMvy(v int32)

SetMvy writes the 12-bit member mvy. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetPartitionType

func (s *ExternalMeSbHint) SetPartitionType(v int32)

SetPartitionType writes the 3-bit member partition_type. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetRefidx

func (s *ExternalMeSbHint) SetRefidx(v int32)

SetRefidx writes the 5-bit member refidx. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetReserved0

func (s *ExternalMeSbHint) SetReserved0(v int32)

SetReserved0 writes the 1-bit member reserved0. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetReserved1

func (s *ExternalMeSbHint) SetReserved1(v int32)

SetReserved1 writes the 1-bit member reserved1. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetX8

func (s *ExternalMeSbHint) SetX8(v int32)

SetX8 writes the 3-bit member x8. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) SetY8

func (s *ExternalMeSbHint) SetY8(v int32)

SetY8 writes the 3-bit member y8. Bits of v above the member's width are discarded.

func (*ExternalMeSbHint) X8

func (s *ExternalMeSbHint) X8() int32

X8 reads the 3-bit member x8.

func (*ExternalMeSbHint) Y8

func (s *ExternalMeSbHint) Y8() int32

Y8 reads the 3-bit member y8.

type FencePointD3d12

type FencePointD3d12 struct {
	Version     uint32  // uint32_t @0
	Reserved    uint32  // uint32_t @4
	PFence      uintptr // void * @8
	WaitValue   uint64  // uint64_t @16
	SignalValue uint64  // uint64_t @24

	Reserved1 [7]uint32 // uint32_t[7] @36
	// contains filtered or unexported fields
}

FencePointD3d12 corresponds to C NV_ENC_FENCE_POINT_D3D12, declared in nvEncodeAPI.h:2771. Size 64, alignment 8.

func (*FencePointD3d12) BSignal

func (s *FencePointD3d12) BSignal() uint32

BSignal reads the 1-bit member bSignal.

func (*FencePointD3d12) BWait

func (s *FencePointD3d12) BWait() uint32

BWait reads the 1-bit member bWait.

func (*FencePointD3d12) ReservedBitField

func (s *FencePointD3d12) ReservedBitField() uint32

ReservedBitField reads the 30-bit member reservedBitField.

func (*FencePointD3d12) SetBSignal

func (s *FencePointD3d12) SetBSignal(v uint32)

SetBSignal writes the 1-bit member bSignal. Bits of v above the member's width are discarded.

func (*FencePointD3d12) SetBWait

func (s *FencePointD3d12) SetBWait(v uint32)

SetBWait writes the 1-bit member bWait. Bits of v above the member's width are discarded.

func (*FencePointD3d12) SetReservedBitField

func (s *FencePointD3d12) SetReservedBitField(v uint32)

SetReservedBitField writes the 30-bit member reservedBitField. Bits of v above the member's width are discarded.

type FilmGrainParamsAV1

type FilmGrainParamsAV1 struct {
	PointYValue       [14]uint8 // uint8_t[14] @4
	PointYScaling     [14]uint8 // uint8_t[14] @18
	PointCbValue      [10]uint8 // uint8_t[10] @32
	PointCbScaling    [10]uint8 // uint8_t[10] @42
	PointCrValue      [10]uint8 // uint8_t[10] @52
	PointCrScaling    [10]uint8 // uint8_t[10] @62
	ArCoeffsYPlus128  [24]uint8 // uint8_t[24] @72
	ArCoeffsCbPlus128 [25]uint8 // uint8_t[25] @96
	ArCoeffsCrPlus128 [25]uint8 // uint8_t[25] @121
	Reserved2         [2]uint8  // uint8_t[2] @146
	CbMult            uint8     // uint8_t @148
	CbLumaMult        uint8     // uint8_t @149
	CbOffset          uint16    // uint16_t @150
	CrMult            uint8     // uint8_t @152
	CrLumaMult        uint8     // uint8_t @153
	CrOffset          uint16    // uint16_t @154
	// contains filtered or unexported fields
}

FilmGrainParamsAV1 corresponds to C NV_ENC_FILM_GRAIN_PARAMS_AV1, declared in nvEncodeAPI.h:2024. Size 156, alignment 4.

func (*FilmGrainParamsAV1) ApplyGrain

func (s *FilmGrainParamsAV1) ApplyGrain() uint32

ApplyGrain reads the 1-bit member applyGrain.

func (*FilmGrainParamsAV1) ArCoeffLag

func (s *FilmGrainParamsAV1) ArCoeffLag() uint32

ArCoeffLag reads the 2-bit member arCoeffLag.

func (*FilmGrainParamsAV1) ArCoeffShiftMinus6

func (s *FilmGrainParamsAV1) ArCoeffShiftMinus6() uint32

ArCoeffShiftMinus6 reads the 2-bit member arCoeffShiftMinus6.

func (*FilmGrainParamsAV1) ChromaScalingFromLuma

func (s *FilmGrainParamsAV1) ChromaScalingFromLuma() uint32

ChromaScalingFromLuma reads the 1-bit member chromaScalingFromLuma.

func (*FilmGrainParamsAV1) ClipToRestrictedRange

func (s *FilmGrainParamsAV1) ClipToRestrictedRange() uint32

ClipToRestrictedRange reads the 1-bit member clipToRestrictedRange.

func (*FilmGrainParamsAV1) GrainScaleShift

func (s *FilmGrainParamsAV1) GrainScaleShift() uint32

GrainScaleShift reads the 2-bit member grainScaleShift.

func (*FilmGrainParamsAV1) GrainScalingMinus8

func (s *FilmGrainParamsAV1) GrainScalingMinus8() uint32

GrainScalingMinus8 reads the 2-bit member grainScalingMinus8.

func (*FilmGrainParamsAV1) NumCbPoints

func (s *FilmGrainParamsAV1) NumCbPoints() uint32

NumCbPoints reads the 4-bit member numCbPoints.

func (*FilmGrainParamsAV1) NumCrPoints

func (s *FilmGrainParamsAV1) NumCrPoints() uint32

NumCrPoints reads the 4-bit member numCrPoints.

func (*FilmGrainParamsAV1) NumYPoints

func (s *FilmGrainParamsAV1) NumYPoints() uint32

NumYPoints reads the 4-bit member numYPoints.

func (*FilmGrainParamsAV1) OverlapFlag

func (s *FilmGrainParamsAV1) OverlapFlag() uint32

OverlapFlag reads the 1-bit member overlapFlag.

func (*FilmGrainParamsAV1) Reserved1

func (s *FilmGrainParamsAV1) Reserved1() uint32

Reserved1 reads the 8-bit member reserved1.

func (*FilmGrainParamsAV1) SetApplyGrain

func (s *FilmGrainParamsAV1) SetApplyGrain(v uint32)

SetApplyGrain writes the 1-bit member applyGrain. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetArCoeffLag

func (s *FilmGrainParamsAV1) SetArCoeffLag(v uint32)

SetArCoeffLag writes the 2-bit member arCoeffLag. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetArCoeffShiftMinus6

func (s *FilmGrainParamsAV1) SetArCoeffShiftMinus6(v uint32)

SetArCoeffShiftMinus6 writes the 2-bit member arCoeffShiftMinus6. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetChromaScalingFromLuma

func (s *FilmGrainParamsAV1) SetChromaScalingFromLuma(v uint32)

SetChromaScalingFromLuma writes the 1-bit member chromaScalingFromLuma. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetClipToRestrictedRange

func (s *FilmGrainParamsAV1) SetClipToRestrictedRange(v uint32)

SetClipToRestrictedRange writes the 1-bit member clipToRestrictedRange. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetGrainScaleShift

func (s *FilmGrainParamsAV1) SetGrainScaleShift(v uint32)

SetGrainScaleShift writes the 2-bit member grainScaleShift. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetGrainScalingMinus8

func (s *FilmGrainParamsAV1) SetGrainScalingMinus8(v uint32)

SetGrainScalingMinus8 writes the 2-bit member grainScalingMinus8. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetNumCbPoints

func (s *FilmGrainParamsAV1) SetNumCbPoints(v uint32)

SetNumCbPoints writes the 4-bit member numCbPoints. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetNumCrPoints

func (s *FilmGrainParamsAV1) SetNumCrPoints(v uint32)

SetNumCrPoints writes the 4-bit member numCrPoints. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetNumYPoints

func (s *FilmGrainParamsAV1) SetNumYPoints(v uint32)

SetNumYPoints writes the 4-bit member numYPoints. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetOverlapFlag

func (s *FilmGrainParamsAV1) SetOverlapFlag(v uint32)

SetOverlapFlag writes the 1-bit member overlapFlag. Bits of v above the member's width are discarded.

func (*FilmGrainParamsAV1) SetReserved1

func (s *FilmGrainParamsAV1) SetReserved1(v uint32)

SetReserved1 writes the 8-bit member reserved1. Bits of v above the member's width are discarded.

type FunctionList

type FunctionList struct {
	Version                        uint32       // uint32_t @0
	Reserved                       uint32       // uint32_t @4
	NvEncOpenEncodeSession         uintptr      // PNVENCOPENENCODESESSION @8
	NvEncGetEncodeGUIDCount        uintptr      // PNVENCGETENCODEGUIDCOUNT @16
	NvEncGetEncodeProfileGUIDCount uintptr      // PNVENCGETENCODEPROFILEGUIDCOUNT @24
	NvEncGetEncodeProfileGUIDs     uintptr      // PNVENCGETENCODEPROFILEGUIDS @32
	NvEncGetEncodeGUIDs            uintptr      // PNVENCGETENCODEGUIDS @40
	NvEncGetInputFormatCount       uintptr      // PNVENCGETINPUTFORMATCOUNT @48
	NvEncGetInputFormats           uintptr      // PNVENCGETINPUTFORMATS @56
	NvEncGetEncodeCaps             uintptr      // PNVENCGETENCODECAPS @64
	NvEncGetEncodePresetCount      uintptr      // PNVENCGETENCODEPRESETCOUNT @72
	NvEncGetEncodePresetGUIDs      uintptr      // PNVENCGETENCODEPRESETGUIDS @80
	NvEncGetEncodePresetConfig     uintptr      // PNVENCGETENCODEPRESETCONFIG @88
	NvEncInitializeEncoder         uintptr      // PNVENCINITIALIZEENCODER @96
	NvEncCreateInputBuffer         uintptr      // PNVENCCREATEINPUTBUFFER @104
	NvEncDestroyInputBuffer        uintptr      // PNVENCDESTROYINPUTBUFFER @112
	NvEncCreateBitstreamBuffer     uintptr      // PNVENCCREATEBITSTREAMBUFFER @120
	NvEncDestroyBitstreamBuffer    uintptr      // PNVENCDESTROYBITSTREAMBUFFER @128
	NvEncEncodePicture             uintptr      // PNVENCENCODEPICTURE @136
	NvEncLockBitstream             uintptr      // PNVENCLOCKBITSTREAM @144
	NvEncUnlockBitstream           uintptr      // PNVENCUNLOCKBITSTREAM @152
	NvEncLockInputBuffer           uintptr      // PNVENCLOCKINPUTBUFFER @160
	NvEncUnlockInputBuffer         uintptr      // PNVENCUNLOCKINPUTBUFFER @168
	NvEncGetEncodeStats            uintptr      // PNVENCGETENCODESTATS @176
	NvEncGetSequenceParams         uintptr      // PNVENCGETSEQUENCEPARAMS @184
	NvEncRegisterAsyncEvent        uintptr      // PNVENCREGISTERASYNCEVENT @192
	NvEncUnregisterAsyncEvent      uintptr      // PNVENCUNREGISTERASYNCEVENT @200
	NvEncMapInputResource          uintptr      // PNVENCMAPINPUTRESOURCE @208
	NvEncUnmapInputResource        uintptr      // PNVENCUNMAPINPUTRESOURCE @216
	NvEncDestroyEncoder            uintptr      // PNVENCDESTROYENCODER @224
	NvEncInvalidateRefFrames       uintptr      // PNVENCINVALIDATEREFFRAMES @232
	NvEncOpenEncodeSessionEx       uintptr      // PNVENCOPENENCODESESSIONEX @240
	NvEncRegisterResource          uintptr      // PNVENCREGISTERRESOURCE @248
	NvEncUnregisterResource        uintptr      // PNVENCUNREGISTERRESOURCE @256
	NvEncReconfigureEncoder        uintptr      // PNVENCRECONFIGUREENCODER @264
	Reserved1                      uintptr      // void * @272
	NvEncCreateMVBuffer            uintptr      // PNVENCCREATEMVBUFFER @280
	NvEncDestroyMVBuffer           uintptr      // PNVENCDESTROYMVBUFFER @288
	NvEncRunMotionEstimationOnly   uintptr      // PNVENCRUNMOTIONESTIMATIONONLY @296
	NvEncGetLastErrorString        uintptr      // PNVENCGETLASTERROR @304
	NvEncSetIOCudaStreams          uintptr      // PNVENCSETIOCUDASTREAMS @312
	NvEncGetEncodePresetConfigEx   uintptr      // PNVENCGETENCODEPRESETCONFIGEX @320
	NvEncGetSequenceParamEx        uintptr      // PNVENCGETSEQUENCEPARAMEX @328
	NvEncRestoreEncoderState       uintptr      // PNVENCRESTOREENCODERSTATE @336
	NvEncLookaheadPicture          uintptr      // PNVENCLOOKAHEADPICTURE @344
	Reserved2                      [275]uintptr // void *[275] @352
}

FunctionList corresponds to C NV_ENCODE_API_FUNCTION_LIST, declared in nvEncodeAPI.h:4591. Size 2552, alignment 8.

type GUID

type GUID struct {
	Data1 uint32   // uint32_t @0
	Data2 uint16   // uint16_t @4
	Data3 uint16   // uint16_t @6
	Data4 [8]uint8 // uint8_t[8] @8
}

GUID corresponds to C GUID, declared in nvEncodeAPI.h:87. Size 16, alignment 4.

Example
package main

import (
	"fmt"
	"github.com/tmc/lib/nvidia/nvenc"
)

func main() {
	params := nvenc.InitializeParams{
		Version:    nvenc.InitializeParamsVer,
		EncodeGUID: nvenc.CodecH264GUID,
		PresetGUID: nvenc.PresetP1GUID,
	}
	fmt.Println(params.EncodeGUID == nvenc.CodecH264GUID)
}
Output:
true

type H264AdaptiveTransformMode

type H264AdaptiveTransformMode int32

H264AdaptiveTransformMode corresponds to C NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE.

const (
	H264AdaptiveTransformAutoselect H264AdaptiveTransformMode = 0x0 // NV_ENC_H264_ADAPTIVE_TRANSFORM_AUTOSELECT
	H264AdaptiveTransformDisable    H264AdaptiveTransformMode = 0x1 // NV_ENC_H264_ADAPTIVE_TRANSFORM_DISABLE
	H264AdaptiveTransformEnable     H264AdaptiveTransformMode = 0x2 // NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE
)

func (H264AdaptiveTransformMode) String

func (e H264AdaptiveTransformMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type H264BdirectMode

type H264BdirectMode int32

H264BdirectMode corresponds to C NV_ENC_H264_BDIRECT_MODE.

const (
	H264BdirectModeAutoselect H264BdirectMode = 0x0 // NV_ENC_H264_BDIRECT_MODE_AUTOSELECT
	H264BdirectModeDisable    H264BdirectMode = 0x1 // NV_ENC_H264_BDIRECT_MODE_DISABLE
	H264BdirectModeTemporal   H264BdirectMode = 0x2 // NV_ENC_H264_BDIRECT_MODE_TEMPORAL
	H264BdirectModeSpatial    H264BdirectMode = 0x3 // NV_ENC_H264_BDIRECT_MODE_SPATIAL
)

func (H264BdirectMode) String

func (e H264BdirectMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type H264EntropyCodingMode

type H264EntropyCodingMode int32

H264EntropyCodingMode corresponds to C NV_ENC_H264_ENTROPY_CODING_MODE.

const (
	H264EntropyCodingModeAutoselect H264EntropyCodingMode = 0x0 // NV_ENC_H264_ENTROPY_CODING_MODE_AUTOSELECT
	H264EntropyCodingModeCabac      H264EntropyCodingMode = 0x1 // NV_ENC_H264_ENTROPY_CODING_MODE_CABAC
	H264EntropyCodingModeCavlc      H264EntropyCodingMode = 0x2 // NV_ENC_H264_ENTROPY_CODING_MODE_CAVLC
)

func (H264EntropyCodingMode) String

func (e H264EntropyCodingMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type H264FmoMode

type H264FmoMode int32

H264FmoMode corresponds to C NV_ENC_H264_FMO_MODE.

const (
	H264FmoAutoselect H264FmoMode = 0x0 // NV_ENC_H264_FMO_AUTOSELECT
	H264FmoEnable     H264FmoMode = 0x1 // NV_ENC_H264_FMO_ENABLE
	H264FmoDisable    H264FmoMode = 0x2 // NV_ENC_H264_FMO_DISABLE
)

func (H264FmoMode) String

func (e H264FmoMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type H264MvData

type H264MvData struct {
	Mv            [4]Mvector // NV_ENC_MVECTOR[4] @0
	MbType        uint8      // uint8_t @16
	PartitionType uint8      // uint8_t @17
	Reserved      uint16     // uint16_t @18
	MbCost        uint32     // uint32_t @20
}

H264MvData corresponds to C NV_ENC_H264_MV_DATA, declared in nvEncodeAPI.h:1502. Size 24, alignment 4.

type Hevc3DReferenceDisplayInfo

type Hevc3DReferenceDisplayInfo struct {
	PrecRefDisplayWidth        int32     // int32_t @4
	PrecRefViewingDist         int32     // int32_t @8
	NumRefDisplaysMinus1       int32     // int32_t @12
	LeftViewId                 [32]int32 // int32_t[32] @16
	RightViewId                [32]int32 // int32_t[32] @144
	ExponentRefDisplayWidth    [32]int32 // int32_t[32] @272
	MantissaRefDisplayWidth    [32]int32 // int32_t[32] @400
	ExponentRefViewingDistance [32]int32 // int32_t[32] @528
	MantissaRefViewingDistance [32]int32 // int32_t[32] @656
	NumSampleShiftPlus512      [32]int32 // int32_t[32] @784
	AdditionalShiftPresentFlag [32]uint8 // uint8_t[32] @912
	Reserved2                  [4]uint32 // uint32_t[4] @944
	// contains filtered or unexported fields
}

Hevc3DReferenceDisplayInfo corresponds to C HEVC_3D_REFERENCE_DISPLAY_INFO, declared in nvEncodeAPI.h:1668. Size 960, alignment 4.

func (*Hevc3DReferenceDisplayInfo) RefViewingDistanceFlag

func (s *Hevc3DReferenceDisplayInfo) RefViewingDistanceFlag() uint32

RefViewingDistanceFlag reads the 1-bit member refViewingDistanceFlag.

func (*Hevc3DReferenceDisplayInfo) Reserved

func (s *Hevc3DReferenceDisplayInfo) Reserved() uint32

Reserved reads the 30-bit member reserved.

func (*Hevc3DReferenceDisplayInfo) SetRefViewingDistanceFlag

func (s *Hevc3DReferenceDisplayInfo) SetRefViewingDistanceFlag(v uint32)

SetRefViewingDistanceFlag writes the 1-bit member refViewingDistanceFlag. Bits of v above the member's width are discarded.

func (*Hevc3DReferenceDisplayInfo) SetReserved

func (s *Hevc3DReferenceDisplayInfo) SetReserved(v uint32)

SetReserved writes the 30-bit member reserved. Bits of v above the member's width are discarded.

func (*Hevc3DReferenceDisplayInfo) SetThreeDimensionalReferenceDisplaysExtensionFlag

func (s *Hevc3DReferenceDisplayInfo) SetThreeDimensionalReferenceDisplaysExtensionFlag(v uint32)

SetThreeDimensionalReferenceDisplaysExtensionFlag writes the 1-bit member threeDimensionalReferenceDisplaysExtensionFlag. Bits of v above the member's width are discarded.

func (*Hevc3DReferenceDisplayInfo) ThreeDimensionalReferenceDisplaysExtensionFlag

func (s *Hevc3DReferenceDisplayInfo) ThreeDimensionalReferenceDisplaysExtensionFlag() uint32

ThreeDimensionalReferenceDisplaysExtensionFlag reads the 1-bit member threeDimensionalReferenceDisplaysExtensionFlag.

type HevcCusize

type HevcCusize int32

HevcCusize corresponds to C NV_ENC_HEVC_CUSIZE.

const (
	HevcCusizeAutoselect HevcCusize = 0 // NV_ENC_HEVC_CUSIZE_AUTOSELECT
	HevcCusize8x8        HevcCusize = 1 // NV_ENC_HEVC_CUSIZE_8x8
	HevcCusize16x16      HevcCusize = 2 // NV_ENC_HEVC_CUSIZE_16x16
	HevcCusize32x32      HevcCusize = 3 // NV_ENC_HEVC_CUSIZE_32x32
	HevcCusize64x64      HevcCusize = 4 // NV_ENC_HEVC_CUSIZE_64x64
)

func (HevcCusize) String

func (e HevcCusize) String() string

String returns the constant name, or a numeric representation for unknown values.

type HevcMvData

type HevcMvData struct {
	Mv            [4]Mvector // NV_ENC_MVECTOR[4] @0
	CuType        uint8      // uint8_t @16
	CuSize        uint8      // uint8_t @17
	PartitionMode uint8      // uint8_t @18
	LastCUInCTB   uint8      // uint8_t @19
}

HevcMvData corresponds to C NV_ENC_HEVC_MV_DATA, declared in nvEncodeAPI.h:1514. Size 20, alignment 2.

type InitializeParams

type InitializeParams struct {
	Version           uint32 // uint32_t @0
	EncodeGUID        GUID   // GUID @4
	PresetGUID        GUID   // GUID @20
	EncodeWidth       uint32 // uint32_t @36
	EncodeHeight      uint32 // uint32_t @40
	DarWidth          uint32 // uint32_t @44
	DarHeight         uint32 // uint32_t @48
	FrameRateNum      uint32 // uint32_t @52
	FrameRateDen      uint32 // uint32_t @56
	EnableEncodeAsync uint32 // uint32_t @60
	EnablePTD         uint32 // uint32_t @64

	PrivDataSize            uint32                              // uint32_t @72
	Reserved                uint32                              // uint32_t @76
	PrivData                uintptr                             // void * @80
	EncodeConfig            uintptr                             // NV_ENC_CONFIG * @88
	MaxEncodeWidth          uint32                              // uint32_t @96
	MaxEncodeHeight         uint32                              // uint32_t @100
	MaxMEHintCountsPerBlock [2]ExternalMeHintCountsPerBlocktype // NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE[2] @104
	TuningInfo              TuningInfo                          // NV_ENC_TUNING_INFO @136
	BufferFormat            BufferFormat                        // NV_ENC_BUFFER_FORMAT @140
	NumStateBuffers         uint32                              // uint32_t @144
	OutputStatsLevel        OutputStatsLevel                    // NV_ENC_OUTPUT_STATS_LEVEL @148
	Reserved1               [284]uint32                         // uint32_t[284] @152
	Reserved2               [64]uintptr                         // void *[64] @1288
	// contains filtered or unexported fields
}

InitializeParams corresponds to C NV_ENC_INITIALIZE_PARAMS, declared in nvEncodeAPI.h:2233. Size 1800, alignment 8.

func (*InitializeParams) EnableExternalMEHints

func (s *InitializeParams) EnableExternalMEHints() uint32

EnableExternalMEHints reads the 1-bit member enableExternalMEHints.

func (*InitializeParams) EnableMEOnlyMode

func (s *InitializeParams) EnableMEOnlyMode() uint32

EnableMEOnlyMode reads the 1-bit member enableMEOnlyMode.

func (*InitializeParams) EnableOutputInVidmem

func (s *InitializeParams) EnableOutputInVidmem() uint32

EnableOutputInVidmem reads the 1-bit member enableOutputInVidmem.

func (*InitializeParams) EnableOutputStats

func (s *InitializeParams) EnableOutputStats() uint32

EnableOutputStats reads the 1-bit member enableOutputStats.

func (*InitializeParams) EnableReconFrameOutput

func (s *InitializeParams) EnableReconFrameOutput() uint32

EnableReconFrameOutput reads the 1-bit member enableReconFrameOutput.

func (*InitializeParams) EnableSubFrameWrite

func (s *InitializeParams) EnableSubFrameWrite() uint32

EnableSubFrameWrite reads the 1-bit member enableSubFrameWrite.

func (*InitializeParams) EnableUniDirectionalB

func (s *InitializeParams) EnableUniDirectionalB() uint32

EnableUniDirectionalB reads the 1-bit member enableUniDirectionalB.

func (*InitializeParams) EnableWeightedPrediction

func (s *InitializeParams) EnableWeightedPrediction() uint32

EnableWeightedPrediction reads the 1-bit member enableWeightedPrediction.

func (*InitializeParams) ReportSliceOffsets

func (s *InitializeParams) ReportSliceOffsets() uint32

ReportSliceOffsets reads the 1-bit member reportSliceOffsets.

func (*InitializeParams) ReservedBitFields

func (s *InitializeParams) ReservedBitFields() uint32

ReservedBitFields reads the 19-bit member reservedBitFields.

func (*InitializeParams) SetEnableExternalMEHints

func (s *InitializeParams) SetEnableExternalMEHints(v uint32)

SetEnableExternalMEHints writes the 1-bit member enableExternalMEHints. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableMEOnlyMode

func (s *InitializeParams) SetEnableMEOnlyMode(v uint32)

SetEnableMEOnlyMode writes the 1-bit member enableMEOnlyMode. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableOutputInVidmem

func (s *InitializeParams) SetEnableOutputInVidmem(v uint32)

SetEnableOutputInVidmem writes the 1-bit member enableOutputInVidmem. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableOutputStats

func (s *InitializeParams) SetEnableOutputStats(v uint32)

SetEnableOutputStats writes the 1-bit member enableOutputStats. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableReconFrameOutput

func (s *InitializeParams) SetEnableReconFrameOutput(v uint32)

SetEnableReconFrameOutput writes the 1-bit member enableReconFrameOutput. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableSubFrameWrite

func (s *InitializeParams) SetEnableSubFrameWrite(v uint32)

SetEnableSubFrameWrite writes the 1-bit member enableSubFrameWrite. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableUniDirectionalB

func (s *InitializeParams) SetEnableUniDirectionalB(v uint32)

SetEnableUniDirectionalB writes the 1-bit member enableUniDirectionalB. Bits of v above the member's width are discarded.

func (*InitializeParams) SetEnableWeightedPrediction

func (s *InitializeParams) SetEnableWeightedPrediction(v uint32)

SetEnableWeightedPrediction writes the 1-bit member enableWeightedPrediction. Bits of v above the member's width are discarded.

func (*InitializeParams) SetReportSliceOffsets

func (s *InitializeParams) SetReportSliceOffsets(v uint32)

SetReportSliceOffsets writes the 1-bit member reportSliceOffsets. Bits of v above the member's width are discarded.

func (*InitializeParams) SetReservedBitFields

func (s *InitializeParams) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 19-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*InitializeParams) SetSplitEncodeMode

func (s *InitializeParams) SetSplitEncodeMode(v uint32)

SetSplitEncodeMode writes the 4-bit member splitEncodeMode. Bits of v above the member's width are discarded.

func (*InitializeParams) SplitEncodeMode

func (s *InitializeParams) SplitEncodeMode() uint32

SplitEncodeMode reads the 4-bit member splitEncodeMode.

type InputResourceD3d12

type InputResourceD3d12 struct {
	Version         uint32          // uint32_t @0
	Reserved        uint32          // uint32_t @4
	PInputBuffer    uintptr         // NV_ENC_INPUT_PTR @8
	InputFencePoint FencePointD3d12 // NV_ENC_FENCE_POINT_D3D12 @16
	Reserved1       [16]uint32      // uint32_t[16] @80
	Reserved2       [16]uintptr     // void *[16] @144
}

InputResourceD3d12 corresponds to C NV_ENC_INPUT_RESOURCE_D3D12, declared in nvEncodeAPI.h:2791. Size 272, alignment 8.

type InputResourceOpenglTex

type InputResourceOpenglTex struct {
	Texture uint32 // uint32_t @0
	Target  uint32 // uint32_t @4
}

InputResourceOpenglTex corresponds to C NV_ENC_INPUT_RESOURCE_OPENGL_TEX, declared in nvEncodeAPI.h:2762. Size 8, alignment 4.

type InputResourceType

type InputResourceType int32

InputResourceType corresponds to C NV_ENC_INPUT_RESOURCE_TYPE.

const (
	InputResourceTypeDirectx       InputResourceType = 0x0 // NV_ENC_INPUT_RESOURCE_TYPE_DIRECTX
	InputResourceTypeCudadeviceptr InputResourceType = 0x1 // NV_ENC_INPUT_RESOURCE_TYPE_CUDADEVICEPTR
	InputResourceTypeCudaarray     InputResourceType = 0x2 // NV_ENC_INPUT_RESOURCE_TYPE_CUDAARRAY
	InputResourceTypeOpenglTex     InputResourceType = 0x3 // NV_ENC_INPUT_RESOURCE_TYPE_OPENGL_TEX
)

func (InputResourceType) String

func (e InputResourceType) String() string

String returns the constant name, or a numeric representation for unknown values.

type Level

type Level int32

Level corresponds to C NV_ENC_LEVEL.

const (
	LevelAutoselect    Level = 0   // NV_ENC_LEVEL_AUTOSELECT
	LevelH2641         Level = 10  // NV_ENC_LEVEL_H264_1
	LevelH2641b        Level = 9   // NV_ENC_LEVEL_H264_1b
	LevelH26411        Level = 11  // NV_ENC_LEVEL_H264_11
	LevelH26412        Level = 12  // NV_ENC_LEVEL_H264_12
	LevelH26413        Level = 13  // NV_ENC_LEVEL_H264_13
	LevelH2642         Level = 20  // NV_ENC_LEVEL_H264_2
	LevelH26421        Level = 21  // NV_ENC_LEVEL_H264_21
	LevelH26422        Level = 22  // NV_ENC_LEVEL_H264_22
	LevelH2643         Level = 30  // NV_ENC_LEVEL_H264_3
	LevelH26431        Level = 31  // NV_ENC_LEVEL_H264_31
	LevelH26432        Level = 32  // NV_ENC_LEVEL_H264_32
	LevelH2644         Level = 40  // NV_ENC_LEVEL_H264_4
	LevelH26441        Level = 41  // NV_ENC_LEVEL_H264_41
	LevelH26442        Level = 42  // NV_ENC_LEVEL_H264_42
	LevelH2645         Level = 50  // NV_ENC_LEVEL_H264_5
	LevelH26451        Level = 51  // NV_ENC_LEVEL_H264_51
	LevelH26452        Level = 52  // NV_ENC_LEVEL_H264_52
	LevelH26460        Level = 60  // NV_ENC_LEVEL_H264_60
	LevelH26461        Level = 61  // NV_ENC_LEVEL_H264_61
	LevelH26462        Level = 62  // NV_ENC_LEVEL_H264_62
	LevelHevc1         Level = 30  // NV_ENC_LEVEL_HEVC_1
	LevelHevc2         Level = 60  // NV_ENC_LEVEL_HEVC_2
	LevelHevc21        Level = 63  // NV_ENC_LEVEL_HEVC_21
	LevelHevc3         Level = 90  // NV_ENC_LEVEL_HEVC_3
	LevelHevc31        Level = 93  // NV_ENC_LEVEL_HEVC_31
	LevelHevc4         Level = 120 // NV_ENC_LEVEL_HEVC_4
	LevelHevc41        Level = 123 // NV_ENC_LEVEL_HEVC_41
	LevelHevc5         Level = 150 // NV_ENC_LEVEL_HEVC_5
	LevelHevc51        Level = 153 // NV_ENC_LEVEL_HEVC_51
	LevelHevc52        Level = 156 // NV_ENC_LEVEL_HEVC_52
	LevelHevc6         Level = 180 // NV_ENC_LEVEL_HEVC_6
	LevelHevc61        Level = 183 // NV_ENC_LEVEL_HEVC_61
	LevelHevc62        Level = 186 // NV_ENC_LEVEL_HEVC_62
	TierHevcMain       Level = 0   // NV_ENC_TIER_HEVC_MAIN
	TierHevcHigh       Level = 1   // NV_ENC_TIER_HEVC_HIGH
	LevelAV12          Level = 0   // NV_ENC_LEVEL_AV1_2
	LevelAV121         Level = 1   // NV_ENC_LEVEL_AV1_21
	LevelAV122         Level = 2   // NV_ENC_LEVEL_AV1_22
	LevelAV123         Level = 3   // NV_ENC_LEVEL_AV1_23
	LevelAV13          Level = 4   // NV_ENC_LEVEL_AV1_3
	LevelAV131         Level = 5   // NV_ENC_LEVEL_AV1_31
	LevelAV132         Level = 6   // NV_ENC_LEVEL_AV1_32
	LevelAV133         Level = 7   // NV_ENC_LEVEL_AV1_33
	LevelAV14          Level = 8   // NV_ENC_LEVEL_AV1_4
	LevelAV141         Level = 9   // NV_ENC_LEVEL_AV1_41
	LevelAV142         Level = 10  // NV_ENC_LEVEL_AV1_42
	LevelAV143         Level = 11  // NV_ENC_LEVEL_AV1_43
	LevelAV15          Level = 12  // NV_ENC_LEVEL_AV1_5
	LevelAV151         Level = 13  // NV_ENC_LEVEL_AV1_51
	LevelAV152         Level = 14  // NV_ENC_LEVEL_AV1_52
	LevelAV153         Level = 15  // NV_ENC_LEVEL_AV1_53
	LevelAV16          Level = 16  // NV_ENC_LEVEL_AV1_6
	LevelAV161         Level = 17  // NV_ENC_LEVEL_AV1_61
	LevelAV162         Level = 18  // NV_ENC_LEVEL_AV1_62
	LevelAV163         Level = 19  // NV_ENC_LEVEL_AV1_63
	LevelAV17          Level = 20  // NV_ENC_LEVEL_AV1_7
	LevelAV171         Level = 21  // NV_ENC_LEVEL_AV1_71
	LevelAV172         Level = 22  // NV_ENC_LEVEL_AV1_72
	LevelAV173         Level = 23  // NV_ENC_LEVEL_AV1_73
	LevelAV1Autoselect Level = 24  // NV_ENC_LEVEL_AV1_AUTOSELECT
	TierAV10           Level = 0   // NV_ENC_TIER_AV1_0
	TierAV11           Level = 1   // NV_ENC_TIER_AV1_1
)

func (Level) String

func (e Level) String() string

String returns the constant name, or a numeric representation for unknown values.

type LibraryConflictError

type LibraryConflictError struct {
	Loaded    string
	Requested string
}

LibraryConflictError reports a Load call naming a different library than the one already loaded. Only one library is loaded per process.

func (*LibraryConflictError) Error

func (e *LibraryConflictError) Error() string

Error reports the conflicting library paths.

type LockBitstream

type LockBitstream struct {
	Version uint32 // uint32_t @0

	OutputBitstream       uintptr     // void * @8
	SliceOffsets          uintptr     // uint32_t * @16
	FrameIdx              uint32      // uint32_t @24
	HwEncodeStatus        uint32      // uint32_t @28
	NumSlices             uint32      // uint32_t @32
	BitstreamSizeInBytes  uint32      // uint32_t @36
	OutputTimeStamp       uint64      // uint64_t @40
	OutputDuration        uint64      // uint64_t @48
	BitstreamBufferPtr    uintptr     // void * @56
	PictureType           PicType     // NV_ENC_PIC_TYPE @64
	PictureStruct         PicStruct   // NV_ENC_PIC_STRUCT @68
	FrameAvgQP            uint32      // uint32_t @72
	FrameSatd             uint32      // uint32_t @76
	LtrFrameIdx           uint32      // uint32_t @80
	LtrFrameBitmap        uint32      // uint32_t @84
	TemporalId            uint32      // uint32_t @88
	IntraMBCount          uint32      // uint32_t @92
	InterMBCount          uint32      // uint32_t @96
	AverageMVX            int32       // int32_t @100
	AverageMVY            int32       // int32_t @104
	AlphaLayerSizeInBytes uint32      // uint32_t @108
	OutputStatsPtrSize    uint32      // uint32_t @112
	Reserved              uint32      // uint32_t @116
	OutputStatsPtr        uintptr     // void * @120
	FrameIdxDisplay       uint32      // uint32_t @128
	Reserved1             [219]uint32 // uint32_t[219] @132
	Reserved2             [63]uintptr // void *[63] @1008
	ReservedInternal      [8]uint32   // uint32_t[8] @1512
	// contains filtered or unexported fields
}

LockBitstream corresponds to C NV_ENC_LOCK_BITSTREAM, declared in nvEncodeAPI.h:2675. Size 1544, alignment 8.

func (*LockBitstream) DoNotWait

func (s *LockBitstream) DoNotWait() uint32

DoNotWait reads the 1-bit member doNotWait.

func (*LockBitstream) GetRCStats

func (s *LockBitstream) GetRCStats() uint32

GetRCStats reads the 1-bit member getRCStats.

func (*LockBitstream) LtrFrame

func (s *LockBitstream) LtrFrame() uint32

LtrFrame reads the 1-bit member ltrFrame.

func (*LockBitstream) ReservedBitFields

func (s *LockBitstream) ReservedBitFields() uint32

ReservedBitFields reads the 29-bit member reservedBitFields.

func (*LockBitstream) SetDoNotWait

func (s *LockBitstream) SetDoNotWait(v uint32)

SetDoNotWait writes the 1-bit member doNotWait. Bits of v above the member's width are discarded.

func (*LockBitstream) SetGetRCStats

func (s *LockBitstream) SetGetRCStats(v uint32)

SetGetRCStats writes the 1-bit member getRCStats. Bits of v above the member's width are discarded.

func (*LockBitstream) SetLtrFrame

func (s *LockBitstream) SetLtrFrame(v uint32)

SetLtrFrame writes the 1-bit member ltrFrame. Bits of v above the member's width are discarded.

func (*LockBitstream) SetReservedBitFields

func (s *LockBitstream) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 29-bit member reservedBitFields. Bits of v above the member's width are discarded.

type LockInputBuffer

type LockInputBuffer struct {
	Version uint32 // uint32_t @0

	InputBuffer   uintptr     // NV_ENC_INPUT_PTR @8
	BufferDataPtr uintptr     // void * @16
	Pitch         uint32      // uint32_t @24
	Reserved1     [251]uint32 // uint32_t[251] @28
	Reserved2     [64]uintptr // void *[64] @1032
	// contains filtered or unexported fields
}

LockInputBuffer corresponds to C NV_ENC_LOCK_INPUT_BUFFER, declared in nvEncodeAPI.h:2722. Size 1544, alignment 8.

func (*LockInputBuffer) DoNotWait

func (s *LockInputBuffer) DoNotWait() uint32

DoNotWait reads the 1-bit member doNotWait.

func (*LockInputBuffer) ReservedBitFields

func (s *LockInputBuffer) ReservedBitFields() uint32

ReservedBitFields reads the 31-bit member reservedBitFields.

func (*LockInputBuffer) SetDoNotWait

func (s *LockInputBuffer) SetDoNotWait(v uint32)

SetDoNotWait writes the 1-bit member doNotWait. Bits of v above the member's width are discarded.

func (*LockInputBuffer) SetReservedBitFields

func (s *LockInputBuffer) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 31-bit member reservedBitFields. Bits of v above the member's width are discarded.

type LookaheadLevel

type LookaheadLevel int32

LookaheadLevel corresponds to C NV_ENC_LOOKAHEAD_LEVEL.

const (
	LookaheadLevel0          LookaheadLevel = 0  // NV_ENC_LOOKAHEAD_LEVEL_0
	LookaheadLevel1          LookaheadLevel = 1  // NV_ENC_LOOKAHEAD_LEVEL_1
	LookaheadLevel2          LookaheadLevel = 2  // NV_ENC_LOOKAHEAD_LEVEL_2
	LookaheadLevel3          LookaheadLevel = 3  // NV_ENC_LOOKAHEAD_LEVEL_3
	LookaheadLevelAutoselect LookaheadLevel = 15 // NV_ENC_LOOKAHEAD_LEVEL_AUTOSELECT
)

func (LookaheadLevel) String

func (e LookaheadLevel) String() string

String returns the constant name, or a numeric representation for unknown values.

type LookaheadPicParams

type LookaheadPicParams struct {
	Version     uint32      // uint32_t @0
	Reserved    uint32      // uint32_t @4
	InputBuffer uintptr     // NV_ENC_INPUT_PTR @8
	PictureType PicType     // NV_ENC_PIC_TYPE @16
	Reserved1   [63]uint32  // uint32_t[63] @20
	Reserved2   [64]uintptr // void *[64] @272
}

LookaheadPicParams corresponds to C NV_ENC_LOOKAHEAD_PIC_PARAMS, declared in nvEncodeAPI.h:1439. Size 784, alignment 8.

type MapInputResource

type MapInputResource struct {
	Version            uint32       // uint32_t @0
	SubResourceIndex   uint32       // uint32_t @4
	InputResource      uintptr      // void * @8
	RegisteredResource uintptr      // NV_ENC_REGISTERED_PTR @16
	MappedResource     uintptr      // NV_ENC_INPUT_PTR @24
	MappedBufferFmt    BufferFormat // NV_ENC_BUFFER_FORMAT @32
	Reserved1          [251]uint32  // uint32_t[251] @36
	Reserved2          [63]uintptr  // void *[63] @1040
}

MapInputResource corresponds to C NV_ENC_MAP_INPUT_RESOURCE, declared in nvEncodeAPI.h:2742. Size 1544, alignment 8.

type MasteringDisplayInfo

type MasteringDisplayInfo struct {
	G          ChromaPoints // CHROMA_POINTS @0
	B          ChromaPoints // CHROMA_POINTS @4
	R          ChromaPoints // CHROMA_POINTS @8
	WhitePoint ChromaPoints // CHROMA_POINTS @12
	MaxLuma    uint32       // uint32_t @16
	MinLuma    uint32       // uint32_t @20
}

MasteringDisplayInfo corresponds to C MASTERING_DISPLAY_INFO, declared in nvEncodeAPI.h:1700. Size 24, alignment 4.

type MemoryHeap

type MemoryHeap int32

MemoryHeap corresponds to C NV_ENC_MEMORY_HEAP.

const (
	MemoryHeapAutoselect     MemoryHeap = 0 // NV_ENC_MEMORY_HEAP_AUTOSELECT
	MemoryHeapVid            MemoryHeap = 1 // NV_ENC_MEMORY_HEAP_VID
	MemoryHeapSysmemCached   MemoryHeap = 2 // NV_ENC_MEMORY_HEAP_SYSMEM_CACHED
	MemoryHeapSysmemUncached MemoryHeap = 3 // NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED
)

func (MemoryHeap) String

func (e MemoryHeap) String() string

String returns the constant name, or a numeric representation for unknown values.

type MeonlyParams

type MeonlyParams struct {
	Version              uint32                              // uint32_t @0
	InputWidth           uint32                              // uint32_t @4
	InputHeight          uint32                              // uint32_t @8
	Reserved             uint32                              // uint32_t @12
	InputBuffer          uintptr                             // NV_ENC_INPUT_PTR @16
	ReferenceFrame       uintptr                             // NV_ENC_INPUT_PTR @24
	MvBuffer             uintptr                             // NV_ENC_OUTPUT_PTR @32
	Reserved2            uint32                              // uint32_t @40
	BufferFmt            BufferFormat                        // NV_ENC_BUFFER_FORMAT @44
	CompletionEvent      uintptr                             // void * @48
	ViewID               uint32                              // uint32_t @56
	MeHintCountsPerBlock [2]ExternalMeHintCountsPerBlocktype // NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE[2] @60

	MeExternalHints uintptr     // NVENC_EXTERNAL_ME_HINT * @96
	Reserved1       [241]uint32 // uint32_t[241] @104

	Reserved3 [59]uintptr // void *[59] @1072
	// contains filtered or unexported fields
}

MeonlyParams corresponds to C NV_ENC_MEONLY_PARAMS, declared in nvEncodeAPI.h:2636. Size 1544, alignment 8.

type MultiPass

type MultiPass int32

MultiPass corresponds to C NV_ENC_MULTI_PASS.

const (
	MultiPassDisabled        MultiPass = 0x0 // NV_ENC_MULTI_PASS_DISABLED
	TwoPassQuarterResolution MultiPass = 0x1 // NV_ENC_TWO_PASS_QUARTER_RESOLUTION
	TwoPassFullResolution    MultiPass = 0x2 // NV_ENC_TWO_PASS_FULL_RESOLUTION
)

func (MultiPass) String

func (e MultiPass) String() string

String returns the constant name, or a numeric representation for unknown values.

type MvPrecision

type MvPrecision int32

MvPrecision corresponds to C NV_ENC_MV_PRECISION.

const (
	MvPrecisionDefault    MvPrecision = 0x0  // NV_ENC_MV_PRECISION_DEFAULT
	MvPrecisionFullPel    MvPrecision = 0x01 // NV_ENC_MV_PRECISION_FULL_PEL
	MvPrecisionHalfPel    MvPrecision = 0x02 // NV_ENC_MV_PRECISION_HALF_PEL
	MvPrecisionQuarterPel MvPrecision = 0x03 // NV_ENC_MV_PRECISION_QUARTER_PEL
)

func (MvPrecision) String

func (e MvPrecision) String() string

String returns the constant name, or a numeric representation for unknown values.

type Mvector

type Mvector struct {
	Mvx int16 // int16_t @0
	Mvy int16 // int16_t @2
}

Mvector corresponds to C NV_ENC_MVECTOR, declared in nvEncodeAPI.h:1493. Size 4, alignment 2.

type NumRefFrames

type NumRefFrames int32

NumRefFrames corresponds to C NV_ENC_NUM_REF_FRAMES.

const (
	NumRefFramesAutoselect NumRefFrames = 0x0 // NV_ENC_NUM_REF_FRAMES_AUTOSELECT
	NumRefFrames1          NumRefFrames = 0x1 // NV_ENC_NUM_REF_FRAMES_1
	NumRefFrames2          NumRefFrames = 0x2 // NV_ENC_NUM_REF_FRAMES_2
	NumRefFrames3          NumRefFrames = 0x3 // NV_ENC_NUM_REF_FRAMES_3
	NumRefFrames4          NumRefFrames = 0x4 // NV_ENC_NUM_REF_FRAMES_4
	NumRefFrames5          NumRefFrames = 0x5 // NV_ENC_NUM_REF_FRAMES_5
	NumRefFrames6          NumRefFrames = 0x6 // NV_ENC_NUM_REF_FRAMES_6
	NumRefFrames7          NumRefFrames = 0x7 // NV_ENC_NUM_REF_FRAMES_7
)

func (NumRefFrames) String

func (e NumRefFrames) String() string

String returns the constant name, or a numeric representation for unknown values.

type OpenEncodeSessionExParams

type OpenEncodeSessionExParams struct {
	Version    uint32      // uint32_t @0
	DeviceType DeviceType  // NV_ENC_DEVICE_TYPE @4
	Device     uintptr     // void * @8
	Reserved   uintptr     // void * @16
	ApiVersion uint32      // uint32_t @24
	Reserved1  [253]uint32 // uint32_t[253] @28
	Reserved2  [64]uintptr // void *[64] @1040
}

OpenEncodeSessionExParams corresponds to C NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS, declared in nvEncodeAPI.h:2943. Size 1552, alignment 8.

type OutputResourceD3d12

type OutputResourceD3d12 struct {
	Version          uint32          // uint32_t @0
	Reserved         uint32          // uint32_t @4
	POutputBuffer    uintptr         // NV_ENC_INPUT_PTR @8
	OutputFencePoint FencePointD3d12 // NV_ENC_FENCE_POINT_D3D12 @16
	Reserved1        [16]uint32      // uint32_t[16] @80
	Reserved2        [16]uintptr     // void *[16] @144
}

OutputResourceD3d12 corresponds to C NV_ENC_OUTPUT_RESOURCE_D3D12, declared in nvEncodeAPI.h:2809. Size 272, alignment 8.

type OutputStatsBlock

type OutputStatsBlock struct {
	Version   uint32     // uint32_t @0
	QP        uint8      // uint8_t @4
	Reserved  [3]uint8   // uint8_t[3] @5
	Bitcount  uint32     // uint32_t @8
	SatdCost  uint32     // uint32_t @12
	Reserved1 [12]uint32 // uint32_t[12] @16
}

OutputStatsBlock corresponds to C NV_ENC_OUTPUT_STATS_BLOCK, declared in nvEncodeAPI.h:1394. Size 64, alignment 4.

type OutputStatsLevel

type OutputStatsLevel int32

OutputStatsLevel corresponds to C NV_ENC_OUTPUT_STATS_LEVEL.

const (
	OutputStatsNone       OutputStatsLevel = 0 // NV_ENC_OUTPUT_STATS_NONE
	OutputStatsBlockLevel OutputStatsLevel = 1 // NV_ENC_OUTPUT_STATS_BLOCK_LEVEL
	OutputStatsRowLevel   OutputStatsLevel = 2 // NV_ENC_OUTPUT_STATS_ROW_LEVEL
)

func (OutputStatsLevel) String

func (e OutputStatsLevel) String() string

String returns the constant name, or a numeric representation for unknown values.

type OutputStatsRow

type OutputStatsRow struct {
	Version   uint32     // uint32_t @0
	QP        uint8      // uint8_t @4
	Reserved  [3]uint8   // uint8_t[3] @5
	Bitcount  uint32     // uint32_t @8
	SatdCost  uint32     // uint32_t @12
	Reserved1 [12]uint32 // uint32_t[12] @16
}

OutputStatsRow corresponds to C NV_ENC_OUTPUT_STATS_ROW, declared in nvEncodeAPI.h:1410. Size 64, alignment 4.

type ParamsFrameFieldMode

type ParamsFrameFieldMode int32

ParamsFrameFieldMode corresponds to C NV_ENC_PARAMS_FRAME_FIELD_MODE.

const (
	ParamsFrameFieldModeFrame ParamsFrameFieldMode = 0x01 // NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME
	ParamsFrameFieldModeField ParamsFrameFieldMode = 0x02 // NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD
	ParamsFrameFieldModeMbaff ParamsFrameFieldMode = 0x03 // NV_ENC_PARAMS_FRAME_FIELD_MODE_MBAFF
)

func (ParamsFrameFieldMode) String

func (e ParamsFrameFieldMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type ParamsRcMode

type ParamsRcMode int32

ParamsRcMode corresponds to C NV_ENC_PARAMS_RC_MODE.

const (
	ParamsRcConstqp ParamsRcMode = 0x0 // NV_ENC_PARAMS_RC_CONSTQP
	ParamsRcVbr     ParamsRcMode = 0x1 // NV_ENC_PARAMS_RC_VBR
	ParamsRcCbr     ParamsRcMode = 0x2 // NV_ENC_PARAMS_RC_CBR
)

func (ParamsRcMode) String

func (e ParamsRcMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type PicFlags

type PicFlags int32

PicFlags corresponds to C NV_ENC_PIC_FLAGS.

const (
	PicFlagForceintra             PicFlags = 0x1  // NV_ENC_PIC_FLAG_FORCEINTRA
	PicFlagForceidr               PicFlags = 0x2  // NV_ENC_PIC_FLAG_FORCEIDR
	PicFlagOutputSpspps           PicFlags = 0x4  // NV_ENC_PIC_FLAG_OUTPUT_SPSPPS
	PicFlagEos                    PicFlags = 0x8  // NV_ENC_PIC_FLAG_EOS
	PicFlagDisableEncStateAdvance PicFlags = 0x10 // NV_ENC_PIC_FLAG_DISABLE_ENC_STATE_ADVANCE
	PicFlagOutputReconFrame       PicFlags = 0x20 // NV_ENC_PIC_FLAG_OUTPUT_RECON_FRAME
)

func (PicFlags) String

func (e PicFlags) String() string

String returns the constant name, or a numeric representation for unknown values.

type PicParams

type PicParams struct {
	Version         uint32       // uint32_t @0
	InputWidth      uint32       // uint32_t @4
	InputHeight     uint32       // uint32_t @8
	InputPitch      uint32       // uint32_t @12
	EncodePicFlags  uint32       // uint32_t @16
	FrameIdx        uint32       // uint32_t @20
	InputTimeStamp  uint64       // uint64_t @24
	InputDuration   uint64       // uint64_t @32
	InputBuffer     uintptr      // NV_ENC_INPUT_PTR @40
	OutputBitstream uintptr      // NV_ENC_OUTPUT_PTR @48
	CompletionEvent uintptr      // void * @56
	BufferFmt       BufferFormat // NV_ENC_BUFFER_FORMAT @64
	PictureStruct   PicStruct    // NV_ENC_PIC_STRUCT @68
	PictureType     PicType      // NV_ENC_PIC_TYPE @72

	CodecPicParams       CodecPicParams                      // NV_ENC_CODEC_PIC_PARAMS @80
	MeHintCountsPerBlock [2]ExternalMeHintCountsPerBlocktype // NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE[2] @1624
	MeExternalHints      uintptr                             // NVENC_EXTERNAL_ME_HINT * @1656
	Reserved2            [7]uint32                           // uint32_t[7] @1664

	Reserved5         [2]uintptr  // void *[2] @1696
	QpDeltaMap        uintptr     // int8_t * @1712
	QpDeltaMapSize    uint32      // uint32_t @1720
	ReservedBitFields uint32      // uint32_t @1724
	MeHintRefPicDist  [2]uint16   // uint16_t[2] @1728
	Reserved4         uint32      // uint32_t @1732
	AlphaBuffer       uintptr     // NV_ENC_INPUT_PTR @1736
	MeExternalSbHints uintptr     // NVENC_EXTERNAL_ME_SB_HINT * @1744
	MeSbHintsCount    uint32      // uint32_t @1752
	StateBufferIdx    uint32      // uint32_t @1756
	OutputReconBuffer uintptr     // NV_ENC_OUTPUT_PTR @1760
	Reserved3         [284]uint32 // uint32_t[284] @1768
	Reserved6         [57]uintptr // void *[57] @2904
	// contains filtered or unexported fields
}

PicParams corresponds to C NV_ENC_PIC_PARAMS, declared in nvEncodeAPI.h:2564. Size 3360, alignment 8.

type PicParamsAV1

type PicParamsAV1 struct {
	DisplayPOCSyntax              uint32 // uint32_t @0
	RefPicFlag                    uint32 // uint32_t @4
	TemporalId                    uint32 // uint32_t @8
	ForceIntraRefreshWithFrameCnt uint32 // uint32_t @12

	NumTileColumns     uint32      // uint32_t @20
	NumTileRows        uint32      // uint32_t @24
	Reserved           uint32      // uint32_t @28
	TileWidths         uintptr     // uint32_t * @32
	TileHeights        uintptr     // uint32_t * @40
	ObuPayloadArrayCnt uint32      // uint32_t @48
	Reserved1          uint32      // uint32_t @52
	ObuPayloadArray    uintptr     // NV_ENC_SEI_PAYLOAD * @56
	FilmGrainParams    uintptr     // NV_ENC_FILM_GRAIN_PARAMS_AV1 * @64
	LtrMarkFrameIdx    uint32      // uint32_t @72
	LtrUseFrameBitmap  uint32      // uint32_t @76
	NumTemporalLayers  uint32      // uint32_t @80
	Reserved4          uint32      // uint32_t @84
	PMaxCll            uintptr     // CONTENT_LIGHT_LEVEL * @88
	PMasteringDisplay  uintptr     // MASTERING_DISPLAY_INFO * @96
	Reserved2          [242]uint32 // uint32_t[242] @104
	Reserved3          [59]uintptr // void *[59] @1072
	// contains filtered or unexported fields
}

PicParamsAV1 corresponds to C NV_ENC_PIC_PARAMS_AV1, declared in nvEncodeAPI.h:2495. Size 1544, alignment 8.

func (*PicParamsAV1) Arf2FrameFlag

func (s *PicParamsAV1) Arf2FrameFlag() uint32

Arf2FrameFlag reads the 1-bit member arf2FrameFlag.

func (*PicParamsAV1) ArfFrameFlag

func (s *PicParamsAV1) ArfFrameFlag() uint32

ArfFrameFlag reads the 1-bit member arfFrameFlag.

func (*PicParamsAV1) BwdFrameFlag

func (s *PicParamsAV1) BwdFrameFlag() uint32

BwdFrameFlag reads the 1-bit member bwdFrameFlag.

func (*PicParamsAV1) EnableCustomTileConfig

func (s *PicParamsAV1) EnableCustomTileConfig() uint32

EnableCustomTileConfig reads the 1-bit member enableCustomTileConfig.

func (*PicParamsAV1) ErrorResilientModeFlag

func (s *PicParamsAV1) ErrorResilientModeFlag() uint32

ErrorResilientModeFlag reads the 1-bit member errorResilientModeFlag.

func (*PicParamsAV1) FilmGrainParamsUpdate

func (s *PicParamsAV1) FilmGrainParamsUpdate() uint32

FilmGrainParamsUpdate reads the 1-bit member filmGrainParamsUpdate.

func (*PicParamsAV1) GoldenFrameFlag

func (s *PicParamsAV1) GoldenFrameFlag() uint32

GoldenFrameFlag reads the 1-bit member goldenFrameFlag.

func (*PicParamsAV1) LtrMarkFrame

func (s *PicParamsAV1) LtrMarkFrame() uint32

LtrMarkFrame reads the 1-bit member ltrMarkFrame.

func (*PicParamsAV1) LtrUseFrames

func (s *PicParamsAV1) LtrUseFrames() uint32

LtrUseFrames reads the 1-bit member ltrUseFrames.

func (*PicParamsAV1) OverlayFrameFlag

func (s *PicParamsAV1) OverlayFrameFlag() uint32

OverlayFrameFlag reads the 1-bit member overlayFrameFlag.

func (*PicParamsAV1) ReservedBitFields

func (s *PicParamsAV1) ReservedBitFields() uint32

ReservedBitFields reads the 19-bit member reservedBitFields.

func (*PicParamsAV1) SetArf2FrameFlag

func (s *PicParamsAV1) SetArf2FrameFlag(v uint32)

SetArf2FrameFlag writes the 1-bit member arf2FrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetArfFrameFlag

func (s *PicParamsAV1) SetArfFrameFlag(v uint32)

SetArfFrameFlag writes the 1-bit member arfFrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetBwdFrameFlag

func (s *PicParamsAV1) SetBwdFrameFlag(v uint32)

SetBwdFrameFlag writes the 1-bit member bwdFrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetEnableCustomTileConfig

func (s *PicParamsAV1) SetEnableCustomTileConfig(v uint32)

SetEnableCustomTileConfig writes the 1-bit member enableCustomTileConfig. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetErrorResilientModeFlag

func (s *PicParamsAV1) SetErrorResilientModeFlag(v uint32)

SetErrorResilientModeFlag writes the 1-bit member errorResilientModeFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetFilmGrainParamsUpdate

func (s *PicParamsAV1) SetFilmGrainParamsUpdate(v uint32)

SetFilmGrainParamsUpdate writes the 1-bit member filmGrainParamsUpdate. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetGoldenFrameFlag

func (s *PicParamsAV1) SetGoldenFrameFlag(v uint32)

SetGoldenFrameFlag writes the 1-bit member goldenFrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetLtrMarkFrame

func (s *PicParamsAV1) SetLtrMarkFrame(v uint32)

SetLtrMarkFrame writes the 1-bit member ltrMarkFrame. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetLtrUseFrames

func (s *PicParamsAV1) SetLtrUseFrames(v uint32)

SetLtrUseFrames writes the 1-bit member ltrUseFrames. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetOverlayFrameFlag

func (s *PicParamsAV1) SetOverlayFrameFlag(v uint32)

SetOverlayFrameFlag writes the 1-bit member overlayFrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetReservedBitFields

func (s *PicParamsAV1) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 19-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetShowExistingFrameFlag

func (s *PicParamsAV1) SetShowExistingFrameFlag(v uint32)

SetShowExistingFrameFlag writes the 1-bit member showExistingFrameFlag. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetTemporalConfigUpdate

func (s *PicParamsAV1) SetTemporalConfigUpdate(v uint32)

SetTemporalConfigUpdate writes the 1-bit member temporalConfigUpdate. Bits of v above the member's width are discarded.

func (*PicParamsAV1) SetTileConfigUpdate

func (s *PicParamsAV1) SetTileConfigUpdate(v uint32)

SetTileConfigUpdate writes the 1-bit member tileConfigUpdate. Bits of v above the member's width are discarded.

func (*PicParamsAV1) ShowExistingFrameFlag

func (s *PicParamsAV1) ShowExistingFrameFlag() uint32

ShowExistingFrameFlag reads the 1-bit member showExistingFrameFlag.

func (*PicParamsAV1) TemporalConfigUpdate

func (s *PicParamsAV1) TemporalConfigUpdate() uint32

TemporalConfigUpdate reads the 1-bit member temporalConfigUpdate.

func (*PicParamsAV1) TileConfigUpdate

func (s *PicParamsAV1) TileConfigUpdate() uint32

TileConfigUpdate reads the 1-bit member tileConfigUpdate.

type PicParamsH264

type PicParamsH264 struct {
	DisplayPOCSyntax              uint32 // uint32_t @0
	Reserved3                     uint32 // uint32_t @4
	RefPicFlag                    uint32 // uint32_t @8
	ColourPlaneId                 uint32 // uint32_t @12
	ForceIntraRefreshWithFrameCnt uint32 // uint32_t @16

	SliceTypeData        uintptr          // uint8_t * @24
	SliceTypeArrayCnt    uint32           // uint32_t @32
	SeiPayloadArrayCnt   uint32           // uint32_t @36
	SeiPayloadArray      uintptr          // NV_ENC_SEI_PAYLOAD * @40
	SliceMode            uint32           // uint32_t @48
	SliceModeData        uint32           // uint32_t @52
	LtrMarkFrameIdx      uint32           // uint32_t @56
	LtrUseFrameBitmap    uint32           // uint32_t @60
	LtrUsageMode         uint32           // uint32_t @64
	ForceIntraSliceCount uint32           // uint32_t @68
	ForceIntraSliceIdx   uintptr          // uint32_t * @72
	H264ExtPicParams     PicParamsH264Ext // NV_ENC_PIC_PARAMS_H264_EXT @80
	TimeCode             TimeCode         // NV_ENC_TIME_CODE @208
	Reserved             [202]uint32      // uint32_t[202] @240
	Reserved2            [61]uintptr      // void *[61] @1048
	// contains filtered or unexported fields
}

PicParamsH264 corresponds to C NV_ENC_PIC_PARAMS_H264, declared in nvEncodeAPI.h:2395. Size 1536, alignment 8.

func (*PicParamsH264) ConstrainedFrame

func (s *PicParamsH264) ConstrainedFrame() uint32

ConstrainedFrame reads the 1-bit member constrainedFrame.

func (*PicParamsH264) LtrMarkFrame

func (s *PicParamsH264) LtrMarkFrame() uint32

LtrMarkFrame reads the 1-bit member ltrMarkFrame.

func (*PicParamsH264) LtrUseFrames

func (s *PicParamsH264) LtrUseFrames() uint32

LtrUseFrames reads the 1-bit member ltrUseFrames.

func (*PicParamsH264) ReservedBitFields

func (s *PicParamsH264) ReservedBitFields() uint32

ReservedBitFields reads the 28-bit member reservedBitFields.

func (*PicParamsH264) SetConstrainedFrame

func (s *PicParamsH264) SetConstrainedFrame(v uint32)

SetConstrainedFrame writes the 1-bit member constrainedFrame. Bits of v above the member's width are discarded.

func (*PicParamsH264) SetLtrMarkFrame

func (s *PicParamsH264) SetLtrMarkFrame(v uint32)

SetLtrMarkFrame writes the 1-bit member ltrMarkFrame. Bits of v above the member's width are discarded.

func (*PicParamsH264) SetLtrUseFrames

func (s *PicParamsH264) SetLtrUseFrames(v uint32)

SetLtrUseFrames writes the 1-bit member ltrUseFrames. Bits of v above the member's width are discarded.

func (*PicParamsH264) SetReservedBitFields

func (s *PicParamsH264) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 28-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*PicParamsH264) SetSliceModeDataUpdate

func (s *PicParamsH264) SetSliceModeDataUpdate(v uint32)

SetSliceModeDataUpdate writes the 1-bit member sliceModeDataUpdate. Bits of v above the member's width are discarded.

func (*PicParamsH264) SliceModeDataUpdate

func (s *PicParamsH264) SliceModeDataUpdate() uint32

SliceModeDataUpdate reads the 1-bit member sliceModeDataUpdate.

type PicParamsH264Ext

type PicParamsH264Ext struct {
	Raw [128]byte
	// contains filtered or unexported fields
}

PicParamsH264Ext corresponds to C NV_ENC_PIC_PARAMS_H264_EXT, declared in nvEncodeAPI.h:2372. It is a union: the members below all start at offset 0 and share the same 128 bytes, so writing one invalidates the others. Size 128, alignment 8.

func (*PicParamsH264Ext) MvcPicParams

func (u *PicParamsH264Ext) MvcPicParams() *PicParamsMvc

MvcPicParams returns a pointer to the union's storage read as PicParamsMvc (C NV_ENC_PIC_PARAMS_MVC).

func (*PicParamsH264Ext) Reserved1

func (u *PicParamsH264Ext) Reserved1() *[32]uint32

Reserved1 returns a pointer to the union's storage read as [32]uint32 (C uint32_t[32]).

type PicParamsHevc

type PicParamsHevc struct {
	DisplayPOCSyntax              uint32 // uint32_t @0
	RefPicFlag                    uint32 // uint32_t @4
	TemporalId                    uint32 // uint32_t @8
	ForceIntraRefreshWithFrameCnt uint32 // uint32_t @12

	Reserved1               uint32      // uint32_t @20
	SliceTypeData           uintptr     // uint8_t * @24
	SliceTypeArrayCnt       uint32      // uint32_t @32
	SliceMode               uint32      // uint32_t @36
	SliceModeData           uint32      // uint32_t @40
	LtrMarkFrameIdx         uint32      // uint32_t @44
	LtrUseFrameBitmap       uint32      // uint32_t @48
	LtrUsageMode            uint32      // uint32_t @52
	SeiPayloadArrayCnt      uint32      // uint32_t @56
	Reserved                uint32      // uint32_t @60
	SeiPayloadArray         uintptr     // NV_ENC_SEI_PAYLOAD * @64
	TimeCode                TimeCode    // NV_ENC_TIME_CODE @72
	NumTemporalLayers       uint32      // uint32_t @104
	ViewId                  uint32      // uint32_t @108
	P3DReferenceDisplayInfo uintptr     // HEVC_3D_REFERENCE_DISPLAY_INFO * @112
	PMaxCll                 uintptr     // CONTENT_LIGHT_LEVEL * @120
	PMasteringDisplay       uintptr     // MASTERING_DISPLAY_INFO * @128
	Reserved2               [234]uint32 // uint32_t[234] @136
	Reserved3               [58]uintptr // void *[58] @1072
	// contains filtered or unexported fields
}

PicParamsHevc corresponds to C NV_ENC_PIC_PARAMS_HEVC, declared in nvEncodeAPI.h:2441. Size 1536, alignment 8.

func (*PicParamsHevc) ConstrainedFrame

func (s *PicParamsHevc) ConstrainedFrame() uint32

ConstrainedFrame reads the 1-bit member constrainedFrame.

func (*PicParamsHevc) LtrMarkFrame

func (s *PicParamsHevc) LtrMarkFrame() uint32

LtrMarkFrame reads the 1-bit member ltrMarkFrame.

func (*PicParamsHevc) LtrUseFrames

func (s *PicParamsHevc) LtrUseFrames() uint32

LtrUseFrames reads the 1-bit member ltrUseFrames.

func (*PicParamsHevc) ReservedBitFields

func (s *PicParamsHevc) ReservedBitFields() uint32

ReservedBitFields reads the 27-bit member reservedBitFields.

func (*PicParamsHevc) SetConstrainedFrame

func (s *PicParamsHevc) SetConstrainedFrame(v uint32)

SetConstrainedFrame writes the 1-bit member constrainedFrame. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SetLtrMarkFrame

func (s *PicParamsHevc) SetLtrMarkFrame(v uint32)

SetLtrMarkFrame writes the 1-bit member ltrMarkFrame. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SetLtrUseFrames

func (s *PicParamsHevc) SetLtrUseFrames(v uint32)

SetLtrUseFrames writes the 1-bit member ltrUseFrames. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SetReservedBitFields

func (s *PicParamsHevc) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 27-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SetSliceModeDataUpdate

func (s *PicParamsHevc) SetSliceModeDataUpdate(v uint32)

SetSliceModeDataUpdate writes the 1-bit member sliceModeDataUpdate. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SetTemporalConfigUpdate

func (s *PicParamsHevc) SetTemporalConfigUpdate(v uint32)

SetTemporalConfigUpdate writes the 1-bit member temporalConfigUpdate. Bits of v above the member's width are discarded.

func (*PicParamsHevc) SliceModeDataUpdate

func (s *PicParamsHevc) SliceModeDataUpdate() uint32

SliceModeDataUpdate reads the 1-bit member sliceModeDataUpdate.

func (*PicParamsHevc) TemporalConfigUpdate

func (s *PicParamsHevc) TemporalConfigUpdate() uint32

TemporalConfigUpdate reads the 1-bit member temporalConfigUpdate.

type PicParamsMvc

type PicParamsMvc struct {
	Version    uint32     // uint32_t @0
	ViewID     uint32     // uint32_t @4
	TemporalID uint32     // uint32_t @8
	PriorityID uint32     // uint32_t @12
	Reserved1  [12]uint32 // uint32_t[12] @16
	Reserved2  [8]uintptr // void *[8] @64
}

PicParamsMvc corresponds to C NV_ENC_PIC_PARAMS_MVC, declared in nvEncodeAPI.h:2354. Size 128, alignment 8.

type PicStruct

type PicStruct int32

PicStruct corresponds to C NV_ENC_PIC_STRUCT.

const (
	PicStructFrame          PicStruct = 0x01 // NV_ENC_PIC_STRUCT_FRAME
	PicStructFieldTopBottom PicStruct = 0x02 // NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM
	PicStructFieldBottomTop PicStruct = 0x03 // NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP
)

func (PicStruct) String

func (e PicStruct) String() string

String returns the constant name, or a numeric representation for unknown values.

type PicType

type PicType int32

PicType corresponds to C NV_ENC_PIC_TYPE.

const (
	PicTypeP            PicType = 0x0  // NV_ENC_PIC_TYPE_P
	PicTypeB            PicType = 0x01 // NV_ENC_PIC_TYPE_B
	PicTypeI            PicType = 0x02 // NV_ENC_PIC_TYPE_I
	PicTypeIdr          PicType = 0x03 // NV_ENC_PIC_TYPE_IDR
	PicTypeBi           PicType = 0x04 // NV_ENC_PIC_TYPE_BI
	PicTypeSkipped      PicType = 0x05 // NV_ENC_PIC_TYPE_SKIPPED
	PicTypeIntraRefresh PicType = 0x06 // NV_ENC_PIC_TYPE_INTRA_REFRESH
	PicTypeNonrefP      PicType = 0x07 // NV_ENC_PIC_TYPE_NONREF_P
	PicTypeSwitch       PicType = 0x08 // NV_ENC_PIC_TYPE_SWITCH
	PicTypeUnknown      PicType = 0xFF // NV_ENC_PIC_TYPE_UNKNOWN
)

func (PicType) String

func (e PicType) String() string

String returns the constant name, or a numeric representation for unknown values.

type PresetConfig

type PresetConfig struct {
	Version   uint32      // uint32_t @0
	Reserved  uint32      // uint32_t @4
	PresetCfg Config      // NV_ENC_CONFIG @8
	Reserved1 [256]uint32 // uint32_t[256] @3592
	Reserved2 [64]uintptr // void *[64] @4616
}

PresetConfig corresponds to C NV_ENC_PRESET_CONFIG, declared in nvEncodeAPI.h:2337. Size 5128, alignment 8.

type Qp

type Qp struct {
	QpInterP uint32 // uint32_t @0
	QpInterB uint32 // uint32_t @4
	QpIntra  uint32 // uint32_t @8
}

Qp corresponds to C NV_ENC_QP, declared in nvEncodeAPI.h:1543. Size 12, alignment 4.

type QpMapMode

type QpMapMode int32

QpMapMode corresponds to C NV_ENC_QP_MAP_MODE.

const (
	QpMapDisabled QpMapMode = 0x0 // NV_ENC_QP_MAP_DISABLED
	QpMapEmphasis QpMapMode = 0x1 // NV_ENC_QP_MAP_EMPHASIS
	QpMapDelta    QpMapMode = 0x2 // NV_ENC_QP_MAP_DELTA
	QpMap         QpMapMode = 0x3 // NV_ENC_QP_MAP
)

func (QpMapMode) String

func (e QpMapMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type RcParams

type RcParams struct {
	Version         uint32       // uint32_t @0
	RateControlMode ParamsRcMode // NV_ENC_PARAMS_RC_MODE @4
	ConstQP         Qp           // NV_ENC_QP @8
	AverageBitRate  uint32       // uint32_t @20
	MaxBitRate      uint32       // uint32_t @24
	VbvBufferSize   uint32       // uint32_t @28
	VbvInitialDelay uint32       // uint32_t @32

	MinQP                  Qp             // NV_ENC_QP @40
	MaxQP                  Qp             // NV_ENC_QP @52
	InitialRCQP            Qp             // NV_ENC_QP @64
	TemporallayerIdxMask   uint32         // uint32_t @76
	TemporalLayerQP        [8]uint8       // uint8_t[8] @80
	TargetQuality          uint8          // uint8_t @88
	TargetQualityLSB       uint8          // uint8_t @89
	LookaheadDepth         uint16         // uint16_t @90
	LowDelayKeyFrameScale  uint8          // uint8_t @92
	YDcQPIndexOffset       int8           // int8_t @93
	UDcQPIndexOffset       int8           // int8_t @94
	VDcQPIndexOffset       int8           // int8_t @95
	QpMapMode              QpMapMode      // NV_ENC_QP_MAP_MODE @96
	MultiPass              MultiPass      // NV_ENC_MULTI_PASS @100
	AlphaLayerBitrateRatio uint32         // uint32_t @104
	CbQPIndexOffset        int8           // int8_t @108
	CrQPIndexOffset        int8           // int8_t @109
	Reserved2              uint16         // uint16_t @110
	LookaheadLevel         LookaheadLevel // NV_ENC_LOOKAHEAD_LEVEL @112
	ViewBitrateRatios      [7]uint8       // uint8_t[7] @116
	Reserved3              uint8          // uint8_t @123
	Reserved1              uint32         // uint32_t @124
	// contains filtered or unexported fields
}

RcParams corresponds to C NV_ENC_RC_PARAMS, declared in nvEncodeAPI.h:1555. Size 128, alignment 4.

func (*RcParams) AqStrength

func (s *RcParams) AqStrength() uint32

AqStrength reads the 4-bit member aqStrength.

func (*RcParams) DisableBadapt

func (s *RcParams) DisableBadapt() uint32

DisableBadapt reads the 1-bit member disableBadapt.

func (*RcParams) DisableIadapt

func (s *RcParams) DisableIadapt() uint32

DisableIadapt reads the 1-bit member disableIadapt.

func (*RcParams) EnableAQ

func (s *RcParams) EnableAQ() uint32

EnableAQ reads the 1-bit member enableAQ.

func (*RcParams) EnableExtLookahead

func (s *RcParams) EnableExtLookahead() uint32

EnableExtLookahead reads the 1-bit member enableExtLookahead.

func (*RcParams) EnableInitialRCQP

func (s *RcParams) EnableInitialRCQP() uint32

EnableInitialRCQP reads the 1-bit member enableInitialRCQP.

func (*RcParams) EnableLookahead

func (s *RcParams) EnableLookahead() uint32

EnableLookahead reads the 1-bit member enableLookahead.

func (*RcParams) EnableMaxQP

func (s *RcParams) EnableMaxQP() uint32

EnableMaxQP reads the 1-bit member enableMaxQP.

func (*RcParams) EnableMinQP

func (s *RcParams) EnableMinQP() uint32

EnableMinQP reads the 1-bit member enableMinQP.

func (*RcParams) EnableNonRefP

func (s *RcParams) EnableNonRefP() uint32

EnableNonRefP reads the 1-bit member enableNonRefP.

func (*RcParams) EnableTemporalAQ

func (s *RcParams) EnableTemporalAQ() uint32

EnableTemporalAQ reads the 1-bit member enableTemporalAQ.

func (*RcParams) ReservedBitField1

func (s *RcParams) ReservedBitField1() uint32

ReservedBitField1 reads the 1-bit member reservedBitField1.

func (*RcParams) ReservedBitFields

func (s *RcParams) ReservedBitFields() uint32

ReservedBitFields reads the 15-bit member reservedBitFields.

func (*RcParams) SetAqStrength

func (s *RcParams) SetAqStrength(v uint32)

SetAqStrength writes the 4-bit member aqStrength. Bits of v above the member's width are discarded.

func (*RcParams) SetDisableBadapt

func (s *RcParams) SetDisableBadapt(v uint32)

SetDisableBadapt writes the 1-bit member disableBadapt. Bits of v above the member's width are discarded.

func (*RcParams) SetDisableIadapt

func (s *RcParams) SetDisableIadapt(v uint32)

SetDisableIadapt writes the 1-bit member disableIadapt. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableAQ

func (s *RcParams) SetEnableAQ(v uint32)

SetEnableAQ writes the 1-bit member enableAQ. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableExtLookahead

func (s *RcParams) SetEnableExtLookahead(v uint32)

SetEnableExtLookahead writes the 1-bit member enableExtLookahead. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableInitialRCQP

func (s *RcParams) SetEnableInitialRCQP(v uint32)

SetEnableInitialRCQP writes the 1-bit member enableInitialRCQP. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableLookahead

func (s *RcParams) SetEnableLookahead(v uint32)

SetEnableLookahead writes the 1-bit member enableLookahead. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableMaxQP

func (s *RcParams) SetEnableMaxQP(v uint32)

SetEnableMaxQP writes the 1-bit member enableMaxQP. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableMinQP

func (s *RcParams) SetEnableMinQP(v uint32)

SetEnableMinQP writes the 1-bit member enableMinQP. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableNonRefP

func (s *RcParams) SetEnableNonRefP(v uint32)

SetEnableNonRefP writes the 1-bit member enableNonRefP. Bits of v above the member's width are discarded.

func (*RcParams) SetEnableTemporalAQ

func (s *RcParams) SetEnableTemporalAQ(v uint32)

SetEnableTemporalAQ writes the 1-bit member enableTemporalAQ. Bits of v above the member's width are discarded.

func (*RcParams) SetReservedBitField1

func (s *RcParams) SetReservedBitField1(v uint32)

SetReservedBitField1 writes the 1-bit member reservedBitField1. Bits of v above the member's width are discarded.

func (*RcParams) SetReservedBitFields

func (s *RcParams) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 15-bit member reservedBitFields. Bits of v above the member's width are discarded.

func (*RcParams) SetStrictGOPTarget

func (s *RcParams) SetStrictGOPTarget(v uint32)

SetStrictGOPTarget writes the 1-bit member strictGOPTarget. Bits of v above the member's width are discarded.

func (*RcParams) SetZeroReorderDelay

func (s *RcParams) SetZeroReorderDelay(v uint32)

SetZeroReorderDelay writes the 1-bit member zeroReorderDelay. Bits of v above the member's width are discarded.

func (*RcParams) StrictGOPTarget

func (s *RcParams) StrictGOPTarget() uint32

StrictGOPTarget reads the 1-bit member strictGOPTarget.

func (*RcParams) ZeroReorderDelay

func (s *RcParams) ZeroReorderDelay() uint32

ZeroReorderDelay reads the 1-bit member zeroReorderDelay.

type ReconfigureParams

type ReconfigureParams struct {
	Version            uint32           // uint32_t @0
	Reserved           uint32           // uint32_t @4
	ReInitEncodeParams InitializeParams // NV_ENC_INITIALIZE_PARAMS @8

	Reserved2 uint32 // uint32_t @1812
	// contains filtered or unexported fields
}

ReconfigureParams corresponds to C NV_ENC_RECONFIGURE_PARAMS, declared in nvEncodeAPI.h:2302. Size 1816, alignment 8.

func (*ReconfigureParams) ForceIDR

func (s *ReconfigureParams) ForceIDR() uint32

ForceIDR reads the 1-bit member forceIDR.

func (*ReconfigureParams) Reserved1

func (s *ReconfigureParams) Reserved1() uint32

Reserved1 reads the 30-bit member reserved1.

func (*ReconfigureParams) ResetEncoder

func (s *ReconfigureParams) ResetEncoder() uint32

ResetEncoder reads the 1-bit member resetEncoder.

func (*ReconfigureParams) SetForceIDR

func (s *ReconfigureParams) SetForceIDR(v uint32)

SetForceIDR writes the 1-bit member forceIDR. Bits of v above the member's width are discarded.

func (*ReconfigureParams) SetReserved1

func (s *ReconfigureParams) SetReserved1(v uint32)

SetReserved1 writes the 30-bit member reserved1. Bits of v above the member's width are discarded.

func (*ReconfigureParams) SetResetEncoder

func (s *ReconfigureParams) SetResetEncoder(v uint32)

SetResetEncoder writes the 1-bit member resetEncoder. Bits of v above the member's width are discarded.

type Rect

type Rect struct {
	Left   uint32 // uint32_t @0
	Top    uint32 // uint32_t @4
	Right  uint32 // uint32_t @8
	Bottom uint32 // uint32_t @12
}

Rect corresponds to C NVENC_RECT, declared in nvEncodeAPI.h:101. Size 16, alignment 4.

type RegisterResource

type RegisterResource struct {
	Version            uint32            // uint32_t @0
	ResourceType       InputResourceType // NV_ENC_INPUT_RESOURCE_TYPE @4
	Width              uint32            // uint32_t @8
	Height             uint32            // uint32_t @12
	Pitch              uint32            // uint32_t @16
	SubResourceIndex   uint32            // uint32_t @20
	ResourceToRegister uintptr           // void * @24
	RegisteredResource uintptr           // NV_ENC_REGISTERED_PTR @32
	BufferFormat       BufferFormat      // NV_ENC_BUFFER_FORMAT @40
	BufferUsage        BufferUsage       // NV_ENC_BUFFER_USAGE @44
	PInputFencePoint   uintptr           // NV_ENC_FENCE_POINT_D3D12 * @48
	ChromaOffset       [2]uint32         // uint32_t[2] @56
	ChromaOffsetIn     [2]uint32         // uint32_t[2] @64
	Reserved1          [244]uint32       // uint32_t[244] @72
	Reserved2          [61]uintptr       // void *[61] @1048
}

RegisterResource corresponds to C NV_ENC_REGISTER_RESOURCE, declared in nvEncodeAPI.h:2826. Size 1536, alignment 8.

type RestoreEncoderStateParams

type RestoreEncoderStateParams struct {
	Version         uint32           // uint32_t @0
	BufferIdx       uint32           // uint32_t @4
	State           StateRestoreType // NV_ENC_STATE_RESTORE_TYPE @8
	Reserved        uint32           // uint32_t @12
	OutputBitstream uintptr          // NV_ENC_OUTPUT_PTR @16
	CompletionEvent uintptr          // void * @24
	Reserved1       [64]uint32       // uint32_t[64] @32
	Reserved2       [64]uintptr      // void *[64] @288
}

RestoreEncoderStateParams corresponds to C NV_ENC_RESTORE_ENCODER_STATE_PARAMS, declared in nvEncodeAPI.h:1374. Size 800, alignment 8.

type SeiPayload

type SeiPayload struct {
	PayloadSize uint32  // uint32_t @0
	PayloadType uint32  // uint32_t @4
	Payload     uintptr // uint8_t * @8
}

SeiPayload corresponds to C NV_ENC_SEI_PAYLOAD, declared in nvEncodeAPI.h:2382. Size 16, alignment 8.

type SequenceParamPayload

type SequenceParamPayload struct {
	Version              uint32      // uint32_t @0
	InBufferSize         uint32      // uint32_t @4
	SpsId                uint32      // uint32_t @8
	PpsId                uint32      // uint32_t @12
	SpsppsBuffer         uintptr     // void * @16
	OutSPSPPSPayloadSize uintptr     // uint32_t * @24
	Reserved             [250]uint32 // uint32_t[250] @32
	Reserved2            [64]uintptr // void *[64] @1032
}

SequenceParamPayload corresponds to C NV_ENC_SEQUENCE_PARAM_PAYLOAD, declared in nvEncodeAPI.h:2908. Size 1544, alignment 8.

type SplitEncodeMode

type SplitEncodeMode int32

SplitEncodeMode corresponds to C NV_ENC_SPLIT_ENCODE_MODE.

const (
	SplitAutoMode        SplitEncodeMode = 0  // NV_ENC_SPLIT_AUTO_MODE
	SplitAutoForcedMode  SplitEncodeMode = 1  // NV_ENC_SPLIT_AUTO_FORCED_MODE
	SplitTwoForcedMode   SplitEncodeMode = 2  // NV_ENC_SPLIT_TWO_FORCED_MODE
	SplitThreeForcedMode SplitEncodeMode = 3  // NV_ENC_SPLIT_THREE_FORCED_MODE
	SplitFourForcedMode  SplitEncodeMode = 4  // NV_ENC_SPLIT_FOUR_FORCED_MODE
	SplitDisableMode     SplitEncodeMode = 15 // NV_ENC_SPLIT_DISABLE_MODE
)

func (SplitEncodeMode) String

func (e SplitEncodeMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type Stat

type Stat struct {
	Version             uint32     // uint32_t @0
	Reserved            uint32     // uint32_t @4
	OutputBitStream     uintptr    // NV_ENC_OUTPUT_PTR @8
	BitStreamSize       uint32     // uint32_t @16
	PicType             uint32     // uint32_t @20
	LastValidByteOffset uint32     // uint32_t @24
	SliceOffsets        [16]uint32 // uint32_t[16] @28
	PicIdx              uint32     // uint32_t @92
	FrameAvgQP          uint32     // uint32_t @96

	LtrFrameIdx  uint32      // uint32_t @104
	IntraMBCount uint32      // uint32_t @108
	InterMBCount uint32      // uint32_t @112
	AverageMVX   int32       // int32_t @116
	AverageMVY   int32       // int32_t @120
	Reserved1    [227]uint32 // uint32_t[227] @124
	Reserved2    [64]uintptr // void *[64] @1032
	// contains filtered or unexported fields
}

Stat corresponds to C NV_ENC_STAT, declared in nvEncodeAPI.h:2878. Size 1544, alignment 8.

func (*Stat) LtrFrame

func (s *Stat) LtrFrame() uint32

LtrFrame reads the 1-bit member ltrFrame.

func (*Stat) ReservedBitFields

func (s *Stat) ReservedBitFields() uint32

ReservedBitFields reads the 31-bit member reservedBitFields.

func (*Stat) SetLtrFrame

func (s *Stat) SetLtrFrame(v uint32)

SetLtrFrame writes the 1-bit member ltrFrame. Bits of v above the member's width are discarded.

func (*Stat) SetReservedBitFields

func (s *Stat) SetReservedBitFields(v uint32)

SetReservedBitFields writes the 31-bit member reservedBitFields. Bits of v above the member's width are discarded.

type StateRestoreType

type StateRestoreType int32

StateRestoreType corresponds to C NV_ENC_STATE_RESTORE_TYPE.

const (
	StateRestoreFull        StateRestoreType = 0x01 // NV_ENC_STATE_RESTORE_FULL
	StateRestoreRateControl StateRestoreType = 0x02 // NV_ENC_STATE_RESTORE_RATE_CONTROL
	StateRestoreEncode      StateRestoreType = 0x03 // NV_ENC_STATE_RESTORE_ENCODE
)

func (StateRestoreType) String

func (e StateRestoreType) String() string

String returns the constant name, or a numeric representation for unknown values.

type Status

type Status int32

Status corresponds to C NVENCSTATUS.

const (
	Success                   Status = 0  // NV_ENC_SUCCESS
	ErrNoEncodeDevice         Status = 1  // NV_ENC_ERR_NO_ENCODE_DEVICE
	ErrUnsupportedDevice      Status = 2  // NV_ENC_ERR_UNSUPPORTED_DEVICE
	ErrInvalidEncoderdevice   Status = 3  // NV_ENC_ERR_INVALID_ENCODERDEVICE
	ErrInvalidDevice          Status = 4  // NV_ENC_ERR_INVALID_DEVICE
	ErrDeviceNotExist         Status = 5  // NV_ENC_ERR_DEVICE_NOT_EXIST
	ErrInvalidPtr             Status = 6  // NV_ENC_ERR_INVALID_PTR
	ErrInvalidEvent           Status = 7  // NV_ENC_ERR_INVALID_EVENT
	ErrInvalidParam           Status = 8  // NV_ENC_ERR_INVALID_PARAM
	ErrInvalidCall            Status = 9  // NV_ENC_ERR_INVALID_CALL
	ErrOutOfMemory            Status = 10 // NV_ENC_ERR_OUT_OF_MEMORY
	ErrEncoderNotInitialized  Status = 11 // NV_ENC_ERR_ENCODER_NOT_INITIALIZED
	ErrUnsupportedParam       Status = 12 // NV_ENC_ERR_UNSUPPORTED_PARAM
	ErrLockBusy               Status = 13 // NV_ENC_ERR_LOCK_BUSY
	ErrNotEnoughBuffer        Status = 14 // NV_ENC_ERR_NOT_ENOUGH_BUFFER
	ErrInvalidVersion         Status = 15 // NV_ENC_ERR_INVALID_VERSION
	ErrMapFailed              Status = 16 // NV_ENC_ERR_MAP_FAILED
	ErrNeedMoreInput          Status = 17 // NV_ENC_ERR_NEED_MORE_INPUT
	ErrEncoderBusy            Status = 18 // NV_ENC_ERR_ENCODER_BUSY
	ErrEventNotRegisterd      Status = 19 // NV_ENC_ERR_EVENT_NOT_REGISTERD
	ErrGeneric                Status = 20 // NV_ENC_ERR_GENERIC
	ErrIncompatibleClientKey  Status = 21 // NV_ENC_ERR_INCOMPATIBLE_CLIENT_KEY
	ErrUnimplemented          Status = 22 // NV_ENC_ERR_UNIMPLEMENTED
	ErrResourceRegisterFailed Status = 23 // NV_ENC_ERR_RESOURCE_REGISTER_FAILED
	ErrResourceNotRegistered  Status = 24 // NV_ENC_ERR_RESOURCE_NOT_REGISTERED
	ErrResourceNotMapped      Status = 25 // NV_ENC_ERR_RESOURCE_NOT_MAPPED
	ErrNeedMoreOutput         Status = 26 // NV_ENC_ERR_NEED_MORE_OUTPUT
)

func CreateInstance

func CreateInstance(functionList *FunctionList) (Status, error)

CreateInstance wraps NvEncodeAPICreateInstance.

func GetMaxSupportedVersion

func GetMaxSupportedVersion(version *uint32) (Status, error)

GetMaxSupportedVersion wraps NvEncodeAPIGetMaxSupportedVersion.

func (Status) Error

func (e Status) Error() string

Error returns the status name, so that a Status can be returned as an error.

func (Status) String

func (e Status) String() string

String returns the constant name, or a numeric representation for unknown values.

type StereoPackingMode

type StereoPackingMode int32

StereoPackingMode corresponds to C NV_ENC_STEREO_PACKING_MODE.

const (
	StereoPackingModeNone          StereoPackingMode = 0x0 // NV_ENC_STEREO_PACKING_MODE_NONE
	StereoPackingModeCheckerboard  StereoPackingMode = 0x1 // NV_ENC_STEREO_PACKING_MODE_CHECKERBOARD
	StereoPackingModeColinterleave StereoPackingMode = 0x2 // NV_ENC_STEREO_PACKING_MODE_COLINTERLEAVE
	StereoPackingModeRowinterleave StereoPackingMode = 0x3 // NV_ENC_STEREO_PACKING_MODE_ROWINTERLEAVE
	StereoPackingModeSidebyside    StereoPackingMode = 0x4 // NV_ENC_STEREO_PACKING_MODE_SIDEBYSIDE
	StereoPackingModeTopbottom     StereoPackingMode = 0x5 // NV_ENC_STEREO_PACKING_MODE_TOPBOTTOM
	StereoPackingModeFrameseq      StereoPackingMode = 0x6 // NV_ENC_STEREO_PACKING_MODE_FRAMESEQ
)

func (StereoPackingMode) String

func (e StereoPackingMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type SymbolError

type SymbolError struct {
	Symbol string
	Err    error
}

SymbolError reports that a symbol is not callable.

Err distinguishes the two ways that happens. A nil Err means the loaded library does not export the symbol, which is what an installed driver older than the entry point looks like. A non-nil Err means the library does export it and the binding itself failed; the library is not at fault.

func (*SymbolError) Error

func (e *SymbolError) Error() string

Error reports the uncallable library symbol and, when the symbol was present but could not be bound, why.

func (*SymbolError) Unwrap

func (e *SymbolError) Unwrap() error

Unwrap returns the reason the symbol could not be bound, or nil when the loaded library does not export it.

type TemporalFilterLevel

type TemporalFilterLevel int32

TemporalFilterLevel corresponds to C NV_ENC_TEMPORAL_FILTER_LEVEL.

const (
	TemporalFilterLevel0 TemporalFilterLevel = 0 // NV_ENC_TEMPORAL_FILTER_LEVEL_0
	TemporalFilterLevel4 TemporalFilterLevel = 4 // NV_ENC_TEMPORAL_FILTER_LEVEL_4
)

func (TemporalFilterLevel) String

func (e TemporalFilterLevel) String() string

String returns the constant name, or a numeric representation for unknown values.

type TimeCode

type TimeCode struct {
	DisplayPicStruct            DisplayPicStruct     // NV_ENC_DISPLAY_PIC_STRUCT @0
	ClockTimestamp              [3]ClockTimestampSet // NV_ENC_CLOCK_TIMESTAMP_SET[3] @4
	SkipClockTimestampInsertion uint32               // uint32_t @28
}

TimeCode corresponds to C NV_ENC_TIME_CODE, declared in nvEncodeAPI.h:1654. Size 32, alignment 4.

type TuningInfo

type TuningInfo int32

TuningInfo corresponds to C NV_ENC_TUNING_INFO.

const (
	TuningInfoUndefined        TuningInfo = 0 // NV_ENC_TUNING_INFO_UNDEFINED
	TuningInfoHighQuality      TuningInfo = 1 // NV_ENC_TUNING_INFO_HIGH_QUALITY
	TuningInfoLowLatency       TuningInfo = 2 // NV_ENC_TUNING_INFO_LOW_LATENCY
	TuningInfoUltraLowLatency  TuningInfo = 3 // NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY
	TuningInfoLossless         TuningInfo = 4 // NV_ENC_TUNING_INFO_LOSSLESS
	TuningInfoUltraHighQuality TuningInfo = 5 // NV_ENC_TUNING_INFO_ULTRA_HIGH_QUALITY
	TuningInfoCount            TuningInfo = 6 // NV_ENC_TUNING_INFO_COUNT
)

func (TuningInfo) String

func (e TuningInfo) String() string

String returns the constant name, or a numeric representation for unknown values.

type VersionError

type VersionError struct {
	Path      string // the library the version was read from
	Supported uint32 // the highest API version the library implements
	Required  uint32 // the API version the bindings were generated for
}

VersionError reports that the loaded library implements an older API than the headers these bindings were generated from.

func (*VersionError) Error

func (e *VersionError) Error() string

type VuiColorPrimaries

type VuiColorPrimaries int32

VuiColorPrimaries corresponds to C NV_ENC_VUI_COLOR_PRIMARIES.

const (
	VuiColorPrimariesUndefined   VuiColorPrimaries = 0  // NV_ENC_VUI_COLOR_PRIMARIES_UNDEFINED
	VuiColorPrimariesBt709       VuiColorPrimaries = 1  // NV_ENC_VUI_COLOR_PRIMARIES_BT709
	VuiColorPrimariesUnspecified VuiColorPrimaries = 2  // NV_ENC_VUI_COLOR_PRIMARIES_UNSPECIFIED
	VuiColorPrimariesReserved    VuiColorPrimaries = 3  // NV_ENC_VUI_COLOR_PRIMARIES_RESERVED
	VuiColorPrimariesBt470m      VuiColorPrimaries = 4  // NV_ENC_VUI_COLOR_PRIMARIES_BT470M
	VuiColorPrimariesBt470bg     VuiColorPrimaries = 5  // NV_ENC_VUI_COLOR_PRIMARIES_BT470BG
	VuiColorPrimariesSmpte170m   VuiColorPrimaries = 6  // NV_ENC_VUI_COLOR_PRIMARIES_SMPTE170M
	VuiColorPrimariesSmpte240m   VuiColorPrimaries = 7  // NV_ENC_VUI_COLOR_PRIMARIES_SMPTE240M
	VuiColorPrimariesFilm        VuiColorPrimaries = 8  // NV_ENC_VUI_COLOR_PRIMARIES_FILM
	VuiColorPrimariesBt2020      VuiColorPrimaries = 9  // NV_ENC_VUI_COLOR_PRIMARIES_BT2020
	VuiColorPrimariesSmpte428    VuiColorPrimaries = 10 // NV_ENC_VUI_COLOR_PRIMARIES_SMPTE428
	VuiColorPrimariesSmpte431    VuiColorPrimaries = 11 // NV_ENC_VUI_COLOR_PRIMARIES_SMPTE431
	VuiColorPrimariesSmpte432    VuiColorPrimaries = 12 // NV_ENC_VUI_COLOR_PRIMARIES_SMPTE432
	VuiColorPrimariesJedecP22    VuiColorPrimaries = 22 // NV_ENC_VUI_COLOR_PRIMARIES_JEDEC_P22
)

func (VuiColorPrimaries) String

func (e VuiColorPrimaries) String() string

String returns the constant name, or a numeric representation for unknown values.

type VuiMatrixCoeffs

type VuiMatrixCoeffs int32

VuiMatrixCoeffs corresponds to C NV_ENC_VUI_MATRIX_COEFFS.

const (
	VuiMatrixCoeffsRgb         VuiMatrixCoeffs = 0  // NV_ENC_VUI_MATRIX_COEFFS_RGB
	VuiMatrixCoeffsBt709       VuiMatrixCoeffs = 1  // NV_ENC_VUI_MATRIX_COEFFS_BT709
	VuiMatrixCoeffsUnspecified VuiMatrixCoeffs = 2  // NV_ENC_VUI_MATRIX_COEFFS_UNSPECIFIED
	VuiMatrixCoeffsReserved    VuiMatrixCoeffs = 3  // NV_ENC_VUI_MATRIX_COEFFS_RESERVED
	VuiMatrixCoeffsFcc         VuiMatrixCoeffs = 4  // NV_ENC_VUI_MATRIX_COEFFS_FCC
	VuiMatrixCoeffsBt470bg     VuiMatrixCoeffs = 5  // NV_ENC_VUI_MATRIX_COEFFS_BT470BG
	VuiMatrixCoeffsSmpte170m   VuiMatrixCoeffs = 6  // NV_ENC_VUI_MATRIX_COEFFS_SMPTE170M
	VuiMatrixCoeffsSmpte240m   VuiMatrixCoeffs = 7  // NV_ENC_VUI_MATRIX_COEFFS_SMPTE240M
	VuiMatrixCoeffsYcgco       VuiMatrixCoeffs = 8  // NV_ENC_VUI_MATRIX_COEFFS_YCGCO
	VuiMatrixCoeffsBt2020Ncl   VuiMatrixCoeffs = 9  // NV_ENC_VUI_MATRIX_COEFFS_BT2020_NCL
	VuiMatrixCoeffsBt2020Cl    VuiMatrixCoeffs = 10 // NV_ENC_VUI_MATRIX_COEFFS_BT2020_CL
	VuiMatrixCoeffsSmpte2085   VuiMatrixCoeffs = 11 // NV_ENC_VUI_MATRIX_COEFFS_SMPTE2085
)

func (VuiMatrixCoeffs) String

func (e VuiMatrixCoeffs) String() string

String returns the constant name, or a numeric representation for unknown values.

type VuiTransferCharacteristic

type VuiTransferCharacteristic int32

VuiTransferCharacteristic corresponds to C NV_ENC_VUI_TRANSFER_CHARACTERISTIC.

const (
	VuiTransferCharacteristicUndefined   VuiTransferCharacteristic = 0  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_UNDEFINED
	VuiTransferCharacteristicBt709       VuiTransferCharacteristic = 1  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT709
	VuiTransferCharacteristicUnspecified VuiTransferCharacteristic = 2  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_UNSPECIFIED
	VuiTransferCharacteristicReserved    VuiTransferCharacteristic = 3  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_RESERVED
	VuiTransferCharacteristicBt470m      VuiTransferCharacteristic = 4  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470M
	VuiTransferCharacteristicBt470bg     VuiTransferCharacteristic = 5  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT470BG
	VuiTransferCharacteristicSmpte170m   VuiTransferCharacteristic = 6  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE170M
	VuiTransferCharacteristicSmpte240m   VuiTransferCharacteristic = 7  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE240M
	VuiTransferCharacteristicLinear      VuiTransferCharacteristic = 8  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_LINEAR
	VuiTransferCharacteristicLog         VuiTransferCharacteristic = 9  // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG
	VuiTransferCharacteristicLogSqrt     VuiTransferCharacteristic = 10 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_LOG_SQRT
	VuiTransferCharacteristicIec6196624  VuiTransferCharacteristic = 11 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_IEC61966_2_4
	VuiTransferCharacteristicBt1361Ecg   VuiTransferCharacteristic = 12 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT1361_ECG
	VuiTransferCharacteristicSrgb        VuiTransferCharacteristic = 13 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SRGB
	VuiTransferCharacteristicBt202010    VuiTransferCharacteristic = 14 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_10
	VuiTransferCharacteristicBt202012    VuiTransferCharacteristic = 15 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_BT2020_12
	VuiTransferCharacteristicSmpte2084   VuiTransferCharacteristic = 16 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE2084
	VuiTransferCharacteristicSmpte428    VuiTransferCharacteristic = 17 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE428
	VuiTransferCharacteristicAribStdB67  VuiTransferCharacteristic = 18 // NV_ENC_VUI_TRANSFER_CHARACTERISTIC_ARIB_STD_B67
)

func (VuiTransferCharacteristic) String

func (e VuiTransferCharacteristic) String() string

String returns the constant name, or a numeric representation for unknown values.

type VuiVideoFormat

type VuiVideoFormat int32

VuiVideoFormat corresponds to C NV_ENC_VUI_VIDEO_FORMAT.

const (
	VuiVideoFormatComponent   VuiVideoFormat = 0 // NV_ENC_VUI_VIDEO_FORMAT_COMPONENT
	VuiVideoFormatPal         VuiVideoFormat = 1 // NV_ENC_VUI_VIDEO_FORMAT_PAL
	VuiVideoFormatNtsc        VuiVideoFormat = 2 // NV_ENC_VUI_VIDEO_FORMAT_NTSC
	VuiVideoFormatSecam       VuiVideoFormat = 3 // NV_ENC_VUI_VIDEO_FORMAT_SECAM
	VuiVideoFormatMac         VuiVideoFormat = 4 // NV_ENC_VUI_VIDEO_FORMAT_MAC
	VuiVideoFormatUnspecified VuiVideoFormat = 5 // NV_ENC_VUI_VIDEO_FORMAT_UNSPECIFIED
)

func (VuiVideoFormat) String

func (e VuiVideoFormat) String() string

String returns the constant name, or a numeric representation for unknown values.

Jump to

Keyboard shortcuts

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