Lines Matching refs:len

61 …tizer_cat_impl(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len, int self_delimited)  in opus_repacketizer_cat_impl()  argument
66 if (len<1) return OPUS_INVALID_PACKET; in opus_repacketizer_cat_impl()
76 curr_nb_frames = opus_packet_get_nb_frames(data, len); in opus_repacketizer_cat_impl()
85 …ret=opus_packet_parse_impl(data, len, self_delimited, &tmp_toc, &rp->frames[rp->nb_frames], &rp->l… in opus_repacketizer_cat_impl()
92 int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) in opus_repacketizer_cat() argument
94 return opus_repacketizer_cat_impl(rp, data, len, 0); in opus_repacketizer_cat()
107 opus_int16 *len; in opus_repacketizer_out_range_impl() local
118 len = rp->len+begin; in opus_repacketizer_out_range_impl()
121 tot_size = 1 + (len[count-1]>=252); in opus_repacketizer_out_range_impl()
129 tot_size += len[0]+1; in opus_repacketizer_out_range_impl()
135 if (len[1] == len[0]) in opus_repacketizer_out_range_impl()
138 tot_size += 2*len[0]+1; in opus_repacketizer_out_range_impl()
144 tot_size += len[0]+len[1]+2+(len[0]>=252); in opus_repacketizer_out_range_impl()
148 ptr += encode_size(len[0], ptr); in opus_repacketizer_out_range_impl()
160 tot_size = 1 + (len[count-1]>=252); in opus_repacketizer_out_range_impl()
166 if (len[i] != len[0]) in opus_repacketizer_out_range_impl()
176 tot_size += 1 + (len[i]>=252) + len[i]; in opus_repacketizer_out_range_impl()
177 tot_size += len[count-1]; in opus_repacketizer_out_range_impl()
184 tot_size += count*len[0]+2; in opus_repacketizer_out_range_impl()
204 ptr += encode_size(len[i], ptr); in opus_repacketizer_out_range_impl()
208 int sdlen = encode_size(len[count-1], ptr); in opus_repacketizer_out_range_impl()
216 celt_assert(frames[i] + len[i] <= data || ptr <= frames[i]); in opus_repacketizer_out_range_impl()
217 OPUS_MOVE(ptr, frames[i], len[i]); in opus_repacketizer_out_range_impl()
218 ptr += len[i]; in opus_repacketizer_out_range_impl()
238 int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len) in opus_packet_pad() argument
242 if (len < 1) in opus_packet_pad()
244 if (len==new_len) in opus_packet_pad()
246 else if (len > new_len) in opus_packet_pad()
250 OPUS_MOVE(data+new_len-len, data, len); in opus_packet_pad()
251 opus_repacketizer_cat(&rp, data+new_len-len, len); in opus_packet_pad()
259 opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len) in opus_packet_unpad() argument
263 if (len < 1) in opus_packet_unpad()
266 ret = opus_repacketizer_cat(&rp, data, len); in opus_packet_unpad()
269 ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, len, 0, 0); in opus_packet_unpad()
270 celt_assert(ret > 0 && ret <= len); in opus_packet_unpad()
274 int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_str… in opus_multistream_packet_pad() argument
283 if (len < 1) in opus_multistream_packet_pad()
285 if (len==new_len) in opus_multistream_packet_pad()
287 else if (len > new_len) in opus_multistream_packet_pad()
289 amount = new_len - len; in opus_multistream_packet_pad()
293 if (len<=0) in opus_multistream_packet_pad()
295 count = opus_packet_parse_impl(data, len, 1, &toc, NULL, in opus_multistream_packet_pad()
300 len -= packet_offset; in opus_multistream_packet_pad()
302 return opus_packet_pad(data, len, len+amount); in opus_multistream_packet_pad()
305 opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams) in opus_multistream_packet_unpad() argument
315 if (len < 1) in opus_multistream_packet_unpad()
324 if (len<=0) in opus_multistream_packet_unpad()
327 ret = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL, in opus_multistream_packet_unpad()
334 ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, dst, len, self_delimited, 0); in opus_multistream_packet_unpad()
341 len -= packet_offset; in opus_multistream_packet_unpad()