Mercurial > libavcodec.hg
annotate mjpegenc.h @ 12197:fbf4d5b1b664 libavcodec
Remove FF_MM_SSE2/3 flags for CPUs where this is generally not faster than
regular MMX code. Examples of this are the Core1 CPU. Instead, set a new flag,
FF_MM_SSE2/3SLOW, which can be checked for particular SSE2/3 functions that
have been checked specifically on such CPUs and are actually faster than
their MMX counterparts.
In addition, use this flag to enable particular VP8 and LPC SSE2 functions
that are faster than their MMX counterparts.
Based on a patch by Loren Merritt <lorenm AT u washington edu>.
author | rbultje |
---|---|
date | Mon, 19 Jul 2010 22:38:23 +0000 |
parents | 7dd2a45249a9 |
children |
rev | line source |
---|---|
5028 | 1 /* |
2 * MJPEG encoder | |
8629
04423b2f6e0b
cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents:
7760
diff
changeset
|
3 * Copyright (c) 2000, 2001 Fabrice Bellard |
5028 | 4 * Copyright (c) 2003 Alex Beregszaszi |
5 * Copyright (c) 2003-2004 Michael Niedermayer | |
6 * | |
5214 | 7 * Support for external huffman table, various fixes (AVID workaround), |
8 * aspecting, new decode_frame mechanism and apple mjpeg-b support | |
9 * by Alex Beregszaszi | |
10 * | |
5028 | 11 * This file is part of FFmpeg. |
12 * | |
13 * FFmpeg is free software; you can redistribute it and/or | |
14 * modify it under the terms of the GNU Lesser General Public | |
15 * License as published by the Free Software Foundation; either | |
16 * version 2.1 of the License, or (at your option) any later version. | |
17 * | |
18 * FFmpeg is distributed in the hope that it will be useful, | |
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
21 * Lesser General Public License for more details. | |
22 * | |
23 * You should have received a copy of the GNU Lesser General Public | |
24 * License along with FFmpeg; if not, write to the Free Software | |
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
26 */ | |
27 | |
28 /** | |
11644
7dd2a45249a9
Remove explicit filename from Doxygen @file commands.
diego
parents:
8718
diff
changeset
|
29 * @file |
5028 | 30 * MJPEG encoder. |
31 */ | |
32 | |
7760 | 33 #ifndef AVCODEC_MJPEGENC_H |
34 #define AVCODEC_MJPEGENC_H | |
5028 | 35 |
36 #include "dsputil.h" | |
37 #include "mpegvideo.h" | |
38 | |
39 typedef struct MJpegContext { | |
40 uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing | |
41 uint16_t huff_code_dc_luminance[12]; | |
42 uint8_t huff_size_dc_chrominance[12]; | |
43 uint16_t huff_code_dc_chrominance[12]; | |
44 | |
45 uint8_t huff_size_ac_luminance[256]; | |
46 uint16_t huff_code_ac_luminance[256]; | |
47 uint8_t huff_size_ac_chrominance[256]; | |
48 uint16_t huff_code_ac_chrominance[256]; | |
49 } MJpegContext; | |
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 | 59 |
7760 | 60 #endif /* AVCODEC_MJPEGENC_H */ |