deint

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

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

Documentation

Overview

Package deint deinterlaces 8-bit 4:2:0 pictures, one frame out for each frame in (the field shown first kept, the other interpolated), as NVDEC's adaptive deinterlacer and ffmpeg's bwdif do for the other decoders here.

The interpolation is yadif's (Michael Niedermayer's "yet another deinterlacing filter"), written from the algorithm: each missing line's sample is the temporal average of the frames around it, kept within how much the picture moves there, and replaced by an edge-directed spatial interpolation where that is nearer: still areas keep their full resolution, moving ones lose no sharpness to combing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deinterlacer

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

Deinterlacer holds the frame before and after the one it outputs.

func New

func New(out func(*Frame) error) *Deinterlacer

New makes a deinterlacer giving its frames to out (valid during the call).

func (*Deinterlacer) Flush

func (d *Deinterlacer) Flush() error

Flush gives out the last frame.

func (*Deinterlacer) Push

func (d *Deinterlacer) Push(f *Frame) error

Push takes the next frame (which must stay valid until the next Push or Flush returns), giving out the one before it.

type Frame

type Frame struct {
	Planes  [3][]byte // Y, Cb, Cr
	Strides [3]int
	Width   int // of luma
	Height  int
	// Interlaced frames are deinterlaced; others pass as they are.
	Interlaced    bool
	TopFieldFirst bool
	Tag           any // the caller's, carried to the output
}

Frame is a picture's planes.

Jump to

Keyboard shortcuts

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