📄 zoran
字号:
Buz tolerable, LML3 almost perfect (occasional single frame drops)SiS735 LML33 perfect, Buz tolerable.VIA KT133(*) LML33 starting to get annoying, Buz poor enough that I have up.Both 440BX boards were dual CPU versions.--Bernhard Praschinger later added:--AMD 751 Buz perfect-tolerableAMD 760 Buz perfect-tolerable--In general, people on the user mailinglist won't give you much of a chanceif you have a VIA-based motherboard. They may be cheap, but sometimes, you'drather want to spend some more money on better boards. In general, VIAmainboard's IDE/PCI performance will also suck badly compared to others.You'll noticed the DC10+/DC30+ aren't mentioned anywhere in the overview.Basically, you can assume that if the Buz works, the LML33 will work too. Ifthe LML33 works, the DC10+/DC30+ will work too. They're most tolerant todifferent mainboard chipsets from all of the supported cards.If you experience timeouts during capture, buy a better mainboard or lowerthe quality/buffersize during capture (see 'Concerning buffer sizes, quality,output size etc.'). If it hangs, there's little we can do as of now. Checkyour IRQs and make sure the card has its own interrupts.===========================4. Programming interfaceThis driver conforms to video4linux and video4linux2, both can be used touse the driver. Since video4linux didn't provide adequate calls to fullyuse the cards' features, we've introduced several programming extensions,which are currently officially accepted in the 2.4.x branch of the kernel.These extensions are known as the v4l/mjpeg extensions. See zoran.h fordetails (structs/ioctls).Information - video4linux:http://roadrunner.swansea.linux.org.uk/v4lapi.shtmlDocumentation/video4linux/API.html/usr/include/linux/videodev.hInformation - video4linux/mjpeg extensions:./zoran.h(also see below)Information - video4linux2:http://linuxtv.orghttp://v4l2spec.bytesex.org//usr/include/linux/videodev2.hMore information on the video4linux/mjpeg extensions, by SergueiMiridonovi and Rainer Johanni:--The ioctls for that interface are as follows:BUZIOC_G_PARAMSBUZIOC_S_PARAMSGet and set the parameters of the buz. The user should always do aBUZIOC_G_PARAMS (with a struct buz_params) to obtain the defaultsettings, change what he likes and then make a BUZIOC_S_PARAMS call.BUZIOC_REQBUFSBefore being able to capture/playback, the user has to requestthe buffers he is wanting to use. Fill the structurezoran_requestbuffers with the size (recommended: 256*1024) andthe number (recommended 32 up to 256). There are no such restrictionsas for the Video for Linux buffers, you should LEAVE SUFFICIENTMEMORY for your system however, else strange things will happen ....On return, the zoran_requestbuffers structure contains number andsize of the actually allocated buffers.You should use these numbers for doing a mmap of the buffersinto the user space.The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmapmaps the MJPEG buffer instead of the V4L buffers.BUZIOC_QBUF_CAPTBUZIOC_QBUF_PLAYQueue a buffer for capture or playback. The first call also startsstreaming capture. When streaming capture is going on, you mayonly queue further buffers or issue syncs until streamingcapture is switched off again with a argument of -1 toa BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl.BUZIOC_SYNCIssue this ioctl when all buffers are queued. This ioctl willblock until the first buffer becomes free for saving itsdata to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY).BUZIOC_G_STATUSGet the status of the input lines (video source connected/norm).For programming example, please, look at lavrec.c and lavplay.c code inlavtools-1.2p2 package (URL: http://www.cicese.mx/~mirsev/DC10plus/)and the 'examples' directory in the original Buz driver distribution.Additional notes for software developers: The driver returns maxwidth and maxheight parameters according to the current TV standard (norm). Therefore, the software which communicates with the driver and "asks" for these parameters should first set the correct norm. Well, it seems logically correct: TV standard is "more constant" for current country than geometry settings of a variety of TV capture cards which may work in ITU or square pixel format. Remember that users now can lock the norm to avoid any ambiguity.--Please note that lavplay/lavrec are also included in the MJPEG-tools(http://mjpeg.sf.net/).===========================5. ApplicationsApplications known to work with this driver:TV viewing:* xawtv* kwintv* probably any TV application that supports video4linux or video4linux2.MJPEG capture/playback:* mjpegtools/lavtools (or Linux Video Studio)* gstreamer* mplayerGeneral raw capture:* xawtv* gstreamer* probably any application that supports video4linux or video4linux2Video editing:* Cinelerra* MainActor* mjpegtools (or Linux Video Studio)===========================6. Concerning buffer sizes, quality, output size etc.The zr36060 can do 1:2 JPEG compression. This is really the theoreticalmaximum that the chipset can reach. The driver can, however, limit compressionto a maximum (size) of 1:4. The reason for this is that some cards (e.g. Buz)can't handle 1:2 compression without stopping capture after only a few minutes.With 1:4, it'll mostly work. If you have a Buz, use 'low_bitrate=1' to go into1:4 max. compression mode.100% JPEG quality is thus 1:2 compression in practice. So for a full PAL frame(size 720x576). The JPEG fields are stored in YUY2 format, so the size of thefields are 720x288x16/2 bits/field (2 fields/frame) = 207360 bytes/field x 2 =414720 bytes/frame (add some more bytes for headers and DHT (huffman)/DQT(quantization) tables, and you'll get to something like 512kB per frame for1:2 compression. For 1:4 compression, you'd have frames of half this size.Some additional explanation by Martin Samuelsson, which also explains theimportance of buffer sizes:--> Hmm, I do not think it is really that way. With the current (downloaded> at 18:00 Monday) driver I get that output sizes for 10 sec:> -q 50 -b 128 : 24.283.332 Bytes> -q 50 -b 256 : 48.442.368> -q 25 -b 128 : 24.655.992> -q 25 -b 256 : 25.859.820I woke up, and can't go to sleep again. I'll kill some time explaining whythis doesn't look strange to me.Let's do some math using a width of 704 pixels. I'm not sure whether the Buzactually use that number or not, but that's not too important right now.704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;1024 bits per block. 100% in the new driver mean 1:2 compression; the maximumoutput becomes 512 bits per block. Actually 510, but 512 is simpler to usefor calculations.Let's say that we specify d1q50. We thus want 256 bits per block; times 3168becomes 811008 bits; 101376 bytes per field. We're talking raw bits and byteshere, so we don't need to do any fancy corrections for bits-per-pixel or suchthings. 101376 bytes per field.d1 video contains two fields per frame. Those sum up to 202752 bytes perframe, and one of those frames goes into each buffer.But wait a second! -b128 gives 128kB buffers! It's not possible to cram202752 bytes of JPEG data into 128kB!This is what the driver notice and automatically compensate for in yourexamples. Let's do some math using this information:128kB is 131072 bytes. In this buffer, we want to store two fields, whichleaves 65536 bytes for each field. Using 3168 blocks per field, we get20.68686868... available bytes per block; 165 bits. We can't allow therequest for 256 bits per block when there's only 165 bits available! The -q50option is silently overridden, and the -b128 option takes precedence, leavingus with the equivalence of -q32.This gives us a data rate of 165 bits per block, which, times 3168, sums upto 65340 bytes per field, out of the allowed 65536. The current driver hasanother level of rate limiting; it won't accept -q values that fill more than6/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to bea safe bet. Personally, I think I would have lowered requested-bits-per-blockby one, or something like that.) We can't use 165 bits per block, but have tolower it again, to 6/8 of the available buffer space: We end up with 124 bitsper block, the equivalence of -q24. With 128kB buffers, you can't use greaterthan -q24 at -d1. (And PAL, and 704 pixels width...)The third example is limited to -q24 through the same process. The secondexample, using very similar calculations, is limited to -q48. The onlyexample that actually grab at the specified -q value is the last one, whichis clearly visible, looking at the file size.--Conclusion: the quality of the resulting movie depends on buffer size, quality,whether or not you use 'low_bitrate=1' as insmod option for the zr36060.cmodule to do 1:4 instead of 1:2 compression, etc.If you experience timeouts, lowering the quality/buffersize or using'low_bitrate=1 as insmod option for zr36060.o might actually help, as isproven by the Buz.===========================7. It hangs/crashes/fails/whatevers! Help!Make sure that the card has its own interrupts (see /proc/interrupts), checkthe output of dmesg at high verbosity (load zr36067.o with debug=2,load all other modules with debug=1). Check that your mainboard is favorable(see question 2) and if not, test the card in another computer. Also see thenotes given in question 3 and try lowering quality/buffersize/capturesizeif recording fails after a period of time.If all this doesn't help, give a clear description of the problem includingdetailed hardware information (memory+brand, mainboard+chipset+brand, whichMJPEG card, processor, other PCI cards that might be of interest), give thesystem PnP information (/proc/interrupts, /proc/dma, /proc/devices), and givethe kernel version, driver version, glibc version, gcc version and any otherinformation that might possibly be of interest. Also provide the dmesg outputat high verbosity. See 'Contacting' on how to contact the developers.===========================8. Maintainers/ContactingThe driver is currently maintained by Laurent Pinchart and Ronald Bultje(<laurent.pinchart@skynet.be> and <rbultje@ronald.bitfreak.net>). For bugreports or questions, please contact the mailinglist instead of the developersindividually. For user questions (i.e. bug reports or how-to questions), sendan email to <mjpeg-users@lists.sf.net>, for developers (i.e. if you want tohelp programming), send an email to <mjpeg-developer@lists.sf.net>. Seehttp://www.sf.net/projects/mjpeg/ for subscription information.For bug reports, be sure to include all the information as described inthe section 'It hangs/crashes/fails/whatevers! Help!'. Please make sureyou're using the latest version (http://mjpeg.sf.net/driver-zoran/).Previous maintainers/developers of this driver include Serguei Miridonov<mirsev@cicese.mx>, Wolfgang Scherr <scherr@net4you.net>, Dave Perks<dperks@ibm.net> and Rainer Johanni <Rainer@Johanni.de>.===========================9. LicenseThis driver is distributed under the terms of the General Public License. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.See http://www.gnu.org/ for more information.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -