mpv
                                
                                 mpv copied to clipboard
                                
                                    mpv copied to clipboard
                            
                            
                            
                        vo_tct: rewrite using the newer vo api, generalize and optimize code
Benchmarked:
1080p 60fps 41s video, played on a 384x102 terminal (alacritty)
| frames dropped | stock | term256 | ALGO_PLAIN | ALGO_PLAIN + term256 | 
|---|---|---|---|---|
| old | 580 | 363 | 29 | 2 | 
| new | 354 | 131 | 14 | 1 | 
The memory usage was roughly the same (as expected)
Another optimization, that i forgot to write about in the commit message, is writing out to a buffer, and then printing the whole buffer, and not printing out every escape code by itself.
This is all foundation for another vo-tct-algo, that (from my testing) should reduce the bandwidth required by ~40% (and maybe increase the horizontal resolution 2-fold).
here are the benchmarks:
video file
274x67 terminal (Kitty)
command: ./build/mpv --vo=tct --profile=sw-fast --no-config --no-config --keep-open ~/Downloads/native.mkv
| frames dropped | plain | half-blocks | quad | 
|---|---|---|---|
| master (9cddd73) | 2 | 126 | N/A | 
| this pr | 0 | 0 | 42 | 
The quad algo provides a substantial improvement both in terms of quality and performance when compared to the old half-blocks one.