[Libav-user] Questions about ffmpeg's image conversion

Kai2 Li likai2 at lenovo.com
Fri Mar 8 04:52:19 CET 2013


Hi, ffmpeg development team:

I'm a software developer of Lenovo Inc. I'm using ffmpeg in my video project for TS stream playing. While playing TS, cpu usage up to 90%, which in the image conversion process (YUV to RGB), cpu usageup to 25% -30%.

In my project, ffmpeg's image conversion call function yuv2rgb_c_32 in C file /libffmpeg/libswscale/yuv2rgb.c

Here is source code:
YUV2RGBFUNC(yuv2rgb_c_32, uint32_t, 0)
    LOADCHROMA(0);
    PUTRGB(dst_1, py_1, 0);
    PUTRGB(dst_2, py_2, 0);

    LOADCHROMA(1);
    PUTRGB(dst_2, py_2, 1);
    PUTRGB(dst_1, py_1, 1);

    LOADCHROMA(2);
    PUTRGB(dst_1, py_1, 2);
    PUTRGB(dst_2, py_2, 2);

    LOADCHROMA(3);
    PUTRGB(dst_2, py_2, 3);
    PUTRGB(dst_1, py_1, 3);
ENDYUV2RGBLINE(8)
    LOADCHROMA(0);
    PUTRGB(dst_1, py_1, 0);
    PUTRGB(dst_2, py_2, 0);

    LOADCHROMA(1);
    PUTRGB(dst_2, py_2, 1);
    PUTRGB(dst_1, py_1, 1);
ENDYUV2RGBFUNC()

With your please, I would like to ask some questions.
a) Why the function writing by macro?
b) Whether the function can be optimized?
c) Has there some updates or new version?
d) Will ffmpeg have ARM platform specialized version or patch?

My hardware is Sumsang Pad GT-P5110 (1G dural core, 1G RAM, 32G SD card), ffmpeg version is 0.11.1

I'm glad and eager for your reply, thank you very much.

Best regards








Regards,

李凯 Li Kai
System Innovation Lab
Lenovo, R&T
No.6 Shangdi West Road Haidian District, Beijing


likai2 at lenovo.com<mailto:likai2 at lenovo.com>
(TEL) +86 10-58861550
(FAX) +86 10-58863357


[说明: 说明: 说明: 说明: 说明: cid:image003.png at 01CD86C6.364B3F00]

www.Lenovo.com<http://www.lenovo.com/>






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130308/020de53b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7119 bytes
Desc: image001.png
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130308/020de53b/attachment.png>


More information about the Libav-user mailing list