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

Function aptx_encode_samples

libavcodec/aptxenc.c:198–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198static void aptx_encode_samples(AptXContext *ctx,
199 int32_t samples[NB_CHANNELS][4],
200 uint8_t *output)
201{
202 int channel;
203 for (channel = 0; channel < NB_CHANNELS; channel++)
204 aptx_encode_channel(&ctx->channels[channel], samples[channel], ctx->hd);
205
206 aptx_insert_sync(ctx->channels, &ctx->sync_idx);
207
208 for (channel = 0; channel < NB_CHANNELS; channel++) {
209 ff_aptx_invert_quantize_and_prediction(&ctx->channels[channel], ctx->hd);
210 if (ctx->hd)
211 AV_WB24(output + 3*channel,
212 aptxhd_pack_codeword(&ctx->channels[channel]));
213 else
214 AV_WB16(output + 2*channel,
215 aptx_pack_codeword(&ctx->channels[channel]));
216 }
217}
218
219static int aptx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
220 const AVFrame *frame, int *got_packet_ptr)

Callers 1

aptx_encode_frameFunction · 0.85

Calls 5

aptx_encode_channelFunction · 0.85
aptx_insert_syncFunction · 0.85
aptxhd_pack_codewordFunction · 0.85
aptx_pack_codewordFunction · 0.85

Tested by

no test coverage detected