annotate libvo/jpeg_enc.h @ 26190:e9617c54bb04

Fix handling of comments in input.c, current code had useless ifs and in addition could treat more data as comments than correct.
author reimar
date Tue, 11 Mar 2008 14:44:19 +0000
parents 4129c8cfa742
children 2a34d9fa52ab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4651
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
1 /* Straightforward (to be) optimized JPEG encoder for the YUV422 format
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
2 * based on mjpeg code from ffmpeg.
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
3 *
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
4 * Copyright (c) 2002, Rik Snel
7902
c9d1054aa359 sync with libavcodec for unaccellerated dcts (sorry Felix, LIBAVCODEC_BUILD did not change, so also no backwards compatibility this time), and a long overdue copyright update
rik
parents: 4651
diff changeset
5 * Parts from ffmpeg Copyright (c) 2000-2002 Fabrice Bellard
4651
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
6 *
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
10 * (at your option) any later version.
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
11 *
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
15 * GNU General Public License for more details.
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
16 *
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
21977
cea0eb833758 Fix FSF address and otherwise broken license headers.
diego
parents: 7902
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4651
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
20 *
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
21 * For an excellent introduction to the JPEG format, see:
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
22 * http://www.ece.purdue.edu/~bourman/grad-labs/lab8/pdf/lab.pdf
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
23 */
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
24
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
25 #ifndef MPLAYER_JPEG_ENC_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
26 #define MPLAYER_JPEG_ENC_H
4651
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
27
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
28 typedef struct {
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
29 struct MpegEncContext *s;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
30 int cheap_upsample;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
31 int bw;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
32 int y_ps;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
33 int u_ps;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
34 int v_ps;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
35 int y_rs;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
36 int u_rs;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
37 int v_rs;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
38 } jpeg_enc_t;
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
39
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
40 jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize,
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
41 int u_psize, int u_rsize, int v_psize, int v_rsize,
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
42 int cu, int q, int b);
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
43
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
44 int jpeg_enc_frame(jpeg_enc_t *j, unsigned char *y_data,
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
45 unsigned char *u_data, unsigned char *v_data, char *bufr);
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
46
49f2bc22f880 mjpeg encoder cleanup - patch by Rik Snel <rsnel@cube.dyndns.org>
arpi
parents:
diff changeset
47 void jpeg_enc_uninit(jpeg_enc_t *j);
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 21977
diff changeset
48
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
49 #endif /* MPLAYER_JPEG_ENC_H */