> 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 > > The radeon driver indeed divides memory 50/50 in dualhead mode. Thomas is right, you are probably running out of memory on 1400x1050 head. One option you have is to try the MergedFB mode available in DRI cvs (http://dri.sourceforge.net/cgi-bin/moin.cgi/Download). Since both crtcs are treated as one head, the whole 16 MB is shared by both heads. all of the available offscreen memory can then be used by either head for Xv, etc. Alex __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86