[MPlayer-dev-eng] [PATCH] new vf_ass implementation

Xidorn Quan quanxunzhen at gmail.com
Sun Oct 21 12:49:29 CEST 2012


On Mon, Oct 8, 2012 at 1:40 PM, Xidorn Quan <quanxunzhen at gmail.com> wrote:

> On Sun, Oct 7, 2012 at 2:34 PM, Xidorn Quan <quanxunzhen at gmail.com> wrote:
>
>> Hi,
>>
>> The patch attached is a new implementation for vf_ass. The core idea
>> for it is that since subtitles usually keep unchanged for several
>> frames, we can render subtitle images on a buffer with alpha channal
>> when subtitles get changed, and then compose it with every frame.
>> It can perform better because composing images with alpha channal is
>> much faster than rendering subtitle images.
>>
>> There are also some other optimizations like processing pixels as few
>> as possible by using extent dirty_rows, downsampling buffer images
>> instead of upsampling frame pictures.
>>
>> For normal subtitles which is changed not very frequently, it can be
>> about 2.2x (for packed YUV) or 1.8x (for planar YUV) faster than
>> the current ass filter by itself. For subtitles which is changed
>> nearly every frame, it can also be 40% faster than the current one
>> for packed YUV, but be slower (by less than 10%) for planar YUV.
>>
>> Although it is sometimes slower, composing can be easily optimized
>> (by using SIMD for example). Then it can be never slower.
>>
>> Best regards,
>> Xidorn Quan
>>
>
> I modified some code so that it can run faster for planar YUV format.
> The filter with this new patch is now never slower than the current
> one, though it is only ~3% faster in the worst case (subtitle is
> changed every frame, planar YUV format).
>

Ping. Any comment or it to be merged? This patch has been here for
nearly 2 weeks.


More information about the MPlayer-dev-eng mailing list