#define MAX_COMPONENTS 4
+typedef struct ICCEntry {
+ uint8_t *data;
+ int length;
+} ICCEntry;
+
+struct JLSState;
+
typedef struct MJpegDecodeContext {
AVClass *class;
AVCodecContext *avctx;
VLC vlcs[3][4];
int qscale[4]; ///< quantizer scale calculated from quant_matrixes
- int org_height; /* size given at codec init */
+ int orig_height; /* size given at codec init */
int first_picture; /* true if decoding first picture */
int interlaced; /* true if interlaced */
int bottom_field; /* true if bottom field */
int last_dc[MAX_COMPONENTS]; /* last DEQUANTIZED dc (XXX: am I right to do that ?) */
AVFrame *picture; /* picture structure */
AVFrame *picture_ptr; /* pointer to picture structure */
+ int seen_sof; ///< we found a SOF.
int got_picture; ///< we found a SOF and picture is valid, too.
int linesize[MAX_COMPONENTS]; ///< linesize << interlaced
int8_t *qscale_table;
const AVPixFmtDescriptor *pix_desc;
- uint8_t **iccdata;
- int *iccdatalens;
+ ICCEntry *iccentries;
int iccnum;
int iccread;
enum AVPixelFormat hwaccel_sw_pix_fmt;
enum AVPixelFormat hwaccel_pix_fmt;
void *hwaccel_picture_private;
+
+ struct JLSState *jls_state;
+ uint32_t palette[AVPALETTE_COUNT];
} MJpegDecodeContext;
+int ff_mjpeg_build_vlc(VLC *vlc, const uint8_t *bits_table,
+ const uint8_t *val_table, int is_ac, void *logctx);
int ff_mjpeg_decode_init(AVCodecContext *avctx);
int ff_mjpeg_decode_end(AVCodecContext *avctx);
int ff_mjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame);