MJPEG decoder. More...
#include <assert.h>
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
Go to the source code of this file.
Macros | |
#define | REFINE_BIT(j) |
#define | ZERO_RUN |
#define | OFFSET(x) offsetof(MJpegDecodeContext, x) |
#define | VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Functions | |
static int | build_vlc (VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes, int use_static, int is_ac) |
static void | build_basic_mjpeg_vlc (MJpegDecodeContext *s) |
av_cold int | ff_mjpeg_decode_init (AVCodecContext *avctx) |
int | ff_mjpeg_decode_dqt (MJpegDecodeContext *s) |
int | ff_mjpeg_decode_dht (MJpegDecodeContext *s) |
int | ff_mjpeg_decode_sof (MJpegDecodeContext *s) |
static int | mjpeg_decode_dc (MJpegDecodeContext *s, int dc_index) |
static int | decode_block (MJpegDecodeContext *s, DCTELEM *block, int component, int dc_index, int ac_index, int16_t *quant_matrix) |
static int | decode_dc_progressive (MJpegDecodeContext *s, DCTELEM *block, int component, int dc_index, int16_t *quant_matrix, int Al) |
static int | decode_block_progressive (MJpegDecodeContext *s, DCTELEM *block, uint8_t *last_nnz, int ac_index, int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN) |
static int | decode_block_refinement (MJpegDecodeContext *s, DCTELEM *block, uint8_t *last_nnz, int ac_index, int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN) |
static int | ljpeg_decode_rgb_scan (MJpegDecodeContext *s, int predictor, int point_transform) |
static int | ljpeg_decode_yuv_scan (MJpegDecodeContext *s, int predictor, int point_transform, int nb_components) |
static int | mjpeg_decode_scan (MJpegDecodeContext *s, int nb_components, int Ah, int Al, const uint8_t *mb_bitmask, const AVFrame *reference) |
static int | mjpeg_decode_scan_progressive_ac (MJpegDecodeContext *s, int ss, int se, int Ah, int Al, const uint8_t *mb_bitmask, const AVFrame *reference) |
int | ff_mjpeg_decode_sos (MJpegDecodeContext *s, const uint8_t *mb_bitmask, const AVFrame *reference) |
static int | mjpeg_decode_dri (MJpegDecodeContext *s) |
static int | mjpeg_decode_app (MJpegDecodeContext *s) |
static int | mjpeg_decode_com (MJpegDecodeContext *s) |
static int | find_marker (const uint8_t **pbuf_ptr, const uint8_t *buf_end) |
int | ff_mjpeg_find_marker (MJpegDecodeContext *s, const uint8_t **buf_ptr, const uint8_t *buf_end, const uint8_t **unescaped_buf_ptr, int *unescaped_buf_size) |
int | ff_mjpeg_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) |
av_cold int | ff_mjpeg_decode_end (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
static const AVClass | mjpegdec_class |
AVCodec | ff_mjpeg_decoder |
AVCodec | ff_thp_decoder |
MJPEG decoder.
Definition in file mjpegdec.c.
#define OFFSET | ( | x | ) | offsetof(MJpegDecodeContext, x) |
Definition at line 1688 of file mjpegdec.c.
#define REFINE_BIT | ( | j | ) |
Definition at line 569 of file mjpegdec.c.
Referenced by decode_block_refinement().
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Definition at line 1689 of file mjpegdec.c.
#define ZERO_RUN |
Definition at line 577 of file mjpegdec.c.
Referenced by decode_block_refinement().
|
static |
Definition at line 69 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_init().
|
static |
Definition at line 46 of file mjpegdec.c.
Referenced by build_basic_mjpeg_vlc(), and ff_mjpeg_decode_dht().
|
static |
Definition at line 431 of file mjpegdec.c.
Referenced by mjpeg_decode_scan().
|
static |
Definition at line 497 of file mjpegdec.c.
Referenced by mjpeg_decode_scan_progressive_ac().
|
static |
Definition at line 595 of file mjpegdec.c.
Referenced by mjpeg_decode_scan_progressive_ac().
|
static |
Definition at line 479 of file mjpegdec.c.
Referenced by mjpeg_decode_scan().
int ff_mjpeg_decode_dht | ( | MJpegDecodeContext * | s | ) |
Definition at line 159 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame(), ff_mjpeg_decode_init(), mjpegb_decode_frame(), and mxpeg_decode_frame().
int ff_mjpeg_decode_dqt | ( | MJpegDecodeContext * | s | ) |
Definition at line 126 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame(), mjpegb_decode_frame(), and mxpeg_decode_frame().
av_cold int ff_mjpeg_decode_end | ( | AVCodecContext * | avctx | ) |
Definition at line 1664 of file mjpegdec.c.
Referenced by mxpeg_decode_end().
int ff_mjpeg_decode_frame | ( | AVCodecContext * | avctx, |
void * | data, | ||
int * | got_frame, | ||
AVPacket * | avpkt | ||
) |
Definition at line 1468 of file mjpegdec.c.
Referenced by sp5x_decode_frame().
av_cold int ff_mjpeg_decode_init | ( | AVCodecContext * | avctx | ) |
Definition at line 85 of file mjpegdec.c.
Referenced by mxpeg_decode_init().
int ff_mjpeg_decode_sof | ( | MJpegDecodeContext * | s | ) |
Definition at line 213 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame(), mjpegb_decode_frame(), and mxpeg_decode_frame().
int ff_mjpeg_decode_sos | ( | MJpegDecodeContext * | s, |
const uint8_t * | mb_bitmask, | ||
const AVFrame * | reference | ||
) |
Definition at line 1018 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame(), mjpegb_decode_frame(), and mxpeg_decode_frame().
int ff_mjpeg_find_marker | ( | MJpegDecodeContext * | s, |
const uint8_t ** | buf_ptr, | ||
const uint8_t * | buf_end, | ||
const uint8_t ** | unescaped_buf_ptr, | ||
int * | unescaped_buf_size | ||
) |
Definition at line 1380 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame(), and mxpeg_decode_frame().
Definition at line 1352 of file mjpegdec.c.
Referenced by ff_mjpeg_find_marker().
|
static |
Definition at line 660 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_sos().
|
static |
Definition at line 731 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_sos().
|
static |
Definition at line 1176 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame().
|
static |
Definition at line 1317 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame().
|
inlinestatic |
Definition at line 413 of file mjpegdec.c.
Referenced by decode_block(), decode_dc_progressive(), ljpeg_decode_rgb_scan(), and ljpeg_decode_yuv_scan().
|
static |
Definition at line 1164 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_frame().
|
static |
Definition at line 820 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_sos().
|
static |
Definition at line 946 of file mjpegdec.c.
Referenced by ff_mjpeg_decode_sos().
AVCodec ff_mjpeg_decoder |
Definition at line 1703 of file mjpegdec.c.
AVCodec ff_thp_decoder |
Definition at line 1716 of file mjpegdec.c.
|
static |
Definition at line 1696 of file mjpegdec.c.
|
static |
Definition at line 1690 of file mjpegdec.c.