#include <stdint.h>
+#include "mjpeg.h"
#include "mpegvideo.h"
+#include "put_bits.h"
typedef struct MJpegContext {
uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing
uint16_t huff_code_ac_chrominance[256];
} MJpegContext;
+static inline void put_marker(PutBitContext *p, enum JpegMarker code)
+{
+ put_bits(p, 8, 0xff);
+ put_bits(p, 8, code);
+}
+
int ff_mjpeg_encode_init(MpegEncContext *s);
void ff_mjpeg_encode_close(MpegEncContext *s);
-void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
- ScanTable *intra_scantable,
- uint16_t luma_intra_matrix[64],
- uint16_t chroma_intra_matrix[64]);
-void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits);
-void ff_mjpeg_escape_FF(PutBitContext *pb, int start);
-void ff_mjpeg_encode_stuffing(MpegEncContext *s);
-void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[3], int vsample[3]);
-void ff_mjpeg_encode_dc(PutBitContext *pb, int val,
- uint8_t *huff_size, uint16_t *huff_code);
void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]);
#endif /* AVCODEC_MJPEGENC_H */