MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / set_sample_rate_params

Function set_sample_rate_params

libavcodec/takdec.c:168–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static void set_sample_rate_params(AVCodecContext *avctx)
169{
170 TAKDecContext *s = avctx->priv_data;
171 int shift;
172
173 if (avctx->sample_rate < 11025) {
174 shift = 3;
175 } else if (avctx->sample_rate < 22050) {
176 shift = 2;
177 } else if (avctx->sample_rate < 44100) {
178 shift = 1;
179 } else {
180 shift = 0;
181 }
182 s->uval = FFALIGN(avctx->sample_rate + 511LL >> 9, 4) << shift;
183 s->subframe_scale = FFALIGN(avctx->sample_rate + 511LL >> 9, 4) << 1;
184}
185
186static av_cold int tak_decode_init(AVCodecContext *avctx)
187{

Callers 2

tak_decode_initFunction · 0.85
tak_decode_frameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected