Commit Graph

109 Commits

Author SHA1 Message Date
nick black
97ecbdb0e5
sigh, probably gotta kill DMCA lure 2019-12-18 05:31:29 -05:00
Nick Black
957549105b
Wide character rigor (#117) (#157)
* unidamage PoC
* add cell_load_simple()
* clear CELL_WIDEASIAN_MASK in cell_load()
* split out render code
* add CELL_SIMPLE_INITIALIZER
* widecolor: fix message plane
* widecolor: simplify color increments
* document wide character handling
* unit tests for wide obliteration #117
* widechar obliteration hardening #117
* widecolor -> widechomper, update man page
2019-12-18 04:38:43 -05:00
nick black
48adc31260 unit test for z-axis rendering #146 2019-12-16 23:20:13 -05:00
nick black
599b7a6d9a z-axis unit tests #71 2019-12-16 21:31:18 -05:00
nick black
dac4f78ee6 basic unit tests for z-axis #71 2019-12-16 21:31:18 -05:00
nick black
58cc6927ac 256-color cube is not ansi, don't muddy the waters 2019-12-16 21:31:18 -05:00
nick black
65858b4495 unit test 256-index quantizing #4 2019-12-16 21:31:18 -05:00
nick black
a916d929db
RGBtoANSI: fixup lower grey onversions, looks reasonable now #4 2019-12-15 23:13:13 -05:00
nick black
cfccd0c39c
RGBtoANSI unit test, fix up bases 2019-12-15 21:33:26 -05:00
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
2019-12-15 13:46:47 -05:00
nick black
91f74901c2
verify cell_load() of ascii results in simple #140 2019-12-14 18:02:58 -05:00
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
2019-12-14 17:34:10 -05:00
Nick Black
ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
2019-12-14 05:33:34 -05:00
nick black
a1c90a347a
add ncplane_box() corner masking 2019-12-13 19:40:22 -05:00
nick black
6e49bbce45
panelreel: don't treat putc() return as bool #132 2019-12-13 15:28:11 -05:00
nick black
0001fa955d
on a wide enough screen, this test breaks 2019-12-12 17:05:17 -05:00
nick black
7c72b0ce83
emoji unit test 2019-12-12 16:14:01 -05:00
nick black
23f8a070b3
unit tests: don't try to close a NULL outfp_ 2019-12-12 09:08:06 -05:00
nick black
ca2f0471c3
setlocale(LC_ALL, "") everywhere 2019-12-12 08:59:16 -05:00
nick black
1821867e35
move outfp out of notcurses_options #130 2019-12-12 07:59:48 -05:00
nick black
64462a11ac
for real tho 2019-12-10 16:21:32 -05:00
nick black
206db6dedd
sgr unit tests 2019-12-10 08:50:32 -05:00
nick black
7eafdd6772
fix up unit testing sanity 2019-12-10 06:59:35 -05:00
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
2019-12-10 06:02:49 -05:00
nick black
3085a5db31
fix up EmitWchar unit test 2019-12-08 14:26:35 -05:00
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
2019-12-08 13:00:19 -05:00
nick black
756eebc060
add ncplane_putwegc() and unit test #120 2019-12-07 23:00:18 -05:00
nick black
1b1729133c
add ncplane_putwstr(), add unit test #120 2019-12-07 20:37:25 -05:00
nick black
7566af57e3
introduce ncplane_set_[fb]g 2019-12-07 17:55:23 -05:00
nick black
8afcd04446
sync cell/ncplane fg/bg API naming 2019-12-06 22:45:08 -05:00
nick black
df93b67b4e
fix up subject of libav test 2019-12-06 14:41:49 -05:00
nick black
e1356a2183
install man pages 2019-12-05 10:12:47 -05:00
nick black
bacc69380a
uniblock: restore backgrounds 2019-12-05 04:18:43 -05:00
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.
2019-12-04 23:46:24 -05:00
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
2019-12-04 10:00:23 -05:00
nick black
1bb114dbdc box unit tests: enlarge pattern #42 2019-12-04 04:50:26 -05:00
nick black
f40f8cfb15 use background in fade unit tests 2019-12-04 04:50:26 -05:00
nick black
ae711b7e75 h/vline gradient unit tests #42 2019-12-04 04:50:26 -05:00
nick black
b711eaeedd box gradient unit tests #42 2019-12-04 04:50:26 -05:00
nick black
bdc841e46e ncplane_box: support box mask ctlword #42 2019-12-04 04:50:26 -05:00
nick black
a55e02836b ncplane_box: accept ctlword (#42) 2019-12-04 04:50:26 -05:00
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
2019-12-03 18:40:41 -05:00
nick black
e21594b4e9
ncplane_*_box_cells() -> cells_*_box() #97 2019-12-03 14:29:48 -05:00
nick black
415e238b3d transparent planes #10 2019-12-02 05:49:13 -05:00
nick black
2aadd096c0 lookin' good atl 2019-12-02 05:49:13 -05:00
nick black
be5ce9051d
outro 2019-12-02 05:42:10 -05:00
nick black
0e4080456c fade unit tests #40 2019-12-02 03:44:11 -05:00
nick black
999f33a2ee
0.3.0-pre 2019-12-01 20:56:42 -05:00
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!
2019-12-01 17:48:38 -05:00
nick black
8e9ed2b8a1 libav tests: check dimensions 2019-12-01 15:29:59 -05:00