ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mpeg_encode/src/nojpeg.c
Revision: 22
Committed: Mon Jul 7 22:16:37 2008 UTC (13 years, 11 months ago) by wdelano
File size: 5094 byte(s)
Log Message:
initial checkin of mpeg_encode source
Line User Rev File contents
1 wdelano 22 /*===========================================================================*
2     * nojpeg.c *
3     * *
4     * procedures to deal with JPEG files *
5     * *
6     * EXPORTED PROCEDURES: *
7     * JMovie2JPEG *
8     * ReadJPEG *
9     * *
10     *===========================================================================*/
11    
12     /*
13     * Copyright (c) 1995 The Regents of the University of California.
14     * All rights reserved.
15     *
16     * Permission to use, copy, modify, and distribute this software and its
17     * documentation for any purpose, without fee, and without written agreement is
18     * hereby granted, provided that the above copyright notice and the following
19     * two paragraphs appear in all copies of this software.
20     *
21     * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
22     * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
23     * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
24     * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25     *
26     * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
27     * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
28     * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
29     * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
30     * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
31     */
32    
33     /*
34     * $Header: /n/charlie-brown/project/mm/mpeg/mpeg_dist/mpeg_encode/RCS/nojpeg.c,v 1.2 1995/01/19 23:08:55 eyhung Exp $
35     * $Log: nojpeg.c,v $
36     * Revision 1.2 1995/01/19 23:08:55 eyhung
37     * Changed copyrights
38     *
39     * Revision 1.1 1994/03/15 00:27:11 keving
40     * nothing
41     *
42     * Revision 1.2 1993/12/22 19:19:01 keving
43     * nothing
44     *
45     * Revision 1.1 1993/07/22 22:23:43 keving
46     * nothing
47     *
48     */
49    
50     /*==============*
51     * HEADER FILES *
52     *==============*/
53    
54     #include "all.h"
55     #include "mtypes.h"
56     #include "frames.h"
57     #include "prototypes.h"
58     #include "param.h"
59     #include "readframe.h"
60     #include "fsize.h"
61     #include "rgbtoycc.h"
62     #include "jpeg.h"
63    
64    
65    
66     /*=======================================================================*
67     * *
68     * JMovie2JPEG *
69     * *
70     * Splits up a Parallax J_Movie into a set of JFIF image files *
71     * *
72     * RETURNS: nothing *
73     * *
74     * SIDE EFFECTS: none *
75     * *
76     * Contributed By James Boucher(jboucher@flash.bu.edu) *
77     * Boston University Multimedia Communications Lab *
78     * This code was adapted from the Berkeley Playone.c and Brian Smith's *
79     * JGetFrame code after being modified on 10-7-93 by Dinesh Venkatesh *
80     * of BU. *
81     * This code converts a version 2 Parallax J_Movie into a *
82     * set of JFIF compatible JPEG images. It works for all image *
83     * sizes and qualities. *
84     ************************************************************************/
85     void
86     JMovie2JPEG(infilename,obase,start,end)
87     char *infilename; /* input filename string */
88     char *obase; /* output filename base string=>obase##.jpg */
89     int start; /* first frame to be extracted */
90     int end; /* last frame to be extracted */
91     {
92     fprintf(stderr, "ERROR: This has not been compiled with JPEG support\n");
93     exit(1);
94     }
95    
96    
97    
98    
99     /*===========================================================================*
100     *
101     * ReadJPEG contributed by James Arthur Boucher of Boston University's
102     * Multimedia Communications Lab
103     *
104     * read a JPEG file and copy data into frame original data arrays
105     *
106     * RETURNS: mf modified
107     *
108     * SIDE EFFECTS: none
109     *
110     *===========================================================================*/
111     /*************************JPEG LIBRARY INTERFACE*********************/
112     /*
113     * THE BIG PICTURE:
114     *
115     * The rough outline this JPEG decompression operation is:
116     *
117     * allocate and initialize JPEG decompression object
118     * specify data source (eg, a file)
119     * jpeg_read_header(); // obtain image dimensions and other parameters
120     * set parameters for decompression
121     * jpeg_start_decompress();
122     * while (scan lines remain to be read)
123     * jpeg_read_scanlines(...);
124     * jpeg_finish_decompress();
125     * release JPEG decompression object
126     *
127     */
128     void
129     ReadJPEG(mf, fp)
130     MpegFrame *mf;
131     FILE *fp;
132     {
133     fprintf(stderr, "ERROR: This has not been compiled with JPEG support\n");
134     exit(1);
135     }