Lines Matching defs:celt
22 #include <celt/celt.h>
23 #include <celt/celt_header.h>
62 struct libcelt_context *celt = c->priv_data;
68 celt->mode = celt_mode_create(c->sample_rate, c->frame_size, &err);
69 if (!celt->mode)
71 celt->dec = celt_decoder_create_custom(celt->mode, c->ch_layout.nb_channels, &err);
72 if (!celt->dec) {
73 celt_mode_destroy(celt->mode);
77 celt->discard = AV_RL32(c->extradata);
78 if (celt->discard < 0 || celt->discard >= c->frame_size) {
80 "Invalid overlap (%d), ignored.\n", celt->discard);
81 celt->discard = 0;
86 unsigned lib_version = ff_celt_bitstream_version_hack(celt->mode);
99 struct libcelt_context *celt = c->priv_data;
101 celt_decoder_destroy(celt->dec);
102 celt_mode_destroy(celt->mode);
109 struct libcelt_context *celt = c->priv_data;
117 err = celt_decode(celt->dec, pkt->data, pkt->size, pcm, c->frame_size);
120 if (celt->discard) {
121 frame->nb_samples -= celt->discard;
122 memmove(pcm, pcm + celt->discard * c->ch_layout.nb_channels,
124 celt->discard = 0;