29 #define DEFAULT_PACKET_SIZE 1024
30 #define OVERREAD_SIZE 3
76 for (; p < end - 3; p += 4) {
79 if (x & (~(x+0x01010101)) & 0x80808080) {
82 }
else if (p[1] == 0xff) {
84 }
else if (p[2] == 0xff) {
86 }
else if (p[3] == 0xff) {
92 for (; p <
end; ++p) {
93 if (*p == 0xff)
return p;
103 unsigned int soi_pos;
108 if (current_pos > current_pos + cache_size)
112 current_pos + cache_size +
135 uint8_t *startmarker_ptr, *
end, *search_end, marker;
154 if (startmarker_ptr >= search_end - 1 ||
155 *(startmarker_ptr + 1) !=
EOI)
break;
158 if (startmarker_ptr != search_end) {
159 marker = *(startmarker_ptr + 1);
164 mxg->
soi_ptr = startmarker_ptr;
165 }
else if (marker ==
EOI) {
173 #if FF_API_DESTRUCT_PACKET
174 pkt->destruct = NULL;
190 }
else if ( (
SOF0 <= marker && marker <=
SOF15) ||
191 (
SOS <= marker && marker <=
COM) ) {
210 if (marker ==
APP13 && size >= 16) {
214 #if FF_API_DESTRUCT_PACKET
215 pkt->destruct = NULL;
218 pkt->
size = size - 14;
219 pkt->
data = startmarker_ptr + 16;
229 }
else if (marker ==
COM && size >= 18 &&
230 !strncmp(startmarker_ptr + 4,
"MXF", 3)) {