|
Top Document: SGI movie Frequently Asked Questions (FAQ) Previous Document: -32- I want to write a program which creates a JPEG- compressed movie file, but I need to control the Next Document: -34- I simply want to create a JPEG-compressed movie which is compatible with the Cosmo Compress board. I don't want See reader questions & answers on this topic! - Help others by sharing your knowledge
board, SGI's hardware JPEG accelerator. How do I do
this?
Date: Fri May 3 10:23:53 PDT 1996
Movies which are compatible with the Cosmo Compress board
have the following characteristics:
- Image compression must be JPEG.
- Width must be video (NTSC or PAL) sized,
and an even multiple of 8.
- Height must be video sized, and an even multiple of 8.
- Image frames must be interlaced (odd interlacing for NTSC,
even interlacing for PAL).
- Image frames must be oriented top to bottom.
- Image packing must be RGB.
- Image track frame rate must be 29.97 for NTSC,
25.0 for PAL.
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;
}
User Contributions:Top Document: SGI movie Frequently Asked Questions (FAQ) Previous Document: -32- I want to write a program which creates a JPEG- compressed movie file, but I need to control the Next Document: -34- I simply want to create a JPEG-compressed movie which is compatible with the Cosmo Compress board. I don't want Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: sgi-faq@viz.tamu.edu (The SGI FAQ group)
Last Update March 27 2014 @ 02:12 PM
|

Comment about this article, ask questions, or add new information about this topic: