Re: Re: Xv and memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik Slagter wrote:
Hi,

How can I calculate how much memory my frame buffer + Xv will need or
actually use?
I have a dual head setup on a Radeon Mobility 7500, 16 Mb memory. In my
normal setup I have a panel running 1400x1050@32bpp and a TFT monitor
running 1024x768@32bpp. This would imply it needs
1400x1050x4 + 1024x768x4 bytes of memory (+ some overhead), which is
approx. 8.8 Mb. I can do all stuff with xv on screen #1, but Xv on
screen #0 (the 1400x1050 one) fails with BadAlloc when requesting Xv for
resolutions over approx 200x100.

I don't understand that, where does all that memory go?

I don't know exactly how the radeon driver shares the available memory among the two heads, but if it does that 50:50 as I would assume, the problem is obvious.


If each screen gets 8 MB, the 1400x1050x32 screen uses almost 6MB just for the visible screen. A little bit for pixmap cache, mouse cursor, perhaps command queue and the available memory soon isn't enough for Xv (which probably uses double-bufferung for avoing tearing effects). Not even speaking of memory fragmentation after a while.

For YV12/I420/NV21/NV12 video, the required memory size for one frame is calculated as follows:

Size = width * height * 3 / 2

For YUV2/YUVY/YVYV/RGB5/RGB6 it is

Size = width * 2 * height

For double buffering, multiply this by 2.

Thomas

--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net          http://www.winischhofer.net/
twini AT xfree86 DOT org
_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux