34 void *
data,
int *got_frame,
38 int buf_size = avpkt->
size;
72 for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
73 recoded[j++] = buf[i];
75 for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
77 recoded[j++] = buf[i];
87 avpkt_recoded.
data = recoded;
88 avpkt_recoded.
size = j;
static const uint8_t sp5x_data_dqt[]
int coded_width
Bitstream width / height, may be different from width/height.
static const uint8_t sp5x_data_dht[]
MJPEG encoder and decoder.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static const uint8_t sp5x_data_sos[]
static int init(AVCodecParserContext *s)
int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation.
int width
picture width / height.
main external API structure.
static void close(AVCodecParserContext *s)
struct MJpegDecodeContext MJpegDecodeContext
static const uint8_t sp5x_data_sof[]
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
static int sp5x_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static const uint8_t sp5x_quant_table[20][64]