Commit Graph

3057 Commits (c7d284a9afe3f3d4f07545889fb36febc2771a3a)

Author SHA1 Message Date
nick black 5a702512c5 [bitmaps] be less aggressive about third phase
When we scribble underneath a TRANSPARENT or ANNIHILATED
sprixcell, or even an OPAQUE or MIXED one in Kitty, we
needn't invalidate the sprixel. Perform these checks for
less aggressive invalidation, eliminating the flicker we
were seeing in xray using Kitty. Closes #1522.
4 years ago
nick black 333b4414d9 note ECMA-48's NUL escape #1416 4 years ago
nick black 0dce453461
[direct] don't print sprixels to the last line 4 years ago
nick black c975bc85fd ncvisual: or 0x1000000 tp transcolor when NCVISUAL_OPTION_ADDALPHA is used 4 years ago
nick black d4e2598c9e [ncplayer] direct mode support for chromakey #1515 4 years ago
nick black feab25bd7d ncdirect_render_visual: account for bitmap overhang #1515 4 years ago
nick black 0de734cb02 ncplayer has 9 log levels, not 10 4 years ago
nick black 2c7034f1e3 [ncplayer] fix margins in direct mode #1515 4 years ago
nick black 9f8d938fad [ncplayer] disable cursor in direct mode #1515 4 years ago
nick black 5507bbbd3e [ncplayer] get margins working with direct mode once more #1515 4 years ago
nick black ef69abe0fc ncdirect_stream: save and restore cursor position before each frame #1515 4 years ago
nick black 53f92760dd ncplayer: support multiframe in direct mode via streamfile #1515 4 years ago
nick black 3555257afb
kitty: use supplied alpha value directly
In Sixel, we map the alpha value to either 0 or 255, as
it has no alpha concept. Kitty can freely reproduce eight
bits of alpha, so go ahead and use them. Improves image
quality of translucent bitmaps in Kitty at the expense of
some behavioral divergence depending on bitmap backend.
4 years ago
nick black 4442a9fea9
rgba_trans_p: any non-zero alpha must be displayed #1540 4 years ago
nick black b070b69eb2
get last remaining cell_ functions -> nccell_ #1532 4 years ago
nick black 7ad5219fa2
convert another crop of cell_ to nccell_ #1532 4 years ago
nick black 89fb48a30b
sprixcells: tense agreement in comment 4 years ago
nick black 30cb74428f
work on the sprixel state machine
Sixel: detect SPRIXCELL_TRANSPARENT cells and mark them as such.
sprixel_invalidate: fix copy-and-paste, want both TRANSPARENT and
ANNIHILATED to block progression to INVALIDATED. add gigantic
comment detailing the state machine. #1537, #1522, #1527, #1483.
4 years ago
nick black 93a08edb23
render: extract stats functions to stats.c 4 years ago
nick black d2394f9c63
c++ wrapper for direct-mode streaming #1515 4 years ago
nick black 529972d16b Elide unnecessary sprixel invalidations
When the damaged cell of a sprixel is actually entirely
transparent (or annihilated), there's no need to invalidate
it. Check for this in the TAM in sprixel_invalidate(). Good
optimization, and eliminates a lot of the flicker in `xray`
on Kitty described in #1522.
4 years ago
nick black 9d516d8c8c
summarize_stats: don't divide by 0 writeouts 4 years ago
nick black 32500239ac
cell_extract() -> nccell_extract() 4 years ago
nick black da2a897544
fix unintended cell abi breakage #1532
cell_release() and cell_duplicate() were deprecated in 2.2.6,
but replaced with static inlines. this breaks the abi, forcing
recompiles from client programs. restore them as exported
functions.
4 years ago
nick black 76bcb8f0af
zaxis test: update to api3 4 years ago
nick black 96ac640733
cell->nccell 4 years ago
nick black 657ed15632
cell_on_styles -> nccell_on_styles() #1532 4 years ago
nick black 15c330c580
[sixel_shutdown] don't disable sixel scrolling on shutdown #1533 4 years ago
nick black 81370ba311
[sixel_delete] don't scribble beyond pile rendering vector #1534 4 years ago
Nick Black e591ec2e98
cell -> nccell throughout much of remaining API (#1535)
cell -> nccell throughout much of the API #1532
4 years ago
nick black e9b5388dde
[sixel] clear debugging cruft #1533 4 years ago
nick black b794dbc848
[sixel] clear sixel scrolling private mode on exit #1533 4 years ago
nick black 89678ed412
[render] only invalidate glyphs when wipe fails 4 years ago
nick black 11f79dfd31
visual_render_pixels: don't use last line of visual area #1479 4 years ago
nick black f5d16e1e89
sprite_wipe_cell: purge unnecessary fxn check 4 years ago
nick black 282830e31c
define sixel_wipe 4 years ago
nick black 39335bc210
[sixel_wipe] set SIXEL_P2_TRANS #1527 4 years ago
nick black 567c351b8f
[sprixcell] kill unused TAM enums for now 4 years ago
nick black 53485eabc3
[paint] extract paint_sprixel() 4 years ago
nick black 3474134f23
[nctree] eliminate tautological pointer compare 4 years ago
nick black 46d70602c5
always set SIXEL_P2_TRANS on transparent pixels #1527 4 years ago
nick black c54198a992
Emit P2=0 when sixel is entirely opaque
Some terminals (foot makes this claim explicitly) can draw
sixels more quickly when P2 is 0 than when P2 is 1. Since
we're already detecting transparency for the TAM matrix, do
the same globally, and prepare a sixel_p2_e value-result
parameter based on the results. If there are no transparent
pixels, emit P2=0 #1527.
4 years ago
nick black 2f8efe53a6
[demo] shrink the fps graph horizontally a little 4 years ago
nick black 162248fcaa
[ncplayer] put blitter changes into effect at media's end #1529 4 years ago
nick black 77e8697be9
get a richer blue in banner RGB 4 years ago
nick black cfd47c26b6
ncvisual_render_pixels: reject negative placex/placey on alignment #1526 4 years ago
nick black 669bc5fa33
[mlterm] sixel cursor hack
At least mlterm unhides the cursor after emitting a
Sixel, even if it was hidden beforehand. Track this
behavior using 'sprixel_cursor_hack' in the tinfo cache.
Set this based on an "mlterm" TERM heuristic match.
When it is set, supply the 'civis' capability as
cursor_hack in blitterargs, and emit it at the end of
the sixel in sixel_blit() #1524.
4 years ago
nick black 7e08e40bff
notcurses_stop: don't treat drop_signals() as an error 4 years ago
nick black e301ef34ae
disable alacritty sixel until ayosec/graphics is merged #1430 4 years ago
nick black 084d5d6673
notcurses_init: free memstream on error paths 4 years ago
Daniel Eklöf 013ac94cd5 [sixel]: re-enable Set Raster Attributes, and fix the ‘pad’ parameter
Now that we explicitly set P2=1, we can safely emit a "Set Raster
Attributes" command, to tell the terminal the final size of the image
up front.

Also fix the ‘pad’ parameter (horizontal aspect ratio); XTerm rejects
sixels with pan or pad set to 0.
4 years ago
Daniel Eklöf 8b7fa78be1 [sixel]: set P2=1
This indicates that empty pixels should "remain at their current
color". I.e. it makes them transparent.

This is in contrast to P2=0|2, where empty pixels are filled with the
"current background color" (which is either sixel color register #0,
or the current ANSI background color, depending on terminal and its
sixel implementation).

Note that due to what is most likely a bug, XTerm will behave as if
P2=1 if P2 is either left unset, or explicitly set to 0 or 2, as long
as we do *not* emit a "Set Raster Attributes" command.
4 years ago
nick black 9c7fa38187
mlterm: enable quadrants (no sextants as of 3.9.0) 4 years ago
nick black c7fca301e8
sixel: set a huge default max geom 4 years ago
nick black e7ca10804d
xtsmgraphics reply: always allow 'S' to terminate #1523 4 years ago
nick black 430e328df6
[query_sixel] tighten sixel check state machine #1523 4 years ago
nick black 96ca5e79cb
xray: use alpha channel for sprixel 4 years ago
nick black 2e254d29e0
ncvisual_blitset_geom: fix unknown flag diagnostic 4 years ago
nick black f8f2784a22
[alacritty] did they disable XTSMGRAPHICS again? wtf? 4 years ago
nick black fada4148b5 [ncplayer] add -a option for alpha channel #1518 4 years ago
nick black 76241f81d2 [rust] adapt pixel-cell.rs 4 years ago
nick black 34bcbb505b [xray] put streaming plane back above scrolling #1518 4 years ago
nick black bac7d634d9 [visual] pipe transcolor through, use it everywhere #1518 4 years ago
nick black 0c566cd74a [ncvisual] pipe transcolor through #1518 4 years ago
nick black ff76dba6ed
cell_strdup -> nccell_strdup 4 years ago
nick black d504e972cc
cell_release -> nccell_release 4 years ago
nick black 9dbcef9969
stop exporting lookup_blitset()
the media code that makes up non-core libnotcurses called
into lookup_rgba(). instead, have them use the new
funtion ncvisual_blitter_geom() to access the actual blitter
being used. we can then hide lookup_blitset(), which ought
never have been exported. closes #1519.
4 years ago
nick black d4fff6a921
check wcwidth('⣿') for braille support 4 years ago
nick black 1f67f540e6
[stacking] guard tests for quadrants 4 years ago
nick black 1720457467
[rotate] fix unit tests for odd number of columns 4 years ago
nick black 17a27427ec
[visual] guard quadblitter tests with check 4 years ago
nick black 7488a84121
[xray] bring slider plane to top #1518 4 years ago
nick black 80d93fdfb6
disable quadrants except where whitelisted #1517
Require a known-good TERM heuristic match to enable
quadrants (NCBLIT_2x2); they otherwise decay to halves
(NCBLIT_2x1). The only terminal that supports quadrants
but does not support sextants is the Linux console, where
we program quadrants directly into the font table,
like a beast. Closes #1517, and #1298 if we're lucky.
4 years ago
nick black 62242f0e41 [terminfo] add alacritty hack for sixel #1430 4 years ago
nick black 53894caccb add ncdirect_stream #1346 4 years ago
Nick Black 04b1ba8ed2
Dankamongmen/unify geom (#1514)
deprecate ncvisual_geom() in favor of new ncvisual_blitter_geom(), which allows caller to get the blitter used. replace the checks and calculations in ncvisual_render() with a call to ncvisual_blitter_geom(), unifying the two paths (and eliminating several bugs in the unloved ncvisual_geom()).
4 years ago
nick black 35e44d81c5
caps-rendered: differentiate sixel v kitty 4 years ago
nick black 1f33ada62e
[cffi] update for ncplane_as_rgba() 4 years ago
nick black 582bdebbc3
lol remove notcurses_debug() from notcurses_render() 4 years ago
nick black f294c6bb0b
add ncplane_pixelgeom() #1507 4 years ago
nick black d153ccb8f4
[ncvisual] properly size created plane
if we go into ncvisual_render() looking to render a number
of rows not evenly divisible by the scaling factor, we need
to get an extra row (duh). correct ncvisual_render_cell() to
reflect this. the blitters already know to fill this line in
with transparency wherever the image is not defined. fix up
rotation unit tests to reflect this. closes #1513.
4 years ago
nick black 94839c2958
[ncdirect_stream] kill unused variable warnings 4 years ago
nick black 05082fc277
ncplane_as_rgba(), returns pixel geometry along with bitmap #1508 4 years ago
nick black 694a0c133f
[terminfo] only interrogate for sixel when pixel geometry is defined #1511 #1506 4 years ago
nick black 217453780e
[terminfo] remove alacritty hacks #1506 #1430 4 years ago
nick black b1baa5e88a
[demo] print that we're checking for pixel support #1506 4 years ago
nick black cc3cddf40b
[sprixel] don't yet enable sixel on alacritty 4 years ago
nick black 0febe3428f
[sprixels] simplify query_sixel() 4 years ago
nick black 9dad70568b
[plot] drop inline from update_sample 4 years ago
joseLuís fce6c6873f fix typos 4 years ago
nick black 8db054ede7
kill off get_controlling_tty in favor of get_tty_fd #1504 4 years ago
nick black 7865539505
query_sixel: support alacritty's ugh decisions #1430 4 years ago
nick black 0c2e3d6e35
[sixel] make some sixeltable args const 4 years ago
Nick Black 7e78690597
[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes (#1502) 4 years ago
nick black 7c35d94a9b
paint: referene crender, not rvec #1482 4 years ago
nick black 0dbd3cf830
ncvisual_render_pixels: hide any old sprixels 4 years ago
nick black 2f47d9adef
[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes 4 years ago
nick black 656b3221af
refresh: initialize with init_rvec, not memset() 4 years ago
nick black 123447183c
[jungle] fix invalid access on some window geometries 4 years ago
nick black 3d3d235abb
[xray] update frame count for new video 4 years ago