Lines Matching defs:out_fmt
79 av_cold int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt)
87 out_fmt = av_get_packed_sample_fmt(out_fmt);
91 if(out_fmt == AV_SAMPLE_FMT_S32) scale = 1.0/(1LL<<31);
92 if(out_fmt == AV_SAMPLE_FMT_S16) scale = 1.0/(1LL<<15);
93 if(out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1.0/(1LL<< 7);
95 if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S32 && (s->dither.output_sample_bits&31)) scale = 1;
96 if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S16) scale = 1<<16;
97 if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1<<24;
98 if(in_fmt == AV_SAMPLE_FMT_S16 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1<<8;
102 if (out_fmt == AV_SAMPLE_FMT_S32 && s->dither.output_sample_bits)
122 s->dither.ns_scale_1 *= 1 - exp(f->gain_cB * M_LN10 * 0.005) * 2 / (1<<(8*av_get_bytes_per_sample(out_fmt)));