Enum Vp8ReferenceCopy
A reference a VP8 inter frame copies into the golden or alternate frame.
public enum Vp8ReferenceCopy
Fields
Alternate = 3The alternate frame (into the golden frame only).
Golden = 2The golden frame (into the alternate frame only).
Last = 1The last frame.
None = 0No copy: the reference stays as it is.
Examples
// 4:2:0 pictures of one size, here decoded from a clip; Egami.Video writes WebM and IVF and plans the frames for you.
using Vp8StreamEncoder encoder = new(pictures[0].Width, pictures[0].Height);
for (int i = 0; i < pictures.Count; i++)
{
Vp8FramePlan plan = new()
{
KeyFrame = i % 30 == 0, // a key frame a second at 30 frames a second
RefreshGolden = i % 10 == 0, // and a golden frame to fall back on every tenth
Quality = 70,
};
Vp8EncodedFrame frame = encoder.Encode(pictures[i], plan);
packets.Add(frame.Data.ToArray()); // a WebM block or an IVF frame; frame.LumaPsnr says how close it came
}