36 int buf_size = avpkt->
size;
47 recoded = buf_recoded->
data;
70 for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
71 recoded[j++] = buf[i];
73 for (i = 14; i < buf_size && j < buf_size+1024-3; i++)
75 recoded[j++] = buf[
i];
85 avpkt->
buf = buf_recoded;
86 avpkt->
data = recoded;
92 #if CONFIG_SP5X_DECODER 108 #if CONFIG_AMV_DECODER #define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
static const uint8_t sp5x_data_dqt[]
int coded_width
Bitstream width / height, may be different from width/height e.g.
static av_cold int init(AVCodecContext *avctx)
static const uint8_t sp5x_data_dht[]
static CopyRet receive_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame)
MJPEG encoder and decoder.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static const uint8_t sp5x_data_sos[]
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. ...
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
const char * name
Name of the codec implementation.
int width
picture width / height.
static const uint8_t sp5x_qscale_five_quant_table[][64]
int ff_mjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Libavcodec external API header.
main external API structure.
uint8_t * data
The data buffer.
AVBufferRef * av_buffer_allocz(int size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
int ff_sp5x_process_packet(AVCodecContext *avctx, AVPacket *avpkt)
static const uint8_t sp5x_data_sof[]
#define FF_CODEC_CAP_SETS_PKT_DTS
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
A reference to a data buffer.
common internal api header.
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.