| 166 | } |
| 167 | |
| 168 | static 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 | |
| 186 | static av_cold int tak_decode_init(AVCodecContext *avctx) |
| 187 | { |
no outgoing calls
no test coverage detected