summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-13modules/droste: implement a droste overlay effectdrosteVito Caputo
2024-04-10setup: cast fgets() to return voidVito Caputo
Another case of some compilers being upset about ignoring the return value, failing the build w/-Wall -Werror
2024-04-10modules/rkt: add some missing castsVito Caputo
Some compilers seem to get upset about this in combination with my use of -Werror -Wall
2023-12-31modules/swab: update sample coords piecemealVito Caputo
Now that din() leaves the input coordinate alone as a const, the rendering loop can reuse the unchanging members across din() calls and only refresh the changing members as needed. Good for a small 62->64FPS boost on the i7 X230 in `--module=swab --video=mem --defaults` tests
2023-12-31libs/din: constify coordinate to din()Vito Caputo
This doesn't seem to make any impact on performance, but it's awkward to be modifying the supplied coordinate as if it's a result... the coordinate input should be left alone, and should be able to get reused across din calls so only the varying members need to get updated across calls.
2023-12-31libs/din: remove unnecessary floorf() from din()Vito Caputo
These are being assigned to ints to index the grid and will become rounded down through truncation anyways. This little change brings a ~20% FPS boost in modules/swab on an i7 x230.
2023-12-31modules/swab: trivial optimizationsVito Caputo
Just moving some unnecessary computation and derefs out of the inner render loop... nothing major, good for about +1 FPS here.
2023-12-31libs/din: constify din_t for din()Vito Caputo
din() just samples the din_t which will always just be a read-only operation, so constify this. It might even help the compiler generate faster code for din-heavy inner loops like modules/swab uses.
2023-12-31libs/din: trivial optimizationsVito Caputo
din() is a hot path for modules/swab in particular. Barring any substantial changes to swab, which would probably make sense in the long-term, there's some low-hanging fruit in libs/din. Here smootherstep() has been made less general for a little perf boost. The way din uses smootherstep() doesn't need these bounds checks, nor does it need the caller-supplied edge values. Also the asserts() have been disabled in the hot path as they were mostly there for catching programmer errors and swab is already done. On my i7 x230 this takes swab from 44fps->54fps, so worthwhile, but swab is still painfully slow here. It's largely just a libs/din abuse module that was made to test libs/din, but turned out to look interesting enough to keep.
2023-12-16til_util: guard MIN/MAX macros to avoid redefiningVito Caputo
This is one of those crufty *NIX/C things. I'm tempted to just rename these to TIL_MIN/TIL_MAX, but here just avoid redefining them and accept what's predefined assuming it behaves the same. Tripped over by Sketch building on an M1 MacOS box
2023-12-16modules/spokes: use fabsf()Vito Caputo
clang rightfully complained about this, these are floats
2023-12-16sdl_fb,modules/sparkler: make bit fields unsignedVito Caputo
This oversight was triggering warnings on an M1 Macbook/clang.
2023-12-13modules/flow: trivial optimizationVito Caputo
Small micro optimization avoiding bounds check for respawned elements, plus comment fixup.
2023-12-12modules/spokes: fix missing spoke in some countsVito Caputo
Due to floating point errors this loop would occasionally miss the last spoke as-is. A quick fix is to just round down the accumulator before comparing it... this function in general needs to all be cleaned up, esp. since the conversion to floats. An obvious repro of this issue, fixed by this commit: '--module=spokes,iterations=2,count=3,twist=0.125,thickness=2' \ '--video=sdl,ratio=full,fullscreen=off,vsync=on,size=640x480' The low count of 3 makes the missing spoke quite visible...
2023-12-09modules/mixer: implement t={normal,inverted} settingVito Caputo
This was done in the obvious way, using a little accessor everywhere the T value s retrieved that checks+applied the current setting.
2023-12-09modules/mixer: introduce t={normal,inverted} settingVito Caputo
This overlaps somewhat with bottom={a,b}, but applies generally to all styles. The reasoning behind this is the same as bottom=. Not this is only the setting, not the implementation, which will follow shortly.
2023-12-09modules/mixer: implement bottom={a,b} settingVito Caputo
This makes the setting actually transpose a_module<->b_module for style={interlace,paintroller,sine}. The default is for a_module to be the logical bottom (bottom=a).
2023-12-09modules/mixer: introduce bottom= settingVito Caputo
This adds a bottom={a,b} setting when style={interlace,paintroller,sine} Note this only introduces the settings, not the implementation. The impetus for this is when experimenting with mixer transitions in a work-in-progress, you'll sometimes want to invert the bottom vs. top layers just to see how that looks. Instead of having to transpose the a_module<->b_module setting values, this provides a separate setting achieving that, which will simply be ignored for the irrelevant mixer styles. Conceptually "bottom" vs. "top" doesn't really apply to all the styles however. style=interlace already feels a bit forced to include here, but in the code it's clearly part of a group with paintroller and sine, so it's included here. But one could argue that *all* styles should have some kind of toggle to swap a_module<->b_module. Except there will probably be another setting introduced to invert T as well, which would effectively achieve that for the modules where "bottom" vs. "top" doesn't conceptually fit.
2023-12-05modules/mixer: implement style=sineVito Caputo
This adds a common retro demo transition using converging/diverging horizontally interlaced sine offsets to transition to/from a_module->b_module Some stubs have been left in place for a vertical variant, and some TODOs for future settings/taps. As-is it's a largely fixed horizontal thing, introducing just the new style=sine variant with no additionl settings or taps for now. I particularly enjoy: --module=mixer,style=sine,a_module=roto,b_module=roto
2023-12-03modules/spokes: make spokes count configurableVito Caputo
This switches the perimeter and stride math to use floating point, done in a kind of fast and nasty naive substitution manner. That's necessary for getting away from the even stride calculation / spokes calculation in favor of supporting arbitrary spoke counts, without introducing discontinuities at the boundaries of the mirrored sides The new setting is count= with a handful of reasonable presets. It's a little awkward since this is expressed as half the actual count, naming could probably be improved.
2023-12-03modules/spokes: get rid of spokes_context_t et alVito Caputo
This isn't actually needed just for the settings now that til_module_context_t.setup always has a reference to the baked setup, and always gets created even if there's no bespoke context created.
2023-12-03modules/spokes: uint setup->{thickness,iterations}Vito Caputo
Let's not handle negative values for these in the setup, even if it's all multiple choice options that don't include erroneous negatives. Technically you can feed in whatever using the ":" force prefix...
2023-12-03modules/blinds: convert "count" to u8 tapVito Caputo
Just starting to transition obvious integer taps from float to ints.
2023-12-03modules/rkt: round integer tap valuesVito Caputo
It's looking like truncation is more often annoying, let's try rounding.
2023-12-02modules/rkt: handle all scalar tap typesVito Caputo
Previously only FLOAT and DOUBLE were handled, and several module taps have been created as those types to make them available for rkt sequencing despite being integers. (book/page for instance) As more taps get implemented, it'll only become increasingly silly for everything needing an integer sequenced to be handling this conversion itself when a generic clamp+truncation would suffice. This commit adds such handling of integer taps. No rounding is performed, nor wrapping on overflow/underflows. Just clamping to the type's limits as defined by {stdint/float}.h (while at it I've added clamping of the FLOAT type which technically was already necessary but ignored). Future commits will likely switch some FLOAT taps to appropriate integer types, cleaning up some ad-hoc conversion code in various modules.
2023-12-01modules/pan: fmod the snapshot's dimensionsVito Caputo
This assumption broke with the introduction of a default tile for non-overlay mode.
2023-12-01modules/spokes: add spokes modulePhilip J Freeman
This module started out as a way to test a line drawing algorithm, but ended up looking interesting enough to include as a module of it's own. #ZephyrCommit #BirdwalkCommit
2023-12-01modules/book: implement a flipbook moduleVito Caputo
This module cycles through a set of modules referred to as pages. Settings include: pages={list,of,modules} rate=float page flipping rate direction=float page flipping direction taps are exposed for controlling rate and direction real-time, with the addition of an explicit page index tap for overriding the automatic flipping normally influenced by rate and direction. Note that when using rkt with these taps, it immediately becomes limiting that there's no ability to specify NaN as a track value for temporarily relinquishing control of the page idx. It'd be very useful to let the automatic flipping run the show at whatever rate the rkt tracks specify, until the page idx was asserted to a specific page, then holding it on that page until a NaN row for the page track was encountered, restoring automatic flipping. This needs to get added in both the Rocket library and RocketEditor to be supported, as well as getting wired up to the rkt integration.
2023-12-01til_fb: move isnan(ratio) test to before assertVito Caputo
Trivial fixup; this will always assert on the NaN case which is expected when ratio=full.
2023-11-30til,main: introduce ratio= --video settingVito Caputo
First stab at supporting explicit aspect ratios. This performs the adjustment when needed in til_fb so it's automatically applied to all fb backends. The syntax is ratio=W:H with ratio=full being special cased for when no aspect ratio adjustment is desired (just use whatever the fb page dimensions are, usually specified via size= in the fb backend's settings, or display native res when fullscreen=on) For now when an aspect ratio is specified it always fits the content within the alotted space... there is no full-but-ratio-preserved-by-clipping-if-needed variant like widescreen TVs often have.
2023-11-30til: wire up til_video_setup_t throughout *_fbVito Caputo
Preparatory commit for aspect ratio settings at the fb layer. This slightly reworks how main::setup_video() integrates the selected fb backend's setup_func to better resemble how the module setup_funcs work now, with more clearly separated settings-building and setup-baking/finalizing phases. Which makes inserting the ratio setting in the middle of the front-end and back-end setup_funcs fairly trivial. Not a fan of all the casts, but there will probably be more helpers introduced to take care of that and make til_video_setup_t more of a first-class thing facilitating the fb stuff.
2023-11-30til: introduce til_video_setup_tVito Caputo
Preparatory commit for wiring up aspect ratio settings at the fb middle layer. This will be a bit crufty initially, but should cleanup alright over time. til_video_setup_t will be passed around the fb stuff instead of a bare til_setup_t.
2023-11-30til_fb: initialize synchronization primitives earlierVito Caputo
Noticed while working on unrelated til_fb stuff; once _til_fb_page_new() started taking a mutex, its use in til_fb_new() was too early relative to initializing said mutex. Funny that this never blew anything up nor angered ASAN, just having the memory allocated and zeroed goes a long way towards hiding such things... for better or worse.
2023-11-29modules/pan: implement a panning overlay moduleVito Caputo
This is primarily intended for overlay use, but when not an overlay uses a little builtin seed-derived tile as a fallback. Currently the only settings are {x,y}=-1..1 for the direction vector. Speed is currently fixed to 1, the vector is always normalized. Nothing terribly exciting.
2023-11-22til_fb: trivial indentation fixupVito Caputo
2023-11-22modules/mixer: trivial indentation fixupVito Caputo
2023-11-22modules/mixer: add style=paintroller variantVito Caputo
This introduces a Second Reality inspired transition I've dubbed "paintroller". When selected, you get two additional settings: orientation={horizontal,vertical} passes={N} There's room for improvement, like the fragmenter should probably be chosen differently depending on orientation.
2023-11-22modules/mixer: use fewer snapshots for style=interlaceVito Caputo
This is mostly just a preparatory commit for style=paintroller, but style=interlace overlaps with it in this area so broke out into separate commit for the interlace-relevant part.
2023-11-22til_fb: remove asserts from til_fb_fragment_copy()Vito Caputo
If a caller wants to rely heavily on til_fb_fragment_copy() for clipping, it'll be normal for situations like zero or negative W/H of the clipped area. Those would just be zero copy scenarios, so simply return instead of asserting.
2023-11-22modules/mixer: fix direction of new interlace styleVito Caputo
This was accidentally inverted, which is especially annoying when experimenting with styles - the T value should be equivalent regardless of mixer style. Trivial fix.
2023-11-22modules/mixer: consider epsilon in fast-path edge casesVito Caputo
Near the fringes of 0,1 it should just be considered 0,1, which handles rounding error as well as slightly increasing the quantity of frames the fast path will tend to run on interpolated fades.
2023-11-21modules/mixer: introduce style=interlaceVito Caputo
Another mixing variant. Similar cost to style=blend in that it must render both [ab]_module every frame, but doesn't have the overhead of interpolating the pixels. As-implemented this always interlaces by horizontal line granularity. It'd be nice to be able to vary that with a runtime setting to make it potentially chunkier.
2023-11-21modules/mixer: some random small cleanupsVito Caputo
No functional change except technically the ticks to rads modulo
2023-11-21til_fb: fixup clipping of til_fb_fragment_copy()Vito Caputo
Apparently no existing were really taking advantage of this ability. The x,y,w,h parameters are also supposed to impart clip bounds, should they be smaller than the union of the src and dest fragments.
2023-11-21til_util: fix til_get_ncpus() windows buildsVito Caputo
Prior to eb13ccdb (use sysconf on *nix) this #ifdef bug went unnoticed because the non-MACH code still compiled successfully on windows, just never got executed because the windows block returns. But after eb13ccdb the sysconf stuff needs defines not present for windows and things won't build, uncovering this silliness. Now only build the windows code on windows, and the non-win code everywhere else... with MACH being a special case of the everywhere else default.
2023-11-21modules/playit: tomix must be signed to handle negativesVito Caputo
This can potentially be negative depending on what n_queued returns, and the early-exit comparison considered that by using <= 0 but size_t is unsigned, so it just wraps around then segfaults in the Very Large Copy attempt. Trivial fix, interestingly discovered during windows testing where the SDL driver was readily causing this to go negative - it never happend in linux testing.
2023-11-21modules/rkt: send \r\n instead of \n from scenerVito Caputo
The nature of scener is to also be used from windows clients like windows telnet, but just sending \n to that results in stair-stepping.
2023-11-21modules/{compose,mixer}: more TIL_MODULE_AUDIO_ONLY exceptsVito Caputo
These were missed by 6c657a9
2023-11-19modules/spiro: add some taps for controlling l/k/roundsVito Caputo
This is a bare minimum binding of some critical knobs so rkt can influence spiro
2023-11-18*: apply TIL_MODULE_AUDIO_ONLY where appropriateVito Caputo
This changes modules/playit from experimental to "audio only". Several other modules now incorporate the new flag into their excludes to prevent inclusion where inappropriate.
© All Rights Reserved