42 0x4a, 0x46, 0x49, 0x46, 0x00,
54 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
55 0x0a, 0x0b, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
56 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
61 memcpy(buf, src, size);
82 uint8_t **poutbuf,
int *poutbuf_size,
86 int input_skip, output_size;
97 if (buf[2] == 0xff && buf[3] ==
APP0) {
98 input_skip = (buf[4] << 8) + buf[5] + 4;
102 if (buf_size < input_skip) {
106 output_size = buf_size - input_skip +
113 out =
append(out, buf + input_skip, buf_size - input_skip);
115 *poutbuf_size = output_size;
120 .
name =
"mjpeg2jpeg",
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
memory handling functions
static const uint8_t dht_segment_frag[]
AVBitStreamFilter ff_mjpeg2jpeg_bsf
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
MJPEG encoder and decoder.
static int mjpeg2jpeg_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
const uint8_t avpriv_mjpeg_bits_dc_luminance[17]
static uint8_t * append(uint8_t *buf, const uint8_t *src, int size)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Libavcodec external API header.
main external API structure.
static uint8_t * append_dht_segment(uint8_t *buf)
const uint8_t avpriv_mjpeg_val_dc[12]
const uint8_t avpriv_mjpeg_bits_ac_chrominance[17]
const uint8_t avpriv_mjpeg_val_ac_chrominance[]
static const uint8_t jpeg_header[]
const uint8_t avpriv_mjpeg_bits_ac_luminance[17]
static const int dht_segment_size
const uint8_t avpriv_mjpeg_val_ac_luminance[]
static const uint8_t dht_segment_head[]