mpv icon indicating copy to clipboard operation
mpv copied to clipboard

vo_tct: rewrite using the newer vo api, generalize and optimize code

Open cloud11665 opened this issue 4 years ago • 2 comments

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.

cloud11665 avatar Oct 04 '21 21:10 cloud11665

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).

cloud11665 avatar Oct 04 '21 21:10 cloud11665

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.

cloud11665 avatar Jan 21 '22 22:01 cloud11665