Documentation
¶
Overview ¶
Package nvdec provides low-level Go bindings for the NVIDIA video decoder.
Unlike NVENC, NVDEC exports its entry points as ordinary symbols, so the functions here are bound with dlsym and called directly. The headers declare them only as typedefs, because FFmpeg resolves them by hand; the symbol a typedef stands for is its name without the leading t.
Decoding is a three-part arrangement the bindings do not hide: a parser (CreateVideoParser) feeds a decoder (CreateDecoder), which writes into surfaces the caller maps with MapVideoFrame64 and must unmap again. The parser calls back into the caller for sequence, decode and display events; those callbacks are C function pointers in ParserParams and must be created with purego.NewCallback, which has a fixed and small budget of callbacks per process.
Every entry point takes a CUDA context, and the decoder is not thread-safe across contexts: cuvidCtxLockCreate exists because the driver requires the context to be locked around decode calls that share it.
What this package does not do: it does not parse a container, own a CUDA context, or provide a decode loop. Optional native tests cover H.264, HEVC and AV1 on Linux. Windows has compiler and fixture ABI tests; native driver execution remains unqualified.
Example ¶
Example asks the hardware what it can decode before anything is created. It returns early when the NVDEC library is not available.
GetDecoderCaps needs a current CUDA context, so a real program calls it after the driver package's Init and NewContext. The capability query is the step that decides whether a clip can be decoded at all: BIsSupported is per codec, chroma format and bit depth, and NMaxWidth/NMaxHeight bound the dimensions CreateDecoder will accept.
package main
import (
"fmt"
"github.com/tmc/lib/nvidia/nvdec"
)
func main() {
caps := nvdec.DecodeCaps{
ECodecType: nvdec.CodecH264,
EChromaFormat: nvdec.ChromaFormat420,
NBitDepthMinus8: 0,
}
if err := nvdec.GetDecoderCaps(&caps); err != nil {
fmt.Println("NVDEC unavailable:", err)
return
}
if caps.BIsSupported == 0 {
fmt.Println("H.264 4:2:0 8-bit is not supported here")
return
}
fmt.Printf("H.264 4:2:0 8-bit up to %dx%d on %d NVDEC engines\n",
caps.NMaxWidth, caps.NMaxHeight, caps.NNumNVDECs)
}
Output:
Index ¶
- Constants
- func Close() error
- func CreateDecoder(phDecoder *Decoder, pdci *DecodeCreateInfo) error
- func CreateVideoParser(pObj *Parser, pParams *ParserParams) error
- func CreateVideoSource(pObj *Source, pszFileName unsafe.Pointer, pParams *SourceParams) error
- func CreateVideoSourceW(pObj *Source, pwszFileName unsafe.Pointer, pParams *SourceParams) error
- func CtxLock(lck uintptr, reservedFlags uint32) error
- func CtxLockCreate(pLock *uintptr, ctx uintptr) error
- func CtxLockDestroy(lck uintptr) error
- func CtxUnlock(lck uintptr, reservedFlags uint32) error
- func DecodePicture(hDecoder Decoder, pPicParams *PicParams) error
- func DecodePictureAsync(hDecoder Decoder, pPicParams *PicParams, strm uintptr) error
- func Err(r Result) error
- func GetDecodeStatus(hDecoder Decoder, nPicIdx int32, pDecodeStatus *DecodeStatusInfo) error
- func GetDecoderCaps(pdc *DecodeCaps) error
- func GetSourceAudioFormat(obj Source, paudfmt *AudioFormat, flags uint32) error
- func GetSourceVideoFormat(obj Source, pvidfmt *VideoFormat, flags uint32) error
- func Has(symbol string) bool
- func Load(path string) error
- func Loaded() bool
- func MapVideoFrame64(hDecoder Decoder, nPicIdx int32, pDevPtr *uint64, pPitch *uint32, ...) error
- func ParseVideoData(obj Parser, pPacket *SourceDataPacket) error
- func Path() string
- func ReconfigureDecoder(hDecoder Decoder, pDecReconfigParams *ReconfigureDecoderInfo) error
- func RegisterDecodeSurfaces(hDecoder Decoder, pDecSurfInfo *RegisterDecodeSurfacesInfo) error
- func SetVideoSourceState(obj Source, state SourceState) error
- func Symbols() []string
- func UnmapVideoFrame64(hDecoder Decoder, devPtr uint64) error
- type AV1PicParams
- func (s *AV1PicParams) AllowHighPrecisionMv() uint32
- func (s *AV1PicParams) AllowIntrabc() uint32
- func (s *AV1PicParams) AllowScreenContentTools() uint32
- func (s *AV1PicParams) AllowWarpedMotion() uint32
- func (s *AV1PicParams) ApplyGrain() uint32
- func (s *AV1PicParams) ArCoeffLag() uint32
- func (s *AV1PicParams) ArCoeffShiftMinus6() uint32
- func (s *AV1PicParams) BitDepthMinus8() uint32
- func (s *AV1PicParams) CdefBits() uint32
- func (s *AV1PicParams) CdefDampingMinus3() uint32
- func (s *AV1PicParams) ChromaScalingFromLuma() uint32
- func (s *AV1PicParams) ClipToRestrictedRange() uint32
- func (s *AV1PicParams) CodedDenom() uint32
- func (s *AV1PicParams) CodedLossless() uint32
- func (s *AV1PicParams) ContextUpdateTileId() uint32
- func (s *AV1PicParams) DeltaLfMulti() uint32
- func (s *AV1PicParams) DeltaLfPresent() uint32
- func (s *AV1PicParams) DeltaLfRes() uint32
- func (s *AV1PicParams) DeltaQPresent() uint32
- func (s *AV1PicParams) DeltaQRes() uint32
- func (s *AV1PicParams) DisableCdfUpdate() uint32
- func (s *AV1PicParams) DisableFrameEndUpdateCdf() uint32
- func (s *AV1PicParams) EnableCdef() uint32
- func (s *AV1PicParams) EnableDualFilter() uint32
- func (s *AV1PicParams) EnableFgs() uint32
- func (s *AV1PicParams) EnableFilterIntra() uint32
- func (s *AV1PicParams) EnableInterintraCompound() uint32
- func (s *AV1PicParams) EnableIntraEdgeFilter() uint32
- func (s *AV1PicParams) EnableJntComp() uint32
- func (s *AV1PicParams) EnableMaskedCompound() uint32
- func (s *AV1PicParams) EnableOrderHint() uint32
- func (s *AV1PicParams) EnableRestoration() uint32
- func (s *AV1PicParams) EnableSuperres() uint32
- func (s *AV1PicParams) ForceIntegerMv() uint32
- func (s *AV1PicParams) FrameType() uint32
- func (s *AV1PicParams) GrainScaleShift() uint32
- func (s *AV1PicParams) InterpFilter() uint32
- func (s *AV1PicParams) LoopFilterDeltaEnabled() uint32
- func (s *AV1PicParams) LoopFilterDeltaUpdate() uint32
- func (s *AV1PicParams) MonoChrome() uint32
- func (s *AV1PicParams) NumTileCols() uint32
- func (s *AV1PicParams) NumTileRows() uint32
- func (s *AV1PicParams) OrderHintBitsMinus1() uint32
- func (s *AV1PicParams) OverlapFlag() uint32
- func (s *AV1PicParams) Profile() uint32
- func (s *AV1PicParams) ReducedTxSet() uint32
- func (s *AV1PicParams) ReferenceMode() uint32
- func (s *AV1PicParams) Reserved07bits() uint32
- func (s *AV1PicParams) Reserved13bits() uint32
- func (s *AV1PicParams) Reserved24bits() uint32
- func (s *AV1PicParams) Reserved34bits() uint32
- func (s *AV1PicParams) Reserved42bits() uint32
- func (s *AV1PicParams) Reserved64bits() uint32
- func (s *AV1PicParams) ScalingShiftMinus8() uint32
- func (s *AV1PicParams) SegmentationEnabled() uint32
- func (s *AV1PicParams) SegmentationTemporalUpdate() uint32
- func (s *AV1PicParams) SegmentationUpdateData() uint32
- func (s *AV1PicParams) SegmentationUpdateMap() uint32
- func (s *AV1PicParams) SetAllowHighPrecisionMv(v uint32)
- func (s *AV1PicParams) SetAllowIntrabc(v uint32)
- func (s *AV1PicParams) SetAllowScreenContentTools(v uint32)
- func (s *AV1PicParams) SetAllowWarpedMotion(v uint32)
- func (s *AV1PicParams) SetApplyGrain(v uint32)
- func (s *AV1PicParams) SetArCoeffLag(v uint32)
- func (s *AV1PicParams) SetArCoeffShiftMinus6(v uint32)
- func (s *AV1PicParams) SetBitDepthMinus8(v uint32)
- func (s *AV1PicParams) SetCdefBits(v uint32)
- func (s *AV1PicParams) SetCdefDampingMinus3(v uint32)
- func (s *AV1PicParams) SetChromaScalingFromLuma(v uint32)
- func (s *AV1PicParams) SetClipToRestrictedRange(v uint32)
- func (s *AV1PicParams) SetCodedDenom(v uint32)
- func (s *AV1PicParams) SetCodedLossless(v uint32)
- func (s *AV1PicParams) SetContextUpdateTileId(v uint32)
- func (s *AV1PicParams) SetDeltaLfMulti(v uint32)
- func (s *AV1PicParams) SetDeltaLfPresent(v uint32)
- func (s *AV1PicParams) SetDeltaLfRes(v uint32)
- func (s *AV1PicParams) SetDeltaQPresent(v uint32)
- func (s *AV1PicParams) SetDeltaQRes(v uint32)
- func (s *AV1PicParams) SetDisableCdfUpdate(v uint32)
- func (s *AV1PicParams) SetDisableFrameEndUpdateCdf(v uint32)
- func (s *AV1PicParams) SetEnableCdef(v uint32)
- func (s *AV1PicParams) SetEnableDualFilter(v uint32)
- func (s *AV1PicParams) SetEnableFgs(v uint32)
- func (s *AV1PicParams) SetEnableFilterIntra(v uint32)
- func (s *AV1PicParams) SetEnableInterintraCompound(v uint32)
- func (s *AV1PicParams) SetEnableIntraEdgeFilter(v uint32)
- func (s *AV1PicParams) SetEnableJntComp(v uint32)
- func (s *AV1PicParams) SetEnableMaskedCompound(v uint32)
- func (s *AV1PicParams) SetEnableOrderHint(v uint32)
- func (s *AV1PicParams) SetEnableRestoration(v uint32)
- func (s *AV1PicParams) SetEnableSuperres(v uint32)
- func (s *AV1PicParams) SetForceIntegerMv(v uint32)
- func (s *AV1PicParams) SetFrameType(v uint32)
- func (s *AV1PicParams) SetGrainScaleShift(v uint32)
- func (s *AV1PicParams) SetInterpFilter(v uint32)
- func (s *AV1PicParams) SetLoopFilterDeltaEnabled(v uint32)
- func (s *AV1PicParams) SetLoopFilterDeltaUpdate(v uint32)
- func (s *AV1PicParams) SetMonoChrome(v uint32)
- func (s *AV1PicParams) SetNumTileCols(v uint32)
- func (s *AV1PicParams) SetNumTileRows(v uint32)
- func (s *AV1PicParams) SetOrderHintBitsMinus1(v uint32)
- func (s *AV1PicParams) SetOverlapFlag(v uint32)
- func (s *AV1PicParams) SetProfile(v uint32)
- func (s *AV1PicParams) SetReducedTxSet(v uint32)
- func (s *AV1PicParams) SetReferenceMode(v uint32)
- func (s *AV1PicParams) SetReserved07bits(v uint32)
- func (s *AV1PicParams) SetReserved13bits(v uint32)
- func (s *AV1PicParams) SetReserved24bits(v uint32)
- func (s *AV1PicParams) SetReserved34bits(v uint32)
- func (s *AV1PicParams) SetReserved42bits(v uint32)
- func (s *AV1PicParams) SetReserved64bits(v uint32)
- func (s *AV1PicParams) SetScalingShiftMinus8(v uint32)
- func (s *AV1PicParams) SetSegmentationEnabled(v uint32)
- func (s *AV1PicParams) SetSegmentationTemporalUpdate(v uint32)
- func (s *AV1PicParams) SetSegmentationUpdateData(v uint32)
- func (s *AV1PicParams) SetSegmentationUpdateMap(v uint32)
- func (s *AV1PicParams) SetShowFrame(v uint32)
- func (s *AV1PicParams) SetSkipMode(v uint32)
- func (s *AV1PicParams) SetSkipModeFrame0(v uint32)
- func (s *AV1PicParams) SetSkipModeFrame1(v uint32)
- func (s *AV1PicParams) SetSpatialLayerId(v uint32)
- func (s *AV1PicParams) SetSubsamplingX(v uint32)
- func (s *AV1PicParams) SetSubsamplingY(v uint32)
- func (s *AV1PicParams) SetSwitchableMotionMode(v uint32)
- func (s *AV1PicParams) SetTemporalLayerId(v uint32)
- func (s *AV1PicParams) SetTxMode(v uint32)
- func (s *AV1PicParams) SetUse128x128Superblock(v uint32)
- func (s *AV1PicParams) SetUseRefFrameMvs(v uint32)
- func (s *AV1PicParams) SetUseSuperres(v uint32)
- func (s *AV1PicParams) SetUsingQmatrix(v uint32)
- func (s *AV1PicParams) ShowFrame() uint32
- func (s *AV1PicParams) SkipMode() uint32
- func (s *AV1PicParams) SkipModeFrame0() uint32
- func (s *AV1PicParams) SkipModeFrame1() uint32
- func (s *AV1PicParams) SpatialLayerId() uint32
- func (s *AV1PicParams) SubsamplingX() uint32
- func (s *AV1PicParams) SubsamplingY() uint32
- func (s *AV1PicParams) SwitchableMotionMode() uint32
- func (s *AV1PicParams) TemporalLayerId() uint32
- func (s *AV1PicParams) TxMode() uint32
- func (s *AV1PicParams) Use128x128Superblock() uint32
- func (s *AV1PicParams) UseRefFrameMvs() uint32
- func (s *AV1PicParams) UseSuperres() uint32
- func (s *AV1PicParams) UsingQmatrix() uint32
- type AV1PicParamsGlobalMotion
- func (s *AV1PicParamsGlobalMotion) Invalid() uint32
- func (s *AV1PicParamsGlobalMotion) Reserved5Bits() uint32
- func (s *AV1PicParamsGlobalMotion) SetInvalid(v uint32)
- func (s *AV1PicParamsGlobalMotion) SetReserved5Bits(v uint32)
- func (s *AV1PicParamsGlobalMotion) SetWmtype(v uint32)
- func (s *AV1PicParamsGlobalMotion) Wmtype() uint32
- type AV1PicParamsRefFrame
- type AV1SeqHdr
- type AudioCodec
- type AudioFormat
- type BindFailure
- type ChromaFormat
- type Codec
- type CreateFlags
- type DecodeCaps
- type DecodeCreateInfo
- type DecodeCreateInfoDisplayArea
- type DecodeCreateInfoTargetRect
- type DecodeFeature
- type DecodeStats
- type DecodeStatsHeader
- func (s *DecodeStatsHeader) BIsMV1Valid() uint32
- func (s *DecodeStatsHeader) BIsStatsPresent() uint32
- func (s *DecodeStatsHeader) Reserved1() uint32
- func (s *DecodeStatsHeader) SetBIsMV1Valid(v uint32)
- func (s *DecodeStatsHeader) SetBIsStatsPresent(v uint32)
- func (s *DecodeStatsHeader) SetReserved1(v uint32)
- type DecodeStatus
- type DecodeStatusInfo
- type Decoder
- type DeinterlaceMode
- type H264DPBEntry
- type H264MVCExt
- type H264PicParams
- type H264PicParamsAnon1
- type H264PicParamsFmo
- type H264SVCExt
- type HEVCPicParams
- type JPEGPicParams
- type LibraryConflictError
- type MPEG2PicParams
- type MPEG4PicParams
- type OperatingPointInfo
- type OperatingPointInfoAnon1
- type OperatingPointInfoAnon1Av1
- type PacketFlags
- type Parser
- type ParserDispInfo
- type ParserParams
- type PicParams
- type PicParamsCodecSpecific
- func (u *PicParamsCodecSpecific) Av1() *AV1PicParams
- func (u *PicParamsCodecSpecific) CodecReserved() *[1024]uint32
- func (u *PicParamsCodecSpecific) H264() *H264PicParams
- func (u *PicParamsCodecSpecific) Hevc() *HEVCPicParams
- func (u *PicParamsCodecSpecific) Jpeg() *JPEGPicParams
- func (u *PicParamsCodecSpecific) Mpeg2() *MPEG2PicParams
- func (u *PicParamsCodecSpecific) Mpeg4() *MPEG4PicParams
- func (u *PicParamsCodecSpecific) Vc1() *VC1PicParams
- func (u *PicParamsCodecSpecific) Vp8() *VP8PicParams
- func (u *PicParamsCodecSpecific) Vp9() *VP9PicParams
- type ProcParams
- type ProcParamsExt
- type ReconfigureDecoderInfo
- type ReconfigureDecoderInfoDisplayArea
- type ReconfigureDecoderInfoTargetRect
- type RegisterDecodeSurfacesInfo
- type Result
- type SEIAlternativeTransferCharacteristics
- type SEIContentLightLevelInfo
- type SEIMasteringDisplayInfo
- type SEIMessage
- type SEIMessageInfo
- type Source
- type SourceDataPacket
- type SourceParams
- type SourceState
- type SurfaceFormat
- type SymbolError
- type TimeCode
- type TimeCodeMPEG2
- type TimeCodeSet
- type VC1PicParams
- type VP8PicParams
- type VP8PicParamsAnon1
- type VP8PicParamsAnon1Vp8FrameTag
- func (s *VP8PicParamsAnon1Vp8FrameTag) FrameType() uint32
- func (s *VP8PicParamsAnon1Vp8FrameTag) Reserved2Bits() uint32
- func (s *VP8PicParamsAnon1Vp8FrameTag) SetFrameType(v uint32)
- func (s *VP8PicParamsAnon1Vp8FrameTag) SetReserved2Bits(v uint32)
- func (s *VP8PicParamsAnon1Vp8FrameTag) SetShowFrame(v uint32)
- func (s *VP8PicParamsAnon1Vp8FrameTag) SetUpdateMbSegmentationData(v uint32)
- func (s *VP8PicParamsAnon1Vp8FrameTag) SetVersion(v uint32)
- func (s *VP8PicParamsAnon1Vp8FrameTag) ShowFrame() uint32
- func (s *VP8PicParamsAnon1Vp8FrameTag) UpdateMbSegmentationData() uint32
- func (s *VP8PicParamsAnon1Vp8FrameTag) Version() uint32
- type VP9PicParams
- func (s *VP9PicParams) AllowHighPrecisionMv() uint32
- func (s *VP9PicParams) ErrorResilient() uint32
- func (s *VP9PicParams) FrameContextIdx() uint32
- func (s *VP9PicParams) FrameParallelDecoding() uint32
- func (s *VP9PicParams) FrameType() uint32
- func (s *VP9PicParams) IntraOnly() uint32
- func (s *VP9PicParams) Profile() uint32
- func (s *VP9PicParams) RefreshEntropyProbs() uint32
- func (s *VP9PicParams) Reserved2Bits() uint32
- func (s *VP9PicParams) Reserved4Bits() uint32
- func (s *VP9PicParams) SegmentEnabled() uint32
- func (s *VP9PicParams) SegmentFeatureMode() uint32
- func (s *VP9PicParams) SegmentMapTemporalUpdate() uint32
- func (s *VP9PicParams) SegmentMapUpdate() uint32
- func (s *VP9PicParams) SetAllowHighPrecisionMv(v uint32)
- func (s *VP9PicParams) SetErrorResilient(v uint32)
- func (s *VP9PicParams) SetFrameContextIdx(v uint32)
- func (s *VP9PicParams) SetFrameParallelDecoding(v uint32)
- func (s *VP9PicParams) SetFrameType(v uint32)
- func (s *VP9PicParams) SetIntraOnly(v uint32)
- func (s *VP9PicParams) SetProfile(v uint32)
- func (s *VP9PicParams) SetRefreshEntropyProbs(v uint32)
- func (s *VP9PicParams) SetReserved2Bits(v uint32)
- func (s *VP9PicParams) SetReserved4Bits(v uint32)
- func (s *VP9PicParams) SetSegmentEnabled(v uint32)
- func (s *VP9PicParams) SetSegmentFeatureMode(v uint32)
- func (s *VP9PicParams) SetSegmentMapTemporalUpdate(v uint32)
- func (s *VP9PicParams) SetSegmentMapUpdate(v uint32)
- func (s *VP9PicParams) SetShowFrame(v uint32)
- func (s *VP9PicParams) SetSubSamplingX(v uint32)
- func (s *VP9PicParams) SetSubSamplingY(v uint32)
- func (s *VP9PicParams) ShowFrame() uint32
- func (s *VP9PicParams) SubSamplingX() uint32
- func (s *VP9PicParams) SubSamplingY() uint32
- type VideoFormat
- type VideoFormatDisplayArea
- type VideoFormatDisplayAspectRatio
- type VideoFormatEx
- type VideoFormatExAnon1
- type VideoFormatFrameRate
- type VideoFormatVideoSignalDescription
- func (s *VideoFormatVideoSignalDescription) ReservedZeroBits() uint32
- func (s *VideoFormatVideoSignalDescription) SetReservedZeroBits(v uint32)
- func (s *VideoFormatVideoSignalDescription) SetVideoFormat(v uint32)
- func (s *VideoFormatVideoSignalDescription) SetVideoFullRangeFlag(v uint32)
- func (s *VideoFormatVideoSignalDescription) VideoFormat() uint32
- func (s *VideoFormatVideoSignalDescription) VideoFullRangeFlag() uint32
- type VideoSourceFormatFlags
Examples ¶
Constants ¶
const (
MaxClockTs = 0x3 // MAX_CLOCK_TS
)
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.
const (
MaxRegisteredDecodeSurfaces registeredDecodeSurfaceLimit = 32 // MAX_NUM_REGISTERED_DECODE_SURFACES
)
Variables ¶
This section is empty.
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 CreateDecoder ¶
func CreateDecoder(phDecoder *Decoder, pdci *DecodeCreateInfo) error
CreateDecoder wraps cuvidCreateDecoder.
func CreateVideoParser ¶
func CreateVideoParser(pObj *Parser, pParams *ParserParams) error
CreateVideoParser wraps cuvidCreateVideoParser.
func CreateVideoSource ¶
func CreateVideoSource(pObj *Source, pszFileName unsafe.Pointer, pParams *SourceParams) error
CreateVideoSource wraps cuvidCreateVideoSource.
func CreateVideoSourceW ¶
func CreateVideoSourceW(pObj *Source, pwszFileName unsafe.Pointer, pParams *SourceParams) error
CreateVideoSourceW wraps cuvidCreateVideoSourceW.
func CtxLockCreate ¶
CtxLockCreate wraps cuvidCtxLockCreate.
func CtxLockDestroy ¶
CtxLockDestroy wraps cuvidCtxLockDestroy.
func DecodePicture ¶
DecodePicture wraps cuvidDecodePicture.
func DecodePictureAsync ¶
DecodePictureAsync wraps cuvidDecodePictureAsync.
func GetDecodeStatus ¶
func GetDecodeStatus(hDecoder Decoder, nPicIdx int32, pDecodeStatus *DecodeStatusInfo) error
GetDecodeStatus wraps cuvidGetDecodeStatus.
func GetDecoderCaps ¶
func GetDecoderCaps(pdc *DecodeCaps) error
GetDecoderCaps wraps cuvidGetDecoderCaps.
func GetSourceAudioFormat ¶
func GetSourceAudioFormat(obj Source, paudfmt *AudioFormat, flags uint32) error
GetSourceAudioFormat wraps cuvidGetSourceAudioFormat.
func GetSourceVideoFormat ¶
func GetSourceVideoFormat(obj Source, pvidfmt *VideoFormat, flags uint32) error
GetSourceVideoFormat wraps cuvidGetSourceVideoFormat.
func Has ¶
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 ¶
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 MapVideoFrame64 ¶
func MapVideoFrame64(hDecoder Decoder, nPicIdx int32, pDevPtr *uint64, pPitch *uint32, pVPP *ProcParams) error
MapVideoFrame64 wraps cuvidMapVideoFrame64.
func ParseVideoData ¶
func ParseVideoData(obj Parser, pPacket *SourceDataPacket) error
ParseVideoData wraps cuvidParseVideoData.
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 ReconfigureDecoder ¶
func ReconfigureDecoder(hDecoder Decoder, pDecReconfigParams *ReconfigureDecoderInfo) error
ReconfigureDecoder wraps cuvidReconfigureDecoder.
func RegisterDecodeSurfaces ¶
func RegisterDecodeSurfaces(hDecoder Decoder, pDecSurfInfo *RegisterDecodeSurfacesInfo) error
RegisterDecodeSurfaces wraps cuvidRegisterDecodeSurfaces.
func SetVideoSourceState ¶
func SetVideoSourceState(obj Source, state SourceState) error
SetVideoSourceState wraps cuvidSetVideoSourceState.
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.
func UnmapVideoFrame64 ¶
UnmapVideoFrame64 wraps cuvidUnmapVideoFrame64.
Types ¶
type AV1PicParams ¶
type AV1PicParams struct {
Width uint32 // unsigned int @0
Height uint32 // unsigned int @4
FrameOffset uint32 // unsigned int @8
DecodePicIdx int32 // int @12
TileWidths [64]uint16 // unsigned short[64] @28
TileHeights [64]uint16 // unsigned short[64] @156
CdefYStrength [8]uint8 // unsigned char[8] @285
CdefUvStrength [8]uint8 // unsigned char[8] @293
BaseQindex uint8 // unsigned char @302
QpYDcDeltaQ int8 // char @303
QpUDcDeltaQ int8 // char @304
QpVDcDeltaQ int8 // char @305
QpUAcDeltaQ int8 // char @306
QpVAcDeltaQ int8 // char @307
QmY uint8 // unsigned char @308
QmU uint8 // unsigned char @309
QmV uint8 // unsigned char @310
SegmentationFeatureData [8][8]int16 // short[8][8] @312
SegmentationFeatureMask [8]uint8 // unsigned char[8] @440
LoopFilterLevel [2]uint8 // unsigned char[2] @448
LoopFilterLevelU uint8 // unsigned char @450
LoopFilterLevelV uint8 // unsigned char @451
LoopFilterSharpness uint8 // unsigned char @452
LoopFilterRefDeltas [8]int8 // char[8] @453
LoopFilterModeDeltas [2]int8 // char[2] @461
LrUnitSize [3]uint8 // unsigned char[3] @464
LrType [3]uint8 // unsigned char[3] @467
PrimaryRefFrame uint8 // unsigned char @470
RefFrameMap [8]uint8 // unsigned char[8] @471
Reserved532bits [4]uint8 // unsigned char[4] @480
RefFrame [7]AV1PicParamsRefFrame // struct (unnamed struct at dynlink_cuviddec.h:998:5)[7] @484
GlobalMotion [7]AV1PicParamsGlobalMotion // struct (unnamed struct at dynlink_cuviddec.h:1007:5)[7] @568
NumYPoints uint8 // unsigned char @766
ScalingPointsY [14][2]uint8 // unsigned char[14][2] @767
NumCbPoints uint8 // unsigned char @795
ScalingPointsCb [10][2]uint8 // unsigned char[10][2] @796
NumCrPoints uint8 // unsigned char @816
ScalingPointsCr [10][2]uint8 // unsigned char[10][2] @817
Reserved78bits uint8 // unsigned char @837
RandomSeed uint16 // unsigned short @838
ArCoeffsY [24]int16 // short[24] @840
ArCoeffsCb [25]int16 // short[25] @888
ArCoeffsCr [25]int16 // short[25] @938
CbMult uint8 // unsigned char @988
CbLumaMult uint8 // unsigned char @989
CbOffset int16 // short @990
CrMult uint8 // unsigned char @992
CrLumaMult uint8 // unsigned char @993
CrOffset int16 // short @994
Reserved [7]int32 // int[7] @996
// contains filtered or unexported fields
}
AV1PicParams corresponds to C CUVIDAV1PICPARAMS, declared in dynlink_cuviddec.h:875. Size 1024, alignment 4.
func (*AV1PicParams) AllowHighPrecisionMv ¶
func (s *AV1PicParams) AllowHighPrecisionMv() uint32
AllowHighPrecisionMv reads the 1-bit member allow_high_precision_mv.
func (*AV1PicParams) AllowIntrabc ¶
func (s *AV1PicParams) AllowIntrabc() uint32
AllowIntrabc reads the 1-bit member allow_intrabc.
func (*AV1PicParams) AllowScreenContentTools ¶
func (s *AV1PicParams) AllowScreenContentTools() uint32
AllowScreenContentTools reads the 1-bit member allow_screen_content_tools.
func (*AV1PicParams) AllowWarpedMotion ¶
func (s *AV1PicParams) AllowWarpedMotion() uint32
AllowWarpedMotion reads the 1-bit member allow_warped_motion.
func (*AV1PicParams) ApplyGrain ¶
func (s *AV1PicParams) ApplyGrain() uint32
ApplyGrain reads the 1-bit member apply_grain.
func (*AV1PicParams) ArCoeffLag ¶
func (s *AV1PicParams) ArCoeffLag() uint32
ArCoeffLag reads the 2-bit member ar_coeff_lag.
func (*AV1PicParams) ArCoeffShiftMinus6 ¶
func (s *AV1PicParams) ArCoeffShiftMinus6() uint32
ArCoeffShiftMinus6 reads the 2-bit member ar_coeff_shift_minus6.
func (*AV1PicParams) BitDepthMinus8 ¶
func (s *AV1PicParams) BitDepthMinus8() uint32
BitDepthMinus8 reads the 4-bit member bit_depth_minus8.
func (*AV1PicParams) CdefBits ¶
func (s *AV1PicParams) CdefBits() uint32
CdefBits reads the 2-bit member cdef_bits.
func (*AV1PicParams) CdefDampingMinus3 ¶
func (s *AV1PicParams) CdefDampingMinus3() uint32
CdefDampingMinus3 reads the 2-bit member cdef_damping_minus_3.
func (*AV1PicParams) ChromaScalingFromLuma ¶
func (s *AV1PicParams) ChromaScalingFromLuma() uint32
ChromaScalingFromLuma reads the 1-bit member chroma_scaling_from_luma.
func (*AV1PicParams) ClipToRestrictedRange ¶
func (s *AV1PicParams) ClipToRestrictedRange() uint32
ClipToRestrictedRange reads the 1-bit member clip_to_restricted_range.
func (*AV1PicParams) CodedDenom ¶
func (s *AV1PicParams) CodedDenom() uint32
CodedDenom reads the 3-bit member coded_denom.
func (*AV1PicParams) CodedLossless ¶
func (s *AV1PicParams) CodedLossless() uint32
CodedLossless reads the 1-bit member coded_lossless.
func (*AV1PicParams) ContextUpdateTileId ¶
func (s *AV1PicParams) ContextUpdateTileId() uint32
ContextUpdateTileId reads the 16-bit member context_update_tile_id.
func (*AV1PicParams) DeltaLfMulti ¶
func (s *AV1PicParams) DeltaLfMulti() uint32
DeltaLfMulti reads the 1-bit member delta_lf_multi.
func (*AV1PicParams) DeltaLfPresent ¶
func (s *AV1PicParams) DeltaLfPresent() uint32
DeltaLfPresent reads the 1-bit member delta_lf_present.
func (*AV1PicParams) DeltaLfRes ¶
func (s *AV1PicParams) DeltaLfRes() uint32
DeltaLfRes reads the 2-bit member delta_lf_res.
func (*AV1PicParams) DeltaQPresent ¶
func (s *AV1PicParams) DeltaQPresent() uint32
DeltaQPresent reads the 1-bit member delta_q_present.
func (*AV1PicParams) DeltaQRes ¶
func (s *AV1PicParams) DeltaQRes() uint32
DeltaQRes reads the 2-bit member delta_q_res.
func (*AV1PicParams) DisableCdfUpdate ¶
func (s *AV1PicParams) DisableCdfUpdate() uint32
DisableCdfUpdate reads the 1-bit member disable_cdf_update.
func (*AV1PicParams) DisableFrameEndUpdateCdf ¶
func (s *AV1PicParams) DisableFrameEndUpdateCdf() uint32
DisableFrameEndUpdateCdf reads the 1-bit member disable_frame_end_update_cdf.
func (*AV1PicParams) EnableCdef ¶
func (s *AV1PicParams) EnableCdef() uint32
EnableCdef reads the 1-bit member enable_cdef.
func (*AV1PicParams) EnableDualFilter ¶
func (s *AV1PicParams) EnableDualFilter() uint32
EnableDualFilter reads the 1-bit member enable_dual_filter.
func (*AV1PicParams) EnableFgs ¶
func (s *AV1PicParams) EnableFgs() uint32
EnableFgs reads the 1-bit member enable_fgs.
func (*AV1PicParams) EnableFilterIntra ¶
func (s *AV1PicParams) EnableFilterIntra() uint32
EnableFilterIntra reads the 1-bit member enable_filter_intra.
func (*AV1PicParams) EnableInterintraCompound ¶
func (s *AV1PicParams) EnableInterintraCompound() uint32
EnableInterintraCompound reads the 1-bit member enable_interintra_compound.
func (*AV1PicParams) EnableIntraEdgeFilter ¶
func (s *AV1PicParams) EnableIntraEdgeFilter() uint32
EnableIntraEdgeFilter reads the 1-bit member enable_intra_edge_filter.
func (*AV1PicParams) EnableJntComp ¶
func (s *AV1PicParams) EnableJntComp() uint32
EnableJntComp reads the 1-bit member enable_jnt_comp.
func (*AV1PicParams) EnableMaskedCompound ¶
func (s *AV1PicParams) EnableMaskedCompound() uint32
EnableMaskedCompound reads the 1-bit member enable_masked_compound.
func (*AV1PicParams) EnableOrderHint ¶
func (s *AV1PicParams) EnableOrderHint() uint32
EnableOrderHint reads the 1-bit member enable_order_hint.
func (*AV1PicParams) EnableRestoration ¶
func (s *AV1PicParams) EnableRestoration() uint32
EnableRestoration reads the 1-bit member enable_restoration.
func (*AV1PicParams) EnableSuperres ¶
func (s *AV1PicParams) EnableSuperres() uint32
EnableSuperres reads the 1-bit member enable_superres.
func (*AV1PicParams) ForceIntegerMv ¶
func (s *AV1PicParams) ForceIntegerMv() uint32
ForceIntegerMv reads the 1-bit member force_integer_mv.
func (*AV1PicParams) FrameType ¶
func (s *AV1PicParams) FrameType() uint32
FrameType reads the 2-bit member frame_type.
func (*AV1PicParams) GrainScaleShift ¶
func (s *AV1PicParams) GrainScaleShift() uint32
GrainScaleShift reads the 2-bit member grain_scale_shift.
func (*AV1PicParams) InterpFilter ¶
func (s *AV1PicParams) InterpFilter() uint32
InterpFilter reads the 3-bit member interp_filter.
func (*AV1PicParams) LoopFilterDeltaEnabled ¶
func (s *AV1PicParams) LoopFilterDeltaEnabled() uint32
LoopFilterDeltaEnabled reads the 1-bit member loop_filter_delta_enabled.
func (*AV1PicParams) LoopFilterDeltaUpdate ¶
func (s *AV1PicParams) LoopFilterDeltaUpdate() uint32
LoopFilterDeltaUpdate reads the 1-bit member loop_filter_delta_update.
func (*AV1PicParams) MonoChrome ¶
func (s *AV1PicParams) MonoChrome() uint32
MonoChrome reads the 1-bit member mono_chrome.
func (*AV1PicParams) NumTileCols ¶
func (s *AV1PicParams) NumTileCols() uint32
NumTileCols reads the 8-bit member num_tile_cols.
func (*AV1PicParams) NumTileRows ¶
func (s *AV1PicParams) NumTileRows() uint32
NumTileRows reads the 8-bit member num_tile_rows.
func (*AV1PicParams) OrderHintBitsMinus1 ¶
func (s *AV1PicParams) OrderHintBitsMinus1() uint32
OrderHintBitsMinus1 reads the 3-bit member order_hint_bits_minus1.
func (*AV1PicParams) OverlapFlag ¶
func (s *AV1PicParams) OverlapFlag() uint32
OverlapFlag reads the 1-bit member overlap_flag.
func (*AV1PicParams) Profile ¶
func (s *AV1PicParams) Profile() uint32
Profile reads the 3-bit member profile.
func (*AV1PicParams) ReducedTxSet ¶
func (s *AV1PicParams) ReducedTxSet() uint32
ReducedTxSet reads the 1-bit member reduced_tx_set.
func (*AV1PicParams) ReferenceMode ¶
func (s *AV1PicParams) ReferenceMode() uint32
ReferenceMode reads the 1-bit member reference_mode.
func (*AV1PicParams) Reserved07bits ¶
func (s *AV1PicParams) Reserved07bits() uint32
Reserved07bits reads the 7-bit member reserved0_7bits.
func (*AV1PicParams) Reserved13bits ¶
func (s *AV1PicParams) Reserved13bits() uint32
Reserved13bits reads the 3-bit member reserved1_3bits.
func (*AV1PicParams) Reserved24bits ¶
func (s *AV1PicParams) Reserved24bits() uint32
Reserved24bits reads the 4-bit member reserved2_4bits.
func (*AV1PicParams) Reserved34bits ¶
func (s *AV1PicParams) Reserved34bits() uint32
Reserved34bits reads the 4-bit member reserved3_4bits.
func (*AV1PicParams) Reserved42bits ¶
func (s *AV1PicParams) Reserved42bits() uint32
Reserved42bits reads the 2-bit member reserved4_2bits.
func (*AV1PicParams) Reserved64bits ¶
func (s *AV1PicParams) Reserved64bits() uint32
Reserved64bits reads the 4-bit member reserved6_4bits.
func (*AV1PicParams) ScalingShiftMinus8 ¶
func (s *AV1PicParams) ScalingShiftMinus8() uint32
ScalingShiftMinus8 reads the 2-bit member scaling_shift_minus8.
func (*AV1PicParams) SegmentationEnabled ¶
func (s *AV1PicParams) SegmentationEnabled() uint32
SegmentationEnabled reads the 1-bit member segmentation_enabled.
func (*AV1PicParams) SegmentationTemporalUpdate ¶
func (s *AV1PicParams) SegmentationTemporalUpdate() uint32
SegmentationTemporalUpdate reads the 1-bit member segmentation_temporal_update.
func (*AV1PicParams) SegmentationUpdateData ¶
func (s *AV1PicParams) SegmentationUpdateData() uint32
SegmentationUpdateData reads the 1-bit member segmentation_update_data.
func (*AV1PicParams) SegmentationUpdateMap ¶
func (s *AV1PicParams) SegmentationUpdateMap() uint32
SegmentationUpdateMap reads the 1-bit member segmentation_update_map.
func (*AV1PicParams) SetAllowHighPrecisionMv ¶
func (s *AV1PicParams) SetAllowHighPrecisionMv(v uint32)
SetAllowHighPrecisionMv writes the 1-bit member allow_high_precision_mv. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetAllowIntrabc ¶
func (s *AV1PicParams) SetAllowIntrabc(v uint32)
SetAllowIntrabc writes the 1-bit member allow_intrabc. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetAllowScreenContentTools ¶
func (s *AV1PicParams) SetAllowScreenContentTools(v uint32)
SetAllowScreenContentTools writes the 1-bit member allow_screen_content_tools. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetAllowWarpedMotion ¶
func (s *AV1PicParams) SetAllowWarpedMotion(v uint32)
SetAllowWarpedMotion writes the 1-bit member allow_warped_motion. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetApplyGrain ¶
func (s *AV1PicParams) SetApplyGrain(v uint32)
SetApplyGrain writes the 1-bit member apply_grain. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetArCoeffLag ¶
func (s *AV1PicParams) SetArCoeffLag(v uint32)
SetArCoeffLag writes the 2-bit member ar_coeff_lag. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetArCoeffShiftMinus6 ¶
func (s *AV1PicParams) SetArCoeffShiftMinus6(v uint32)
SetArCoeffShiftMinus6 writes the 2-bit member ar_coeff_shift_minus6. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetBitDepthMinus8 ¶
func (s *AV1PicParams) SetBitDepthMinus8(v uint32)
SetBitDepthMinus8 writes the 4-bit member bit_depth_minus8. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetCdefBits ¶
func (s *AV1PicParams) SetCdefBits(v uint32)
SetCdefBits writes the 2-bit member cdef_bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetCdefDampingMinus3 ¶
func (s *AV1PicParams) SetCdefDampingMinus3(v uint32)
SetCdefDampingMinus3 writes the 2-bit member cdef_damping_minus_3. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetChromaScalingFromLuma ¶
func (s *AV1PicParams) SetChromaScalingFromLuma(v uint32)
SetChromaScalingFromLuma writes the 1-bit member chroma_scaling_from_luma. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetClipToRestrictedRange ¶
func (s *AV1PicParams) SetClipToRestrictedRange(v uint32)
SetClipToRestrictedRange writes the 1-bit member clip_to_restricted_range. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetCodedDenom ¶
func (s *AV1PicParams) SetCodedDenom(v uint32)
SetCodedDenom writes the 3-bit member coded_denom. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetCodedLossless ¶
func (s *AV1PicParams) SetCodedLossless(v uint32)
SetCodedLossless writes the 1-bit member coded_lossless. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetContextUpdateTileId ¶
func (s *AV1PicParams) SetContextUpdateTileId(v uint32)
SetContextUpdateTileId writes the 16-bit member context_update_tile_id. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDeltaLfMulti ¶
func (s *AV1PicParams) SetDeltaLfMulti(v uint32)
SetDeltaLfMulti writes the 1-bit member delta_lf_multi. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDeltaLfPresent ¶
func (s *AV1PicParams) SetDeltaLfPresent(v uint32)
SetDeltaLfPresent writes the 1-bit member delta_lf_present. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDeltaLfRes ¶
func (s *AV1PicParams) SetDeltaLfRes(v uint32)
SetDeltaLfRes writes the 2-bit member delta_lf_res. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDeltaQPresent ¶
func (s *AV1PicParams) SetDeltaQPresent(v uint32)
SetDeltaQPresent writes the 1-bit member delta_q_present. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDeltaQRes ¶
func (s *AV1PicParams) SetDeltaQRes(v uint32)
SetDeltaQRes writes the 2-bit member delta_q_res. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDisableCdfUpdate ¶
func (s *AV1PicParams) SetDisableCdfUpdate(v uint32)
SetDisableCdfUpdate writes the 1-bit member disable_cdf_update. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetDisableFrameEndUpdateCdf ¶
func (s *AV1PicParams) SetDisableFrameEndUpdateCdf(v uint32)
SetDisableFrameEndUpdateCdf writes the 1-bit member disable_frame_end_update_cdf. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableCdef ¶
func (s *AV1PicParams) SetEnableCdef(v uint32)
SetEnableCdef writes the 1-bit member enable_cdef. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableDualFilter ¶
func (s *AV1PicParams) SetEnableDualFilter(v uint32)
SetEnableDualFilter writes the 1-bit member enable_dual_filter. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableFgs ¶
func (s *AV1PicParams) SetEnableFgs(v uint32)
SetEnableFgs writes the 1-bit member enable_fgs. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableFilterIntra ¶
func (s *AV1PicParams) SetEnableFilterIntra(v uint32)
SetEnableFilterIntra writes the 1-bit member enable_filter_intra. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableInterintraCompound ¶
func (s *AV1PicParams) SetEnableInterintraCompound(v uint32)
SetEnableInterintraCompound writes the 1-bit member enable_interintra_compound. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableIntraEdgeFilter ¶
func (s *AV1PicParams) SetEnableIntraEdgeFilter(v uint32)
SetEnableIntraEdgeFilter writes the 1-bit member enable_intra_edge_filter. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableJntComp ¶
func (s *AV1PicParams) SetEnableJntComp(v uint32)
SetEnableJntComp writes the 1-bit member enable_jnt_comp. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableMaskedCompound ¶
func (s *AV1PicParams) SetEnableMaskedCompound(v uint32)
SetEnableMaskedCompound writes the 1-bit member enable_masked_compound. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableOrderHint ¶
func (s *AV1PicParams) SetEnableOrderHint(v uint32)
SetEnableOrderHint writes the 1-bit member enable_order_hint. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableRestoration ¶
func (s *AV1PicParams) SetEnableRestoration(v uint32)
SetEnableRestoration writes the 1-bit member enable_restoration. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetEnableSuperres ¶
func (s *AV1PicParams) SetEnableSuperres(v uint32)
SetEnableSuperres writes the 1-bit member enable_superres. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetForceIntegerMv ¶
func (s *AV1PicParams) SetForceIntegerMv(v uint32)
SetForceIntegerMv writes the 1-bit member force_integer_mv. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetFrameType ¶
func (s *AV1PicParams) SetFrameType(v uint32)
SetFrameType writes the 2-bit member frame_type. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetGrainScaleShift ¶
func (s *AV1PicParams) SetGrainScaleShift(v uint32)
SetGrainScaleShift writes the 2-bit member grain_scale_shift. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetInterpFilter ¶
func (s *AV1PicParams) SetInterpFilter(v uint32)
SetInterpFilter writes the 3-bit member interp_filter. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetLoopFilterDeltaEnabled ¶
func (s *AV1PicParams) SetLoopFilterDeltaEnabled(v uint32)
SetLoopFilterDeltaEnabled writes the 1-bit member loop_filter_delta_enabled. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetLoopFilterDeltaUpdate ¶
func (s *AV1PicParams) SetLoopFilterDeltaUpdate(v uint32)
SetLoopFilterDeltaUpdate writes the 1-bit member loop_filter_delta_update. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetMonoChrome ¶
func (s *AV1PicParams) SetMonoChrome(v uint32)
SetMonoChrome writes the 1-bit member mono_chrome. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetNumTileCols ¶
func (s *AV1PicParams) SetNumTileCols(v uint32)
SetNumTileCols writes the 8-bit member num_tile_cols. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetNumTileRows ¶
func (s *AV1PicParams) SetNumTileRows(v uint32)
SetNumTileRows writes the 8-bit member num_tile_rows. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetOrderHintBitsMinus1 ¶
func (s *AV1PicParams) SetOrderHintBitsMinus1(v uint32)
SetOrderHintBitsMinus1 writes the 3-bit member order_hint_bits_minus1. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetOverlapFlag ¶
func (s *AV1PicParams) SetOverlapFlag(v uint32)
SetOverlapFlag writes the 1-bit member overlap_flag. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetProfile ¶
func (s *AV1PicParams) SetProfile(v uint32)
SetProfile writes the 3-bit member profile. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReducedTxSet ¶
func (s *AV1PicParams) SetReducedTxSet(v uint32)
SetReducedTxSet writes the 1-bit member reduced_tx_set. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReferenceMode ¶
func (s *AV1PicParams) SetReferenceMode(v uint32)
SetReferenceMode writes the 1-bit member reference_mode. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved07bits ¶
func (s *AV1PicParams) SetReserved07bits(v uint32)
SetReserved07bits writes the 7-bit member reserved0_7bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved13bits ¶
func (s *AV1PicParams) SetReserved13bits(v uint32)
SetReserved13bits writes the 3-bit member reserved1_3bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved24bits ¶
func (s *AV1PicParams) SetReserved24bits(v uint32)
SetReserved24bits writes the 4-bit member reserved2_4bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved34bits ¶
func (s *AV1PicParams) SetReserved34bits(v uint32)
SetReserved34bits writes the 4-bit member reserved3_4bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved42bits ¶
func (s *AV1PicParams) SetReserved42bits(v uint32)
SetReserved42bits writes the 2-bit member reserved4_2bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetReserved64bits ¶
func (s *AV1PicParams) SetReserved64bits(v uint32)
SetReserved64bits writes the 4-bit member reserved6_4bits. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetScalingShiftMinus8 ¶
func (s *AV1PicParams) SetScalingShiftMinus8(v uint32)
SetScalingShiftMinus8 writes the 2-bit member scaling_shift_minus8. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSegmentationEnabled ¶
func (s *AV1PicParams) SetSegmentationEnabled(v uint32)
SetSegmentationEnabled writes the 1-bit member segmentation_enabled. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSegmentationTemporalUpdate ¶
func (s *AV1PicParams) SetSegmentationTemporalUpdate(v uint32)
SetSegmentationTemporalUpdate writes the 1-bit member segmentation_temporal_update. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSegmentationUpdateData ¶
func (s *AV1PicParams) SetSegmentationUpdateData(v uint32)
SetSegmentationUpdateData writes the 1-bit member segmentation_update_data. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSegmentationUpdateMap ¶
func (s *AV1PicParams) SetSegmentationUpdateMap(v uint32)
SetSegmentationUpdateMap writes the 1-bit member segmentation_update_map. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetShowFrame ¶
func (s *AV1PicParams) SetShowFrame(v uint32)
SetShowFrame writes the 1-bit member show_frame. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSkipMode ¶
func (s *AV1PicParams) SetSkipMode(v uint32)
SetSkipMode writes the 1-bit member skip_mode. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSkipModeFrame0 ¶
func (s *AV1PicParams) SetSkipModeFrame0(v uint32)
SetSkipModeFrame0 writes the 4-bit member SkipModeFrame0. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSkipModeFrame1 ¶
func (s *AV1PicParams) SetSkipModeFrame1(v uint32)
SetSkipModeFrame1 writes the 4-bit member SkipModeFrame1. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSpatialLayerId ¶
func (s *AV1PicParams) SetSpatialLayerId(v uint32)
SetSpatialLayerId writes the 4-bit member spatial_layer_id. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSubsamplingX ¶
func (s *AV1PicParams) SetSubsamplingX(v uint32)
SetSubsamplingX writes the 1-bit member subsampling_x. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSubsamplingY ¶
func (s *AV1PicParams) SetSubsamplingY(v uint32)
SetSubsamplingY writes the 1-bit member subsampling_y. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetSwitchableMotionMode ¶
func (s *AV1PicParams) SetSwitchableMotionMode(v uint32)
SetSwitchableMotionMode writes the 1-bit member switchable_motion_mode. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetTemporalLayerId ¶
func (s *AV1PicParams) SetTemporalLayerId(v uint32)
SetTemporalLayerId writes the 4-bit member temporal_layer_id. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetTxMode ¶
func (s *AV1PicParams) SetTxMode(v uint32)
SetTxMode writes the 2-bit member tx_mode. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetUse128x128Superblock ¶
func (s *AV1PicParams) SetUse128x128Superblock(v uint32)
SetUse128x128Superblock writes the 1-bit member use_128x128_superblock. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetUseRefFrameMvs ¶
func (s *AV1PicParams) SetUseRefFrameMvs(v uint32)
SetUseRefFrameMvs writes the 1-bit member use_ref_frame_mvs. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetUseSuperres ¶
func (s *AV1PicParams) SetUseSuperres(v uint32)
SetUseSuperres writes the 1-bit member use_superres. Bits of v above the member's width are discarded.
func (*AV1PicParams) SetUsingQmatrix ¶
func (s *AV1PicParams) SetUsingQmatrix(v uint32)
SetUsingQmatrix writes the 1-bit member using_qmatrix. Bits of v above the member's width are discarded.
func (*AV1PicParams) ShowFrame ¶
func (s *AV1PicParams) ShowFrame() uint32
ShowFrame reads the 1-bit member show_frame.
func (*AV1PicParams) SkipMode ¶
func (s *AV1PicParams) SkipMode() uint32
SkipMode reads the 1-bit member skip_mode.
func (*AV1PicParams) SkipModeFrame0 ¶
func (s *AV1PicParams) SkipModeFrame0() uint32
SkipModeFrame0 reads the 4-bit member SkipModeFrame0.
func (*AV1PicParams) SkipModeFrame1 ¶
func (s *AV1PicParams) SkipModeFrame1() uint32
SkipModeFrame1 reads the 4-bit member SkipModeFrame1.
func (*AV1PicParams) SpatialLayerId ¶
func (s *AV1PicParams) SpatialLayerId() uint32
SpatialLayerId reads the 4-bit member spatial_layer_id.
func (*AV1PicParams) SubsamplingX ¶
func (s *AV1PicParams) SubsamplingX() uint32
SubsamplingX reads the 1-bit member subsampling_x.
func (*AV1PicParams) SubsamplingY ¶
func (s *AV1PicParams) SubsamplingY() uint32
SubsamplingY reads the 1-bit member subsampling_y.
func (*AV1PicParams) SwitchableMotionMode ¶
func (s *AV1PicParams) SwitchableMotionMode() uint32
SwitchableMotionMode reads the 1-bit member switchable_motion_mode.
func (*AV1PicParams) TemporalLayerId ¶
func (s *AV1PicParams) TemporalLayerId() uint32
TemporalLayerId reads the 4-bit member temporal_layer_id.
func (*AV1PicParams) TxMode ¶
func (s *AV1PicParams) TxMode() uint32
TxMode reads the 2-bit member tx_mode.
func (*AV1PicParams) Use128x128Superblock ¶
func (s *AV1PicParams) Use128x128Superblock() uint32
Use128x128Superblock reads the 1-bit member use_128x128_superblock.
func (*AV1PicParams) UseRefFrameMvs ¶
func (s *AV1PicParams) UseRefFrameMvs() uint32
UseRefFrameMvs reads the 1-bit member use_ref_frame_mvs.
func (*AV1PicParams) UseSuperres ¶
func (s *AV1PicParams) UseSuperres() uint32
UseSuperres reads the 1-bit member use_superres.
func (*AV1PicParams) UsingQmatrix ¶
func (s *AV1PicParams) UsingQmatrix() uint32
UsingQmatrix reads the 1-bit member using_qmatrix.
type AV1PicParamsGlobalMotion ¶
type AV1PicParamsGlobalMotion struct {
Reserved24Bits [3]int8 // char[3] @1
Wmmat [6]int32 // int[6] @4
// contains filtered or unexported fields
}
AV1PicParamsGlobalMotion corresponds to C anonymous record at dynlink_cuviddec.h:1007, declared in dynlink_cuviddec.h:1007. Size 28, alignment 4.
func (*AV1PicParamsGlobalMotion) Invalid ¶
func (s *AV1PicParamsGlobalMotion) Invalid() uint32
Invalid reads the 1-bit member invalid.
func (*AV1PicParamsGlobalMotion) Reserved5Bits ¶
func (s *AV1PicParamsGlobalMotion) Reserved5Bits() uint32
Reserved5Bits reads the 5-bit member reserved5Bits.
func (*AV1PicParamsGlobalMotion) SetInvalid ¶
func (s *AV1PicParamsGlobalMotion) SetInvalid(v uint32)
SetInvalid writes the 1-bit member invalid. Bits of v above the member's width are discarded.
func (*AV1PicParamsGlobalMotion) SetReserved5Bits ¶
func (s *AV1PicParamsGlobalMotion) SetReserved5Bits(v uint32)
SetReserved5Bits writes the 5-bit member reserved5Bits. Bits of v above the member's width are discarded.
func (*AV1PicParamsGlobalMotion) SetWmtype ¶
func (s *AV1PicParamsGlobalMotion) SetWmtype(v uint32)
SetWmtype writes the 2-bit member wmtype. Bits of v above the member's width are discarded.
func (*AV1PicParamsGlobalMotion) Wmtype ¶
func (s *AV1PicParamsGlobalMotion) Wmtype() uint32
Wmtype reads the 2-bit member wmtype.
type AV1PicParamsRefFrame ¶
type AV1PicParamsRefFrame struct {
Width uint32 // unsigned int @0
Height uint32 // unsigned int @4
Index uint8 // unsigned char @8
Reserved24Bits [3]uint8 // unsigned char[3] @9
}
AV1PicParamsRefFrame corresponds to C anonymous record at dynlink_cuviddec.h:998, declared in dynlink_cuviddec.h:998. Size 12, alignment 4.
type AV1SeqHdr ¶
type AV1SeqHdr struct {
MaxWidth uint32 // unsigned int @0
MaxHeight uint32 // unsigned int @4
Reserved [1016]uint8 // unsigned char[1016] @8
}
AV1SeqHdr corresponds to C CUVIDAV1SEQHDR, declared in dynlink_nvcuvid.h:289. Size 1024, alignment 4.
type AudioCodec ¶
type AudioCodec int32
AudioCodec corresponds to C cudaAudioCodec.
const ( AudioCodecMpeg1 AudioCodec = 0 // cudaAudioCodec_MPEG1 AudioCodecMpeg2 AudioCodec = 1 // cudaAudioCodec_MPEG2 AudioCodecMP3 AudioCodec = 2 // cudaAudioCodec_MP3 AudioCodecAC3 AudioCodec = 3 // cudaAudioCodec_AC3 AudioCodecLpcm AudioCodec = 4 // cudaAudioCodec_LPCM AudioCodecAac AudioCodec = 5 // cudaAudioCodec_AAC )
func (AudioCodec) String ¶
func (e AudioCodec) String() string
String returns the constant name, or a numeric representation for unknown values.
type AudioFormat ¶
type AudioFormat struct {
Codec AudioCodec // cudaAudioCodec @0
Channels uint32 // unsigned int @4
Samplespersec uint32 // unsigned int @8
Bitrate uint32 // unsigned int @12
Reserved1 uint32 // unsigned int @16
Reserved2 uint32 // unsigned int @20
}
AudioFormat corresponds to C CUAUDIOFORMAT, declared in dynlink_nvcuvid.h:316. Size 24, alignment 4.
type BindFailure ¶
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 ChromaFormat ¶
type ChromaFormat int32
ChromaFormat corresponds to C cudaVideoChromaFormat.
const ( ChromaFormatMonochrome ChromaFormat = 0 // cudaVideoChromaFormat_Monochrome ChromaFormat420 ChromaFormat = 1 // cudaVideoChromaFormat_420 ChromaFormat422 ChromaFormat = 2 // cudaVideoChromaFormat_422 ChromaFormat444 ChromaFormat = 3 // cudaVideoChromaFormat_444 )
func (ChromaFormat) String ¶
func (e ChromaFormat) String() string
String returns the constant name, or a numeric representation for unknown values.
type Codec ¶
type Codec int32
Codec corresponds to C cudaVideoCodec.
const ( CodecMpeg1 Codec = 0 // cudaVideoCodec_MPEG1 CodecMpeg2 Codec = 1 // cudaVideoCodec_MPEG2 CodecMpeg4 Codec = 2 // cudaVideoCodec_MPEG4 CodecVC1 Codec = 3 // cudaVideoCodec_VC1 CodecH264 Codec = 4 // cudaVideoCodec_H264 CodecJpeg Codec = 5 // cudaVideoCodec_JPEG CodecH264Svc Codec = 6 // cudaVideoCodec_H264_SVC CodecH264Mvc Codec = 7 // cudaVideoCodec_H264_MVC CodecHevc Codec = 8 // cudaVideoCodec_HEVC CodecVP8 Codec = 9 // cudaVideoCodec_VP8 CodecVP9 Codec = 10 // cudaVideoCodec_VP9 CodecAV1 Codec = 11 // cudaVideoCodec_AV1 CodecNumCodecs Codec = 12 // cudaVideoCodec_NumCodecs CodecYuv420 Codec = 1230591318 // cudaVideoCodec_YUV420 CodecYV12 Codec = 1498820914 // cudaVideoCodec_YV12 CodecNV12 Codec = 1314271538 // cudaVideoCodec_NV12 CodecYuyv Codec = 1498765654 // cudaVideoCodec_YUYV CodecUyvy Codec = 1431918169 // cudaVideoCodec_UYVY )
type CreateFlags ¶
type CreateFlags int32
CreateFlags corresponds to C cudaVideoCreateFlags.
const ( CreateFlagsDefault CreateFlags = 0x00 // cudaVideoCreate_Default CreateFlagsPreferCUDA CreateFlags = 0x01 // cudaVideoCreate_PreferCUDA CreateFlagsPreferDXVA CreateFlags = 0x02 // cudaVideoCreate_PreferDXVA CreateFlagsPreferCUVID CreateFlags = 0x04 // cudaVideoCreate_PreferCUVID )
func (CreateFlags) String ¶
func (e CreateFlags) String() string
String returns the constant name, or a numeric representation for unknown values.
type DecodeCaps ¶
type DecodeCaps struct {
ECodecType Codec // cudaVideoCodec @0
EChromaFormat ChromaFormat // cudaVideoChromaFormat @4
NBitDepthMinus8 uint32 // unsigned int @8
Reserved1 [3]uint32 // unsigned int[3] @12
BIsSupported uint8 // unsigned char @24
NNumNVDECs uint8 // unsigned char @25
NOutputFormatMask uint16 // unsigned short @26
NMaxWidth uint32 // unsigned int @28
NMaxHeight uint32 // unsigned int @32
NMaxMBCount uint32 // unsigned int @36
NMinWidth uint16 // unsigned short @40
NMinHeight uint16 // unsigned short @42
BIsHistogramSupported uint8 // unsigned char @44
NCounterBitDepth uint8 // unsigned char @45
NMaxHistogramBins uint16 // unsigned short @46
BIsDecodeStatsSupported uint8 // unsigned char @48
Reserved4 [3]uint8 // unsigned char[3] @49
Reserved3 [9]uint32 // unsigned int[9] @52
}
DecodeCaps corresponds to C CUVIDDECODECAPS, declared in dynlink_cuviddec.h:249. Size 88, alignment 4.
type DecodeCreateInfo ¶
type DecodeCreateInfo struct {
UlWidth uint64 // tcu_ulong @0
UlHeight uint64 // tcu_ulong @8
UlNumDecodeSurfaces uint64 // tcu_ulong @16
CodecType Codec // cudaVideoCodec @24
ChromaFormat ChromaFormat // cudaVideoChromaFormat @28
UlCreationFlags uint64 // tcu_ulong @32
BitDepthMinus8 uint64 // tcu_ulong @40
UlIntraDecodeOnly uint64 // tcu_ulong @48
UlMaxWidth uint64 // tcu_ulong @56
UlMaxHeight uint64 // tcu_ulong @64
Reserved1 uint64 // tcu_ulong @72
DisplayArea DecodeCreateInfoDisplayArea // struct (unnamed struct at dynlink_cuviddec.h:299:5) @80
OutputFormat SurfaceFormat // cudaVideoSurfaceFormat @88
DeinterlaceMode DeinterlaceMode // cudaVideoDeinterlaceMode @92
UlTargetWidth uint64 // tcu_ulong @96
UlTargetHeight uint64 // tcu_ulong @104
UlNumOutputSurfaces uint64 // tcu_ulong @112
VidLock uintptr // CUvideoctxlock @120
TargetRect DecodeCreateInfoTargetRect // struct (unnamed struct at dynlink_cuviddec.h:319:5) @128
EnableHistogram uint64 // tcu_ulong @136
EnableDecodeFeatures uint64 // tcu_ulong @144
Reserved2 [3]uint64 // tcu_ulong[3] @152
}
DecodeCreateInfo corresponds to C CUVIDDECODECREATEINFO, declared in dynlink_cuviddec.h:279. Size 176, alignment 8.
type DecodeCreateInfoDisplayArea ¶
type DecodeCreateInfoDisplayArea struct {
Left int16 // short @0
Top int16 // short @2
Right int16 // short @4
Bottom int16 // short @6
}
DecodeCreateInfoDisplayArea corresponds to C anonymous record at dynlink_cuviddec.h:299, declared in dynlink_cuviddec.h:299. Size 8, alignment 2.
type DecodeCreateInfoTargetRect ¶
type DecodeCreateInfoTargetRect struct {
Left int16 // short @0
Top int16 // short @2
Right int16 // short @4
Bottom int16 // short @6
}
DecodeCreateInfoTargetRect corresponds to C anonymous record at dynlink_cuviddec.h:319, declared in dynlink_cuviddec.h:319. Size 8, alignment 2.
type DecodeFeature ¶
type DecodeFeature int32
DecodeFeature corresponds to C cuvidDecodeFeature.
const (
DecodeFeatureDecStats DecodeFeature = 0 // cuvidDecodeFeature_DecStats
)
func (DecodeFeature) String ¶
func (e DecodeFeature) String() string
String returns the constant name, or a numeric representation for unknown values.
type DecodeStats ¶
type DecodeStats struct {
QpLuma uint8 // unsigned char @0
Reserved2 [2]uint8 // unsigned char[2] @2
Mv0X int16 // short @4
Mv0Y int16 // short @6
Mv1X int16 // short @8
Mv1Y int16 // short @10
// contains filtered or unexported fields
}
DecodeStats corresponds to C CUVIDDECODESTATS, declared in dynlink_cuviddec.h:210. Size 12, alignment 2.
func (*DecodeStats) CuType ¶
func (s *DecodeStats) CuType() uint32
CuType reads the 3-bit member cu_type.
func (*DecodeStats) QpInvalid ¶
func (s *DecodeStats) QpInvalid() uint32
QpInvalid reads the 1-bit member qp_invalid.
func (*DecodeStats) Reserved1 ¶
func (s *DecodeStats) Reserved1() uint32
Reserved1 reads the 4-bit member reserved1.
func (*DecodeStats) SetCuType ¶
func (s *DecodeStats) SetCuType(v uint32)
SetCuType writes the 3-bit member cu_type. Bits of v above the member's width are discarded.
func (*DecodeStats) SetQpInvalid ¶
func (s *DecodeStats) SetQpInvalid(v uint32)
SetQpInvalid writes the 1-bit member qp_invalid. Bits of v above the member's width are discarded.
func (*DecodeStats) SetReserved1 ¶
func (s *DecodeStats) SetReserved1(v uint32)
SetReserved1 writes the 4-bit member reserved1. Bits of v above the member's width are discarded.
type DecodeStatsHeader ¶
type DecodeStatsHeader struct {
Reserved2 [3]uint8 // unsigned char[3] @1
MbCount uint32 // unsigned int @4
Size uint32 // unsigned int @8
Reserved3 [5]uint32 // unsigned int[5] @12
// contains filtered or unexported fields
}
DecodeStatsHeader corresponds to C CUVIDDECODESTATSHEADER, declared in dynlink_cuviddec.h:192. Size 32, alignment 4.
func (*DecodeStatsHeader) BIsMV1Valid ¶
func (s *DecodeStatsHeader) BIsMV1Valid() uint32
BIsMV1Valid reads the 1-bit member bIsMV1Valid.
func (*DecodeStatsHeader) BIsStatsPresent ¶
func (s *DecodeStatsHeader) BIsStatsPresent() uint32
BIsStatsPresent reads the 1-bit member bIsStatsPresent.
func (*DecodeStatsHeader) Reserved1 ¶
func (s *DecodeStatsHeader) Reserved1() uint32
Reserved1 reads the 6-bit member reserved1.
func (*DecodeStatsHeader) SetBIsMV1Valid ¶
func (s *DecodeStatsHeader) SetBIsMV1Valid(v uint32)
SetBIsMV1Valid writes the 1-bit member bIsMV1Valid. Bits of v above the member's width are discarded.
func (*DecodeStatsHeader) SetBIsStatsPresent ¶
func (s *DecodeStatsHeader) SetBIsStatsPresent(v uint32)
SetBIsStatsPresent writes the 1-bit member bIsStatsPresent. Bits of v above the member's width are discarded.
func (*DecodeStatsHeader) SetReserved1 ¶
func (s *DecodeStatsHeader) SetReserved1(v uint32)
SetReserved1 writes the 6-bit member reserved1. Bits of v above the member's width are discarded.
type DecodeStatus ¶
type DecodeStatus int32
DecodeStatus corresponds to C cuvidDecodeStatus.
const ( DecodeStatusInvalid DecodeStatus = 0 // cuvidDecodeStatus_Invalid DecodeStatusInProgress DecodeStatus = 1 // cuvidDecodeStatus_InProgress DecodeStatusSuccess DecodeStatus = 2 // cuvidDecodeStatus_Success DecodeStatusError DecodeStatus = 8 // cuvidDecodeStatus_Error DecodeStatusErrorConcealed DecodeStatus = 9 // cuvidDecodeStatus_Error_Concealed )
func (DecodeStatus) String ¶
func (e DecodeStatus) String() string
String returns the constant name, or a numeric representation for unknown values.
type DecodeStatusInfo ¶
type DecodeStatusInfo struct {
DecodeStatus DecodeStatus // cuvidDecodeStatus @0
Reserved [31]uint32 // unsigned int[31] @4
PReserved [8]uintptr // void *[8] @128
}
DecodeStatusInfo corresponds to C CUVIDGETDECODESTATUS, declared in dynlink_cuviddec.h:1137. Size 192, alignment 8.
type Decoder ¶
type Decoder uintptr
Decoder is an opaque CUvideodecoder handle.
It is created by CreateDecoder and must be released with Decoder.Destroy. The zero Decoder is not usable.
type DeinterlaceMode ¶
type DeinterlaceMode int32
DeinterlaceMode corresponds to C cudaVideoDeinterlaceMode.
const ( DeinterlaceModeWeave DeinterlaceMode = 0 // cudaVideoDeinterlaceMode_Weave DeinterlaceModeBob DeinterlaceMode = 1 // cudaVideoDeinterlaceMode_Bob DeinterlaceModeAdaptive DeinterlaceMode = 2 // cudaVideoDeinterlaceMode_Adaptive )
func (DeinterlaceMode) String ¶
func (e DeinterlaceMode) String() string
String returns the constant name, or a numeric representation for unknown values.
type H264DPBEntry ¶
type H264DPBEntry struct {
PicIdx int32 // int @0
FrameIdx int32 // int @4
IsLongTerm int32 // int @8
NotExisting int32 // int @12
UsedForReference int32 // int @16
FieldOrderCnt [2]int32 // int[2] @20
}
H264DPBEntry corresponds to C CUVIDH264DPBENTRY, declared in dynlink_cuviddec.h:349. Size 28, alignment 4.
type H264MVCExt ¶
type H264MVCExt struct {
NumViewsMinus1 int32 // int @0
ViewId int32 // int @4
InterViewFlag uint8 // unsigned char @8
NumInterViewRefsL0 uint8 // unsigned char @9
NumInterViewRefsL1 uint8 // unsigned char @10
MVCReserved8Bits uint8 // unsigned char @11
InterViewRefsL0 [16]int32 // int[16] @12
InterViewRefsL1 [16]int32 // int[16] @76
}
H264MVCExt corresponds to C CUVIDH264MVCEXT, declared in dynlink_cuviddec.h:364. Size 140, alignment 4.
type H264PicParams ¶
type H264PicParams struct {
Log2MaxFrameNumMinus4 int32 // int @0
PicOrderCntType int32 // int @4
Log2MaxPicOrderCntLsbMinus4 int32 // int @8
DeltaPicOrderAlwaysZeroFlag int32 // int @12
FrameMbsOnlyFlag int32 // int @16
Direct8x8InferenceFlag int32 // int @20
NumRefFrames int32 // int @24
ResidualColourTransformFlag uint8 // unsigned char @28
BitDepthLumaMinus8 uint8 // unsigned char @29
BitDepthChromaMinus8 uint8 // unsigned char @30
QpprimeYZeroTransformBypassFlag uint8 // unsigned char @31
EntropyCodingModeFlag int32 // int @32
PicOrderPresentFlag int32 // int @36
NumRefIdxL0ActiveMinus1 int32 // int @40
NumRefIdxL1ActiveMinus1 int32 // int @44
WeightedPredFlag int32 // int @48
WeightedBipredIdc int32 // int @52
PicInitQpMinus26 int32 // int @56
DeblockingFilterControlPresentFlag int32 // int @60
RedundantPicCntPresentFlag int32 // int @64
Transform8x8ModeFlag int32 // int @68
MbaffFrameFlag int32 // int @72
ConstrainedIntraPredFlag int32 // int @76
ChromaQpIndexOffset int32 // int @80
SecondChromaQpIndexOffset int32 // int @84
RefPicFlag int32 // int @88
FrameNum int32 // int @92
CurrFieldOrderCnt [2]int32 // int[2] @96
Dpb [16]H264DPBEntry // CUVIDH264DPBENTRY[16] @104
WeightScale4x4 [6][16]uint8 // unsigned char[6][16] @552
WeightScale8x8 [2][64]uint8 // unsigned char[2][64] @648
FmoAsoEnable uint8 // unsigned char @776
NumSliceGroupsMinus1 uint8 // unsigned char @777
SliceGroupMapType uint8 // unsigned char @778
PicInitQsMinus26 int8 // signed char @779
SliceGroupChangeRateMinus1 uint32 // unsigned int @780
Fmo H264PicParamsFmo // union (unnamed union at dynlink_cuviddec.h:465:5) @784
Reserved [11]uint32 // unsigned int[11] @796
H264PicParamsAnon1 H264PicParamsAnon1 // union _CUVIDH264PICPARAMS::(anonymous at dynlink_cuviddec.h:475:5) @840
// contains filtered or unexported fields
}
H264PicParams corresponds to C CUVIDH264PICPARAMS, declared in dynlink_cuviddec.h:422. Size 984, alignment 8.
func (*H264PicParams) MbAdaptiveFrameFieldFlag ¶
func (s *H264PicParams) MbAdaptiveFrameFieldFlag() uint32
MbAdaptiveFrameFieldFlag reads the 2-bit member mb_adaptive_frame_field_flag.
func (*H264PicParams) Reserved1 ¶
func (s *H264PicParams) Reserved1() uint32
Reserved1 reads the 30-bit member Reserved1.
func (*H264PicParams) SetMbAdaptiveFrameFieldFlag ¶
func (s *H264PicParams) SetMbAdaptiveFrameFieldFlag(v uint32)
SetMbAdaptiveFrameFieldFlag writes the 2-bit member mb_adaptive_frame_field_flag. Bits of v above the member's width are discarded.
func (*H264PicParams) SetReserved1 ¶
func (s *H264PicParams) SetReserved1(v uint32)
SetReserved1 writes the 30-bit member Reserved1. Bits of v above the member's width are discarded.
type H264PicParamsAnon1 ¶
type H264PicParamsAnon1 struct {
Raw [144]byte
// contains filtered or unexported fields
}
H264PicParamsAnon1 corresponds to C anonymous record at dynlink_cuviddec.h:475, declared in dynlink_cuviddec.h:475. It is a union: the members below all start at offset 0 and share the same 144 bytes, so writing one invalidates the others. Size 144, alignment 8.
func (*H264PicParamsAnon1) Mvcext ¶
func (u *H264PicParamsAnon1) Mvcext() *H264MVCExt
Mvcext returns a pointer to the union's storage read as H264MVCExt (C CUVIDH264MVCEXT).
func (*H264PicParamsAnon1) Svcext ¶
func (u *H264PicParamsAnon1) Svcext() *H264SVCExt
Svcext returns a pointer to the union's storage read as H264SVCExt (C CUVIDH264SVCEXT).
type H264PicParamsFmo ¶
type H264PicParamsFmo struct {
Raw [8]byte
// contains filtered or unexported fields
}
H264PicParamsFmo corresponds to C anonymous record at dynlink_cuviddec.h:465, declared in dynlink_cuviddec.h:465. It is a union: the members below all start at offset 0 and share the same 8 bytes, so writing one invalidates the others. Size 8, alignment 8.
func (*H264PicParamsFmo) PMb2SliceGroupMap ¶
func (u *H264PicParamsFmo) PMb2SliceGroupMap() *uintptr
PMb2SliceGroupMap returns a pointer to the union's storage read as uintptr (C const unsigned char *).
func (*H264PicParamsFmo) SliceGroupMapAddr ¶
func (u *H264PicParamsFmo) SliceGroupMapAddr() *uint64
SliceGroupMapAddr returns a pointer to the union's storage read as uint64 (C unsigned long long).
type H264SVCExt ¶
type H264SVCExt struct {
ProfileIdc uint8 // unsigned char @0
LevelIdc uint8 // unsigned char @1
DQId uint8 // unsigned char @2
DQIdMax uint8 // unsigned char @3
DisableInterLayerDeblockingFilterIdc uint8 // unsigned char @4
RefLayerChromaPhaseYPlus1 uint8 // unsigned char @5
InterLayerSliceAlphaC0OffsetDiv2 int8 // signed char @6
InterLayerSliceBetaOffsetDiv2 int8 // signed char @7
DPBEntryValidFlag uint16 // unsigned short @8
InterLayerDeblockingFilterControlPresentFlag uint8 // unsigned char @10
ExtendedSpatialScalabilityIdc uint8 // unsigned char @11
AdaptiveTcoeffLevelPredictionFlag uint8 // unsigned char @12
SliceHeaderRestrictionFlag uint8 // unsigned char @13
ChromaPhaseXPlus1Flag uint8 // unsigned char @14
ChromaPhaseYPlus1 uint8 // unsigned char @15
TcoeffLevelPredictionFlag uint8 // unsigned char @16
ConstrainedIntraResamplingFlag uint8 // unsigned char @17
RefLayerChromaPhaseXPlus1Flag uint8 // unsigned char @18
StoreRefBasePicFlag uint8 // unsigned char @19
Reserved8BitsA uint8 // unsigned char @20
Reserved8BitsB uint8 // unsigned char @21
ScaledRefLayerLeftOffset int16 // short @22
ScaledRefLayerTopOffset int16 // short @24
ScaledRefLayerRightOffset int16 // short @26
ScaledRefLayerBottomOffset int16 // short @28
Reserved16Bits uint16 // unsigned short @30
PNextLayer uintptr // struct _CUVIDPICPARAMS * @32
BRefBaseLayer int32 // int @40
// contains filtered or unexported fields
}
H264SVCExt corresponds to C CUVIDH264SVCEXT, declared in dynlink_cuviddec.h:381. Size 48, alignment 8.
type HEVCPicParams ¶
type HEVCPicParams struct {
PicWidthInLumaSamples int32 // int @0
PicHeightInLumaSamples int32 // int @4
Log2MinLumaCodingBlockSizeMinus3 uint8 // unsigned char @8
Log2DiffMaxMinLumaCodingBlockSize uint8 // unsigned char @9
Log2MinTransformBlockSizeMinus2 uint8 // unsigned char @10
Log2DiffMaxMinTransformBlockSize uint8 // unsigned char @11
PcmEnabledFlag uint8 // unsigned char @12
Log2MinPcmLumaCodingBlockSizeMinus3 uint8 // unsigned char @13
Log2DiffMaxMinPcmLumaCodingBlockSize uint8 // unsigned char @14
PcmSampleBitDepthLumaMinus1 uint8 // unsigned char @15
PcmSampleBitDepthChromaMinus1 uint8 // unsigned char @16
PcmLoopFilterDisabledFlag uint8 // unsigned char @17
StrongIntraSmoothingEnabledFlag uint8 // unsigned char @18
MaxTransformHierarchyDepthIntra uint8 // unsigned char @19
MaxTransformHierarchyDepthInter uint8 // unsigned char @20
AmpEnabledFlag uint8 // unsigned char @21
SeparateColourPlaneFlag uint8 // unsigned char @22
Log2MaxPicOrderCntLsbMinus4 uint8 // unsigned char @23
NumShortTermRefPicSets uint8 // unsigned char @24
LongTermRefPicsPresentFlag uint8 // unsigned char @25
NumLongTermRefPicsSps uint8 // unsigned char @26
SpsTemporalMvpEnabledFlag uint8 // unsigned char @27
SampleAdaptiveOffsetEnabledFlag uint8 // unsigned char @28
ScalingListEnableFlag uint8 // unsigned char @29
IrapPicFlag uint8 // unsigned char @30
IdrPicFlag uint8 // unsigned char @31
BitDepthLumaMinus8 uint8 // unsigned char @32
BitDepthChromaMinus8 uint8 // unsigned char @33
Log2MaxTransformSkipBlockSizeMinus2 uint8 // unsigned char @34
Log2SaoOffsetScaleLuma uint8 // unsigned char @35
Log2SaoOffsetScaleChroma uint8 // unsigned char @36
HighPrecisionOffsetsEnabledFlag uint8 // unsigned char @37
MvHevcEnable uint8 // unsigned char @38
NuhLayerId uint8 // unsigned char @39
DefaultRefLayersActiveFlag uint8 // unsigned char @40
NumDirectRefLayers uint8 // unsigned char @41
MaxOneActiveRefLayerFlag uint8 // unsigned char @42
PocLsbNotPresentFlag uint8 // unsigned char @43
NumActiveRefLayerPics0 uint8 // unsigned char @44
NumActiveRefLayerPics1 uint8 // unsigned char @45
Reserved1 [2]uint8 // unsigned char[2] @46
DependentSliceSegmentsEnabledFlag uint8 // unsigned char @48
SliceSegmentHeaderExtensionPresentFlag uint8 // unsigned char @49
SignDataHidingEnabledFlag uint8 // unsigned char @50
CuQpDeltaEnabledFlag uint8 // unsigned char @51
DiffCuQpDeltaDepth uint8 // unsigned char @52
InitQpMinus26 int8 // signed char @53
PpsCbQpOffset int8 // signed char @54
PpsCrQpOffset int8 // signed char @55
ConstrainedIntraPredFlag uint8 // unsigned char @56
WeightedPredFlag uint8 // unsigned char @57
WeightedBipredFlag uint8 // unsigned char @58
TransformSkipEnabledFlag uint8 // unsigned char @59
TransquantBypassEnabledFlag uint8 // unsigned char @60
EntropyCodingSyncEnabledFlag uint8 // unsigned char @61
Log2ParallelMergeLevelMinus2 uint8 // unsigned char @62
NumExtraSliceHeaderBits uint8 // unsigned char @63
LoopFilterAcrossTilesEnabledFlag uint8 // unsigned char @64
LoopFilterAcrossSlicesEnabledFlag uint8 // unsigned char @65
OutputFlagPresentFlag uint8 // unsigned char @66
NumRefIdxL0DefaultActiveMinus1 uint8 // unsigned char @67
NumRefIdxL1DefaultActiveMinus1 uint8 // unsigned char @68
ListsModificationPresentFlag uint8 // unsigned char @69
CabacInitPresentFlag uint8 // unsigned char @70
PpsSliceChromaQpOffsetsPresentFlag uint8 // unsigned char @71
DeblockingFilterOverrideEnabledFlag uint8 // unsigned char @72
PpsDeblockingFilterDisabledFlag uint8 // unsigned char @73
PpsBetaOffsetDiv2 int8 // signed char @74
PpsTcOffsetDiv2 int8 // signed char @75
TilesEnabledFlag uint8 // unsigned char @76
UniformSpacingFlag uint8 // unsigned char @77
NumTileColumnsMinus1 uint8 // unsigned char @78
NumTileRowsMinus1 uint8 // unsigned char @79
ColumnWidthMinus1 [21]uint16 // unsigned short[21] @80
RowHeightMinus1 [21]uint16 // unsigned short[21] @122
SpsRangeExtensionFlag uint8 // unsigned char @164
TransformSkipRotationEnabledFlag uint8 // unsigned char @165
TransformSkipContextEnabledFlag uint8 // unsigned char @166
ImplicitRdpcmEnabledFlag uint8 // unsigned char @167
ExplicitRdpcmEnabledFlag uint8 // unsigned char @168
ExtendedPrecisionProcessingFlag uint8 // unsigned char @169
IntraSmoothingDisabledFlag uint8 // unsigned char @170
PersistentRiceAdaptationEnabledFlag uint8 // unsigned char @171
CabacBypassAlignmentEnabledFlag uint8 // unsigned char @172
PpsRangeExtensionFlag uint8 // unsigned char @173
CrossComponentPredictionEnabledFlag uint8 // unsigned char @174
ChromaQpOffsetListEnabledFlag uint8 // unsigned char @175
DiffCuChromaQpOffsetDepth uint8 // unsigned char @176
ChromaQpOffsetListLenMinus1 uint8 // unsigned char @177
CbQpOffsetList [6]int8 // signed char[6] @178
CrQpOffsetList [6]int8 // signed char[6] @184
Reserved2 [2]uint8 // unsigned char[2] @190
Reserved3 [8]uint32 // unsigned int[8] @192
NumBitsForShortTermRPSInSlice int32 // int @224
NumDeltaPocsOfRefRpsIdx int32 // int @228
NumPocTotalCurr int32 // int @232
NumPocStCurrBefore int32 // int @236
NumPocStCurrAfter int32 // int @240
NumPocLtCurr int32 // int @244
CurrPicOrderCntVal int32 // int @248
RefPicIdx [16]int32 // int[16] @252
PicOrderCntVal [16]int32 // int[16] @316
IsLongTerm [16]uint8 // unsigned char[16] @380
RefPicSetStCurrBefore [8]uint8 // unsigned char[8] @396
RefPicSetStCurrAfter [8]uint8 // unsigned char[8] @404
RefPicSetLtCurr [8]uint8 // unsigned char[8] @412
RefPicSetInterLayer0 [8]uint8 // unsigned char[8] @420
RefPicSetInterLayer1 [8]uint8 // unsigned char[8] @428
Reserved4 [12]uint32 // unsigned int[12] @436
ScalingList4x4 [6][16]uint8 // unsigned char[6][16] @484
ScalingList8x8 [6][64]uint8 // unsigned char[6][64] @580
ScalingList16x16 [6][64]uint8 // unsigned char[6][64] @964
ScalingList32x32 [2][64]uint8 // unsigned char[2][64] @1348
ScalingListDCCoeff16x16 [6]uint8 // unsigned char[6] @1476
ScalingListDCCoeff32x32 [2]uint8 // unsigned char[2] @1482
}
HEVCPicParams corresponds to C CUVIDHEVCPICPARAMS, declared in dynlink_cuviddec.h:627. Size 1484, alignment 4.
type JPEGPicParams ¶
type JPEGPicParams struct {
NumComponents uint8 // unsigned char @0
BitDepth uint8 // unsigned char @1
QuantizationTableSelector [4]uint8 // unsigned char[4] @2
ScanOffset [4]uint32 // unsigned int[4] @8
ScanSize [4]uint32 // unsigned int[4] @24
RestartInterval uint16 // unsigned short @40
ComponentIdentifier [4]uint8 // unsigned char[4] @42
HasQMatrix uint8 // unsigned char @46
HasHuffman uint8 // unsigned char @47
Quantvals [4][64]uint16 // unsigned short[4][64] @48
BitsAc [4][16]uint8 // unsigned char[4][16] @560
TableAc [4][256]uint8 // unsigned char[4][256] @624
BitsDc [4][16]uint8 // unsigned char[4][16] @1648
TableDc [4][256]uint8 // unsigned char[4][256] @1712
// contains filtered or unexported fields
}
JPEGPicParams corresponds to C CUVIDJPEGPICPARAMS, declared in dynlink_cuviddec.h:599. Size 2736, alignment 4.
type LibraryConflictError ¶
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 MPEG2PicParams ¶
type MPEG2PicParams struct {
ForwardRefIdx int32 // int @0
BackwardRefIdx int32 // int @4
PictureCodingType int32 // int @8
FullPelForwardVector int32 // int @12
FullPelBackwardVector int32 // int @16
FCode [2][2]int32 // int[2][2] @20
IntraDcPrecision int32 // int @36
FramePredFrameDct int32 // int @40
ConcealmentMotionVectors int32 // int @44
QScaleType int32 // int @48
IntraVlcFormat int32 // int @52
AlternateScan int32 // int @56
TopFieldFirst int32 // int @60
QuantMatrixIntra [64]uint8 // unsigned char[64] @64
QuantMatrixInter [64]uint8 // unsigned char[64] @128
}
MPEG2PicParams corresponds to C CUVIDMPEG2PICPARAMS, declared in dynlink_cuviddec.h:488. Size 192, alignment 4.
type MPEG4PicParams ¶
type MPEG4PicParams struct {
ForwardRefIdx int32 // int @0
BackwardRefIdx int32 // int @4
VideoObjectLayerWidth int32 // int @8
VideoObjectLayerHeight int32 // int @12
VopTimeIncrementBitcount int32 // int @16
TopFieldFirst int32 // int @20
ResyncMarkerDisable int32 // int @24
QuantType int32 // int @28
QuarterSample int32 // int @32
ShortVideoHeader int32 // int @36
DivxFlags int32 // int @40
VopCodingType int32 // int @44
VopCoded int32 // int @48
VopRoundingType int32 // int @52
AlternateVerticalScanFlag int32 // int @56
Interlaced int32 // int @60
VopFcodeForward int32 // int @64
VopFcodeBackward int32 // int @68
Trd [2]int32 // int[2] @72
Trb [2]int32 // int[2] @80
QuantMatrixIntra [64]uint8 // unsigned char[64] @88
QuantMatrixInter [64]uint8 // unsigned char[64] @152
GmcEnabled int32 // int @216
}
MPEG4PicParams corresponds to C CUVIDMPEG4PICPARAMS, declared in dynlink_cuviddec.h:519. Size 220, alignment 4.
type OperatingPointInfo ¶
type OperatingPointInfo struct {
Codec Codec // cudaVideoCodec @0
OperatingPointInfoAnon1 OperatingPointInfoAnon1 // union CUVIDOPERATINGPOINTINFO::(anonymous at dynlink_nvcuvid.h:259:5) @4
}
OperatingPointInfo corresponds to C CUVIDOPERATINGPOINTINFO, declared in dynlink_nvcuvid.h:256. Size 1028, alignment 4.
type OperatingPointInfoAnon1 ¶
type OperatingPointInfoAnon1 struct {
Raw [1024]byte
// contains filtered or unexported fields
}
OperatingPointInfoAnon1 corresponds to C anonymous record at dynlink_nvcuvid.h:259, declared in dynlink_nvcuvid.h:259. It is a union: the members below all start at offset 0 and share the same 1024 bytes, so writing one invalidates the others. Size 1024, alignment 2.
func (*OperatingPointInfoAnon1) Av1 ¶
func (u *OperatingPointInfoAnon1) Av1() *OperatingPointInfoAnon1Av1
Av1 returns a pointer to the union's storage read as OperatingPointInfoAnon1Av1 (C struct (unnamed struct at dynlink_nvcuvid.h:261:9)).
func (*OperatingPointInfoAnon1) CodecReserved ¶
func (u *OperatingPointInfoAnon1) CodecReserved() *[1024]uint8
CodecReserved returns a pointer to the union's storage read as [1024]uint8 (C unsigned char[1024]).
type OperatingPointInfoAnon1Av1 ¶
type OperatingPointInfoAnon1Av1 struct {
OperatingPointsCnt uint8 // unsigned char @0
Reserved24Bits [3]uint8 // unsigned char[3] @1
OperatingPointsIdc [32]uint16 // unsigned short[32] @4
}
OperatingPointInfoAnon1Av1 corresponds to C anonymous record at dynlink_nvcuvid.h:261, declared in dynlink_nvcuvid.h:261. Size 68, alignment 2.
type PacketFlags ¶
type PacketFlags int32
PacketFlags corresponds to C CUvideopacketflags.
const ( PacketFlagsEndofstream PacketFlags = 0x01 // CUVID_PKT_ENDOFSTREAM PacketFlagsTimestamp PacketFlags = 0x02 // CUVID_PKT_TIMESTAMP PacketFlagsDiscontinuity PacketFlags = 0x04 // CUVID_PKT_DISCONTINUITY PacketFlagsEndofpicture PacketFlags = 0x08 // CUVID_PKT_ENDOFPICTURE PacketFlagsNotifyEos PacketFlags = 0x10 // CUVID_PKT_NOTIFY_EOS )
func (PacketFlags) String ¶
func (e PacketFlags) String() string
String returns the constant name, or a numeric representation for unknown values.
type Parser ¶
type Parser uintptr
Parser is an opaque CUvideoparser handle, created by CreateVideoParser and released with Parser.Destroy. The zero Parser is not usable.
type ParserDispInfo ¶
type ParserDispInfo struct {
PictureIndex int32 // int @0
ProgressiveFrame int32 // int @4
TopFieldFirst int32 // int @8
RepeatFirstField int32 // int @12
Timestamp int64 // CUvideotimestamp @16
}
ParserDispInfo corresponds to C CUVIDPARSERDISPINFO, declared in dynlink_nvcuvid.h:459. Size 24, alignment 8.
type ParserParams ¶
type ParserParams struct {
CodecType Codec // cudaVideoCodec @0
UlMaxNumDecodeSurfaces uint32 // unsigned int @4
UlClockRate uint32 // unsigned int @8
UlErrorThreshold uint32 // unsigned int @12
UlMaxDisplayDelay uint32 // unsigned int @16
UReserved1 [4]uint32 // unsigned int[4] @24
PUserData uintptr // void * @40
PfnSequenceCallback uintptr // PFNVIDSEQUENCECALLBACK @48
PfnDecodePicture uintptr // PFNVIDDECODECALLBACK @56
PfnDisplayPicture uintptr // PFNVIDDISPLAYCALLBACK @64
PfnGetOperatingPoint uintptr // PFNVIDOPPOINTCALLBACK @72
PfnGetSEIMsg uintptr // PFNVIDSEIMSGCALLBACK @80
PvReserved2 [5]uintptr // void *[5] @88
PExtVideoInfo uintptr // CUVIDEOFORMATEX * @128
// contains filtered or unexported fields
}
ParserParams corresponds to C CUVIDPARSERPARAMS, declared in dynlink_nvcuvid.h:495. Size 136, alignment 8.
func (*ParserParams) BAnnexb ¶
func (s *ParserParams) BAnnexb() uint32
BAnnexb reads the 1-bit member bAnnexb.
func (*ParserParams) BMemoryOptimize ¶
func (s *ParserParams) BMemoryOptimize() uint32
BMemoryOptimize reads the 1-bit member bMemoryOptimize.
func (*ParserParams) SetBAnnexb ¶
func (s *ParserParams) SetBAnnexb(v uint32)
SetBAnnexb writes the 1-bit member bAnnexb. Bits of v above the member's width are discarded.
func (*ParserParams) SetBMemoryOptimize ¶
func (s *ParserParams) SetBMemoryOptimize(v uint32)
SetBMemoryOptimize writes the 1-bit member bMemoryOptimize. Bits of v above the member's width are discarded.
func (*ParserParams) SetUReserved ¶
func (s *ParserParams) SetUReserved(v uint32)
SetUReserved writes the 30-bit member uReserved. Bits of v above the member's width are discarded.
func (*ParserParams) UReserved ¶
func (s *ParserParams) UReserved() uint32
UReserved reads the 30-bit member uReserved.
type PicParams ¶
type PicParams struct {
PicWidthInMbs int32 // int @0
FrameHeightInMbs int32 // int @4
CurrPicIdx int32 // int @8
FieldPicFlag int32 // int @12
BottomFieldFlag int32 // int @16
SecondField int32 // int @20
NBitstreamDataLen uint32 // unsigned int @24
PBitstreamData uintptr // const unsigned char * @32
NNumSlices uint32 // unsigned int @40
PSliceDataOffsets uintptr // const unsigned int * @48
RefPicFlag int32 // int @56
IntraPicFlag int32 // int @60
Timestamp int64 // CUvideotimestamp @64
Reserved [28]uint32 // unsigned int[28] @72
CodecSpecific PicParamsCodecSpecific // union (unnamed union at dynlink_cuviddec.h:1071:5) @184
// contains filtered or unexported fields
}
PicParams corresponds to C CUVIDPICPARAMS, declared in dynlink_cuviddec.h:1052. Size 4280, alignment 8.
type PicParamsCodecSpecific ¶
type PicParamsCodecSpecific struct {
Raw [4096]byte
// contains filtered or unexported fields
}
PicParamsCodecSpecific corresponds to C anonymous record at dynlink_cuviddec.h:1071, declared in dynlink_cuviddec.h:1071. It is a union: the members below all start at offset 0 and share the same 4096 bytes, so writing one invalidates the others. Size 4096, alignment 8.
func (*PicParamsCodecSpecific) Av1 ¶
func (u *PicParamsCodecSpecific) Av1() *AV1PicParams
Av1 returns a pointer to the union's storage read as AV1PicParams (C CUVIDAV1PICPARAMS).
func (*PicParamsCodecSpecific) CodecReserved ¶
func (u *PicParamsCodecSpecific) CodecReserved() *[1024]uint32
CodecReserved returns a pointer to the union's storage read as [1024]uint32 (C unsigned int[1024]).
func (*PicParamsCodecSpecific) H264 ¶
func (u *PicParamsCodecSpecific) H264() *H264PicParams
H264 returns a pointer to the union's storage read as H264PicParams (C CUVIDH264PICPARAMS).
func (*PicParamsCodecSpecific) Hevc ¶
func (u *PicParamsCodecSpecific) Hevc() *HEVCPicParams
Hevc returns a pointer to the union's storage read as HEVCPicParams (C CUVIDHEVCPICPARAMS).
func (*PicParamsCodecSpecific) Jpeg ¶
func (u *PicParamsCodecSpecific) Jpeg() *JPEGPicParams
Jpeg returns a pointer to the union's storage read as JPEGPicParams (C CUVIDJPEGPICPARAMS).
func (*PicParamsCodecSpecific) Mpeg2 ¶
func (u *PicParamsCodecSpecific) Mpeg2() *MPEG2PicParams
Mpeg2 returns a pointer to the union's storage read as MPEG2PicParams (C CUVIDMPEG2PICPARAMS).
func (*PicParamsCodecSpecific) Mpeg4 ¶
func (u *PicParamsCodecSpecific) Mpeg4() *MPEG4PicParams
Mpeg4 returns a pointer to the union's storage read as MPEG4PicParams (C CUVIDMPEG4PICPARAMS).
func (*PicParamsCodecSpecific) Vc1 ¶
func (u *PicParamsCodecSpecific) Vc1() *VC1PicParams
Vc1 returns a pointer to the union's storage read as VC1PicParams (C CUVIDVC1PICPARAMS).
func (*PicParamsCodecSpecific) Vp8 ¶
func (u *PicParamsCodecSpecific) Vp8() *VP8PicParams
Vp8 returns a pointer to the union's storage read as VP8PicParams (C CUVIDVP8PICPARAMS).
func (*PicParamsCodecSpecific) Vp9 ¶
func (u *PicParamsCodecSpecific) Vp9() *VP9PicParams
Vp9 returns a pointer to the union's storage read as VP9PicParams (C CUVIDVP9PICPARAMS).
type ProcParams ¶
type ProcParams struct {
ProgressiveFrame int32 // int @0
SecondField int32 // int @4
TopFieldFirst int32 // int @8
UnpairedField int32 // int @12
ReservedFlags uint32 // unsigned int @16
ReservedZero uint32 // unsigned int @20
RawInputDptr uint64 // unsigned long long @24
RawInputPitch uint32 // unsigned int @32
RawInputFormat uint32 // unsigned int @36
RawOutputDptr uint64 // unsigned long long @40
RawOutputPitch uint32 // unsigned int @48
Reserved1 uint32 // unsigned int @52
OutputStream uintptr // CUstream @56
Reserved [46]uint32 // unsigned int[46] @64
HistogramDptr uintptr // unsigned long long * @248
PCuvidProcExt uintptr // CUVIDPROCPARAMSEXT * @256
}
ProcParams corresponds to C CUVIDPROCPARAMS, declared in dynlink_cuviddec.h:1111. Size 264, alignment 8.
type ProcParamsExt ¶
type ProcParamsExt struct {
DecodeStatsSize uint32 // unsigned int @0
Reserved1 [31]uint32 // unsigned int[31] @4
DecodeStatsDptr uintptr // unsigned long long * @128
ReservedPtr [15]uintptr // void *[15] @136
}
ProcParamsExt corresponds to C CUVIDPROCPARAMSEXT, declared in dynlink_cuviddec.h:1091. Size 256, alignment 8.
type ReconfigureDecoderInfo ¶
type ReconfigureDecoderInfo struct {
UlWidth uint32 // unsigned int @0
UlHeight uint32 // unsigned int @4
UlTargetWidth uint32 // unsigned int @8
UlTargetHeight uint32 // unsigned int @12
UlNumDecodeSurfaces uint32 // unsigned int @16
Reserved1 [12]uint32 // unsigned int[12] @20
DisplayArea ReconfigureDecoderInfoDisplayArea // struct (unnamed struct at dynlink_cuviddec.h:1160:5) @68
TargetRect ReconfigureDecoderInfoTargetRect // struct (unnamed struct at dynlink_cuviddec.h:1169:5) @76
Reserved2 [11]uint32 // unsigned int[11] @84
}
ReconfigureDecoderInfo corresponds to C CUVIDRECONFIGUREDECODERINFO, declared in dynlink_cuviddec.h:1149. Size 128, alignment 4.
type ReconfigureDecoderInfoDisplayArea ¶
type ReconfigureDecoderInfoDisplayArea struct {
Left int16 // short @0
Top int16 // short @2
Right int16 // short @4
Bottom int16 // short @6
}
ReconfigureDecoderInfoDisplayArea corresponds to C anonymous record at dynlink_cuviddec.h:1160, declared in dynlink_cuviddec.h:1160. Size 8, alignment 2.
type ReconfigureDecoderInfoTargetRect ¶
type ReconfigureDecoderInfoTargetRect struct {
Left int16 // short @0
Top int16 // short @2
Right int16 // short @4
Bottom int16 // short @6
}
ReconfigureDecoderInfoTargetRect corresponds to C anonymous record at dynlink_cuviddec.h:1169, declared in dynlink_cuviddec.h:1169. Size 8, alignment 2.
type RegisterDecodeSurfacesInfo ¶
type RegisterDecodeSurfacesInfo struct {
UlNumDecodeSurfaces uint32 // unsigned int @0
Reserved [31]uint32 // unsigned int[31] @4
PDecodeSurfaces uintptr // CUarray * @128
PDecodeStatsSurfaces uintptr // CUdeviceptr * @136
PReserved [30]uintptr // void *[30] @144
}
RegisterDecodeSurfacesInfo corresponds to C CUVIDREGISTERDECODESURFACESINFO, declared in dynlink_cuviddec.h:335. Size 384, alignment 8.
type Result ¶
type Result int32
Result is a CUDA driver result code, as returned by every NVDEC entry point.
It is the driver's CUresult, not a decoder-specific enum, so its constants are the driver's. Only success is named here: the numbering belongs to the driver API, and duplicating it would create a second list to keep in step.
const Success Result = 0
Success reports that the call completed.
type SEIAlternativeTransferCharacteristics ¶
type SEIAlternativeTransferCharacteristics struct {
PreferredTransferCharacteristics uint8 // unsigned char @0
}
SEIAlternativeTransferCharacteristics corresponds to C SEIALTERNATIVETRANSFERCHARACTERISTICS, declared in dynlink_nvcuvid.h:164. Size 1, alignment 1.
type SEIContentLightLevelInfo ¶
type SEIContentLightLevelInfo struct {
MaxContentLightLevel uint16 // unsigned short @0
MaxPicAverageLightLevel uint16 // unsigned short @2
Reserved uint32 // unsigned int @4
}
SEIContentLightLevelInfo corresponds to C SEICONTENTLIGHTLEVELINFO, declared in dynlink_nvcuvid.h:137. Size 8, alignment 4.
type SEIMasteringDisplayInfo ¶
type SEIMasteringDisplayInfo struct {
DisplayPrimariesX [3]uint16 // unsigned short[3] @0
DisplayPrimariesY [3]uint16 // unsigned short[3] @6
WhitePointX uint16 // unsigned short @12
WhitePointY uint16 // unsigned short @14
MaxDisplayMasteringLuminance uint32 // unsigned int @16
MinDisplayMasteringLuminance uint32 // unsigned int @20
}
SEIMasteringDisplayInfo corresponds to C SEIMASTERINGDISPLAYINFO, declared in dynlink_nvcuvid.h:122. Size 24, alignment 4.
type SEIMessage ¶
type SEIMessage struct {
SeiMessageType uint8 // unsigned char @0
Reserved [3]uint8 // unsigned char[3] @1
SeiMessageSize uint32 // unsigned int @4
}
SEIMessage corresponds to C CUSEIMESSAGE, declared in dynlink_nvcuvid.h:174. Size 8, alignment 4.
type SEIMessageInfo ¶
type SEIMessageInfo struct {
PSEIData uintptr // void * @0
PSEIMessage uintptr // CUSEIMESSAGE * @8
SeiMessageCount uint32 // unsigned int @16
PicIdx uint32 // unsigned int @20
}
SEIMessageInfo corresponds to C CUVIDSEIMESSAGEINFO, declared in dynlink_nvcuvid.h:276. Size 24, alignment 8.
type Source ¶
type Source uintptr
Source is an opaque CUvideosource handle, created by CreateVideoSource and released with Source.Destroy. The zero Source is not usable.
type SourceDataPacket ¶
type SourceDataPacket struct {
Flags uint64 // tcu_ulong @0
PayloadSize uint64 // tcu_ulong @8
Payload uintptr // const unsigned char * @16
Timestamp int64 // CUvideotimestamp @24
}
SourceDataPacket corresponds to C CUVIDSOURCEDATAPACKET, declared in dynlink_nvcuvid.h:349. Size 32, alignment 8.
type SourceParams ¶
type SourceParams struct {
UlClockRate uint32 // unsigned int @0
UReserved1 [6]uint32 // unsigned int[6] @8
PUserData uintptr // void * @32
PfnVideoDataHandler uintptr // PFNVIDSOURCECALLBACK @40
PfnAudioDataHandler uintptr // PFNVIDSOURCECALLBACK @48
PvReserved2 [8]uintptr // void *[8] @56
// contains filtered or unexported fields
}
SourceParams corresponds to C CUVIDSOURCEPARAMS, declared in dynlink_nvcuvid.h:368. Size 120, alignment 8.
func (*SourceParams) BAnnexb ¶
func (s *SourceParams) BAnnexb() uint32
BAnnexb reads the 1-bit member bAnnexb.
func (*SourceParams) SetBAnnexb ¶
func (s *SourceParams) SetBAnnexb(v uint32)
SetBAnnexb writes the 1-bit member bAnnexb. Bits of v above the member's width are discarded.
func (*SourceParams) SetUReserved ¶
func (s *SourceParams) SetUReserved(v uint32)
SetUReserved writes the 31-bit member uReserved. Bits of v above the member's width are discarded.
func (*SourceParams) UReserved ¶
func (s *SourceParams) UReserved() uint32
UReserved reads the 31-bit member uReserved.
type SourceState ¶
type SourceState int32
SourceState corresponds to C cudaVideoState.
const ( SourceStateError SourceState = -1 // cudaVideoState_Error SourceStateStopped SourceState = 0 // cudaVideoState_Stopped SourceStateStarted SourceState = 1 // cudaVideoState_Started )
func GetVideoSourceState ¶
func GetVideoSourceState(obj Source) (SourceState, error)
GetVideoSourceState wraps cuvidGetVideoSourceState.
func (SourceState) String ¶
func (e SourceState) String() string
String returns the constant name, or a numeric representation for unknown values.
type SurfaceFormat ¶
type SurfaceFormat int32
SurfaceFormat corresponds to C cudaVideoSurfaceFormat.
const ( SurfaceFormatNV12 SurfaceFormat = 0 // cudaVideoSurfaceFormat_NV12 SurfaceFormatP016 SurfaceFormat = 1 // cudaVideoSurfaceFormat_P016 SurfaceFormatYuv444 SurfaceFormat = 2 // cudaVideoSurfaceFormat_YUV444 SurfaceFormatYuv44416Bit SurfaceFormat = 3 // cudaVideoSurfaceFormat_YUV444_16Bit SurfaceFormatNV16 SurfaceFormat = 4 // cudaVideoSurfaceFormat_NV16 SurfaceFormatP216 SurfaceFormat = 5 // cudaVideoSurfaceFormat_P216 SurfaceFormatNV12Opaque SurfaceFormat = 6 // cudaVideoSurfaceFormat_NV12_Opaque SurfaceFormatP016Opaque SurfaceFormat = 7 // cudaVideoSurfaceFormat_P016_Opaque SurfaceFormatYuv444Opaque SurfaceFormat = 8 // cudaVideoSurfaceFormat_YUV444_Opaque SurfaceFormatYuv44416BitOpaque SurfaceFormat = 9 // cudaVideoSurfaceFormat_YUV444_16Bit_Opaque SurfaceFormatNV16Opaque SurfaceFormat = 10 // cudaVideoSurfaceFormat_NV16_Opaque SurfaceFormatP216Opaque SurfaceFormat = 11 // cudaVideoSurfaceFormat_P216_Opaque )
func (SurfaceFormat) String ¶
func (e SurfaceFormat) String() string
String returns the constant name, or a numeric representation for unknown values.
type SymbolError ¶
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 TimeCode ¶
type TimeCode struct {
TimeCodeSet [3]TimeCodeSet // TIMECODESET[3] @0
NumClockTs uint8 // unsigned char @60
// contains filtered or unexported fields
}
TimeCode corresponds to C TIMECODE, declared in dynlink_nvcuvid.h:111. Size 64, alignment 4.
type TimeCodeMPEG2 ¶
type TimeCodeMPEG2 struct {
DropFrameFlag uint8 // unsigned char @0
TimeCodeHours uint8 // unsigned char @1
TimeCodeMinutes uint8 // unsigned char @2
MarkerBit uint8 // unsigned char @3
TimeCodeSeconds uint8 // unsigned char @4
TimeCodePictures uint8 // unsigned char @5
}
TimeCodeMPEG2 corresponds to C TIMECODEMPEG2, declared in dynlink_nvcuvid.h:149. Size 6, alignment 1.
type TimeCodeSet ¶
type TimeCodeSet struct {
TimeOffsetValue uint32 // unsigned int @0
NFrames uint16 // unsigned short @4
ClockTimestampFlag uint8 // unsigned char @6
UnitsFieldBasedFlag uint8 // unsigned char @7
CountingType uint8 // unsigned char @8
FullTimestampFlag uint8 // unsigned char @9
DiscontinuityFlag uint8 // unsigned char @10
CntDroppedFlag uint8 // unsigned char @11
SecondsValue uint8 // unsigned char @12
MinutesValue uint8 // unsigned char @13
HoursValue uint8 // unsigned char @14
SecondsFlag uint8 // unsigned char @15
MinutesFlag uint8 // unsigned char @16
HoursFlag uint8 // unsigned char @17
TimeOffsetLength uint8 // unsigned char @18
Reserved uint8 // unsigned char @19
}
TimeCodeSet corresponds to C TIMECODESET, declared in dynlink_nvcuvid.h:86. Size 20, alignment 4.
type VC1PicParams ¶
type VC1PicParams struct {
ForwardRefIdx int32 // int @0
BackwardRefIdx int32 // int @4
FrameWidth int32 // int @8
FrameHeight int32 // int @12
IntraPicFlag int32 // int @16
RefPicFlag int32 // int @20
ProgressiveFcm int32 // int @24
Profile int32 // int @28
Postprocflag int32 // int @32
Pulldown int32 // int @36
Interlace int32 // int @40
Tfcntrflag int32 // int @44
Finterpflag int32 // int @48
Psf int32 // int @52
Multires int32 // int @56
Syncmarker int32 // int @60
Rangered int32 // int @64
Maxbframes int32 // int @68
PanscanFlag int32 // int @72
RefdistFlag int32 // int @76
ExtendedMv int32 // int @80
Dquant int32 // int @84
Vstransform int32 // int @88
Loopfilter int32 // int @92
Fastuvmc int32 // int @96
Overlap int32 // int @100
Quantizer int32 // int @104
ExtendedDmv int32 // int @108
RangeMapyFlag int32 // int @112
RangeMapy int32 // int @116
RangeMapuvFlag int32 // int @120
RangeMapuv int32 // int @124
Rangeredfrm int32 // int @128
}
VC1PicParams corresponds to C CUVIDVC1PICPARAMS, declared in dynlink_cuviddec.h:554. Size 132, alignment 4.
type VP8PicParams ¶
type VP8PicParams struct {
Width int32 // int @0
Height int32 // int @4
FirstPartitionSize uint32 // unsigned int @8
LastRefIdx uint8 // unsigned char @12
GoldenRefIdx uint8 // unsigned char @13
AltRefIdx uint8 // unsigned char @14
VP8PicParamsAnon1 VP8PicParamsAnon1 // union _CUVIDVP8PICPARAMS::(anonymous at dynlink_cuviddec.h:785:5) @15
Reserved1 [4]uint8 // unsigned char[4] @16
Reserved2 [3]uint32 // unsigned int[3] @20
}
VP8PicParams corresponds to C CUVIDVP8PICPARAMS, declared in dynlink_cuviddec.h:776. Size 32, alignment 4.
type VP8PicParamsAnon1 ¶
type VP8PicParamsAnon1 struct {
Raw [1]byte
// contains filtered or unexported fields
}
VP8PicParamsAnon1 corresponds to C anonymous record at dynlink_cuviddec.h:785, declared in dynlink_cuviddec.h:785. It is a union: the members below all start at offset 0 and share the same 1 bytes, so writing one invalidates the others. Size 1, alignment 1.
func (*VP8PicParamsAnon1) Vp8FrameTag ¶
func (u *VP8PicParamsAnon1) Vp8FrameTag() *VP8PicParamsAnon1Vp8FrameTag
Vp8FrameTag returns a pointer to the union's storage read as VP8PicParamsAnon1Vp8FrameTag (C struct (unnamed struct at dynlink_cuviddec.h:786:9)).
func (*VP8PicParamsAnon1) WFrameTagFlags ¶
func (u *VP8PicParamsAnon1) WFrameTagFlags() *uint8
WFrameTagFlags returns a pointer to the union's storage read as uint8 (C unsigned char).
type VP8PicParamsAnon1Vp8FrameTag ¶
type VP8PicParamsAnon1Vp8FrameTag struct {
// contains filtered or unexported fields
}
VP8PicParamsAnon1Vp8FrameTag corresponds to C anonymous record at dynlink_cuviddec.h:786, declared in dynlink_cuviddec.h:786. Size 1, alignment 1.
func (*VP8PicParamsAnon1Vp8FrameTag) FrameType ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) FrameType() uint32
FrameType reads the 1-bit member frame_type.
func (*VP8PicParamsAnon1Vp8FrameTag) Reserved2Bits ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) Reserved2Bits() uint32
Reserved2Bits reads the 2-bit member Reserved2Bits.
func (*VP8PicParamsAnon1Vp8FrameTag) SetFrameType ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) SetFrameType(v uint32)
SetFrameType writes the 1-bit member frame_type. Bits of v above the member's width are discarded.
func (*VP8PicParamsAnon1Vp8FrameTag) SetReserved2Bits ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) SetReserved2Bits(v uint32)
SetReserved2Bits writes the 2-bit member Reserved2Bits. Bits of v above the member's width are discarded.
func (*VP8PicParamsAnon1Vp8FrameTag) SetShowFrame ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) SetShowFrame(v uint32)
SetShowFrame writes the 1-bit member show_frame. Bits of v above the member's width are discarded.
func (*VP8PicParamsAnon1Vp8FrameTag) SetUpdateMbSegmentationData ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) SetUpdateMbSegmentationData(v uint32)
SetUpdateMbSegmentationData writes the 1-bit member update_mb_segmentation_data. Bits of v above the member's width are discarded.
func (*VP8PicParamsAnon1Vp8FrameTag) SetVersion ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) SetVersion(v uint32)
SetVersion writes the 3-bit member version. Bits of v above the member's width are discarded.
func (*VP8PicParamsAnon1Vp8FrameTag) ShowFrame ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) ShowFrame() uint32
ShowFrame reads the 1-bit member show_frame.
func (*VP8PicParamsAnon1Vp8FrameTag) UpdateMbSegmentationData ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) UpdateMbSegmentationData() uint32
UpdateMbSegmentationData reads the 1-bit member update_mb_segmentation_data.
func (*VP8PicParamsAnon1Vp8FrameTag) Version ¶
func (s *VP8PicParamsAnon1Vp8FrameTag) Version() uint32
Version reads the 3-bit member version.
type VP9PicParams ¶
type VP9PicParams struct {
Width uint32 // unsigned int @0
Height uint32 // unsigned int @4
LastRefIdx uint8 // unsigned char @8
GoldenRefIdx uint8 // unsigned char @9
AltRefIdx uint8 // unsigned char @10
ColorSpace uint8 // unsigned char @11
Reserved16Bits uint16 // unsigned short @14
RefFrameSignBias [4]uint8 // unsigned char[4] @16
BitDepthMinus8Luma uint8 // unsigned char @20
BitDepthMinus8Chroma uint8 // unsigned char @21
LoopFilterLevel uint8 // unsigned char @22
LoopFilterSharpness uint8 // unsigned char @23
ModeRefLfEnabled uint8 // unsigned char @24
Log2TileColumns uint8 // unsigned char @25
Log2TileRows uint8 // unsigned char @26
SegmentFeatureEnable [8][4]uint8 // unsigned char[8][4] @28
SegmentFeatureData [8][4]int16 // short[8][4] @60
MbSegmentTreeProbs [7]uint8 // unsigned char[7] @124
SegmentPredProbs [3]uint8 // unsigned char[3] @131
ReservedSegment16Bits [2]uint8 // unsigned char[2] @134
QpYAc int32 // int @136
QpYDc int32 // int @140
QpChDc int32 // int @144
QpChAc int32 // int @148
ActiveRefIdx [3]uint32 // unsigned int[3] @152
ResetFrameContext uint32 // unsigned int @164
McompFilterType uint32 // unsigned int @168
MbRefLfDelta [4]uint32 // unsigned int[4] @172
MbModeLfDelta [2]uint32 // unsigned int[2] @188
FrameTagSize uint32 // unsigned int @196
OffsetToDctParts uint32 // unsigned int @200
Reserved128Bits [4]uint32 // unsigned int[4] @204
// contains filtered or unexported fields
}
VP9PicParams corresponds to C CUVIDVP9PICPARAMS, declared in dynlink_cuviddec.h:804. Size 220, alignment 4.
func (*VP9PicParams) AllowHighPrecisionMv ¶
func (s *VP9PicParams) AllowHighPrecisionMv() uint32
AllowHighPrecisionMv reads the 1-bit member allow_high_precision_mv.
func (*VP9PicParams) ErrorResilient ¶
func (s *VP9PicParams) ErrorResilient() uint32
ErrorResilient reads the 1-bit member errorResilient.
func (*VP9PicParams) FrameContextIdx ¶
func (s *VP9PicParams) FrameContextIdx() uint32
FrameContextIdx reads the 2-bit member frameContextIdx.
func (*VP9PicParams) FrameParallelDecoding ¶
func (s *VP9PicParams) FrameParallelDecoding() uint32
FrameParallelDecoding reads the 1-bit member frameParallelDecoding.
func (*VP9PicParams) FrameType ¶
func (s *VP9PicParams) FrameType() uint32
FrameType reads the 1-bit member frameType.
func (*VP9PicParams) IntraOnly ¶
func (s *VP9PicParams) IntraOnly() uint32
IntraOnly reads the 1-bit member intraOnly.
func (*VP9PicParams) Profile ¶
func (s *VP9PicParams) Profile() uint32
Profile reads the 3-bit member profile.
func (*VP9PicParams) RefreshEntropyProbs ¶
func (s *VP9PicParams) RefreshEntropyProbs() uint32
RefreshEntropyProbs reads the 1-bit member refreshEntropyProbs.
func (*VP9PicParams) Reserved2Bits ¶
func (s *VP9PicParams) Reserved2Bits() uint32
Reserved2Bits reads the 2-bit member reserved2Bits.
func (*VP9PicParams) Reserved4Bits ¶
func (s *VP9PicParams) Reserved4Bits() uint32
Reserved4Bits reads the 4-bit member reserved4Bits.
func (*VP9PicParams) SegmentEnabled ¶
func (s *VP9PicParams) SegmentEnabled() uint32
SegmentEnabled reads the 1-bit member segmentEnabled.
func (*VP9PicParams) SegmentFeatureMode ¶
func (s *VP9PicParams) SegmentFeatureMode() uint32
SegmentFeatureMode reads the 1-bit member segmentFeatureMode.
func (*VP9PicParams) SegmentMapTemporalUpdate ¶
func (s *VP9PicParams) SegmentMapTemporalUpdate() uint32
SegmentMapTemporalUpdate reads the 1-bit member segmentMapTemporalUpdate.
func (*VP9PicParams) SegmentMapUpdate ¶
func (s *VP9PicParams) SegmentMapUpdate() uint32
SegmentMapUpdate reads the 1-bit member segmentMapUpdate.
func (*VP9PicParams) SetAllowHighPrecisionMv ¶
func (s *VP9PicParams) SetAllowHighPrecisionMv(v uint32)
SetAllowHighPrecisionMv writes the 1-bit member allow_high_precision_mv. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetErrorResilient ¶
func (s *VP9PicParams) SetErrorResilient(v uint32)
SetErrorResilient writes the 1-bit member errorResilient. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetFrameContextIdx ¶
func (s *VP9PicParams) SetFrameContextIdx(v uint32)
SetFrameContextIdx writes the 2-bit member frameContextIdx. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetFrameParallelDecoding ¶
func (s *VP9PicParams) SetFrameParallelDecoding(v uint32)
SetFrameParallelDecoding writes the 1-bit member frameParallelDecoding. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetFrameType ¶
func (s *VP9PicParams) SetFrameType(v uint32)
SetFrameType writes the 1-bit member frameType. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetIntraOnly ¶
func (s *VP9PicParams) SetIntraOnly(v uint32)
SetIntraOnly writes the 1-bit member intraOnly. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetProfile ¶
func (s *VP9PicParams) SetProfile(v uint32)
SetProfile writes the 3-bit member profile. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetRefreshEntropyProbs ¶
func (s *VP9PicParams) SetRefreshEntropyProbs(v uint32)
SetRefreshEntropyProbs writes the 1-bit member refreshEntropyProbs. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetReserved2Bits ¶
func (s *VP9PicParams) SetReserved2Bits(v uint32)
SetReserved2Bits writes the 2-bit member reserved2Bits. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetReserved4Bits ¶
func (s *VP9PicParams) SetReserved4Bits(v uint32)
SetReserved4Bits writes the 4-bit member reserved4Bits. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSegmentEnabled ¶
func (s *VP9PicParams) SetSegmentEnabled(v uint32)
SetSegmentEnabled writes the 1-bit member segmentEnabled. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSegmentFeatureMode ¶
func (s *VP9PicParams) SetSegmentFeatureMode(v uint32)
SetSegmentFeatureMode writes the 1-bit member segmentFeatureMode. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSegmentMapTemporalUpdate ¶
func (s *VP9PicParams) SetSegmentMapTemporalUpdate(v uint32)
SetSegmentMapTemporalUpdate writes the 1-bit member segmentMapTemporalUpdate. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSegmentMapUpdate ¶
func (s *VP9PicParams) SetSegmentMapUpdate(v uint32)
SetSegmentMapUpdate writes the 1-bit member segmentMapUpdate. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetShowFrame ¶
func (s *VP9PicParams) SetShowFrame(v uint32)
SetShowFrame writes the 1-bit member showFrame. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSubSamplingX ¶
func (s *VP9PicParams) SetSubSamplingX(v uint32)
SetSubSamplingX writes the 1-bit member subSamplingX. Bits of v above the member's width are discarded.
func (*VP9PicParams) SetSubSamplingY ¶
func (s *VP9PicParams) SetSubSamplingY(v uint32)
SetSubSamplingY writes the 1-bit member subSamplingY. Bits of v above the member's width are discarded.
func (*VP9PicParams) ShowFrame ¶
func (s *VP9PicParams) ShowFrame() uint32
ShowFrame reads the 1-bit member showFrame.
func (*VP9PicParams) SubSamplingX ¶
func (s *VP9PicParams) SubSamplingX() uint32
SubSamplingX reads the 1-bit member subSamplingX.
func (*VP9PicParams) SubSamplingY ¶
func (s *VP9PicParams) SubSamplingY() uint32
SubSamplingY reads the 1-bit member subSamplingY.
type VideoFormat ¶
type VideoFormat struct {
Codec Codec // cudaVideoCodec @0
FrameRate VideoFormatFrameRate // struct (unnamed struct at dynlink_nvcuvid.h:193:5) @4
ProgressiveSequence uint8 // unsigned char @12
BitDepthLumaMinus8 uint8 // unsigned char @13
BitDepthChromaMinus8 uint8 // unsigned char @14
MinNumDecodeSurfaces uint8 // unsigned char @15
CodedWidth uint32 // unsigned int @16
CodedHeight uint32 // unsigned int @20
DisplayArea VideoFormatDisplayArea // struct (unnamed struct at dynlink_nvcuvid.h:221:5) @24
ChromaFormat ChromaFormat // cudaVideoChromaFormat @40
Bitrate uint32 // unsigned int @44
DisplayAspectRatio VideoFormatDisplayAspectRatio // struct (unnamed struct at dynlink_nvcuvid.h:232:5) @48
VideoSignalDescription VideoFormatVideoSignalDescription // struct (unnamed struct at dynlink_nvcuvid.h:240:5) @56
SeqhdrDataLength uint32 // unsigned int @60
}
VideoFormat corresponds to C CUVIDEOFORMAT, declared in dynlink_nvcuvid.h:187. Size 64, alignment 4.
type VideoFormatDisplayArea ¶
type VideoFormatDisplayArea struct {
Left int32 // int @0
Top int32 // int @4
Right int32 // int @8
Bottom int32 // int @12
}
VideoFormatDisplayArea corresponds to C anonymous record at dynlink_nvcuvid.h:221, declared in dynlink_nvcuvid.h:221. Size 16, alignment 4.
type VideoFormatDisplayAspectRatio ¶
VideoFormatDisplayAspectRatio corresponds to C anonymous record at dynlink_nvcuvid.h:232, declared in dynlink_nvcuvid.h:232. Size 8, alignment 4.
type VideoFormatEx ¶
type VideoFormatEx struct {
Format VideoFormat // CUVIDEOFORMAT @0
VideoFormatExAnon1 VideoFormatExAnon1 // union CUVIDEOFORMATEX::(anonymous at dynlink_nvcuvid.h:304:5) @64
}
VideoFormatEx corresponds to C CUVIDEOFORMATEX, declared in dynlink_nvcuvid.h:301. Size 1088, alignment 4.
type VideoFormatExAnon1 ¶
type VideoFormatExAnon1 struct {
Raw [1024]byte
// contains filtered or unexported fields
}
VideoFormatExAnon1 corresponds to C anonymous record at dynlink_nvcuvid.h:304, declared in dynlink_nvcuvid.h:304. It is a union: the members below all start at offset 0 and share the same 1024 bytes, so writing one invalidates the others. Size 1024, alignment 4.
func (*VideoFormatExAnon1) Av1 ¶
func (u *VideoFormatExAnon1) Av1() *AV1SeqHdr
Av1 returns a pointer to the union's storage read as AV1SeqHdr (C CUVIDAV1SEQHDR).
func (*VideoFormatExAnon1) RawSeqhdrData ¶
func (u *VideoFormatExAnon1) RawSeqhdrData() *[1024]uint8
RawSeqhdrData returns a pointer to the union's storage read as [1024]uint8 (C unsigned char[1024]).
type VideoFormatFrameRate ¶
type VideoFormatFrameRate struct {
Numerator uint32 // unsigned int @0
Denominator uint32 // unsigned int @4
}
VideoFormatFrameRate corresponds to C anonymous record at dynlink_nvcuvid.h:193, declared in dynlink_nvcuvid.h:193. Size 8, alignment 4.
type VideoFormatVideoSignalDescription ¶
type VideoFormatVideoSignalDescription struct {
ColorPrimaries uint8 // unsigned char @1
TransferCharacteristics uint8 // unsigned char @2
MatrixCoefficients uint8 // unsigned char @3
// contains filtered or unexported fields
}
VideoFormatVideoSignalDescription corresponds to C anonymous record at dynlink_nvcuvid.h:240, declared in dynlink_nvcuvid.h:240. Size 4, alignment 1.
func (*VideoFormatVideoSignalDescription) ReservedZeroBits ¶
func (s *VideoFormatVideoSignalDescription) ReservedZeroBits() uint32
ReservedZeroBits reads the 4-bit member reserved_zero_bits.
func (*VideoFormatVideoSignalDescription) SetReservedZeroBits ¶
func (s *VideoFormatVideoSignalDescription) SetReservedZeroBits(v uint32)
SetReservedZeroBits writes the 4-bit member reserved_zero_bits. Bits of v above the member's width are discarded.
func (*VideoFormatVideoSignalDescription) SetVideoFormat ¶
func (s *VideoFormatVideoSignalDescription) SetVideoFormat(v uint32)
SetVideoFormat writes the 3-bit member video_format. Bits of v above the member's width are discarded.
func (*VideoFormatVideoSignalDescription) SetVideoFullRangeFlag ¶
func (s *VideoFormatVideoSignalDescription) SetVideoFullRangeFlag(v uint32)
SetVideoFullRangeFlag writes the 1-bit member video_full_range_flag. Bits of v above the member's width are discarded.
func (*VideoFormatVideoSignalDescription) VideoFormat ¶
func (s *VideoFormatVideoSignalDescription) VideoFormat() uint32
VideoFormat reads the 3-bit member video_format.
func (*VideoFormatVideoSignalDescription) VideoFullRangeFlag ¶
func (s *VideoFormatVideoSignalDescription) VideoFullRangeFlag() uint32
VideoFullRangeFlag reads the 1-bit member video_full_range_flag.
type VideoSourceFormatFlags ¶
type VideoSourceFormatFlags int32
VideoSourceFormatFlags corresponds to C CUvideosourceformat_flags.
const (
VideoSourceFormatFlagsExtformatinfo VideoSourceFormatFlags = 0x100 // CUVID_FMT_EXTFORMATINFO
)
func (VideoSourceFormatFlags) String ¶
func (e VideoSourceFormatFlags) String() string
String returns the constant name, or a numeric representation for unknown values.