Go to the documentation of this file.
38 unsigned dqt = 0,
dht = 0, sof0 = 0;
54 bytestream_put_byte(&out_buf, 0xff);
55 bytestream_put_byte(&out_buf,
SOI);
56 bytestream_put_byte(&out_buf, 0xff);
57 bytestream_put_byte(&out_buf,
APP1);
58 bytestream_put_be16(&out_buf, 42);
59 bytestream_put_be32(&out_buf, 0);
61 bytestream_put_be32(&out_buf, in->
size + 44);
62 bytestream_put_be32(&out_buf, in->
size + 44);
63 bytestream_put_be32(&out_buf, 0);
65 for (
i = 0;
i < in->
size - 1;
i++) {
66 if (in->
data[
i] == 0xff) {
67 switch (in->
data[
i + 1]) {
70 case SOF0: sof0 =
i + 46;
break;
72 bytestream_put_be32(&out_buf,
dqt);
73 bytestream_put_be32(&out_buf,
dht);
74 bytestream_put_be32(&out_buf, sof0);
75 bytestream_put_be32(&out_buf,
i + 46);
76 bytestream_put_be32(&out_buf,
i + 46 +
AV_RB16(in->
data +
i + 2));
79 out->size = out_buf -
out->data;
105 .
p.
name =
"mjpegadump",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt)
Called by the bitstream filters to get the next packet for filtering.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
The bitstream filter state.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVCodecID
Identify the syntax and semantics of the bitstream.
AVBitStreamFilter p
The public AVBitStreamFilter.
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
#define i(width, name, range_min, range_max)
static int FUNC() dht(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawHuffmanTableSpecification *current)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
static int FUNC() dqt(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawQuantisationTableSpecification *current)
This structure stores compressed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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