[FFmpeg-devel] YUV to RGB conversion, optimized ARM assembler code

Frank Barchard fbarchard
Sun Aug 9 06:04:40 CEST 2009


On Sat, Aug 8, 2009 at 1:18 PM, Yonas . <googelly.eyes at gmail.com> wrote:

> M?ns,
>
> Have you looked at the code yet?
>
> Yonas


My ARM is rusty, but I can comment on the algorithm.
The table look up method avoids multiplies and is the fastest way.
The tables are preclamped, you loose a little quality.  If you use
saturating adds (qadd16
instead of
sadd16) you can unclamp the tables... allow the values to go from 0 to 0xff.
 Otherwise you cant get full black and white.

Its doing 2 rows at a time.  You may improve performance doing one row at a
time.  x86 does better one row at a time, despite the duplicated UV math.

You can simplify the code by doing just the horizontal loop in ARM and the
outer Y look in C, without loosing much performance.  Then it can apply to
422 as well.

ffmpeg uses swscaler for conversion.  This wont drop in easily, but it is
faster.



More information about the ffmpeg-devel mailing list