This is a modified XIL example to which H.261 (video) compression was added. See source code notes for specific H.261 code changes. The SunVideo version of this demonstration program can be run under the SunVideo Binary Compatibility Mode without modification (the SunVideo version does not include H261). Note that the default shrink factor is 2 (-s 2) which results in CIF-sized image compression. To compress QCIF-sized images, use -s 4.
The following shows the command-line syntax for the xil_compress example:
hostname% xil_compress options -o filename
The following table describes command options and the default setting
Table 4-5 xil_compress Options
Legal Options |
Description and Values |
Default |
---|---|---|
-o %s |
Save bitstream in file |
NULL |
-C %s |
Compression type (CellB, JPEG, MPEG1, H261) |
CellB |
-s %d |
Shrink factor |
2 |
-I %d |
Select input channel |
1 |
-f %d |
Frames to capture |
100 |
-i %d |
Frames to skip between capture |
0 |
-D %s |
Name of device |
/dev/olk0 |
-B %d |
H261 bitrate, kbits/sec |
2000 |
-Q %d |
H261 max quantity |
10 |
-R %d |
H261 rate control (0=variable, 1=fixed) |
1 |
Legal Switches |
|
|
-E |
Exit on first error |
|
.
To compress a CIF CellB bitstream, type:
hostname% xil_compress -C CellB -o /tmp/t.clb
To compress a CIF JPEG bitstream, type:
hostname% xil_compress -C Jpeg -o /tmp/t.jpeg
To compress a CIF H261 bitstream, type:
hostname% xil_compress -C H261 -o /tmp/t.h261
To compress a QCIF H261 bitstream, type:
hostname% xil_compress -C H261 -s 4 -o /tmp/t.h261