Repository navigation
Fixes - #66
Merged
Merged
Fixes#66
Conversation
The viewer renders on the UI thread and each timeline's thumbnails on a thread of their own, through the same host and the same plugins, and two things they shared were written on every render. PropertySet::getString() copied the value into a scratch buffer on the property set and handed back a pointer into it; on the plugin's own set, shared by every instance, two renders resized the same buffer under each other. The stored string is handed out directly now: it stays put until the property is set again, which for a plugin's set is describe time. The supported context is read once at load rather than on every exec, and the host's lookups on the shared plugin maps are finds, so a name that is not there is an error rather than an insertion. The plugins kept their parameter handles in plugin-global maps keyed by instance, filled at create-instance time from both threads and never emptied. The base class looks a parameter up when it is used instead, and the eighteen create-instance overrides that only filled the maps go. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
A parameter's value reaches the plugin through paramGetValue, which wrote whatever type the value happened to be held as: a JSON integer was written as int64 through the double pointer a Double parameter passes, and a default stored as int was not written at all, because that branch did not exist. The draw plugin's box was never filled by default for that reason. The instance keeps each parameter with its declared OpenFX type, and the host converts to that: doubles for the Double, RGB and RGBA families, ints for Integer, Boolean and Choice, a string for String, with components past what the value has written as zero. Defaults are read in full rather than their first component, and stored the way OTIO metadata arrives, so both take the same path. A null handle is an error rather than a dereference. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
lunasvg renders premultiplied and the comp premultiplies again, so every antialiased edge of an SVG clip came out darker than drawn. The bitmap is converted to plain RGBA before it is handed on, which also does the channel swap the loop was doing by hand. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The warp subtracted the range start, scaled, and never added the start back, so a warped sequence that starts at frame 1001 asked for frames near zero, which do not exist. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The playback timer was started with a timeout of 1000 over the frame rate in a call that takes microseconds, so it fired on every tick and the frame advanced at whatever rate the application ticks. Each tick now asks how many whole frames have elapsed since the last one it advanced and moves by that, carrying the remainder, so the rate is the timeline's and tick latency does not accumulate. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
Closing a file before the current one left the current index alone, so the file after the current one became current. The index, and the B index, move down with the files. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The raw output converted only when the data type differed, and the readers always produce four channels, so -raw rgb24 wrote RGBA pixels under an RGB label. The y4m path already checked the channel count. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The members are raw FFmpeg handles, and a constructor that throws runs no destructor, so an open that failed part way leaked what came before it: an opened format context when the stream info was not found, both codec contexts and the open file when the header could not be written. The freeing moves into one function the destructor and the constructor's catch both call. The AVIO buffer for memory-backed reads was never freed either. It is the caller's to free, and libavformat may have replaced it, so it is the context's pointer that goes. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
A read node that could not be created was not cached, so a missing movie was probed, and the error logged, on every frame of the render. The failure is cached as a null node and logged once per reference. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The data of an entry was found by adding the central directory's filename and extra field sizes to the local header offset, and the local header's extra field need not be the same size: Python's zipfile writes a zip64 extra there and not in the central directory, which put the pointer twenty bytes into the data. The local header is read for its own sizes, and the two copies of the lookup become one. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The result of read_image() was ignored, so a file that failed part way through was composited from whatever the buffer held. An empty frame is returned instead, which the comp treats as missing media. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
ImageBuf::write() returns false rather than throwing, and the result was dropped, so an output directory that does not exist gave a clean exit from toucan-render and a completed progress dialog from the export tool. The error is thrown, which the callers already catch. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
A constructor that throws runs no destructor, so a file that could not be mapped leaked its descriptor, or its handles on Windows, where the view check also tested the wrong member and never failed. The advice was given before the map was checked, and doubled up; it comes after. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
Only the thumbnail requests were drained, so an aspect request pending when the generator went away left the widget's future with a broken promise, which get() throws. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
getSequence() returns nothing when the directory is there and the file is not, and the first element of nothing was then taken. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The same shape as the video reader and writer: raw FFmpeg handles, a constructor that throws, and no destructor to free what came before the throw. The freeing moves into one function the destructor and the constructor's catch both call, and the AVIO buffer goes with the context. The resampler is drained once the decoder is: when the rates differ it holds a tail of its own, and that tail was replaced with silence. Checked against ffmpeg's own resample of the same file at 44.1 kHz: identical to the last sample. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
The crossfade gain was worked out once per frame and applied to every sample in it, so a dissolve was a staircase with one step per frame. The gain is a line from the frame's start to its end now. The audio time warp keeps its range start, as the image graph's does, and media that failed to open is cached as such rather than opened, and logged, again on every frame. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
OpenFX passes Boolean and Integer parameter values as int, and the host now writes them that way. The plugins were receiving them into bool and int64_t variables, which the old host had matched by writing whatever type the JSON held. Written as int, a bool got four bytes into one, and on Windows that took the gradient generator's stack with it: the test render hung at the first gradient frame. Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Various fixes:
-raw rgb24converts on channel count.\bugnote is closed.Assisted-by: Claude:claude-fable-5-1 [patch] [debugging]