29#ifndef AVCODEC_MJPEGDEC_H
30#define AVCODEC_MJPEGDEC_H
47#define MAX_COMPONENTS 4
149#if FF_API_MJPEG_EXTERN_HUFF
184 const uint8_t *val_table,
int is_ac,
void *logctx);
192 const AVPacket *avpkt,
const uint8_t *buf,
int buf_size);
203 if (
s->restart_interval) {
204 if (
s->restart_count <= 0) {
205 s->restart_count =
s->restart_interval;
210 if (
s->restart_count < 0) {
211 s->restart_count = 0;
Libavcodec external API header.
bitstream reader API header.
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Average and put pixel Widths can be 16, 8, 4 or 2.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
static int ff_mjpeg_handle_restart(MJpegDecodeContext *s, int *restart)
int ff_mjpeg_decode_init(AVCodecContext *avctx)
int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
int ff_mjpeg_decode_end(AVCodecContext *avctx)
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_dqt(MJpegDecodeContext *s)
static int ff_mjpeg_should_restart(MJpegDecodeContext *s)
int ff_mjpeg_unescape_sos(MJpegDecodeContext *s)
int ff_mjpeg_decode_frame_from_buf(AVCodecContext *avctx, AVFrame *frame, int *got_frame, const AVPacket *avpkt, const uint8_t *buf, int buf_size)
int ff_mjpeg_find_marker(const uint8_t **buf_ptr, const uint8_t *buf_end)
int ff_mjpeg_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
AVPixelFormat
Pixel format.
Describe the class of an AVClass context structure.
main external API structure.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
int block_stride[MAX_COMPONENTS]
int nb_seq_component_scans
component scans decoded since the SOF (sequential images: <= nb_components)
AVExifMetadata exif_metadata
int reset
context halfing interval ?rename
enum AVPixelFormat hwaccel_pix_fmt
int nb_blocks[MAX_COMPONENTS]
int ac_index[MAX_COMPONENTS]
int h_count[MAX_COMPONENTS]
uint8_t raw_huffman_lengths[2][4][16]
int64_t total_ls_decoded_height
const AVFrame * reference
int linesize[MAX_COMPONENTS]
linesize << interlaced
void * hwaccel_picture_private
int component_id[MAX_COMPONENTS]
int qscale[4]
quantizer scale calculated from quant_matrixes
uint8_t * last_nnz[MAX_COMPONENTS]
op_pixels_func copy_block
only set and used by mxpeg
uint8_t raw_huffman_values[2][4][256]
int comp_index[MAX_COMPONENTS]
int quant_sindex[MAX_COMPONENTS]
uint64_t coefs_finished[MAX_COMPONENTS]
bitmask of which coefs have been completely decoded (progressive mode)
uint16_t quant_matrixes[4][64]
enum AVPixelFormat hwaccel_sw_pix_fmt
const AVPixFmtDescriptor * pix_desc
!< stereoscopic information (cached, since it is read before frame allocation)
int v_scount[MAX_COMPONENTS]
int16_t(*[MAX_COMPONENTS] blocks)[64]
intermediate sums (progressive mode)
const uint8_t * mb_bitmask
struct JLSState * jls_state
int got_picture
we found a SOF and picture is valid, too.
size_t raw_image_buffer_size
uint16_t(* ljpeg_buffer)[4]
int dc_index[MAX_COMPONENTS]
int h_scount[MAX_COMPONENTS]
int v_count[MAX_COMPONENTS]
int near
near lossless bound (si 0 for lossless)
const uint8_t * raw_image_buffer
unsigned int ljpeg_buffer_size
uint8_t permutated_scantable[64]
int last_dc[MAX_COMPONENTS]