Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to transfer surgery map between frames of a multiframe ncvisual #1457

Closed
dankamongmen opened this issue Mar 24, 2021 · 6 comments · Fixed by #1477
Closed

need to transfer surgery map between frames of a multiframe ncvisual #1457

dankamongmen opened this issue Mar 24, 2021 · 6 comments · Fixed by #1477
Assignees
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Milestone

Comments

@dankamongmen
Copy link
Owner

When we run ncplayer -bpixel on a multiframe image (e.g. a video) when using Sixel (this does not happen in Kitty), the frame count and time get obliterated. We need to carry the surgery map through frames. We ought be able to embed it into the transparency-annihilation matrix as a third value. We can invoke this internally from ncvisual_decode() -- the user needn't deal with this at all.

@dankamongmen dankamongmen added bug Something isn't working bitmaps bitmapped graphics (sixel, kitty, mmap) labels Mar 24, 2021
@dankamongmen dankamongmen added this to the 2.3.0 milestone Mar 24, 2021
@dankamongmen dankamongmen self-assigned this Mar 24, 2021
@dankamongmen
Copy link
Owner Author

This is necessary for getting ncplayer reliably displaying the legend with Sixel (see #1432); things work well enough now with Kitty.

@dankamongmen
Copy link
Owner Author

To do this right, I think we need to hook the T-A matrix up to the ncvisual, either directly or through the sprixel. Let's think lifetimes here: the ncvisual must live through the last decode we want to do; the T-A must live through the last pixel blit we want to do....we need a T-A matrix whether it's multiframe media or not for sprixel drawing, but the ncvisual doesn't need it in that case. Maybe just comutual linkage, like we have between the sprixel and the ncplane?

@dankamongmen
Copy link
Owner Author

We have a handle to the ncplane within ncvisual_render(), and presumably we're reusing the ncplane--we have to, otherwise the sprixel would have been destroyed. and technically it's not a property of the ncvisual or sprixel, it's a property of the plane. If we blit some othet, unrelated bitmap to the same plane, we have the same cells atop it, so we can apply the T-A matrix unchanged (save layer 1, which must be recomputed each time we blit).

@dankamongmen
Copy link
Owner Author

we're reusing the tacache across renders now; we need to actually cut out the appropriate cells in the load.

dankamongmen added a commit that referenced this issue Mar 27, 2021
@dankamongmen
Copy link
Owner Author

for the first time, we've got gaps maintained in the legend of ncplayer with sixel! =]

@dankamongmen
Copy link
Owner Author

yield no longer flickers in sixel =]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant