video: frame reuse (opts.reuse, v:release, decoder:release) and the control tests
- codecs/video/Video/Pool: Images a decoder made, handed back and reused (only its own; fresh meta) - H264 / Vp8 / Mpeg2 output Images come from a Pool; H264 / Vp8 decoder:release, VideoCodecDecoder.release - Video.open: opts.reuse recycles the previous frame's Image at the next nextFrame; v:release(frame); the yuv Image under an rgba / scaled frame (never seen by the caller) goes back to the codec at once - tests/video/control.luau: yield hook (identical frames, H.264 / VP8 / MPEG-1, conversions), disposable packets in every container, skipDisposable bit-exact at the right index, reuse identical and recycled, fuzz - docs/guide/video.md: Skipping and reusing frames; docs/API.md
This commit is contained in:
1 parent
15e0dfcc86
commit
0b2d8774b9
10 files changed
+463
-27
No files matched your search
+3
-1
@@ -45,7 +45,9 @@ VideoDecoder saved to an image format (`gif`, `apng`, `webp`) becomes an animate
|
||||
one category. Extras:
|
||||
|
||||
- `F.video.open(src, opts?)`: `opts.maxSide` shrinks the frames (longer side at most n pixels), `opts.yield` is a
|
||||
cooperative yield point for slow codecs (H.264; see the video guide), `opts.audio = false` skips the audio track, `opts.sbr = false` decodes only the AAC-LC core of an HE-AAC track.
|
||||
cooperative yield point for slow codecs (H.264, VP8, MPEG-1 / MPEG-2 and the conversions; see the video guide), `opts.audio = false` skips the audio track, `opts.sbr = false` decodes only the AAC-LC core of an HE-AAC track,
|
||||
`opts.skipDisposable` skips the frames nothing depends on (`packet.disposable`), `opts.reuse` decodes each frame
|
||||
into the previous frame's Image (`v:release(frame)` hands one back).
|
||||
It also opens animated images (GIF / APNG / WebP) as videos; `F.video.fromImage(img)`,
|
||||
`F.video.fromFrames(images, delays?)` (an image sequence: `F.save(F.video.fromFrames(list, 1 / 25), "out.avi")`),
|
||||
`F.video.codecs` (the codec registry `codecs/video/Video`).
|
||||
|
||||
Reference in new issue
Block a user