[MPlayer-dev-eng] [PATCH] A new ASS renderer

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Mon Sep 24 00:20:57 CEST 2012


Hi Reimar Döffinger!

 On 2012.09.23 at 23:49:25 +0200, Reimar Döffinger wrote next:

> Even stranger: even without this patch, the driver does not use any relevant amount of CPU at all when using the OpenSource driver, basically freetype is using all of it (I used a trivially decodable video with those subs).
> Only the closed-source driver is a bit of an issue.
> I'll have to read up on the thread again, but did we ever figure out why some strange expand filter magic made a difference?
> Admittedly this is using some Radeon 5700 card.

Well, another quick check has shown that new versions of drm & mesa &
gallium made no difference: on Fedora 17 w/ Radeon 4870 there is exactly
same effect as on Fedora 14 with Radeon 1900.

The karaoke subtitles in question on 1920x1080 video raise CPU usage
from 36% to >100% (& >10% frames dropped) when rendered with vo_gl
compared to -vf ass; doesn't matter if it's in window or fullscreen.

I have karaoke and non-karaoke version of these subtitles. Non-karaoke
version prints line only on subtitles change
EOSD counts (tiny, small, all): 1, 1, 162
A:  23.2 V:  23.2 A-V:  0.000 ct:  0.075   0/  0  3% 26%  6.0% 6 0 68% 
EOSD counts (tiny, small, all): 1, 5, 178
A:  30.2 V:  30.2 A-V: -0.001 ct:  0.074   0/  0  2% 23%  6.2% 6 0 59% 
EOSD counts (tiny, small, all): 3, 5, 102

Karaoke prints it all the time
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.7 V:  16.7 A-V: -0.000 ct:  0.053   0/  0  1% 29%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 165
A:  16.7 V:  16.7 A-V: -0.000 ct:  0.053   0/  0  1% 29%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 166
A:  16.7 V:  16.8 A-V: -0.000 ct:  0.053   0/  0  1% 29%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.8 V:  16.8 A-V: -0.000 ct:  0.053   0/  0  1% 30%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.8 V:  16.8 A-V: -0.000 ct:  0.053   0/  0  1% 30%  6.6% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.8 V:  16.9 A-V: -0.001 ct:  0.053   0/  0  1% 30%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.9 V:  16.9 A-V: -0.001 ct:  0.052   0/  0  1% 30%  6.7% 0 0 74% 
EOSD counts (tiny, small, all): 22, 2, 164
A:  16.9 V:  16.9 A-V: -0.001 ct:  0.052   0/  0  1% 30%  6.6% 0 0 74% 



As for the second (black bars causing slowdown) issue, the problem
persists as well: simple non-karaoke on 720x480 video with -vf ass
rendering uses 30% cpu (window or fullscreen), same usage with vo_gl
rendering in window (either original size of "fullscreen-size" window),
but 85-90% usage in fullscreen.


We didn't figure why expand works like it works - you asked to check if
it helps and my tests have shown that in most modes it doesn't help,
except the only (useless for me) mode when you specify exact resolution
for video without -1/-2 auto-calculation trickery. In that mode it
solves the problem. However, vf_ass rendering is easier to use solution;
without vo_gl ass rendering there is no difference between fullscreen or
window, black bars don't seem to hurt at all.

-- 

Vladimir


More information about the MPlayer-dev-eng mailing list