| 46 | } |
| 47 | |
| 48 | static av_cold int cng_encode_init(AVCodecContext *avctx) |
| 49 | { |
| 50 | CNGContext *p = avctx->priv_data; |
| 51 | int ret; |
| 52 | |
| 53 | avctx->frame_size = 640; |
| 54 | p->order = 10; |
| 55 | if ((ret = ff_lpc_init(&p->lpc, avctx->frame_size, p->order, FF_LPC_TYPE_LEVINSON)) < 0) |
| 56 | return ret; |
| 57 | p->samples32 = av_malloc_array(avctx->frame_size, sizeof(*p->samples32)); |
| 58 | p->ref_coef = av_malloc_array(p->order, sizeof(*p->ref_coef)); |
| 59 | if (!p->samples32 || !p->ref_coef) |
| 60 | return AVERROR(ENOMEM); |
| 61 | |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, |
| 66 | const AVFrame *frame, int *got_packet_ptr) |
nothing calls this directly
no test coverage detected