40 unsigned second_field_offset = 0;
41 unsigned next_field = 0;
42 unsigned dht_offset[2];
43 unsigned dqt_offset[2];
44 unsigned sod_offset[2];
45 unsigned sof_offset[2];
46 unsigned sos_offset[2];
65 bytestream2_put_be32(&pb, 0);
66 bytestream2_put_be32(&pb,
AV_RB32(
"mjpg"));
67 bytestream2_put_be32(&pb, 0);
68 bytestream2_put_be32(&pb, 0);
69 for (
int i = 0;
i < 6;
i++)
70 bytestream2_put_be32(&pb, 0);
73 bytestream2_put_be16(&pb, 17);
74 bytestream2_put_byte(&pb, 8);
75 bytestream2_put_be16(&pb,
ctx->par_in->height / 2);
76 bytestream2_put_be16(&pb,
ctx->par_in->width);
77 bytestream2_put_byte(&pb, 3);
78 bytestream2_put_byte(&pb, 1);
79 bytestream2_put_byte(&pb, 0x21);
80 bytestream2_put_byte(&pb, 0);
81 bytestream2_put_byte(&pb, 2);
82 bytestream2_put_byte(&pb, 0x11);
83 bytestream2_put_byte(&pb, 1);
84 bytestream2_put_byte(&pb, 3);
85 bytestream2_put_byte(&pb, 0x11);
86 bytestream2_put_byte(&pb, 1);
89 bytestream2_put_be16(&pb, 12);
90 bytestream2_put_byte(&pb, 3);
91 bytestream2_put_byte(&pb, 1);
92 bytestream2_put_byte(&pb, 0);
93 bytestream2_put_byte(&pb, 2);
94 bytestream2_put_byte(&pb, 0x11);
95 bytestream2_put_byte(&pb, 3);
96 bytestream2_put_byte(&pb, 0x11);
97 bytestream2_put_byte(&pb, 0);
98 bytestream2_put_byte(&pb, 0);
99 bytestream2_put_byte(&pb, 0);
102 bytestream2_put_be16(&pb, 132);
103 bytestream2_put_byte(&pb, 0);
105 for (
int i = 0;
i < 64;
i++)
106 bytestream2_put_byte(&pb, bytestream2_get_be32(&gb));
107 bytestream2_put_byte(&pb, 1);
108 for (
int i = 0;
i < 64;
i++)
109 bytestream2_put_byte(&pb, bytestream2_get_be32(&gb));
111 dht_offset[
field] = 0;
123 bytestream2_put_be64(&pb, 0);
128 next_field = in->
size;
143 AV_WB32(
out->data + second_field_offset + 16, 0);
144 AV_WB32(
out->data + second_field_offset + 20, dqt_offset[1] - second_field_offset);
145 AV_WB32(
out->data + second_field_offset + 24, dht_offset[1]);
146 AV_WB32(
out->data + second_field_offset + 28, sof_offset[1] - second_field_offset);
147 AV_WB32(
out->data + second_field_offset + 32, sos_offset[1] - second_field_offset);
148 AV_WB32(
out->data + second_field_offset + 36, sod_offset[1] - second_field_offset);
164 .
p.
name =
"media100_to_mjpegb",