Lines Matching defs:out_count
587 static int resample(SwrContext *s, AudioData *out_param, int out_count,
617 ret= s->resampler->multiple_resample(s->resample, &out, out_count, &tmp, s->in_buffer_count, &consumed);
618 out_count -= ret;
637 ret= s->resampler->multiple_resample(s->resample, &out, out_count, &in, FFMAX(in_count-padless, 0), &consumed);
638 out_count -= ret;
658 if(s->in_buffer_count && s->in_buffer_count+2 < count && out_count) count= s->in_buffer_count+2;
677 s->resample_in_constraint= !!out_count;
682 static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_count,
691 return out_count;
694 // in_max= out_count*(int64_t)s->in_sample_rate / s->out_sample_rate + resample_filter_taps;
701 if((ret=swri_realloc_audio(&s->midbuf, out_count))<0)
708 if((ret=swri_realloc_audio(&s->preout, out_count))<0)
730 out_count= FFMIN(out_count, in_count); //TODO check at the end if this is needed or redundant
732 copy(out, in, out_count);
733 return out_count;
746 if ((out_count = resample(s, midbuf, out_count, postin, in_count)) < 0)
747 return out_count;
749 swri_rematrix(s, preout, midbuf, out_count, preout==out);
754 if ((out_count = resample(s, preout, out_count, midbuf, in_count)) < 0)
755 return out_count;
758 if(preout != out && out_count){
762 int dither_count= FFMAX(out_count, 1<<16);
778 if(s->dither.noise_pos + out_count > s->dither.noise.count)
783 int len1= out_count&~15;
789 if(out_count != len1)
791 s->mix_2_1_f(conv_src->ch[ch] + off, preout->ch[ch] + off, s->dither.noise.ch[ch] + s->dither.noise.bps * s->dither.noise_pos + off, s->native_one, 0, 0, out_count - len1);
794 s->mix_2_1_f(conv_src->ch[ch], preout->ch[ch], s->dither.noise.ch[ch] + s->dither.noise.bps * s->dither.noise_pos, s->native_one, 0, 0, out_count);
798 case AV_SAMPLE_FMT_S16P :swri_noise_shaping_int16(s, conv_src, preout, &s->dither.noise, out_count); break;
799 case AV_SAMPLE_FMT_S32P :swri_noise_shaping_int32(s, conv_src, preout, &s->dither.noise, out_count); break;
800 case AV_SAMPLE_FMT_FLTP :swri_noise_shaping_float(s, conv_src, preout, &s->dither.noise, out_count); break;
801 case AV_SAMPLE_FMT_DBLP :swri_noise_shaping_double(s,conv_src, preout, &s->dither.noise, out_count); break;
804 s->dither.noise_pos += out_count;
807 swri_audio_convert(s->out_convert, out, conv_src, out_count);
809 return out_count;
817 uint8_t **out_arg, int out_count,
870 int ret = swr_convert_internal(s, out, out_count, in, in_count);
881 size = FFMIN(out_count, s->in_buffer_count);
891 out_count -= ret;
897 size= s->in_buffer_index + s->in_buffer_count + in_count - out_count;
899 if(in_count > out_count) { //FIXME move after swr_convert_internal
901 && s->in_buffer_count + in_count - out_count <= s->in_buffer_index){
910 if(out_count){
911 size = FFMIN(in_count, out_count);