Lines Matching defs:frame_size
70 int frame_size;
139 st->frame_size = Fs/400;
205 opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)
241 if (frame_size < F2_5)
246 /* Limit frame_size to avoid excessive stack allocations. */
247 frame_size = IMIN(frame_size, st->Fs/25*3);
253 frame_size = IMIN(frame_size, st->frame_size);
257 audiosize = st->frame_size;
261 audiosize = frame_size;
288 return frame_size;
318 if (audiosize > frame_size)
320 /*fprintf(stderr, "PCM buffer too small: %d vs %d (mode = %d)\n", audiosize, frame_size, mode);*/
324 frame_size = audiosize;
328 pcm_silk_size = (mode != MODE_CELT_ONLY) ? IMAX(F10, frame_size)*st->channels : ALLOC_NONE;
373 silk_frame_size = frame_size;
374 for (i=0;i<frame_size*st->channels;i++)
383 } while( decoded_samples < frame_size );
474 int celt_frame_size = IMIN(F20, frame_size);
483 for (i=0;i<frame_size*st->channels;i++)
497 for (i=0;i<frame_size*st->channels;i++)
500 for (i=0;i<frame_size*st->channels;i++)
519 smooth_fade(pcm+st->channels*(frame_size-F2_5), redundant_audio+st->channels*F2_5,
520 pcm+st->channels*(frame_size-F2_5), F2_5, st->channels, window, st->Fs);
557 for (i=0;i<frame_size*st->channels;i++)
585 opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec,
596 /* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */
597 if ((decode_fec || len==0 || data==NULL) && frame_size%(st->Fs/400)!=0)
604 ret = opus_decode_frame(st, NULL, 0, pcm+pcm_count*st->channels, frame_size-pcm_count, 0);
608 } while (pcm_count < frame_size);
609 celt_assert(pcm_count == frame_size);
634 if (frame_size < packet_frame_size || packet_mode == MODE_CELT_ONLY || st->mode == MODE_CELT_ONLY)
635 return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, soft_clip);
638 if (frame_size-packet_frame_size!=0)
640 ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL, soft_clip);
646 celt_assert(ret==frame_size-packet_frame_size);
651 st->frame_size = packet_frame_size;
653 ret = opus_decode_frame(st, data, size[0], pcm+st->channels*(frame_size-packet_frame_size),
658 if (OPUS_CHECK_ARRAY(pcm, frame_size*st->channels))
659 OPUS_PRINT_INT(frame_size);
660 st->last_packet_duration = frame_size;
661 return frame_size;
665 if (count*packet_frame_size > frame_size)
671 st->frame_size = packet_frame_size;
678 ret = opus_decode_frame(st, data, size[i], pcm+nb_samples*st->channels, frame_size-nb_samples, 0);
700 opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)
702 if(frame_size<=0)
704 return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0);
709 opus_int32 len, float *pcm, int frame_size, int decode_fec)
715 if(frame_size<=0)
720 ALLOC(out, frame_size*st->channels, opus_int16);
722 ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 0);
736 opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec)
742 if(frame_size<=0)
748 ALLOC(out, frame_size*st->channels, float);
750 ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 1);
761 opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec)
763 if(frame_size<=0)
765 return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0);
814 st->frame_size = st->Fs/400;