home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / old-compression / CLintro.z / CLintro
Encoding:
Text File  |  1998-10-20  |  74.4 KB  |  1,123 lines

  1.  
  2.  
  3.  
  4. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CLintro, CompressionLibrary, compression, libcl, cl - A library for
  10.      working with compressed video and audio data
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>>
  14.      ----llllccccllll
  15.  
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The Compression Library provides an application programming interface for
  19.      processing video and audio data using a variety of compression
  20.      algorithms.
  21.  
  22.      Compression techniques are useful for extending the utility of system
  23.      resources such as memory, disk space, and network bandwidth.  Some
  24.      application areas include publishing (presentations, documentation,
  25.      training, archiving, and annotation), telecommunications (video/voice
  26.      mail, phone, and conferencing), animation previewing (2D/3D graphics
  27.      renderings), and movie editing.
  28.  
  29.      The Compression Library is used by several Silicon Graphics digital media
  30.      tools, including capture(1), movieplayer(1) and moviemaker(1).
  31.  
  32.  
  33. AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMMSSSS
  34.      The library focuses on accepted standards, as well as proprietary methods
  35.      that have additional benefits.  Some algorithms are enabled with the
  36.      installation of separate products (see the section on option products).
  37.  
  38.      The techniques currently supported are discussed below.  Note that each
  39.      algorithm implementation has a corresponding "scheme" identifier that
  40.      begins with the common library prefix, CL.  Algorithms are grouped into
  41.      two categories : video compression and audio compression.
  42.  
  43.  
  44.    VVVVIIIIDDDDEEEEOOOO CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSIIIIOOOONNNN
  45.  
  46.      MMMMPPPPEEEEGGGG----1111 VVVViiiiddddeeeeoooo (ISO 11172-2) is a video compression standard designed to
  47.      exploit temporal as well as spatial redundancies in order to achieve good
  48.      image quality at very high compression ratios; an MPEG-1 stream at 1.2
  49.      Mbit/second (low enough for single-speed CD-ROMs) gives quality
  50.      comparable to VHS video.  MPEG-1 is an asymmetrical technique, with
  51.      compression being much more computationally demanding than decompression.
  52.      Scheme is CL_MPEG1_VIDEO_SOFTWARE.
  53.  
  54.      JJJJPPPPEEEEGGGG (baseline) is a standard method for encoding individual images.
  55.      Very good compressed quality (almost indistinguishable from the original)
  56.      can be achieved at about 1.2 to 1.5 bits/pixel. Compression consists of
  57.      frequency transformation, quantization, and entropy coding; decompression
  58.      is the reverse.  Two versions of the JPEG algorithm are supported, an
  59.      all-software implementation (scheme is CL_JPEG_SOFTWARE) and a hardware-
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      assisted version (scheme is CL_JPEG_COSMO).
  75.  
  76.      MMMMVVVVCCCC1111 (Motion Video Compressor 1) is an SGI proprietary algorithm. It is
  77.      designed for efficient decompression of motion video.  Reasonable quality
  78.      can be achieved at about 4.5 bits/pixel.  Scheme is CL_MVC1_SOFTWARE.
  79.  
  80.      MMMMVVVVCCCC2222 (Motion Video Compressor 2) is similar to MVC1, but can compress to
  81.      about 2 bits/pixel with approximately the same quality.  Scheme is
  82.      CL_MVC2_SOFTWARE.
  83.  
  84.      MMMMVVVVCCCC3333 (Motion Video Compressor 3) is an SGI proprietary algorithm based on
  85.      fast transform coding.  Scheme is CL_MVC3_SOFTWARE.
  86.  
  87.      RRRRLLLLEEEE (Run Length Encoding) is a lossless algorithm for compressing 8-bit
  88.      RGB data.  Compression ratios are often 2:1 or less for many images, but
  89.      may be higher for graphics scenes.  Scheme is CL_RLE_SOFTWARE.
  90.  
  91.      RRRRLLLLEEEE22224444 is run length encoding applied to 24-bit RGB data.  Scheme is
  92.      CL_RLE24_SOFTWARE.
  93.  
  94.      An "uncompressed" video algorithm is also supported.  This allows
  95.      uncompressed data to be handled without alteration using the same library
  96.      interface that is used for compressing data, which may be convenient for
  97.      some applications.  Scheme is CL_UNCOMPRESSED_VIDEO.
  98.  
  99.      The performance of these techniques for one test sequence is shown below.
  100.      Results will vary with other data sequences and compression parameters,
  101.      and may change with newer implementations.
  102.  
  103.      TTTTaaaabbbblllleeee 1111:::: VVVViiiiddddeeeeoooo AAAAllllggggoooorrrriiiitttthhhhmmmmssss ---- PPPPeeeerrrrffffoooorrrrmmmmaaaannnncccceeee EEEExxxxaaaammmmpppplllleeee
  104.  
  105.                                              320 by 240 frames on Indy R4400
  106.                      Comp.     Average       bits/s          frames/second
  107.      Algorithm       Ratio     bits/pixel      at          compress
  108.                                              30 f/s                decompress
  109.      Uncompressed    1:1       24            55.30M        -       -
  110.      MPEG-1          48:1      0.5           1.16M         0.5     17.5
  111.      JPEG (software) 33:1      0.7           1.66M         3.1     7.2
  112.      MVC1            8:1       3.1           7.10M         11.7    83.9
  113.      MVC2            19:1      1.3           2.92M         10.0    89.7
  114.      MVC3            14:1      1.7           3.96M         9.3     17.6
  115.      RLE             6:1       3.9           8.90M         20.3    39.4
  116.      RLE24           6:1       4.2           9.76M         43.3    20.3
  117.  
  118.  
  119.  
  120.    AAAAUUUUDDDDIIIIOOOO CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSIIIIOOOONNNN
  121.  
  122.      MMMMPPPPEEEEGGGG----1111 AAAAuuuuddddiiiioooo (ISO 11172-3) is an audio compression standard based on
  123.      subband coding and perceptual bit allocation.  The core engine is
  124.      licensed from Aware, Inc.  Two interfaces are provided by the Compression
  125.      Library - one that accesses the Aware codec directly (scheme is
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.      CL_MPEG1_AUDIO_AWARE), and an SGI version that provides other features
  141.      (scheme is CL_MPEG1_AUDIO_SOFTWARE).
  142.  
  143.      AAAAwwwwaaaarrrreeee MMMMuuuullllttttiiiirrrraaaatttteeee is an Aware proprietary technique that provides lossless
  144.      to near-lossless quality.  Compression ratios are typically 2:1 to 5:1.
  145.      Scheme is CL_MULTIRATE_AWARE.
  146.  
  147.      GGGG777711111111 uuuu----llllaaaawwww is a simple 16-bit to 8-bit conversion that uses coarse
  148.      quantization at high volumes and fine quantization at low volumes.  It is
  149.      a standard encoding format in the U.S.  Scheme is CL_G711_ULAW_SOFTWARE.
  150.  
  151.      GGGG777711111111 AAAA----llllaaaawwww also performs 16-bit to 8-bit conversion, but with a slightly
  152.      different mapping.  It is a standard encoding format in Europe.  Scheme
  153.      is CL_G711_ALAW_SOFTWARE.
  154.  
  155.      An "uncompressed" audio algorithm is also supported.  Scheme is
  156.      CL_UNCOMPRESSED_AUDIO.
  157.  
  158.      The performance of these techniques for one test sequence is shown below.
  159.  
  160.      TTTTaaaabbbblllleeee 2222:::: AAAAuuuuddddiiiioooo AAAAllllggggoooorrrriiiitttthhhhmmmmssss ---- PPPPeeeerrrrffffoooorrrrmmmmaaaannnncccceeee EEEExxxxaaaammmmpppplllleeee
  161.  
  162.                                        2x16-bit (stereo) frames on Indy R4400
  163.                      Comp.    Average      bits/s        frames/second
  164.      Algorithm       Ratio    bits/samp      at        compress
  165.                                           44.1 KHz             decompress
  166.      Uncompressed    1:1      16.0        1.41M        -       -
  167.      MPEG-1          7:1      2.2         192K         54.6K   163.8K
  168.      Multirate       5:1      3.4         296K         179.2K  220.5K
  169.      u-law           2:1      8.0         706K         1.17M   2.21M
  170.      A-law           2:1      8.0         706K         1.79M   2.05M
  171.  
  172.  
  173.  
  174.  
  175.  
  176. DDDDAAAATTTTAAAA FFFFOOOORRRRMMMMAAAATTTTSSSS
  177.      The Compression Library recognizes the following video and audio formats.
  178.  
  179.  
  180.    VVVVIIIIDDDDEEEEOOOO FFFFOOOORRRRMMMMAAAATTTTSSSS
  181.  
  182.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____AAAABBBBGGGGRRRR means R, G, B, and A data are 8-bit components packed into
  183.      a 32-bit word as:
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  203.  
  204.  
  205.  
  206.               0xAABBGGRR
  207.                   where:
  208.                       AA  contains the alpha value.
  209.                       BB  contains the blue value.
  210.                       GG  contains the green value.
  211.                       RR  contains the red value.
  212.  
  213.  
  214.  
  215.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____XXXXBBBBGGGGRRRR means R, G, B, and X (don't care) data are packed into a
  216.      32-bit word as 0xXXBBGGRR.
  217.  
  218.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____BBBBGGGGRRRR means R, G, and B data are packed into a 24-bit word. Note
  219.      that with this format, the RGB triplets may cross 32-bit word boundaries.
  220.  
  221.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____BBBBGGGGRRRR333333332222 means R, G, and B data are packed into a byte as:
  222.  
  223.               rrrbbggg
  224.                   where:
  225.                       rrr  is three bits of red.
  226.                       bb   is two bits of blue.
  227.                       ggg  is three bits of green.
  228.  
  229.  
  230.  
  231.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____BBBBGGGGRRRR222233333333 means R, G, and B data are packed into a byte as:
  232.  
  233.               bbgggrrr
  234.                   where:
  235.                       bb   is two bits of blue.
  236.                       ggg  is three bits of green.
  237.                       rrr  is three bits of red.
  238.  
  239.  
  240.  
  241.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____GGGGRRRRAAAAYYYYSSSSCCCCAAAALLLLEEEE means four luminance bytes are packed into a 32-bit
  242.      word.
  243.  
  244.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____YYYYCCCCbbbbCCCCrrrr means 3 8-bit components, Y (Luminance), Cb (Luminance-
  245.      Blue), and Cr (Luminance-Red), are packed into 24 bits as:
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  269.  
  270.  
  271.  
  272.               0xCbYYCr
  273.                   where:
  274.                       Cb  contains the luma-blue value.
  275.                       YY  contains the luminance value.
  276.                       Cr  contains the luma-red value.
  277.  
  278.  
  279.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____YYYYCCCCbbbbCCCCrrrr444422222222 means that two luminance components are packed into a
  280.      32-bit word with one Cb-Cr pair (i.e., chroma components are sampled with
  281.      half of the horizontal rate of the luma). The order of the components is:
  282.  
  283.               0xCbY1CrY2
  284.                   where:
  285.                       Cb  contains the chroma-blue value.
  286.                       Y1  contains the first luminance value.
  287.                       Cr  contains the chroma-red value.
  288.                       Y2  contains the second luminance value.
  289.  
  290.  
  291.      This 32-bit word represents two pixels (Y1, Cb, Cr) and (Y2, Cb, Cr).
  292.  
  293.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____YYYYCCCCbbbbCCCCrrrr444422222222DDDDCCCC (duplicate chroma) means that the chroma are sub-
  294.      sampled by 2 vertically in addition to horizontally, and are packed the
  295.      same as CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____YYYYCCCCbbbbCCCCrrrr444422222222 except that Cb & Cr are duplicated on the odd
  296.      lines.
  297.  
  298.      The YCbCr formats use CCIR 601 style scaling and biasing of components.
  299.      This means that the nominal range of an eight bit Y component is
  300.      [16...235].
  301.  
  302.    AAAAUUUUDDDDIIIIOOOO FFFFOOOORRRRMMMMAAAATTTTSSSS
  303.  
  304.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____MMMMOOOONNNNOOOO means that the audio samples represent a single channel.
  305.  
  306.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT____SSSSTTTTEEEERRRREEEEOOOO____IIIINNNNTTTTEEEERRRRLLLLEEEEAAAAVVVVEEEEDDDD means that the audio samples alternately
  307.      represent left and right channels.
  308.  
  309.  
  310. PPPPRRRROOOOGGGGRRRRAAAAMMMMMMMMIIIINNNNGGGG IIIINNNNTTTTEEEERRRRFFFFAAAACCCCEEEE
  311.      The operations supported by the Compression Library are compression and
  312.      decompression.  The application programming interface is described in
  313.      several parts : processing data, managing implicit buffers, managing
  314.      parameters, adding algorithms and parameters, and other features.  This
  315.      description provides an overview of the API calls.  Further details on
  316.      each call are available from the corresponding man page.
  317.  
  318.  
  319.    AAAAPPPPIIII FFFFOOOORRRR PPPPRRRROOOOCCCCEEEESSSSSSSSIIIINNNNGGGG DDDDAAAATTTTAAAA
  320.  
  321.      iiiinnnntttt ccccllllOOOOppppeeeennnnCCCCoooommmmpppprrrreeeessssssssoooorrrr((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, CCCCLLLLhhhhaaaannnnddddlllleeee ****ccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll))))
  322.      iiiinnnntttt ccccllllCCCCoooommmmpppprrrreeeessssssss((((CCCCLLLLhhhhaaaannnnddddlllleeee ccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll,,,, iiiinnnntttt nnnnuuuummmmbbbbeeeerrrrOOOOffffFFFFrrrraaaammmmeeeessss,,,,
  323.          vvvvooooiiiidddd ****ffffrrrraaaammmmeeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrrSSSSiiiizzzzeeee,,,, vvvvooooiiiidddd ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrr))))
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  335.  
  336.  
  337.  
  338.      iiiinnnntttt ccccllllCCCClllloooosssseeeeCCCCoooommmmpppprrrreeeessssssssoooorrrr((((CCCCLLLLhhhhaaaannnnddddlllleeee ccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll))))
  339.  
  340.      iiiinnnntttt ccccllllOOOOppppeeeennnnDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, CCCCLLLLhhhhaaaannnnddddlllleeee ****ddddeeeeccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll))))
  341.      iiiinnnntttt ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssss((((CCCCLLLLhhhhaaaannnnddddlllleeee ddddeeeeccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll,,,, iiiinnnntttt nnnnuuuummmmbbbbeeeerrrrOOOOffffFFFFrrrraaaammmmeeeessss,,,,
  342.          iiiinnnntttt ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrrSSSSiiiizzzzeeee,,,, vvvvooooiiiidddd ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrr,,,, vvvvooooiiiidddd ****ffffrrrraaaammmmeeeeBBBBuuuuffffffffeeeerrrr))))
  343.      iiiinnnntttt ccccllllCCCClllloooosssseeeeDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr((((CCCCLLLLhhhhaaaannnnddddlllleeee ddddeeeeccccoooommmmpppprrrreeeessssssssoooorrrrHHHHddddllll))))
  344.  
  345.  
  346.  
  347.      Each processing operation (compress, decompress) has a corresponding
  348.      object, or CLhandle, which is used to maintain state across processing
  349.      calls.  First, the object is created with an "Open" call.  Then,
  350.      processing is performed with one or more "Execute" calls.  Finally, when
  351.      no more data needs to be processed the object is destroyed with a "Close"
  352.      call.
  353.  
  354.      The example below illustrates how to compress a series of 320 by 240 XBGR
  355.      images using MVC1:
  356.  
  357.      EEEExxxxaaaammmmpppplllleeee ((((ccccoooommmmpppprrrreeeessssssssiiiioooonnnn))))
  358.  
  359.      | CLhandle compressorHdl;
  360.      | int frameBuffer[320][240];
  361.      | int compressedBufferSize;
  362.      | void *compressedBuffer;
  363.      | int k, numberOfFrames;
  364.      |
  365.      | /* Create and configure the object */
  366.      | clOpenCompressor(CL_MVC1_SOFTWARE, &compressorHdl);
  367.      | clSetParam(compressorHdl, CL_IMAGE_WIDTH, 320);
  368.      | clSetParam(compressorHdl, CL_IMAGE_HEIGHT, 240);
  369.      | clSetParam(compressorHdl, CL_FORMAT, CL_FORMAT_XBGR);
  370.      |
  371.      | /* Allocate space for compressed buffer */
  372.      | compressedBufferSize = clGetParam(compressorHdl,
  373.      |                                   CL_COMPRESSED_BUFFER_SIZE);
  374.      | compressedBuffer = malloc(compressedBufferSize);
  375.      |
  376.      | /* Compress and write out each frame */
  377.      | for (k = 0; k < numberOfFrames; k++) {
  378.      |   GetVideo(k, frameBuffer);
  379.      |   clCompress(compressorHdl, 1, frameBuffer,
  380.      |              &compressedBufferSize, compressedBuffer);
  381.      |   write(fd, compressedBuffer, compressedBufferSize);
  382.      | }
  383.      |
  384.      | /* Destroy the object */
  385.      | clCloseCompressor(compressorHdl);
  386.  
  387.      GetVideo reads frame k from the video source.  clSetParam and clGetParam,
  388.      used here to configure and query the compressor, are discussed in a later
  389.      section (API for Managing Parameters).
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  401.  
  402.  
  403.  
  404.      BBBBuuuuffffffffeeeerrrriiiinnnngggg MMMMooooddddeeeellllssss
  405.  
  406.      Compressors operate on an input "frame" buffer and an output "compressed"
  407.      buffer; decompressors reverse this direction. These buffers are specified
  408.      to the processing calls using one of two buffering models.
  409.  
  410.      1. DDDDiiiirrrreeeecccctttt   - buffer is given as argument to processing call
  411.  
  412.         o For clCompress and clDecompress, frameBuffer/compressedBuffer
  413.           is set to some application-allocated memory (or set to
  414.           CL_EXTERNAL_DEVICE, currently supported by CL_JPEG_COSMO).
  415.  
  416.      2. IIIImmmmpppplllliiiicccciiiitttt - buffer is set up prior to processing call
  417.  
  418.         o For clCompress and clDecompress, frameBuffer/compressedBuffer is
  419.           set to NULL.
  420.  
  421.      The previous example uses the Direct model, which is the simpler of the
  422.      two.  The Implicit model is more complicated (requiring several
  423.      additional calls such as ccccllllCCCCrrrreeeeaaaatttteeeeBBBBuuuuffff and ccccllllDDDDeeeessssttttrrrrooooyyyyBBBBuuuuffff), but provides
  424.      several benefits described in the next section.  Note that it is possible
  425.      to mix the two models in one call (e.g. clCompress may be called with
  426.      frameBuffer=CL_EXTERNAL_DEVICE and compressedBuffer=NULL).
  427.  
  428.  
  429.    AAAAPPPPIIII FFFFOOOORRRR MMMMAAAANNNNAAAAGGGGIIIINNNNGGGG IIIIMMMMPPPPLLLLIIIICCCCIIIITTTT BBBBUUUUFFFFFFFFEEEERRRRSSSS
  430.  
  431.      CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll ccccllllCCCCrrrreeeeaaaatttteeeeBBBBuuuuffff((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrTTTTyyyyppppeeee,,,,
  432.          iiiinnnntttt bbbblllloooocccckkkkssss,,,, iiiinnnntttt bbbblllloooocccckkkkSSSSiiiizzzzeeee,,,, vvvvooooiiiidddd ********bbbbuuuuffffffffeeeerrrr))))
  433.      iiiinnnntttt ccccllllDDDDeeeessssttttrrrrooooyyyyBBBBuuuuffff((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll))))
  434.      CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll ccccllllQQQQuuuueeeerrrryyyyBBBBuuuuffffffffeeeerrrrHHHHddddllll((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  435.          iiiinnnntttt bbbbuuuuffffffffeeeerrrrTTTTyyyyppppeeee,,,, vvvvooooiiiidddd ********bbbbuuuuffffffffeeeerrrr))))
  436.      CCCCLLLLhhhhaaaannnnddddlllleeee ccccllllQQQQuuuueeeerrrryyyyHHHHaaaannnnddddlllleeee((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll))))
  437.  
  438.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyFFFFrrrreeeeeeee((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll,,,, iiiinnnntttt ffffrrrreeeeeeeeAAAAmmmmoooouuuunnnntttt,,,,
  439.          vvvvooooiiiidddd ********ffffrrrreeeeeeeeDDDDaaaattttaaaa,,,, iiiinnnntttt ****ffffrrrreeeeeeeeWWWWrrrraaaapppp))))
  440.      iiiinnnntttt ccccllllUUUUppppddddaaaatttteeeeHHHHeeeeaaaadddd((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll,,,, iiiinnnntttt aaaammmmoooouuuunnnnttttTTTTooooAAAAdddddddd))))
  441.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyVVVVaaaalllliiiidddd((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll,,,, iiiinnnntttt vvvvaaaalllliiiiddddAAAAmmmmoooouuuunnnntttt,,,,
  442.          vvvvooooiiiidddd ********vvvvaaaalllliiiiddddDDDDaaaattttaaaa,,,, iiiinnnntttt ****vvvvaaaalllliiiiddddWWWWrrrraaaapppp))))
  443.      iiiinnnntttt ccccllllUUUUppppddddaaaatttteeeeTTTTaaaaiiiillll((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll,,,, iiiinnnntttt aaaammmmoooouuuunnnnttttTTTTooooRRRReeeelllleeeeaaaasssseeee))))
  444.      iiiinnnntttt ccccllllDDDDoooonnnneeeeUUUUppppddddaaaattttiiiinnnnggggHHHHeeeeaaaadddd((((CCCCLLLLbbbbuuuuffffffffeeeerrrrHHHHddddllll bbbbuuuuffffffffeeeerrrrHHHHddddllll))))
  445.  
  446.  
  447.      Implicit buffers are ring buffers created and managed separately from the
  448.      processing calls.  A ring buffer contains a number of blocks of arbitrary
  449.      size and maintains a pointer to the buffer space, the capacity, and
  450.      pointers to the head of (newest) and tail of (oldest) valid data.
  451.  
  452.      The Implicit buffering model facilitates decompression of streaming data
  453.      by freeing the application from having to know about data boundaries, and
  454.      conveniently supports multiple input or output buffers necessary for
  455.      multiplexed data.  Separating buffer management calls from data
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  467.  
  468.  
  469.  
  470.      processing calls also allows an application to be implemented with
  471.      multiple threads for input, processing, and output.  The ring buffers
  472.      support synchronization with a blocking access mode.
  473.  
  474.      The buffer management calls allow applications to create, access, and
  475.      destroy ring buffers.  Compressors and decompressors have buffers of type
  476.      CCCCLLLL____BBBBUUUUFFFF____FFFFRRRRAAAAMMMMEEEE and CCCCLLLL____BBBBUUUUFFFF____CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSEEEEDDDD.
  477.  
  478.      ccccllllCCCCrrrreeeeaaaatttteeeeBBBBuuuuffff and ccccllllDDDDeeeessssttttrrrrooooyyyyBBBBuuuuffff create and destroy a ring buffer,
  479.      respectively.  The actual buffer memory may be allocated by the
  480.      application by passing in a non-NULL buffer to the creation function; if
  481.      buffer is NULL, the library will allocate the memory.  ccccllllQQQQuuuueeeerrrryyyyBBBBuuuuffffffffeeeerrrrHHHHddddllll
  482.      returns the ring buffer of specified type given a processing object;
  483.      ccccllllQQQQuuuueeeerrrryyyyHHHHaaaannnnddddlllleeee returns the processing object given a ring buffer.
  484.  
  485.      A ring buffer producer calls ccccllllQQQQuuuueeeerrrryyyyFFFFrrrreeeeeeee and ccccllllUUUUppppddddaaaatttteeeeHHHHeeeeaaaadddd to add data to
  486.      the buffer.  clQueryFree gives the size and location of free space in a
  487.      buffer.  If the requested amount is positive, the calling process will
  488.      block until that amount is available.  If the requested amount is zero,
  489.      then the query will return immediately.  clUpdateHead advances the ring
  490.      buffer head pointer to indicate newly written data.  A ring buffer
  491.      consumer calls ccccllllQQQQuuuueeeerrrryyyyVVVVaaaalllliiiidddd and ccccllllUUUUppppddddaaaatttteeeeTTTTaaaaiiiillll, which are complementary
  492.      calls for querying valid data and reading from the tail of the buffer.
  493.      The producer should call ccccllllDDDDoooonnnneeeeUUUUppppddddaaaattttiiiinnnnggggHHHHeeeeaaaadddd when no more data is to be
  494.      written.  This allows clQueryValid to return to the consumer instead of
  495.      blocking for data that will never arrive.
  496.  
  497.      The following code segments illustrate how to use implicit buffers.
  498.  
  499.      EEEExxxxaaaammmmpppplllleeee ((((iiiimmmmpppplllliiiicccciiiitttt bbbbuuuuffffffffeeeerrrriiiinnnngggg mmmmooooddddeeeellll ---- rrrreeeeccccoooorrrrdddd))))
  500.  
  501.      | /* Create the frame (input) and compressed (output) buffers */
  502.      | frameBufferHdl = clCreateBuf(compressorHdl, CL_BUF_FRAME,
  503.      |                              numberOfFrames, bytesPerFrame, NULL);
  504.      | compressedBufferHdl = clCreateBuf(compressorHdl, CL_BUF_COMPRESSED,
  505.      |                                   compressedBufferSize, 1, NULL);
  506.      |
  507.      | /* Write a frame from screen to buffer */
  508.      | clQueryFree(frameBufferHdl, 1, &frameBuffer, &wrap);
  509.      | lrectread(0, 0, width - 1, height - 1, frameBuffer);
  510.      | clUpdateHead(frameBufferHdl, 1);
  511.      |
  512.      | /* Compress the frame */
  513.      | clCompress(compressorHdl, 1, NULL, &compressedBufferSize, NULL);
  514.      |
  515.      | /* Copy compressed bytes to file */
  516.      | while ((size=clQueryValid(compressedBufferHdl, 0, &buf, &wrap)) > 0) {
  517.      |   write(fd, buf, size);
  518.      |   clUpdateTail(compressedBufferHdl, size);
  519.      | }
  520.  
  521.      EEEExxxxaaaammmmpppplllleeee ((((iiiimmmmpppplllliiiicccciiiitttt bbbbuuuuffffffffeeeerrrriiiinnnngggg mmmmooooddddeeeellll ---- ppppllllaaaayyyybbbbaaaacccckkkk))))
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  533.  
  534.  
  535.  
  536.      | /* Fill the compressed buffer */
  537.      | while ((size=clQueryFree(compressedBufferHdl, 0, &buf, &wrap)) > 0) {
  538.      |   read(fd, buf, size);
  539.      |   clUpdateHead(compressedBufferHdl, size);
  540.      | }
  541.      |
  542.      | /* Decompress a frame */
  543.      | clDecompress(decompressorHdl, 1, 0, NULL, NULL);
  544.      |
  545.      | /* Read and display the frame */
  546.      | clQueryValid(frameBufferHdl, 1, &frameBuffer, &wrap);
  547.      | lrectwrite(0, 0, width-1, height-1, frameBuffer);
  548.      | clUpdateTail(frameBufferHdl, 1);
  549.  
  550.      EEEExxxxaaaammmmpppplllleeee ((((iiiimmmmpppplllliiiicccciiiitttt bbbbuuuuffffffffeeeerrrriiiinnnngggg mmmmooooddddeeeellll ---- mmmmuuuullllttttiiiipppprrrroooocccceeeessssssss rrrreeeeccccoooorrrrdddd))))
  551.  
  552.      | ProduceFrameProcess() :
  553.      | while (1) {
  554.      |   clQueryFree(frameBufferHdl, 1, &frameBuffer, &wrap);
  555.      |   lrectread(0, 0, width - 1, height - 1, frameBuffer);
  556.      |   clUpdateHead(frameBufferHdl, 1);
  557.      | }
  558.      |
  559.      | CompressProcess() :
  560.      | while (1)
  561.      |   clCompress(compressorHdl, 1, NULL, &compressedBufferSize, NULL);
  562.      |
  563.      | ConsumeCompressedDataProcess() :
  564.      | while (1) {
  565.      |   size = clQueryValid(compressedBufferHdl, 0, &buf, &wrap);
  566.      |   write(fd, buf, size);
  567.      |   clUpdateTail(compressedBufferHdl, size);
  568.      | }
  569.  
  570.      EEEExxxxaaaammmmpppplllleeee ((((iiiimmmmpppplllliiiicccciiiitttt bbbbuuuuffffffffeeeerrrriiiinnnngggg mmmmooooddddeeeellll ---- mmmmuuuullllttttiiiipppprrrroooocccceeeessssssss ppppllllaaaayyyybbbbaaaacccckkkk))))
  571.  
  572.      | ProduceCompressedDataProcess() :
  573.      | while (1) {
  574.      |   size = clQueryFree(compressedBufferHdl, 0, &buf, &wrap);
  575.      |   read(fd, buf, size);
  576.      |   clUpdateHead(compressedBufferHdl, size);
  577.      | }
  578.      |
  579.      | DecompressProcess() :
  580.      | while (1)
  581.      |   clDecompress(decompressorHdl, 1, 0, NULL, NULL);
  582.      |
  583.      | ConsumeFrameProcess() :
  584.      | while (1) {
  585.      |   clQueryValid(frameBufferHdl, 1, &frameBuffer, &wrap);
  586.      |   lrectwrite(0, 0, width - 1, height - 1, frameBuffer);
  587.      |   clUpdateTail(frameBufferHdl, 1);
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  599.  
  600.  
  601.  
  602.      | }
  603.  
  604.  
  605.  
  606.    AAAAPPPPIIII FFFFOOOORRRR MMMMAAAANNNNAAAAGGGGIIIINNNNGGGG PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  607.  
  608.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  609.          iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  610.      iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmIIIIDDDD((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, cccchhhhaaaarrrr ****ppppaaaarrrraaaammmmNNNNaaaammmmeeee))))
  611.  
  612.      iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  613.          iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  614.      iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  615.          iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  616.      iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
  617.      iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt vvvvaaaalllluuuueeee))))
  618.  
  619.      iiiinnnntttt ccccllllGGGGeeeettttDDDDeeeeffffaaaauuuulllltttt((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
  620.      iiiinnnntttt ccccllllGGGGeeeettttMMMMiiiinnnnMMMMaaaaxxxx((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt ****mmmmiiiinnnn,,,, iiiinnnntttt ****mmmmaaaaxxxx))))
  621.      cccchhhhaaaarrrr ****ccccllllGGGGeeeettttNNNNaaaammmmeeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
  622.  
  623.  
  624.      Operations in the Compression Library are guided and monitored through
  625.      the use of various parameters.  Each compressor or decompressor object
  626.      has a list of parameters that is accessible through querying, setting,
  627.      and getting.  Each parameter has an identifier (paramID) and a text name
  628.      (paramName).
  629.  
  630.      ccccllllQQQQuuuueeeerrrryyyyPPPPaaaarrrraaaammmmssss is used to determine what parameters are defined for an
  631.      object.  ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmIIIIDDDD returns the parameter identifier used in other
  632.      calls.  ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss, ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss, ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm, and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm are used to
  633.      read and write groups of parameters or individual parameters.
  634.      ccccllllGGGGeeeettttDDDDeeeeffffaaaauuuulllltttt, ccccllllGGGGeeeettttMMMMiiiinnnnMMMMaaaaxxxx, and ccccllllGGGGeeeettttNNNNaaaammmmeeee are used to determine defaults,
  635.      ranges, and text names.
  636.  
  637.      Each parameter is classified as one of the following types.  Individual
  638.      algorithms may impose further restrictions on parameter values in
  639.      addition to those implied by the parameter type.
  640.  
  641.         CCCCLLLL____EEEENNNNUUUUMMMM____VVVVAAAALLLLUUUUEEEE           only certain constant values are valid
  642.         CCCCLLLL____RRRRAAAANNNNGGGGEEEE____VVVVAAAALLLLUUUUEEEE          any value in a given range is valid
  643.         CCCCLLLL____FFFFLLLLOOOOAAAATTTTIIIINNNNGGGG____EEEENNNNUUUUMMMM____VVVVAAAALLLLUUUUEEEE  only certain constant floating point values
  644.                                 are valid
  645.         CCCCLLLL____FFFFLLLLOOOOAAAATTTTIIIINNNNGGGG____RRRRAAAANNNNGGGGEEEE____VVVVAAAALLLLUUUUEEEE any value in a given floating point range
  646.                                 is valid
  647.  
  648.      Below is the list of basic parameters common to all processing objects,
  649.      identified by paramID.  Note that not all parameters are useful for all
  650.      schemes (e.g. image dimensions are ignored by audio compressors).  Also,
  651.      some parameters are designated read-only, indicating that they should not
  652.      be set.
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  665.  
  666.  
  667.  
  668.      CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____WWWWIIIIDDDDTTTTHHHH,,,, CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____HHHHEEEEIIIIGGGGHHHHTTTT
  669.           Type: CL_RANGE_VALUE
  670.           Horizontal and vertical dimensions of uncompressed image.  For
  671.           compressors, these should be set to match the input dimensions.
  672.           For most decompressors, this is a read-only parameter.  For
  673.           decompressors that support scaling (CL_JPEG_COSMO), this may be
  674.           set to configure the output dimensions.
  675.  
  676.      CCCCLLLL____IIIINNNNTTTTEEEERRRRNNNNAAAALLLL____IIIIMMMMAAAAGGGGEEEE____WWWWIIIIDDDDTTTTHHHH,,,, CCCCLLLL____IIIINNNNTTTTEEEERRRRNNNNAAAALLLL____IIIIMMMMAAAAGGGGEEEE____HHHHEEEEIIIIGGGGHHHHTTTT
  677.           Type: CL_RANGE_VALUE
  678.           Horizontal and vertical dimensions of the encoded image.
  679.           For most compressors, these default to CL_IMAGE_WIDTH and
  680.           CL_IMAGE_HEIGHT.  For compressors that support scaling
  681.           (CL_MPEG1_VIDEO_SOFTWARE, CL_JPEG_COSMO), setting different
  682.           values causes the input image to be scaled to the internal
  683.           dimensions prior to compression.  For decompressors, these
  684.           parameters are read-only.
  685.  
  686.      CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____CCCCRRRROOOOPPPP____LLLLEEEEFFFFTTTT,,,, CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____CCCCRRRROOOOPPPP____RRRRIIIIGGGGHHHHTTTT,,,,
  687.      CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____CCCCRRRROOOOPPPP____TTTTOOOOPPPP,,,, CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____CCCCRRRROOOOPPPP____BBBBOOOOTTTTTTTTOOOOMMMM
  688.           Type: CL_RANGE_VALUE
  689.           Cropping parameters.  For compressors that support cropping
  690.           (CL_MPEG1_VIDEO_SOFTWARE), these may be set to indicate how many
  691.           pixels should be cropped from the left, right, top, and bottom
  692.           borders of the input image.  If combined with scaling, the order
  693.           of operations is input->crop->scale->compress.
  694.  
  695.      CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT
  696.           Type: CL_RANGE_VALUE
  697.           Format of the uncompressed data (e.g. CL_FORMAT_YCbCr or
  698.           CL_FORMAT_MONO).  For compressors, this should be set to match
  699.           the input format.  For video decompressors, this may be set to
  700.           indicate the desired output format.  For audio decompressors, this
  701.           is a read-only parameter.  Currently, the format is restricted to
  702.           CL_FORMAT_XBGR for CL_JPEG_COSMO and CL_MVC2_SOFTWARE.
  703.  
  704.      CCCCLLLL____IIIINNNNTTTTEEEERRRRNNNNAAAALLLL____FFFFOOOORRRRMMMMAAAATTTT
  705.           Type: CL_RANGE_VALUE
  706.           Internal format used by video schemes.  If this is different from
  707.           CL_FORMAT, color space conversion is performed from CL_FORMAT to
  708.           CL_INTERNAL_FORMAT on compression, and vice versa for decompression.
  709.           For compressors, the following internal formats may be set.
  710.  
  711.           Scheme                  Internal Formats
  712.           ------                  ----------------
  713.           CL_MPEG1_VIDEO_SOFTWARE CL_FORMAT_YCbCr422DC
  714.           CL_JPEG_SOFTWARE        CL_FORMAT_YCbCr, CL_FORMAT_YCbCr422,
  715.                                   CL_FORMAT_GRAYSCALE
  716.           CL_JPEG_COSMO           CL_FORMAT_YCbCr422
  717.           CL_MVC1_SOFTWARE        CL_FORMAT_XBGR, CL_FORMAT_GRAYSCALE
  718.           CL_MVC2_SOFTWARE        CL_FORMAT_XBGR
  719.           CL_MVC3_SOFTWARE        CL_FORMAT_YCbCr, CL_FORMAT_YCbCr422,
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  731.  
  732.  
  733.  
  734.                                   CL_FORMAT_YCbCr422DC, CL_FORMAT_GRAYSCALE
  735.           CL_RLE_SOFTWARE         CL_FORMAT_BGR332
  736.           CL_RLE24_SOFTWARE       CL_FORMAT_XBGR
  737.  
  738.           For decompressors, this is a read-only parameter.
  739.  
  740.      CCCCLLLL____CCCCOOOOMMMMPPPPOOOONNNNEEEENNNNTTTTSSSS
  741.           Type: CL_RANGE_VALUE
  742.           The number of components in the format, e.g. 1 for CL_FORMAT_MONO,
  743.           2 for CL_FORMAT_STEREO_INTERLEAVED, 4 for CL_FORMAT_ABGR.  This is
  744.           a read-only parameter determined from CL_FORMAT.
  745.  
  746.      CCCCLLLL____BBBBIIIITTTTSSSS____PPPPEEEERRRR____CCCCOOOOMMMMPPPPOOOONNNNEEEENNNNTTTT
  747.           Type: CL_RANGE_VALUE
  748.           For audio compressors, this may be set to indicate the input sample
  749.           width (8 or 16 bits); G711 u-law and A-law accept only 16 bit inputs.
  750.           For audio decompressors, this is a read-only parameter which gives
  751.           the output sample width.
  752.  
  753.      CCCCLLLL____FFFFRRRRAAAAMMMMEEEE____RRRRAAAATTTTEEEE
  754.           Type: CL_FLOATING_RANGE_VALUE
  755.           The frames per second of video or audio.  For compressors that use
  756.           this information (MPEG-1 Video and Audio), this should be set to
  757.           match the frame rate of the input.  For decompressors, this is a
  758.           read-only parameter.
  759.  
  760.      CCCCLLLL____OOOORRRRIIIIEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  761.           Type: CL_ENUM_VALUE
  762.           Image orientation, either CL_TOP_DOWN or CL_BOTTOM_UP.  For video
  763.           compressors, this should be set to match the input images.  For
  764.           video decompressors, this may be set to indicate the desired
  765.           output orientation.  CL_JPEG_COSMO supports only CL_TOP_DOWN.
  766.  
  767.      CCCCLLLL____PPPPIIIIXXXXEEEELLLL____AAAASSSSPPPPEEEECCCCTTTT
  768.           Type: CL_FLOATING_RANGE_VALUE
  769.           Pixel aspect ratio, defined as the vertical extent of a pixel divided
  770.           by its horizontal extent.  For video compressors, this should be set
  771.           to indicate the aspect ratio of the input pixels.  For video
  772.           decompressors, this is a read-only parameter.
  773.  
  774.      CCCCLLLL____CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSIIIIOOOONNNN____RRRRAAAATTTTIIIIOOOO
  775.           Type: CL_FLOATING_RANGE_VALUE
  776.           The target compression ratio, including effects of cropping and
  777.           scaling.  For compressors, this parameter may be set to indicate
  778.           the degree of compression desired.
  779.  
  780.      CCCCLLLL____EEEEXXXXAAAACCCCTTTT____CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSIIIIOOOONNNN____RRRRAAAATTTTIIIIOOOO
  781.           Type: CL_RANGE_VALUE
  782.           A read-only flag which indicates whether a compressor is able to
  783.           achieve compression ratio targets.  If this flag is TRUE, the average
  784.           compression ratio over many frames should be very close to the
  785.           value of CL_COMPRESSION_RATIO.  If this flag is FALSE, then setting
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  797.  
  798.  
  799.  
  800.           the target ratio may have little effect on the actual ratio achieved.
  801.  
  802.      CCCCLLLL____BBBBIIIITTTTRRRRAAAATTTTEEEE
  803.           Type : CL_RANGE_VALUE
  804.           The rate of the sequence in bits per second.  This may be set on
  805.           compression to select a target bitrate.  On decompression, this
  806.           is a read-only parameter.  Currently supported by
  807.           CL_MPEG1_VIDEO_SOFTWARE, CL_MPEG1_AUDIO_SOFTWARE, and (Cosmo) JPEG.
  808.  
  809.      CCCCLLLL____FFFFRRRRAAAAMMMMEEEESSSS____PPPPEEEERRRR____CCCCHHHHUUUUNNNNKKKK
  810.           Type: CL_RANGE_VALUE
  811.           A read-only parameter which gives the number of frames in a "chunk".
  812.           clCompress and clDecompress should be called with numberOfFrames
  813.           equal to an integer multiple of CL_FRAMES_PER_CHUNK.  For most
  814.           schemes, CL_FRAMES_PER_CHUNK is 1, so this is not a significant
  815.           restriction.  For MPEG-1 Audio, this parameter is either 384 or
  816.           1152.
  817.  
  818.      CCCCLLLL____FFFFRRRRAAAAMMMMEEEE____SSSSIIIIZZZZEEEE
  819.           Type: CL_RANGE_VALUE
  820.           A read-only parameter which equals the number of bytes in one
  821.           frame of uncompressed data.  This value is calculated based on
  822.           CL_FORMAT, CL_IMAGE_WIDTH, CL_IMAGE_HEIGHT, CL_COMPONENTS and
  823.           CL_BITS_PER_COMPONENT.  A frame is defined as the data corresponding
  824.           to a single time instant.  One video frame consists of width*height
  825.           pixels.  One audio frame consists of 1 mono sample or 2 stereo
  826.           samples.
  827.  
  828.      CCCCLLLL____CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSEEEEDDDD____BBBBUUUUFFFFFFFFEEEERRRR____SSSSIIIIZZZZEEEE
  829.           Type: CL_RANGE_VALUE
  830.           A read-only parameter which gives the maximum number of bytes
  831.           generated by compressing CL_FRAMES_PER_CHUNK frames.  The value
  832.           may depend on other parameters such as CL_IMAGE_WIDTH and
  833.           CL_IMAGE_HEIGHT.  This parameter should be used to allocate enough
  834.           space for a compressor's output buffer and a decompressor's input
  835.           buffer so that clCompress and clDecompress do not block.
  836.  
  837.      CCCCLLLL____FFFFRRRRAAAAMMMMEEEE____TTTTYYYYPPPPEEEE
  838.           Type: CL_RANGE_VALUE
  839.           A read-only parameter for decompressors which indicates the
  840.           type of frame most recently decoded.  May be CL_INTRA (same
  841.           as CL_KEYFRAME), CL_PREDICTED, CL_BIDIRECTIONAL, or CL_NONE.
  842.  
  843.      CCCCLLLL____FFFFRRRRAAAAMMMMEEEE____IIIINNNNDDDDEEEEXXXX
  844.           Type: CL_RANGE_VALUE
  845.           A read-only parameter for decompressors which indicates the
  846.           index of the frame most recently decoded.
  847.  
  848.      CCCCLLLL____NNNNUUUUMMMMBBBBEEEERRRR____OOOOFFFF____FFFFRRRRAAAAMMMMEEEESSSS
  849.           Type: CL_RANGE_VALUE
  850.           The number of frames in the video or audio sequence.  For
  851.           compressors, this should be set (if known) since some schemes
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  863.  
  864.  
  865.  
  866.           include this data in the header.  For decompressors, this parameter
  867.           is read-only and is available after calling clReadHeader; the value
  868.           may be zero if the number of frames is not listed in the header.
  869.  
  870.      CCCCLLLL____SSSSPPPPEEEEEEEEDDDD
  871.           Type: CL_FLOATING_RANGE_VALUE
  872.           The relative speed of playback.  For decompressors that support
  873.           variable rate decoding, this parameter may be set to adjust playback
  874.           speed.  Ranges are scheme-specific but, in general, 1.0 is the
  875.           default and higher values correspond to faster decoding (at the
  876.           expense of some quality loss).
  877.  
  878.      CCCCLLLL____PPPPRRRREEEERRRROOOOLLLLLLLL
  879.           Type: CL_RANGE_VALUE
  880.           A read-only parameter which gives the number of chunks of frames
  881.           that must be decompressed before valid frames are returned.
  882.           Currently not used.
  883.  
  884.      CCCCLLLL____EEEENNNNAAAABBBBLLLLEEEE____IIIIMMMMAAAAGGGGEEEEIIIINNNNFFFFOOOO
  885.           Type: CL_RANGE_VALUE
  886.           This parameter is used to enable the clGetNextImageInfo call
  887.           for video compressors or decompressors.  To enable the call,
  888.           CL_ENABLE_IMAGEINFO should be set to TRUE before invoking
  889.           clCompress or clDecompress.  This is currently supported for
  890.           CL_JPEG_COSMO.
  891.  
  892.      CCCCLLLL____AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMM____IIIIDDDD
  893.           Type: CL_RANGE_VALUE
  894.           The algorithm identifier (e.g. CL_MPEG1_VIDEO_SOFTWARE).  This is
  895.           a read-only parameter for all processing objects.
  896.  
  897.      CCCCLLLL____AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMM____VVVVEEEERRRRSSSSIIIIOOOONNNN
  898.           Type: CL_RANGE_VALUE
  899.           The algorithm version number.  This is a read-only parameter for
  900.           all processing objects.
  901.  
  902.      Note that some parameters, such as CL_COMPRESSED_BUFFER_SIZE, depend on
  903.      other parameters and should not be read until other parameters are set.
  904.      For decompressors, parameters are generally valid after clReadHeader is
  905.      called.
  906.  
  907.      Some algorithms and products have additional parameters which extend this
  908.      basic set.  See cl_mpeg1(3dm), cl_jpeg(3dm), cl_mvc2(3dm), and
  909.      cl_mvc3(3dm) for algorithm-specific parameters. See cl_cosmo(3dm) and
  910.      cl_aware(3dm) for product-specific parameters.
  911.  
  912.  
  913.    AAAAPPPPIIII FFFFOOOORRRR AAAADDDDDDDDIIIINNNNGGGG AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMMSSSS AAAANNNNDDDD PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  914.  
  915.      iiiinnnntttt ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt aaaallllggggTTTTyyyyppppeeee,,,, iiiinnnntttt mmmmaaaaxxxxHHHHeeeeaaaaddddeeeerrrrSSSSiiiizzzzeeee,,,,
  916.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ooooppppeeeennnnCCCCoooommmmpppprrrreeeessssssssoooorrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ccccoooommmmpppprrrreeeessssssss,,,,
  917.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr cccclllloooosssseeeeCCCCoooommmmpppprrrreeeessssssssoooorrrr,,,,
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  929.  
  930.  
  931.  
  932.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ooooppppeeeennnnDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ddddeeeeccccoooommmmpppprrrreeeessssssss,,,,
  933.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr cccclllloooosssseeeeDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr,,,,
  934.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr rrrreeeeaaaaddddHHHHeeeeaaaaddddeeeerrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr qqqquuuueeeerrrryyyySSSScccchhhheeeemmmmeeee,,,,
  935.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr qqqquuuueeeerrrryyyyLLLLiiiicccceeeennnnsssseeee,,,,
  936.          FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ggggeeeettttPPPPaaaarrrraaaammmmssss,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr sssseeeettttPPPPaaaarrrraaaammmmssss,,,,
  937.          iiiinnnntttt ****sssscccchhhheeeemmmmeeee))))
  938.      vvvvooooiiiidddd ****ccccllllSSSSeeeettttUUUUnnnniiiiqqqquuuueeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, vvvvooooiiiidddd ****uuuunnnniiiiqqqquuuueeee))))
  939.      vvvvooooiiiidddd ****ccccllllGGGGeeeettttUUUUnnnniiiiqqqquuuueeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee))))
  940.      iiiinnnntttt  ccccllllFFFFeeeettttcccchhhhPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
  941.      vvvvooooiiiidddd ccccllllSSSSttttoooorrrreeeePPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt vvvvaaaalllluuuueeee))))
  942.      vvvvooooiiiidddd ccccllllEEEErrrrrrrroooorrrr((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ccccooooddddeeee,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffoooorrrrmmmmaaaatttt,,,, ............))))
  943.  
  944.      iiiinnnntttt ccccllllAAAAddddddddPPPPaaaarrrraaaammmm((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmTTTTyyyyppppeeee,,,,
  945.          iiiinnnntttt mmmmiiiinnnn,,,, iiiinnnntttt mmmmaaaaxxxx,,,, iiiinnnntttt iiiinnnniiiittttiiiiaaaallll,,,, iiiinnnntttt ****ppppaaaarrrraaaammmmIIIIDDDD))))
  946.      iiiinnnntttt ccccllllSSSSeeeettttDDDDeeeeffffaaaauuuulllltttt((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt iiiinnnniiiittttiiiiaaaallll))))
  947.      iiiinnnntttt ccccllllSSSSeeeettttMMMMiiiinnnn((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt mmmmiiiinnnn))))
  948.      iiiinnnntttt ccccllllSSSSeeeettttMMMMaaaaxxxx((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt mmmmaaaaxxxx))))
  949.      iiiinnnntttt ccccllllSSSSeeeettttMMMMiiiinnnnMMMMaaaaxxxx((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt mmmmiiiinnnn,,,, iiiinnnntttt mmmmaaaaxxxx))))
  950.      iiiinnnntttt ccccllllSSSSeeeettttRRRRaaaannnnggggeeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt mmmmiiiinnnn,,,, iiiinnnntttt mmmmaaaaxxxx,,,, iiiinnnntttt iiiinnnniiiittttiiiiaaaallll))))
  951.  
  952.  
  953.      These calls support the addition of custom algorithms and parameters to
  954.      the library.
  955.  
  956.      ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm installs a new codec given the functions that implement
  957.      it.  ccccllllSSSSeeeettttUUUUnnnniiiiqqqquuuueeee and ccccllllGGGGeeeettttUUUUnnnniiiiqqqquuuueeee allow the codec implementation to save
  958.      and retrieve a private data structure with each codec object, enabling
  959.      unique state information to be retained across processing calls.
  960.      ccccllllFFFFeeeettttcccchhhhPPPPaaaarrrraaaammmm and ccccllllSSSSttttoooorrrreeeePPPPaaaarrrraaaammmm are used by the codec implementation to
  961.      directly access parameters in the handle.  (Users of the codec, however,
  962.      should call the standard routines ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm.)  ccccllllEEEErrrrrrrroooorrrr is
  963.      the active error handler function, and may be used by the codec
  964.      implementation to report errors.
  965.  
  966.      ccccllllAAAAddddddddPPPPaaaarrrraaaammmm is used to extend the basic parameter list for new codecs.
  967.      ccccllllSSSSeeeettttDDDDeeeeffffaaaauuuulllltttt, ccccllllSSSSeeeettttMMMMiiiinnnn, ccccllllSSSSeeeettttMMMMaaaaxxxx, ccccllllSSSSeeeettttMMMMiiiinnnnMMMMaaaaxxxx, and ccccllllSSSSeeeettttRRRRaaaannnnggggeeee are used to
  968.      configure a parameter after it is added.
  969.  
  970.      Once installed with these calls, new algorithms and their parameters may
  971.      be accessed with the same API used for the base schemes.
  972.  
  973.  
  974.    AAAAPPPPIIII FFFFOOOORRRR OOOOTTTTHHHHEEEERRRR FFFFEEEEAAAATTTTUUUURRRREEEESSSS
  975.  
  976.      iiiinnnntttt ccccllllCCCCoooommmmpppprrrreeeessssssssIIIImmmmaaaaggggeeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt wwwwiiiiddddtttthhhh,,,, iiiinnnntttt hhhheeeeiiiigggghhhhtttt,,,,
  977.          iiiinnnntttt ffffoooorrrrmmmmaaaatttt,,,, ffffllllooooaaaatttt ccccoooommmmpppprrrreeeessssssssiiiioooonnnnRRRRaaaattttiiiioooo,,,, vvvvooooiiiidddd ****ffffrrrraaaammmmeeeeBBBBuuuuffffffffeeeerrrr,,,,
  978.          iiiinnnntttt ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrrSSSSiiiizzzzeeee,,,, vvvvooooiiiidddd ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrr))))
  979.      iiiinnnntttt ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssssIIIImmmmaaaaggggeeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt wwwwiiiiddddtttthhhh,,,, iiiinnnntttt hhhheeeeiiiigggghhhhtttt,,,,
  980.          iiiinnnntttt ffffoooorrrrmmmmaaaatttt,,,, iiiinnnntttt ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrrSSSSiiiizzzzeeee,,,,
  981.          vvvvooooiiiidddd ****ccccoooommmmpppprrrreeeesssssssseeeeddddBBBBuuuuffffffffeeeerrrr,,,, vvvvooooiiiidddd ****ffffrrrraaaammmmeeeeBBBBuuuuffffffffeeeerrrr))))
  982.  
  983.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyAAAAllllggggoooorrrriiiitttthhhhmmmmssss((((iiiinnnntttt aaaallllggggTTTTyyyyppppeeee,,,, iiiinnnntttt ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  984.  
  985.  
  986.  
  987.                                                                        PPPPaaaaggggeeee 11115555
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  995.  
  996.  
  997.  
  998.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmHHHHaaaannnnddddlllleeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee))))
  999.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmNNNNaaaammmmeeee((((iiiinnnntttt aaaallllggggTTTTyyyyppppeeee,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****nnnnaaaammmmeeee))))
  1000.      cccchhhhaaaarrrr ****ccccllllGGGGeeeettttAAAAllllggggoooorrrriiiitttthhhhmmmmNNNNaaaammmmeeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee))))
  1001.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyLLLLiiiicccceeeennnnsssseeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee,,,, iiiinnnntttt ffffuuuunnnnccccttttiiiioooonnnnaaaalllliiiittttyyyy,,,, cccchhhhaaaarrrr ********mmmmeeeessssssssaaaaggggeeee))))
  1002.  
  1003.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeee((((vvvvooooiiiidddd ****hhhheeeeaaaaddddeeeerrrr))))
  1004.      iiiinnnntttt ccccllllQQQQuuuueeeerrrryyyyMMMMaaaaxxxxHHHHeeeeaaaaddddeeeerrrrSSSSiiiizzzzeeee((((iiiinnnntttt sssscccchhhheeeemmmmeeee))))
  1005.      iiiinnnntttt ccccllllRRRReeeeaaaaddddHHHHeeeeaaaaddddeeeerrrr((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt hhhheeeeaaaaddddeeeerrrrSSSSiiiizzzzeeee,,,, vvvvooooiiiidddd ****hhhheeeeaaaaddddeeeerrrr))))
  1006.  
  1007.      iiiinnnntttt ccccllllGGGGeeeettttNNNNeeeexxxxttttIIIImmmmaaaaggggeeeeIIIInnnnffffoooo((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  1008.          CCCCLLLLiiiimmmmaaaaggggeeeeIIIInnnnffffoooo ****iiiimmmmaaaaggggeeeeIIIInnnnffffoooo,,,, iiiinnnntttt ssssiiiizzzzeeeeOOOOffffIIIImmmmaaaaggggeeeeIIIInnnnffffoooo))))
  1009.  
  1010.      CCCCLLLLeeeerrrrrrrrFFFFuuuunnnncccc ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((CCCCLLLLeeeerrrrrrrrFFFFuuuunnnncccc eeeeffffuuuunnnncccc))))
  1011.  
  1012.  
  1013.      ccccllllCCCCoooommmmpppprrrreeeessssssssIIIImmmmaaaaggggeeee and ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssssIIIImmmmaaaaggggeeee provide a simple way to process
  1014.      individual video frames in one call; the application does not need to
  1015.      open and close a compressor or decompressor.  Note, however, that these
  1016.      calls do not save state between invocations so algorithms that have
  1017.      dependencies between frames (e.g. MPEG-1 Video) should not be used.
  1018.      Also, these calls do not allow general parameter modification and are not
  1019.      compatible with implicit buffers.
  1020.  
  1021.      ccccllllQQQQuuuueeeerrrryyyyAAAAllllggggoooorrrriiiitttthhhhmmmmssss gives a list of algorithms recognized by the library.
  1022.      ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmHHHHaaaannnnddddlllleeee and ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmNNNNaaaammmmeeee return the scheme
  1023.      identifier from the handle and text name, respectively;
  1024.      ccccllllGGGGeeeettttAAAAllllggggoooorrrriiiitttthhhhmmmmNNNNaaaammmmeeee returns the text name from the scheme.  Some schemes
  1025.      must be enabled with a NetLS license (see the section on option
  1026.      products); ccccllllQQQQuuuueeeerrrryyyyLLLLiiiicccceeeennnnsssseeee is used to determine whether a license is
  1027.      available.
  1028.  
  1029.      Applications which need to read data generated by several algorithms may
  1030.      use ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeee to determine the appropriate decompressor to use.  This
  1031.      call attempts to identify the algorithm based on the first 16 bytes of
  1032.      data so that the correct processing object may be opened.  Once opened,
  1033.      the decompressor should be configured by reading the header with
  1034.      ccccllllQQQQuuuueeeerrrryyyyMMMMaaaaxxxxHHHHeeeeaaaaddddeeeerrrrSSSSiiiizzzzeeee and ccccllllRRRReeeeaaaaddddHHHHeeeeaaaaddddeeeerrrr.
  1035.  
  1036.      ccccllllGGGGeeeettttNNNNeeeexxxxttttIIIImmmmaaaaggggeeeeIIIInnnnffffoooo is used to obtain information about images as they are
  1037.      compressed or decompressed.  This call is currently supported by the
  1038.      CL_JPEG_COSMO scheme, and provides information such as time stamps and
  1039.      image counts.
  1040.  
  1041.      ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr allows an application to override the default error
  1042.      handler.  The default function prints a message to stderr.
  1043.  
  1044.  
  1045. OOOOPPPPTTTTIIIIOOOONNNN PPPPRRRROOOODDDDUUUUCCCCTTTTSSSS
  1046.      Some schemes must be enabled with the installation of separate option
  1047.      products.
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.                                                                        PPPPaaaaggggeeee 11116666
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))                                                      CCCCLLLLiiiinnnnttttrrrroooo((((3333ddddmmmm))))
  1061.  
  1062.  
  1063.  
  1064.    MMMMPPPPEEEEGGGG EEEEnnnnccccooooddddeeeerrrr
  1065.      This product includes the CL_MPEG1_VIDEO_SOFTWARE and
  1066.      CL_MPEG1_AUDIO_SOFTWARE compressors.  The audio compressor may also
  1067.      enabled by a license from Aware, Inc. (see below).
  1068.  
  1069.  
  1070.    CCCCoooossssmmmmoooo CCCCoooommmmpppprrrreeeessssssss
  1071.      This hardware product enables the CL_JPEG_COSMO scheme, which offers
  1072.      accelerated JPEG compression and decompression for realtime video capture
  1073.      and playback.  Cosmo is supported on Indy and Indigo2 systems.
  1074.  
  1075.  
  1076.    AAAAwwwwaaaarrrreeee AAAAuuuuddddiiiiooooPPPPuuuubbbblllliiiisssshhhheeeerrrr,,,, AAAAuuuuddddiiiiooooPPPPrrrroooodddduuuucccceeeerrrr,,,, aaaannnndddd AAAAuuuuddddiiiiooooPPPPllllaaaayyyybbbbaaaacccckkkk
  1077.      These products provide various levels of NetLS licenses for MPEG-1 Audio
  1078.      (CL_MPEG1_AUDIO_SOFTWARE, CL_MPEG1_AUDIO_AWARE) and Aware Multirate
  1079.      (CL_MULTIRATE_AWARE).
  1080.  
  1081.      For more details see cl_aware(3dm) and cl_mpeg1(3dm).
  1082.  
  1083.  
  1084. FFFFIIIILLLLEEEESSSS
  1085.      /usr/include/dmedia/cl.h                        - header file
  1086.                                                         (including error codes)
  1087.  
  1088.      /usr/share/src/dmedia/dmrecord               - sample code
  1089.      /usr/share/src/dmedia/dmplay            - sample code
  1090.  
  1091.  
  1092. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  1093.      clOpenCompressor(3dm), clCompress(3dm), clCloseCompressor(3dm),
  1094.      clOpenDecompressor(3dm), clDecompress(3dm), clCloseDecompressor(3dm),
  1095.      clCreateBuf(3dm), clDestroyBuf(3dm),
  1096.      clQueryBufferHdl(3dm), clQueryHandle(3dm),
  1097.      clQueryFree(3dm), clUpdateHead(3dm), clQueryVaild(3dm),
  1098.      clUpdateTail(3dm), clDoneUpdatingHead(3dm),
  1099.      clQueryParams(3dm), clGetParamID(3dm),
  1100.      clGetParams(3dm), clSetParams(3dm),
  1101.      clGetDefault(3dm), clGetMinMax(3dm), clGetName(3dm),
  1102.      clAddAlgorithm(3dm), clSetUnique(3dm), clGetUnique(3dm),
  1103.      clFetchParam(3dm), clStoreParam(3dm), clError(3dm),
  1104.      clAddParam(3dm), clSetDefault(3dm), clSetMin(3dm), clSetMax(3dm),
  1105.      clSetMinMax(3dm), clSetRange(3dm),
  1106.      clCompressImage(3dm), clDecompressImage(3dm),
  1107.      clQueryAlgorithms(3dm), clQuerySchemeFromHandle(3dm),
  1108.      clQuerySchemeFromName(3dm), clGetAlgorithmName(3dm), clQueryLicense(3dm),
  1109.      clQueryScheme(3dm), clQueryMaxHeaderSize(3dm), clReadHeader(3dm),
  1110.      clGetNextImageInfo(3dm), clSetErrorHandler(3dm),
  1111.      mpeg(4), jpeg(4),
  1112.      cl_mpeg1(3dm), cl_jpeg(3dm), cl_mvc2(3dm), cl_mvc3(3dm),
  1113.      cl_cosmo(3dm), cl_aware(3dm),
  1114.      dmconvert(1), dmrecord(1), dmplay(1)
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                                                        PPPPaaaaggggeeee 11117777
  1120.  
  1121.  
  1122.  
  1123.