Home
last modified time | relevance | path

Searched refs:buf_size (Results 1 – 25 of 831) sorted by relevance

12345678910>>...34

/third_party/ffmpeg/libavcodec/
Ddvdsub_parser.c38 const uint8_t *buf, int buf_size) in dvdsub_parse() argument
43 *poutbuf_size = buf_size; in dvdsub_parse()
46 if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) { in dvdsub_parse()
47 if (buf_size) in dvdsub_parse()
48 av_log(avctx, AV_LOG_DEBUG, "Parser input %d too small\n", buf_size); in dvdsub_parse()
49 return buf_size; in dvdsub_parse()
57 return buf_size; in dvdsub_parse()
62 if (pc->packet_index + buf_size <= pc->packet_len) { in dvdsub_parse()
63 memcpy(pc->packet + pc->packet_index, buf, buf_size); in dvdsub_parse()
64 pc->packet_index += buf_size; in dvdsub_parse()
[all …]
Ddnxhd_parser.c38 const uint8_t *buf, int buf_size) in dnxhd_find_frame_end() argument
46 for (i = 0; i < buf_size; i++) { in dnxhd_find_frame_end()
59 if (!buf_size) /* EOF considered as end of frame */ in dnxhd_find_frame_end()
61 for (; i < buf_size; i++) { in dnxhd_find_frame_end()
84 if (buf_size >= dctx->remaining) { in dnxhd_find_frame_end()
91 dctx->remaining -= buf_size; in dnxhd_find_frame_end()
94 dctx->cur_byte += buf_size - i; in dnxhd_find_frame_end()
100 if (dctx->remaining > buf_size) { in dnxhd_find_frame_end()
101 dctx->remaining -= buf_size; in dnxhd_find_frame_end()
120 const uint8_t *buf, int buf_size) in dnxhd_parse() argument
[all …]
Ddirac_parser.c57 const uint8_t *buf, int buf_size) in find_frame_end() argument
63 for (i = 0; i < buf_size; i++) { in find_frame_end()
77 for (; i < buf_size; i++) { in find_frame_end()
79 if ((buf_size - i) >= pc->header_bytes_needed) { in find_frame_end()
83 pc->header_bytes_needed = 9 - (buf_size - i); in find_frame_end()
138 int next, const uint8_t **buf, int *buf_size) in dirac_combine_frame() argument
149 if (*buf_size == 0 && pc->buffer[4] == 0x10) { in dirac_combine_frame()
151 *buf_size = pc->index; in dirac_combine_frame()
160 pc->index + (*buf_size - pc->sync_offset)); in dirac_combine_frame()
165 *buf_size - pc->sync_offset); in dirac_combine_frame()
[all …]
Davs3_parser.c28 static int avs3_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size) in avs3_find_frame_end() argument
35 for (; cur < buf_size; ++cur) { in avs3_find_frame_end()
46 if (!buf_size) in avs3_find_frame_end()
48 for (; cur < buf_size; ++cur) { in avs3_find_frame_end()
65 int buf_size, AVCodecContext *avctx) in parse_avs3_nal_units() argument
67 if (buf_size < 5) { in parse_avs3_nal_units()
76 init_get_bits(&gb, buf + 4, buf_size - 4); in parse_avs3_nal_units()
134 if (buf_size > 9) { in parse_avs3_nal_units()
149 const uint8_t *buf, int buf_size) in avs3_parse() argument
155 next = buf_size; in avs3_parse()
[all …]
Dtak_parser.c39 const uint8_t *buf, int buf_size) in tak_parse() argument
46 int needed = buf_size ? TAK_MAX_FRAME_HEADER_BYTES : 8; in tak_parse()
50 *poutbuf_size = buf_size; in tak_parse()
54 if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0) in tak_parse()
55 return buf_size; in tak_parse()
59 return buf_size; in tak_parse()
62 while (buf_size || t->index + needed <= pc->index) { in tak_parse()
63 if (buf_size && t->index + TAK_MAX_FRAME_HEADER_BYTES > pc->index) { in tak_parse()
65 buf_size); in tak_parse()
72 buf_size -= tmp_buf_size; in tak_parse()
[all …]
Dmlp_parser.c55 const uint8_t *buf, int buf_size) in mlp_parse() argument
68 if (buf_size == 0) in mlp_parse()
72 next = buf_size; in mlp_parse()
77 for (i = 0; i < buf_size; i++) { in mlp_parse()
89 if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1) in mlp_parse()
91 return buf_size; in mlp_parse()
94 if ((ret = ff_combine_frame(&mp->pc, i - 7, &buf, &buf_size)) < 0) { in mlp_parse()
110 if (mp->pc.index + buf_size < 2) { in mlp_parse()
111 if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1) in mlp_parse()
113 return buf_size; in mlp_parse()
[all …]
Dmjpeg_parser.c40 static int find_frame_end(MJPEGParserContext *m, const uint8_t *buf, int buf_size){ in find_frame_end() argument
50 for(i=0; i<buf_size;){ in find_frame_end()
62 int size= FFMIN(buf_size-i, m->size); in find_frame_end()
74 if (buf_size == 0) in find_frame_end()
76 for(; i<buf_size;){ in find_frame_end()
90 int size= FFMIN(buf_size-i, m->size); in find_frame_end()
107 const uint8_t *buf, int buf_size) in jpeg_parse() argument
114 next= buf_size; in jpeg_parse()
116 next= find_frame_end(m, buf, buf_size); in jpeg_parse()
118 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in jpeg_parse()
[all …]
Dlatm_parser.c43 int buf_size) in latm_find_frame_end() argument
54 for (i = 0; i < buf_size; i++) { in latm_find_frame_end()
67 if (buf_size == 0) in latm_find_frame_end()
69 if ((state & LATM_SIZE_MASK) - s->count <= buf_size) { in latm_find_frame_end()
76 s->count += buf_size; in latm_find_frame_end()
85 const uint8_t *buf, int buf_size) in latm_parse() argument
92 next = buf_size; in latm_parse()
94 next = latm_find_frame_end(s1, buf, buf_size); in latm_parse()
96 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in latm_parse()
99 return buf_size; in latm_parse()
[all …]
Dcavs_parser.c37 int buf_size) { in cavs_find_frame_end() argument
46 for(i=0; i<buf_size; i++){ in cavs_find_frame_end()
58 if (buf_size == 0) in cavs_find_frame_end()
60 for(; i<buf_size; i++){ in cavs_find_frame_end()
79 const uint8_t *buf, int buf_size) in cavsvideo_parse() argument
85 next= buf_size; in cavsvideo_parse()
87 next= cavs_find_frame_end(pc, buf, buf_size); in cavsvideo_parse()
89 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in cavsvideo_parse()
92 return buf_size; in cavsvideo_parse()
96 *poutbuf_size = buf_size; in cavsvideo_parse()
Dopus_parser.c84 const uint8_t *buf, int buf_size, int *header_len) in opus_find_frame_end() argument
94 if (!buf_size) in opus_find_frame_end()
102 if (!s->ts_framing && buf_size > 2) { in opus_find_frame_end()
109 for (i = 0; i < buf_size-2; i++) { in opus_find_frame_end()
112 payload = parse_opus_ts_header(payload, &payload_len, buf_size - i); in opus_find_frame_end()
125 payload_len = buf_size; in opus_find_frame_end()
137 if (payload_len <= buf_size && (!s->ts_framing || start_found)) { in opus_find_frame_end()
150 if (payload_len + *header_len <= buf_size) { in opus_find_frame_end()
162 return buf_size; in opus_find_frame_end()
167 const uint8_t *buf, int buf_size) in opus_parse() argument
[all …]
Davs2_parser.c29 static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size) in avs2_find_frame_end() argument
36 for (; cur < buf_size; ++cur) { in avs2_find_frame_end()
47 if (!buf_size) in avs2_find_frame_end()
49 for (; cur < buf_size; cur++) { in avs2_find_frame_end()
67 const uint8_t *buf, int buf_size) in avs2_parse() argument
73 next = buf_size; in avs2_parse()
75 next = avs2_find_frame_end(pc, buf, buf_size); in avs2_parse()
76 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in avs2_parse()
79 return buf_size; in avs2_parse()
84 *poutbuf_size = buf_size; in avs2_parse()
Ddvbsubenc.c40 static int dvb_encode_rle2(uint8_t **pq, int buf_size, in dvb_encode_rle2() argument
53 if (buf_size * 8 < w * 3 + 32) in dvb_encode_rle2()
116 buf_size -= q - line_begin; in dvb_encode_rle2()
135 static int dvb_encode_rle4(uint8_t **pq, int buf_size, in dvb_encode_rle4() argument
148 if (buf_size * 8 < w * 6 + 32) in dvb_encode_rle4()
203 buf_size -= q - line_begin; in dvb_encode_rle4()
210 static int dvb_encode_rle8(uint8_t **pq, int buf_size, in dvb_encode_rle8() argument
221 if (buf_size * 8 < w * 12 + 24) in dvb_encode_rle8()
264 buf_size -= q - line_begin; in dvb_encode_rle8()
271 static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size, in dvbsub_encode() argument
[all …]
Dvp8_parser.c26 const uint8_t *buf, int buf_size) in parse() argument
32 *poutbuf_size = buf_size; in parse()
34 if (buf_size < 3) in parse()
35 return buf_size; in parse()
41 return buf_size; in parse()
55 if (buf_size < 10) in parse()
56 return buf_size; in parse()
61 return buf_size; in parse()
73 return buf_size; in parse()
Dmpegaudio_parser.c46 const uint8_t *buf, int buf_size) in mpegaudio_parse() argument
53 int flush = !buf_size; in mpegaudio_parse()
55 for(i=0; i<buf_size; ){ in mpegaudio_parse()
57 int inc= FFMIN(buf_size - i, s->frame_size); in mpegaudio_parse()
67 while(i<buf_size){ in mpegaudio_parse()
98 next = buf_size; in mpegaudio_parse()
104 return buf_size; /* parsers must not return error codes */ in mpegaudio_parse()
114 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in mpegaudio_parse()
117 return buf_size; in mpegaudio_parse()
120 if (flush && buf_size >= ID3v1_TAG_SIZE && memcmp(buf, "TAG", 3) == 0) { in mpegaudio_parse()
[all …]
Dh263_parser.c30 int ff_h263_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size){ in ff_h263_find_frame_end() argument
39 for(i=0; i<buf_size; i++){ in ff_h263_find_frame_end()
50 for(; i<buf_size; i++){ in ff_h263_find_frame_end()
68 const uint8_t *buf, int buf_size) in h263_parse() argument
74 next = buf_size; in h263_parse()
76 next= ff_h263_find_frame_end(pc, buf, buf_size); in h263_parse()
78 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in h263_parse()
81 return buf_size; in h263_parse()
86 *poutbuf_size = buf_size; in h263_parse()
Dmpeg4video_parser.c37 int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size) in ff_mpeg4_find_frame_end() argument
47 for (i = 0; i < buf_size; i++) { in ff_mpeg4_find_frame_end()
59 if (buf_size == 0) in ff_mpeg4_find_frame_end()
61 for (; i < buf_size; i++) { in ff_mpeg4_find_frame_end()
79 const uint8_t *buf, int buf_size) in mpeg4_decode_header() argument
97 init_get_bits(gb, buf, 8 * buf_size); in mpeg4_decode_header()
133 const uint8_t *buf, int buf_size) in mpeg4video_parse() argument
139 next = buf_size; in mpeg4video_parse()
141 next = ff_mpeg4_find_frame_end(pc, buf, buf_size); in mpeg4video_parse()
143 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in mpeg4video_parse()
[all …]
Dvorbis_parser.c42 const uint8_t *buf, int buf_size) in parse_id_header() argument
45 if (buf_size < 30) { in parse_id_header()
74 const uint8_t *buf, int buf_size) in parse_setup_header() argument
82 if (buf_size < 7) { in parse_setup_header()
100 if (!(rev_buf = av_malloc(buf_size))) { in parse_setup_header()
104 for (i = 0; i < buf_size; i++) in parse_setup_header()
105 rev_buf[i] = buf[buf_size - 1 - i]; in parse_setup_header()
106 init_get_bits(&gb, rev_buf, buf_size * 8); in parse_setup_header()
172 init_get_bits(&gb, rev_buf, buf_size * 8); in parse_setup_header()
214 int buf_size, int *flags) in av_vorbis_parse_frame_flags() argument
[all …]
Dh261_parser.c31 const uint8_t *buf, int buf_size) in h261_find_frame_end() argument
39 for (i = 0; i < buf_size && !vop_found; i++) { in h261_find_frame_end()
49 for (; i < buf_size; i++) { in h261_find_frame_end()
69 const uint8_t *buf, int buf_size) in h261_parse() argument
75 next = buf_size; in h261_parse()
77 next = h261_find_frame_end(pc, avctx, buf, buf_size); in h261_parse()
78 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { in h261_parse()
81 return buf_size; in h261_parse()
85 *poutbuf_size = buf_size; in h261_parse()
Dg729_parser.c41 const uint8_t *buf, int buf_size) in g729_parse() argument
61 *poutbuf_size = buf_size; in g729_parse()
62 return buf_size; in g729_parse()
67 if (s->remaining <= buf_size) { in g729_parse()
72 s->remaining -= buf_size; in g729_parse()
75 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0 || !buf_size) { in g729_parse()
78 return buf_size; in g729_parse()
84 *poutbuf_size = buf_size; in g729_parse()
Ddpx_parser.c42 const uint8_t *buf, int buf_size) in dpx_parse() argument
52 if (buf_size == 0) in dpx_parse()
56 for (; i < buf_size; i++) { in dpx_parse()
69 i = FFMIN(d->remaining_size, buf_size); in dpx_parse()
76 for (; d->pc.frame_start_found && i < buf_size; i++) { in dpx_parse()
85 if (d->fsize > buf_size - i + 19) in dpx_parse()
86 d->remaining_size = d->fsize - buf_size + i - 19; in dpx_parse()
101 if (ff_combine_frame(&d->pc, next, &buf, &buf_size) < 0) in dpx_parse()
102 return buf_size; in dpx_parse()
107 *poutbuf_size = buf_size; in dpx_parse()
Ddvdsubdec.c42 int buf_size; member
101 const uint8_t *buf, int start, int buf_size, int is_8bit) in decode_rle() argument
108 if (start >= buf_size) in decode_rle()
114 bit_len = (buf_size - start) * 8; in decode_rle()
221 const uint8_t *buf, int buf_size) in decode_dvd_subtitles() argument
233 if (buf_size < 10) in decode_dvd_subtitles()
249 if (cmd_pos < 0 || cmd_pos > buf_size - 2 - offset_size) { in decode_dvd_subtitles()
257 while (cmd_pos > 0 && cmd_pos < buf_size - 2 - offset_size) { in decode_dvd_subtitles()
266 while (pos < buf_size) { in decode_dvd_subtitles()
284 if ((buf_size - pos) < 2) in decode_dvd_subtitles()
[all …]
Dparser.c122 const uint8_t *buf, int buf_size, in av_parser_parse2() argument
143 if (buf_size == 0) { in av_parser_parse2()
147 …} else if (s->cur_offset + buf_size != s->cur_frame_end[s->cur_frame_start_index]) { /* skip remai… in av_parser_parse2()
152 s->cur_frame_end[i] = s->cur_offset + buf_size; in av_parser_parse2()
167 poutbuf_size, buf, buf_size); in av_parser_parse2()
195 const uint8_t *buf, int buf_size, int keyframe) in av_parser_change() argument
200 int i = s->parser->split(avctx, buf, buf_size); in av_parser_change()
202 buf_size -= i; in av_parser_change()
208 *poutbuf_size = buf_size; in av_parser_change()
211 int size = buf_size + avctx->extradata_size; in av_parser_change()
[all …]
Ddvbsub_parser.c47 const uint8_t *buf, int buf_size) in dvbsub_parse() argument
57 for (i=0; i < buf_size; i++) in dvbsub_parse()
68 *poutbuf_size = buf_size; in dvbsub_parse()
83 if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) { in dvbsub_parse()
85 return buf_size; in dvbsub_parse()
108 if (buf_size - buf_pos + pc->packet_index > PARSE_BUF_SIZE) in dvbsub_parse()
109 return buf_size; in dvbsub_parse()
113 return buf_size; in dvbsub_parse()
115 memcpy(pc->packet_buf + pc->packet_index, buf + buf_pos, buf_size - buf_pos); in dvbsub_parse()
116 pc->packet_index += buf_size - buf_pos; in dvbsub_parse()
[all …]
/third_party/musl/porting/linux/user/src/stdio/
D__fdopen.c27 size_t buf_size = 0; in get_bufsize() local
30 buf_size = BUFSIZ; in get_bufsize()
32 buf_size = BUFSIZ; in get_bufsize()
34 buf_size = st.st_blksize; in get_bufsize()
37 return buf_size; in get_bufsize()
44 size_t buf_size = 0; in __fdopen() local
53 buf_size = get_bufsize(fd); in __fdopen()
56 if (!(f = malloc(sizeof *f + UNGET + buf_size))) { in __fdopen()
83 f->buf_size = buf_size; in __fdopen()
/third_party/libexif/libexif/olympus/
Dexif-mnote-data-olympus.c42 unsigned int buf_size);
100 unsigned char **buf, unsigned int *buf_size) in exif_mnote_data_olympus_save() argument
108 if (!n || !buf || !buf_size) return; in exif_mnote_data_olympus_save()
113 *buf_size = 6 + 2 + 2 + n->count * 12; in exif_mnote_data_olympus_save()
118 *buf = exif_mem_alloc (ne->mem, *buf_size); in exif_mnote_data_olympus_save()
120 EXIF_LOG_NO_MEMORY(ne->log, "ExifMnoteDataOlympus", *buf_size); in exif_mnote_data_olympus_save()
132 *buf_size += 8-6 + 4; in exif_mnote_data_olympus_save()
133 *buf = exif_mem_alloc (ne->mem, *buf_size); in exif_mnote_data_olympus_save()
135 EXIF_LOG_NO_MEMORY(ne->log, "ExifMnoteDataOlympus", *buf_size); in exif_mnote_data_olympus_save()
155 *buf_size -= 8 + 2; in exif_mnote_data_olympus_save()
[all …]

12345678910>>...34