Versions in this module Expand all Collapse all v0 v0.1.1 Dec 3, 2026 v0.1.0 Dec 2, 2026 Changes in this version + var ErrAgain = errors.New("hwdec: try again") + var ErrClosed = errors.New("hwdec: closed") + var ErrCorrupt = errors.New("hwdec: corrupt picture") + var ErrDevice = errors.New("hwdec: device failed") + var ErrHeld = errors.New("hwdec: all surfaces are held") + var ErrUnsupported = errors.New("hwdec: not supported by the hardware") + type AV1Params struct + BaseQIdx int + BitDepth int + CdefBits int + CdefDamping int + CdefEnabled bool + CdefUVStrengths [8]int + CdefYStrengths [8]int + ContextUpdateTileID int + DeltaEnabled bool + DeltaLFMulti bool + DeltaLFPresent bool + DeltaLFResLog2 int + DeltaQPresent bool + DeltaQResLog2 int + DeltaQUAC int + DeltaQUDC int + DeltaQVAC int + DeltaQVDC int + DeltaQYDC int + DeltaUpdate bool + DisableCdfUpdate bool + DualFilter bool + ErrorResilient bool + FilmGrainPresent bool + FilterIntra bool + FilterLevel [2]int + FilterLevelU int + FilterLevelV int + ForceIntegerMV bool + FrameType int + FullRange bool + GlobalMotion [7][6]int32 + GlobalMotionInvalid [7]bool + GlobalMotionType [7]int + Grain bool + GrainARCb [25]int8 + GrainARCoeffLag int + GrainARCoeffShift int + GrainARCr [25]int8 + GrainARY [24]int8 + GrainCb [10][2]uint8 + GrainCbLumaMult int + GrainCbMult int + GrainCbOffset int + GrainChromaFromLuma bool + GrainClipToRestrictedRange bool + GrainCr [10][2]uint8 + GrainCrLumaMult int + GrainCrMult int + GrainCrOffset int + GrainNumCb int + GrainNumCr int + GrainNumY int + GrainOverlap bool + GrainScaleShift int + GrainScalingShift int + GrainSeed int + GrainY [14][2]uint8 + Height int + HighPrecisionMV bool + InterIntraCompound bool + InterpFilter int + IntraBC bool + IntraEdgeFilter bool + JntComp bool + Layout int + MaskedCompound bool + MatrixCoefficients int + MaxHeight int + MaxWidth int + ModeDeltas [2]int + OrderHint int + OrderHintBits int + OrderHintEnabled bool + PrimaryRefFrame int + Profile int + QM bool + QMU int + QMV int + QMY int + ReducedTxSet bool + RefDeltas [8]int + RefFrameMVsEnabled bool + RefHeight [8]int + RefIdx [7]int + RefWidth [8]int + ReferenceSelect bool + RefreshContext bool + RefreshFlags int + RestorationEnabled bool + RestorationSize [2]int + RestorationType [3]int + SB128 bool + ScreenContentTools bool + SegEnabled bool + SegFeatureData [8][8]int + SegFeatureMask [8]uint8 + SegTemporal bool + SegUpdateData bool + SegUpdateMap bool + Sharpness int + ShowFrame bool + ShowableFrame bool + SkipMode bool + StillPicture bool + SuperRes bool + SuperResDenom int + SwitchableMotionMode bool + TileCols int + TileHeights []int + TileRows int + TileWidths []int + TxMode int + UniformTileSpacing bool + UseRefFrameMVs bool + WarpedMotion bool + Width int + type AV1Picture struct + Data []byte + Display Surface + Params AV1Params + Refs [8]Surface + Surface Surface + Tiles []AV1Tile + type AV1Tile struct + Col int + Offset int + Row int + Size int + type Codec int + const AV1 + const H264 + const HEVC + const VP8 + const VP9 + func (c Codec) String() string + type Config struct + Codec Codec + Depth int + Device uintptr + Height int + Layout int + Surfaces int + Width int + type DMABuf struct + Format uint32 + Height int + Modifier uint64 + Planes []DMABufPlane + Width int + type DMABufPlane struct + FD int + Offset int + Pitch int + type DMABufSurface interface + DMABuf func() (*DMABuf, error) + type FrameDecoder interface + Close func() error + Flush func() error + Receive func() (Surface, time.Duration, error) + Reset func() error + Send func(unit []byte, pts time.Duration) error + func NewFrameDecoder(c Config) (FrameDecoder, error) + type H264Picture struct + BitDepth int + BitDepthC int + Bottom bool + BottomFieldPicOrder bool + CABAC bool + ChromaFormatIDC int + ChromaQpOffset [2]int + ConstrainedIntra bool + DeblockingControl bool + DeltaPicOrderZero bool + Direct8x8Inference bool + Field bool + FrameMbsOnly bool + FrameNum int + FullRange bool + GapsInFrameNumAllowed bool + HeightMbs int + Log2MaxFrameNum int + Log2MaxPicOrderCntLsb int + MBAFF bool + MaxNumRefFrames int + MbAdaptiveFrameField bool + MinLumaBiPred8x8 bool + POC [2]int + PPSData []byte + PicInitQpMinus26 int + PicInitQsMinus26 int + PicOrderCntType int + Redundant bool + Reference bool + Refs []H264Ref + SPSData []byte + Scaling4x4 [6][16]uint8 + Scaling8x8 [6][64]uint8 + Second bool + Surface Surface + Transform8x8 bool + WeightedBipredIDC int + WeightedPred bool + WidthMbs int + type H264Ref struct + Field int + FrameIdx int + Long bool + POC [2]int + Surface Surface + Used [2]bool + type H264Slice struct + AlphaC0OffsetDiv2 int + BetaOffsetDiv2 int + CabacInitIDC int + ChromaLog2Denom int + Data []byte + DirectSpatial bool + DisableDeblocking int + FirstMb int + HeaderBits int + List [2][]H264Ref + LumaLog2Denom int + NumRefIdx [2]int + QpDelta int + Type int + Weights [2][]H264Weight + type H264Weight struct + ChromaOffset [2]int + ChromaWeight [2]int + LumaOffset int + LumaWeight int + type HEVCParams struct + AMP bool + BetaOffsetDiv2 int + BitDepth int + BitDepthC int + CabacBypassAlignment bool + CabacInit bool + CbQpOffset int + CbQpOffsetList [6]int + ChromaFormatIDC int + ChromaQpOffsetList bool + ChromaQpOffsetListLen int + ColumnWidths []uint32 + ConstrainedIntra bool + CrQpOffset int + CrQpOffsetList [6]int + CrossComponentPrediction bool + CuQpDelta bool + DeblockingDisabled bool + DeblockingOverride bool + DependentSlices bool + DiffCuChromaQpOffsetDepth int + DiffCuQpDeltaDepth int + EntropySync bool + ExplicitRdpcm bool + ExtendedPrecision bool + FullRange bool + Height int + HighPrecisionOffsets bool + IDR bool + IRAP bool + ImplicitRdpcm bool + InitQp int + IntraSmoothingDisabled bool + ListsModification bool + Log2Ctb int + Log2MaxPCM int + Log2MaxPOCLsb int + Log2MaxTb int + Log2MaxTransformSkipSize int + Log2MinCb int + Log2MinPCM int + Log2MinTb int + Log2ParallelMerge int + Log2SaoOffsetScaleChroma int + Log2SaoOffsetScaleLuma int + LongTermRefs bool + LoopFilterSlices bool + LoopFilterTiles bool + MaxDecPicBuffering int + MaxNumReorder int + MaxSubLayers int + MaxTrHierarchyInter int + MaxTrHierarchyIntra int + NumDeltaPocsRef int + NumExtraSliceHeaderBits int + NumLongTermSPS int + NumRefIdxDefault [2]int + NumShortTermSets int + OutputFlag bool + PCM bool + PCMBitDepth int + PCMBitDepthC int + PCMLoopFilterDisabled bool + POC int + PersistentRice bool + RowHeights []uint32 + SAO bool + Scaling16x16 [6][64]uint8 + Scaling32x32 [2][64]uint8 + Scaling4x4 [6][16]uint8 + Scaling8x8 [6][64]uint8 + ScalingDC16 [6]uint8 + ScalingDC32 [2]uint8 + ScalingList bool + SeparatePlanes bool + ShortTermSetBits int + SignDataHiding bool + SliceChromaQpOffsets bool + SliceHeaderExtension bool + StrongIntraSmoothing bool + TcOffsetDiv2 int + TemporalMVP bool + Tiles bool + TransformSkip bool + TransformSkipContext bool + TransformSkipRotation bool + TransquantBypass bool + WeightedBipred bool + WeightedPred bool + Width int + type HEVCPicture struct + PPSData []byte + Params HEVCParams + Refs []HEVCRef + SPSData []byte + Surface Surface + VPSData []byte + type HEVCRef struct + After bool + Before bool + Long bool + LongCurr bool + POC int + Surface Surface + type HEVCSlice struct + Data []byte + List [2][]int + Params HEVCSliceParams + type HEVCSliceParams struct + Address int + BetaOffsetDiv2 int + CabacInit bool + CbQpOffset int + ChromaLog2 int + ChromaOffset [2][16][2]int16 + ChromaWeight [2][16][2]int16 + CollocatedL0 bool + CollocatedRefIdx int + ColorPlane int + CrQpOffset int + CuChromaQpOffset bool + DeblockingDisabled bool + Dependent bool + EntryPoints int + HeaderEPB int + HeaderSize int + LoopFilterAcross bool + LumaLog2 int + LumaOffset [2][16]int16 + LumaWeight [2][16]int16 + MVDL1Zero bool + MaxNumMergeCand int + NumRefIdx [2]int + QpDelta int + SAOChroma bool + SAOLuma bool + TcOffsetDiv2 int + TemporalMVP bool + Type int + Weighted bool + type Image struct + Cb []uint8 + Cb16 []uint16 + Cr []uint8 + Cr16 []uint16 + Depth int + Height int + Layout int + StrideC int + StrideY int + Width int + Y []uint8 + Y16 []uint16 + func (m *Image) SetAYUV(width, height int, src []byte, stride int) bool + func (m *Image) SetNV12(width, height int, y, c []byte, strideY, strideC int) bool + func (m *Image) SetP010(width, height, depth int, y, c []byte, strideY, strideC int) bool + func (m *Image) SetY210(width, height, depth int, src []byte, stride int) bool + func (m *Image) SetY410(width, height int, src []byte, stride int) bool + func (m *Image) SetY412(width, height, depth int, src []byte, stride int) bool + func (m *Image) SetYUY2(width, height int, src []byte, stride int) bool + type NV12Surface interface + NV12 func() (*DMABuf, error) + Scaled func(x, y, w, h, width, height int) (*DMABuf, error) + type SliceDecoder interface + BeginH264 func(p *H264Picture) error + BeginHEVC func(p *HEVCPicture) error + Close func() error + DecodeAV1 func(p *AV1Picture) error + DecodeVP9 func(p *VP9Picture) error + End func() error + NewSurface func() (Surface, error) + Reset func() error + SliceH264 func(s *H264Slice) error + SliceHEVC func(s *HEVCSlice) error + func NewSliceDecoder(c Config) (SliceDecoder, error) + type Surface interface + Map func(dst *Image) error + Release func() + Size func() (width, height int) + type VP9Params struct + AllowHP bool + BaseQ int + BitDepth int + CompressedSize int + ContextIdx int + DeltaEnabled bool + DeltaQUVAC int + DeltaQUVDC int + DeltaQYDC int + ErrorResilient bool + FilterLevel int + HeaderSize int + Height int + InterpFilter int + IntraOnly bool + KeyFrame bool + ModeDeltas [2]int + ParallelMode bool + Profile int + RefDeltas [4]int + RefHeight [8]int + RefIdx [3]int + RefWidth [8]int + RefreshContext bool + ResetContext int + SegAbsDelta bool + SegEnabled bool + SegFeatureData [8][4]int16 + SegFeatureMask [8]uint8 + SegFilterLevel [8][4][2]int + SegPredProbs [3]uint8 + SegQuant [8][2][2]int + SegTemporal bool + SegTreeProbs [7]uint8 + SegUpdateMap bool + Sharpness int + ShowFrame bool + SignBias [4]bool + SubsamplingX int + SubsamplingY int + TileColsLog2 int + TileRowsLog2 int + UsePrevMVs bool + Width int + type VP9Picture struct + Data []byte + Params VP9Params + Refs [8]Surface + Surface Surface