mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_dc()
[libav.git] / libavcodec / mjpegenc.h
CommitLineData
d9c9259f
AJ
1/*
2 * MJPEG encoder
406792e7 3 * Copyright (c) 2000, 2001 Fabrice Bellard
d9c9259f
AJ
4 * Copyright (c) 2003 Alex Beregszaszi
5 * Copyright (c) 2003-2004 Michael Niedermayer
6 *
7b94177e
DB
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 *
2912e87a 11 * This file is part of Libav.
d9c9259f 12 *
2912e87a 13 * Libav is free software; you can redistribute it and/or
d9c9259f
AJ
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 *
2912e87a 18 * Libav is distributed in the hope that it will be useful,
d9c9259f
AJ
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
2912e87a 24 * License along with Libav; if not, write to the Free Software
d9c9259f 25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
d9c9259f
AJ
26 */
27
28/**
ba87f080 29 * @file
d9c9259f
AJ
30 * MJPEG encoder.
31 */
32
98790382
SS
33#ifndef AVCODEC_MJPEGENC_H
34#define AVCODEC_MJPEGENC_H
d9c9259f 35
88bd7fdc
DB
36#include <stdint.h>
37
d9c9259f
AJ
38#include "mpegvideo.h"
39
40typedef struct MJpegContext {
41 uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing
42 uint16_t huff_code_dc_luminance[12];
43 uint8_t huff_size_dc_chrominance[12];
44 uint16_t huff_code_dc_chrominance[12];
45
46 uint8_t huff_size_ac_luminance[256];
47 uint16_t huff_code_ac_luminance[256];
48 uint8_t huff_size_ac_chrominance[256];
49 uint16_t huff_code_ac_chrominance[256];
50} MJpegContext;
51
44301eaa
AJ
52int ff_mjpeg_encode_init(MpegEncContext *s);
53void ff_mjpeg_encode_close(MpegEncContext *s);
058d5f2f
AK
54void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
55 ScanTable *intra_scantable,
56 uint16_t intra_matrix[64]);
3360ad99 57void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits);
44301eaa 58void ff_mjpeg_encode_stuffing(PutBitContext *pbc);
86eb2eaa 59void ff_mjpeg_encode_dc(PutBitContext *pb, int val,
44301eaa 60 uint8_t *huff_size, uint16_t *huff_code);
88bd7fdc 61void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[6][64]);
d9c9259f 62
98790382 63#endif /* AVCODEC_MJPEGENC_H */