FFmpeg
Macros | Variables
g723_1enc.c File Reference

G.723.1 compatible encoder. More...

#include <stdint.h>
#include <string.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "celp_math.h"
#include "g723_1.h"
#include "internal.h"
#include "put_bits.h"

Macros

#define BITSTREAM_WRITER_LE
 
#define get_index(num, offset, size)
 Quantize the current LSP subvector. More...
 

Variables

AVCodec ff_g723_1_encoder
 

Detailed Description

G.723.1 compatible encoder.

Macro Definition Documentation

§ get_index

#define get_index (   num,
  offset,
  size 
)
Value:
{ \
int error, max = -1; \
int16_t temp[4]; \
int i, j; \
\
for (i = 0; i < LSP_CB_SIZE; i++) { \
for (j = 0; j < size; j++){ \
temp[j] = (weight[j + (offset)] * lsp_band##num[i][j] + \
(1 << 14)) >> 15; \
} \
error = ff_g723_1_dot_product(lsp + (offset), temp, size) << 1; \
error -= ff_g723_1_dot_product(lsp_band##num[i], temp, size); \
if (error > max) { \
max = error; \
lsp_index[num] = i; \
} \
} \
}

Quantize the current LSP subvector.

Parameters
numband number
offsetoffset of the current subvector in an LPC_ORDER vector
sizesize of the current subvector

Variable Documentation

§ ff_g723_1_encoder

AVCodec ff_g723_1_encoder
Initial value:
= {
.name = "g723_1",
.long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_G723_1,
.priv_data_size = sizeof(G723_1_Context),
.init = g723_1_encode_init,
.encode2 = g723_1_encode_frame,
.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
},
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: g723_1.h:119
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
signed 16 bits
Definition: samplefmt.h:61