Commit Graph

107 Commits (dfc7623119ce79059b45d91e92f2f1c674a05c50)

Author SHA1 Message Date
nick black 48adc31260 unit test for z-axis rendering #146 5 years ago
nick black 599b7a6d9a z-axis unit tests #71 5 years ago
nick black dac4f78ee6 basic unit tests for z-axis #71 5 years ago
nick black 58cc6927ac 256-color cube is not ansi, don't muddy the waters 5 years ago
nick black 65858b4495 unit test 256-index quantizing #4 5 years ago
nick black a916d929db
RGBtoANSI: fixup lower grey onversions, looks reasonable now #4 5 years ago
nick black cfccd0c39c
RGBtoANSI unit test, fix up bases 5 years ago
Nick Black 2de07f8a48
Per-line damage map, ~50% increase in FPS on notcurses-demo (#144)
Implement a fairly conservative, line-granularity, two-level damage map. One on the overall notcurses object is dirtied by planar moves, creations, deletions, and resizes. One on each ncplane is dirtied by glyph output, media rendering, fades, and erasure. #83 This has some definite false positives: a hidden plane which moves will damage a bunch of lines unnecessarily. For now, don't do things like that :D.

Extra byte per line per plane, shouldn't be a problem.

Two new stats for cell elisions and emissions

Allow keypress to interrupt view-demo

ncvisual_stream() now allows a callback per frame

Allow ncvisual_open() to create its own, perfectly-sized, ncplane #128

Typical performance prior to this PR:

4655 renders, 18.3s total (0.000305s min, 0.196s max, 0.0039s avg 253.9 fps)
401046.505KB total (9.688KB min, 139.697KB max, 86.15KB avg)
Emits/elides: def 1082115/116196 fg 10547624/7236460 bg 10602717/6208644
 Elide rates: 9.70% 40.69% 36.93%
4680 renders, 18.4s total (0.000285s min, 0.15s max, 0.0039s avg 255.0 fps)
403078.188KB total (9.688KB min, 139.697KB max, 86.13KB avg)
Emits/elides: def 1088994/116196 fg 10604983/7267750 bg 10655426/6237472
 Elide rates: 9.64% 40.66% 36.92%
4699 renders, 17.8s total (0.000227s min, 0.192s max, 0.0038s avg 263.8 fps)
403266.907KB total (9.688KB min, 139.697KB max, 85.82KB avg)
Emits/elides: def 1086511/116196 fg 10601709/7359116 bg 10661910/6326744
 Elide rates: 9.66% 40.97% 37.24%

After this PR:

5625 renders, 15s total (9.36e-05s min, 0.187s max, 0.0027s avg 375.2 fps)
168365.640KB total (0.930KB min, 139.600KB max, 29.93KB avg)
Emits/elides: def 310575/116196 fg 4486002/4473416 bg 4116835/4630666
 Elide rates: 27.23% 49.93% 52.94%
Cells emitted; 9928000 elided: 12572000 (55.88%)
5642 renders, 14.2s total (9.17e-05s min, 0.154s max, 0.0025s avg 397.0 fps)
168669.009KB total (0.605KB min, 139.600KB max, 29.90KB avg)
Emits/elides: def 310819/116196 fg 4499833/4482134 bg 4118562/4652470
 Elide rates: 27.21% 49.90% 53.04%
Cells emitted; 9962160 elided: 12605840 (55.86%)
5650 renders, 14.3s total (0.000118s min, 0.143s max, 0.0025s avg 395.7 fps)
169461.884KB total (0.860KB min, 139.600KB max, 29.99KB avg)
Emits/elides: def 305431/116196 fg 4515396/4456376 bg 4149967/4613668
 Elide rates: 27.56% 49.67% 52.65%
Cells emitted; 9945200 elided: 12654800 (55.99%)

on netcurses-demo, we're eliding about half of the total cells via this damage map. that's pretty fucking sweet! FPS increase of about 50% -- I'll take that any day of the fuckin' week, boyo. w00t!

https://www.youtube.com/watch?v=XbGs_qK2PQA
5 years ago
nick black 91f74901c2
verify cell_load() of ascii results in simple #140 5 years ago
Nick Black 8bd8055f72
Distinct fg/bg alpha channels #139 (#141)
* improved alpha macros
* demo: use new alpha macros
* add ncplane_set_*_alpha()
* explicitly set fg for uniblock
* outro: background is a space #139
* distinct alpha channels for fg/bg #139
* rename 'background' cell to 'default' #142
* doc palette fades
5 years ago
Nick Black ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
5 years ago
nick black a1c90a347a
add ncplane_box() corner masking 5 years ago
nick black 6e49bbce45
panelreel: don't treat putc() return as bool #132 5 years ago
nick black 0001fa955d
on a wide enough screen, this test breaks 5 years ago
nick black 7c72b0ce83
emoji unit test 5 years ago
nick black 23f8a070b3
unit tests: don't try to close a NULL outfp_ 5 years ago
nick black ca2f0471c3
setlocale(LC_ALL, "") everywhere 5 years ago
nick black 1821867e35
move outfp out of notcurses_options #130 5 years ago
nick black 64462a11ac
for real tho 5 years ago
nick black 206db6dedd
sgr unit tests 5 years ago
nick black 7eafdd6772
fix up unit testing sanity 5 years ago
Nick Black 0d2c43603b
Luigi in Mega Man world (#127)
* uniblock-demo: reset background to black
* warning about quantization
* some luigi love
* update cell documentation
* add unit test for move of stdplane
* MoveToLowerRight unit test
* ncplane_move_yx(): error to move stdscr
* better box permutations test
* luigi in megaman2 world
* stats: don't print 'em if we haven't got 'em
5 years ago
nick black 3085a5db31
fix up EmitWchar unit test 5 years ago
Nick Black 38a10d9065
Transparency via alpha channels (#122)
* outro: bevel message window's corners
* egcspool: use full 25 bits available for 32MB pools
* render: remove unused inheritance mask
* interfaces + unit tests for 2-bit alpha
* notcurses_*g_alpha() acccessors
* cell alpha + unit tests
* panelreel: support a background channel
* notcurses: transparency via alpha channel
* remove unused CELL_ALPHA_MASK
5 years ago
nick black 756eebc060
add ncplane_putwegc() and unit test #120 5 years ago
nick black 1b1729133c
add ncplane_putwstr(), add unit test #120 5 years ago
nick black 7566af57e3
introduce ncplane_set_[fb]g 5 years ago
nick black 8afcd04446
sync cell/ncplane fg/bg API naming 5 years ago
nick black df93b67b4e
fix up subject of libav test 5 years ago
nick black e1356a2183
install man pages 5 years ago
nick black bacc69380a
uniblock: restore backgrounds 5 years ago
nick black af7ca02f36 Decode input escape sequences to special keys #78
Add the necessary input buffer, non-blocking reads, escape trie,
and unit tests to support extended keys, including arrow keys.
Update notcurses-input to print Unicode Control Glyphs instead of
a blank space for control chars.
5 years ago
Nick Black c0a1ee0f31
Spruce up slider demo, fix up uniblock demo #66 #72 (#112)
Slider demo: paint chunks in a pattern, then shuffle them up #72
Right-to-left unit tests #66
Fix up damage to uniblock demo using cup explicit cursor move #66
5 years ago
nick black 1bb114dbdc box unit tests: enlarge pattern #42 5 years ago
nick black f40f8cfb15 use background in fade unit tests 5 years ago
nick black ae711b7e75 h/vline gradient unit tests #42 5 years ago
nick black b711eaeedd box gradient unit tests #42 5 years ago
nick black bdc841e46e ncplane_box: support box mask ctlword #42 5 years ago
nick black a55e02836b ncplane_box: accept ctlword (#42) 5 years ago
Nick Black 8e8cb92c54
Improved cell API #97 (#103)
* cell/ncplane: simplify box API (#97)
* widecolor: use new box api (#97)
* uniblock: use new box API #97
* intro: use new box api #97
* panelreel: use new box api
* boxdemo: use new box API #97
* sliding: use new box API #97
* maxcolor: use new box api #97
* factor out notcurses_channel_prep() #97
* maxcolor: use new channel API #97
* sliding: use new channel API #97
* intro: use new channel API #97
* new output functions with no need for a cell
* add ncplane_putegc() and ncplane_putsimple(). the former takes an EGC, the latter a simple char less than 0x80. (#97)
* cell_prime: directly load all parts of a cell with immediates
* widecolor: use new output API #97
* boxdemo: properly initialize cells
* slider: total time cap of 5 * delaydemo
* maxcolor: use new output API #97
5 years ago
nick black e21594b4e9
ncplane_*_box_cells() -> cells_*_box() #97 5 years ago
nick black 415e238b3d transparent planes #10 5 years ago
nick black 2aadd096c0 lookin' good atl 5 years ago
nick black be5ce9051d
outro 5 years ago
nick black 0e4080456c fade unit tests #40 5 years ago
nick black 999f33a2ee
0.3.0-pre 5 years ago
Nick Black 426f632300
Panelreels port #52 (#90)
Port of panelreels, unit tests, and panelreel-demo from outcurses #52.
Doesn't completely work yet, but is surprisingly close!
5 years ago
nick black 8e9ed2b8a1 libav tests: check dimensions 5 years ago
nick black 28fac736bb notcurses-view: stop() before printing error
implement ncvisual_render()
5 years ago
nick black d106ebf0d3 libav: check for AVERROR_EOF #86 5 years ago