annotate mjpegenc.h @ 5133:5039df79f8cb libavcodec

restore GCC2/3 support, patch by Sigbjorn Skjaeret %sskjer-1 A broadpark P no%
author gpoirier
date Tue, 12 Jun 2007 21:17:22 +0000
parents dbaa06366c3c
children 470601203f44
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5028
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
1 /*
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
2 * MJPEG encoder
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
3 * Copyright (c) 2000, 2001 Fabrice Bellard.
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
4 * Copyright (c) 2003 Alex Beregszaszi
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
5 * Copyright (c) 2003-2004 Michael Niedermayer
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
6 *
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
7 * This file is part of FFmpeg.
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
8 *
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
13 *
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
17 * Lesser General Public License for more details.
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
18 *
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
22 *
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
23 * Support for external huffman table, various fixes (AVID workaround),
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
24 * aspecting, new decode_frame mechanism and apple mjpeg-b support
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
25 * by Alex Beregszaszi
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
26 */
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
27
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
28 /**
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
29 * @file mjpegenc.h
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
30 * MJPEG encoder.
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
31 */
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
32
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
33 #ifndef MJPEGENC_H
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
34 #define MJPEGENC_H
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
35
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
36 #include "dsputil.h"
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
37 #include "mpegvideo.h"
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
38
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
39 typedef struct MJpegContext {
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
40 uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
41 uint16_t huff_code_dc_luminance[12];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
42 uint8_t huff_size_dc_chrominance[12];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
43 uint16_t huff_code_dc_chrominance[12];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
44
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
45 uint8_t huff_size_ac_luminance[256];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
46 uint16_t huff_code_ac_luminance[256];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
47 uint8_t huff_size_ac_chrominance[256];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
48 uint16_t huff_code_ac_chrominance[256];
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
49 } MJpegContext;
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
50
5029
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
51 int ff_mjpeg_encode_init(MpegEncContext *s);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
52 void ff_mjpeg_encode_close(MpegEncContext *s);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
53 void ff_mjpeg_encode_picture_header(MpegEncContext *s);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
54 void ff_mjpeg_encode_picture_trailer(MpegEncContext *s);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
55 void ff_mjpeg_encode_stuffing(PutBitContext *pbc);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
56 void ff_mjpeg_encode_dc(MpegEncContext *s, int val,
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
57 uint8_t *huff_size, uint16_t *huff_code);
dbaa06366c3c add a proper prefix to all mjpeg encoder exported functions
aurel
parents: 5028
diff changeset
58 void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]);
5028
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
59
3d8a813666e4 split ljpeg encoder out of mjpeg.c
aurel
parents:
diff changeset
60 #endif /* MJPEGENC_H */