| 116 | } |
| 117 | |
| 118 | static av_cold int decode_init(AVCodecContext * avctx) |
| 119 | { |
| 120 | int ret; |
| 121 | float scale = 1.0f; |
| 122 | NellyMoserDecodeContext *s = avctx->priv_data; |
| 123 | |
| 124 | s->avctx = avctx; |
| 125 | s->imdct_out = s->imdct_buf[0]; |
| 126 | s->imdct_prev = s->imdct_buf[1]; |
| 127 | av_lfg_init(&s->random_state, 0); |
| 128 | if ((ret = av_tx_init(&s->imdct_ctx, &s->imdct_fn, AV_TX_FLOAT_MDCT, |
| 129 | 1, 128, &scale, 0)) < 0) |
| 130 | return ret; |
| 131 | |
| 132 | s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT); |
| 133 | if (!s->fdsp) |
| 134 | return AVERROR(ENOMEM); |
| 135 | |
| 136 | s->scale_bias = 1.0/(32768*8); |
| 137 | avctx->sample_fmt = AV_SAMPLE_FMT_FLT; |
| 138 | |
| 139 | av_channel_layout_uninit(&avctx->ch_layout); |
| 140 | avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; |
| 141 | |
| 142 | /* Generate overlap window */ |
| 143 | ff_init_ff_sine_windows(7); |
| 144 | |
| 145 | return 0; |
| 146 | } |
| 147 | |
| 148 | static int decode_tag(AVCodecContext *avctx, AVFrame *frame, |
| 149 | int *got_frame_ptr, AVPacket *avpkt) |
nothing calls this directly
no test coverage detected