Up: SGI movie Frequently Asked Questions (FAQ)
Next: -35- I simply want to create a JPEG-compressed movie which is compatible with the Cosmo Compress board. I don't want to write my own program. How do I do this?
Previous: -33- I want to write a program which creates a JPEG- compressed movie file, but I need to control the compression quality. How do I do this with the Movie Library?
Subject:   -34- I want to write a program which can create a JPEG-
                compressed movie file compatible with the Cosmo Compress
                board, SGI's hardware JPEG accelerator.  How do I do
                this?
Date: Wed Nov 16 13:04:20 PST 1994

  Movies which are compatible with the Cosmo Compress board
  have the following characteristics:

    - must be JPEG.
    - width must be video sized, even multiple of 8.
    - height must be video sized, even multiple of 8.
    - image frames must be interlaced.
    - image frames must be oriented top to bottom.
    - image packing must be RGB.

  Here is a piece of code which will check an existing image
  track for you.  C programmers will hopefully forgive the use
  of C++ style comments:


  ///////////////
  //
  // Check to see if the video track is one of the subset of
  // JPEG-encoded tracks that the cosmo board can play.
  //
  ///////////////

  static DMboolean isCosmoCompatible( MVid videotrack )
  {
      //
      // must be JPEG.
      //
      if ( mvGetCompression(videotrack) != IMAGE_COMP_JPEG ) {
    	  return DM_FALSE;
      }

      //
      // width must be video sized, even multiple of 8.
      //
      int width = mvGetImageWidth(videotrack);
      if ( width < 16 || width > 768 || width % 8 ) {
    	  return DM_FALSE;
      }

      //
      // height must be video sized, even multiple of 8.
      //
      int height = mvGetImageHeight(videotrack);
      if ( height < 16 || height > 2*296 || height % 8 ) {
    	  return DM_FALSE;
      }

      //
      // image frames must be interlaced.
      //
      if ( mvGetImageInterlacing(videotrack) == DM_IMAGE_NONINTERLACED) {
    	  return DM_FALSE;
      }

      //
      // image frames must be oriented top to bottom.
      //
      if ( mvGetImageOrientation(videotrack) != DM_TOP_TO_BOTTOM ) {
	  return DM_FALSE;
      }

      //
      // image packing must be RGB.
      //
      if ( mvGetImagePacking(videotrack) != DM_PACKING_RGB ) {
    	  return DM_FALSE;
      }

      //
      // we've run the gauntlet.  dmplay can play this movie.
      //
      return DM_TRUE;
  }

Up: SGI movie Frequently Asked Questions (FAQ)
Next: -35- I simply want to create a JPEG-compressed movie which is compatible with the Cosmo Compress board. I don't want to write my own program. How do I do this?
Previous: -33- I want to write a program which creates a JPEG- compressed movie file, but I need to control the compression quality. How do I do this with the Movie Library?