webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Macros | Typedefs | Functions
opus_private.h File Reference
#include "arch.h"
#include "opus.h"
#include "celt.h"
#include <stddef.h>

Go to the source code of this file.

Classes

struct  OpusRepacketizer
 
struct  ChannelLayout
 

Macros

#define MODE_SILK_ONLY   1000
 
#define MODE_HYBRID   1001
 
#define MODE_CELT_ONLY   1002
 
#define OPUS_SET_VOICE_RATIO_REQUEST   11018
 
#define OPUS_GET_VOICE_RATIO_REQUEST   11019
 
#define OPUS_SET_VOICE_RATIO(x)
 
#define OPUS_GET_VOICE_RATIO(x)
 
#define OPUS_SET_FORCE_MODE_REQUEST   11002
 
#define OPUS_SET_FORCE_MODE(x)   OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x)
 

Typedefs

typedef struct ChannelLayout ChannelLayout
 
typedef void(* downmix_func) (const void *, opus_val32 *, int, int, int, int, int)
 

Functions

int validate_layout (const ChannelLayout *layout)
 
int get_left_channel (const ChannelLayout *layout, int stream_id, int prev)
 
int get_right_channel (const ChannelLayout *layout, int stream_id, int prev)
 
int get_mono_channel (const ChannelLayout *layout, int stream_id, int prev)
 
void downmix_float (const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C)
 
void downmix_int (const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C)
 
int encode_size (int size, unsigned char *data)
 
opus_int32 frame_size_select (opus_int32 frame_size, int variable_duration, opus_int32 Fs)
 
opus_int32 compute_frame_size (const void *analysis_pcm, int frame_size, int variable_duration, int C, opus_int32 Fs, int bitrate_bps, int delay_compensation, downmix_func downmix, float *subframe_mem)
 
opus_int32 opus_encode_native (OpusEncoder *st, const opus_val16 *pcm, int frame_size, unsigned char *data, opus_int32 out_data_bytes, int lsb_depth, const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix, int float_api)
 
int opus_decode_native (OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, opus_int32 *packet_offset, int soft_clip)
 
int opus_packet_parse_impl (const unsigned char *data, opus_int32 len, int self_delimited, unsigned char *out_toc, const unsigned char *frames[48], opus_int16 size[48], int *payload_offset, opus_int32 *packet_offset)
 
opus_int32 opus_repacketizer_out_range_impl (OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited, int pad)
 
int pad_frame (unsigned char *data, opus_int32 len, opus_int32 new_len)
 

Macro Definition Documentation

◆ MODE_CELT_ONLY

#define MODE_CELT_ONLY   1002

◆ MODE_HYBRID

#define MODE_HYBRID   1001

◆ MODE_SILK_ONLY

#define MODE_SILK_ONLY   1000

◆ OPUS_GET_VOICE_RATIO

#define OPUS_GET_VOICE_RATIO (   x)

Gets the encoder's configured voice ratio value,

See also
OPUS_SET_VOICE_RATIO
Parameters
[out]xint*: Voice percentage in the range 0-100, inclusive.

◆ OPUS_GET_VOICE_RATIO_REQUEST

#define OPUS_GET_VOICE_RATIO_REQUEST   11019

◆ OPUS_SET_FORCE_MODE

#define OPUS_SET_FORCE_MODE (   x)    OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x)

◆ OPUS_SET_FORCE_MODE_REQUEST

#define OPUS_SET_FORCE_MODE_REQUEST   11002

◆ OPUS_SET_VOICE_RATIO

#define OPUS_SET_VOICE_RATIO (   x)

Configures the encoder's expected percentage of voice opposed to music or other signals.

Note
This interface is currently more aspiration than actuality. It's ultimately expected to bias an automatic signal classifier, but it currently just shifts the static bitrate to mode mapping around a little bit.
Parameters
[in]xint: Voice percentage in the range 0-100, inclusive.

◆ OPUS_SET_VOICE_RATIO_REQUEST

#define OPUS_SET_VOICE_RATIO_REQUEST   11018

Typedef Documentation

◆ ChannelLayout

◆ downmix_func

typedef void(* downmix_func) (const void *, opus_val32 *, int, int, int, int, int)

Function Documentation

◆ compute_frame_size()

opus_int32 compute_frame_size ( const void analysis_pcm,
int  frame_size,
int  variable_duration,
int  C,
opus_int32  Fs,
int  bitrate_bps,
int  delay_compensation,
downmix_func  downmix,
float *  subframe_mem 
)

◆ downmix_float()

void downmix_float ( const void _x,
opus_val32 sub,
int  subframe,
int  offset,
int  c1,
int  c2,
int  C 
)

◆ downmix_int()

void downmix_int ( const void _x,
opus_val32 sub,
int  subframe,
int  offset,
int  c1,
int  c2,
int  C 
)

◆ encode_size()

int encode_size ( int  size,
unsigned char *  data 
)

◆ frame_size_select()

opus_int32 frame_size_select ( opus_int32  frame_size,
int  variable_duration,
opus_int32  Fs 
)

◆ get_left_channel()

int get_left_channel ( const ChannelLayout layout,
int  stream_id,
int  prev 
)

◆ get_mono_channel()

int get_mono_channel ( const ChannelLayout layout,
int  stream_id,
int  prev 
)

◆ get_right_channel()

int get_right_channel ( const ChannelLayout layout,
int  stream_id,
int  prev 
)

◆ opus_decode_native()

int opus_decode_native ( OpusDecoder st,
const unsigned char *  data,
opus_int32  len,
opus_val16 pcm,
int  frame_size,
int  decode_fec,
int  self_delimited,
opus_int32 packet_offset,
int  soft_clip 
)

◆ opus_encode_native()

opus_int32 opus_encode_native ( OpusEncoder st,
const opus_val16 pcm,
int  frame_size,
unsigned char *  data,
opus_int32  out_data_bytes,
int  lsb_depth,
const void analysis_pcm,
opus_int32  analysis_size,
int  c1,
int  c2,
int  analysis_channels,
downmix_func  downmix,
int  float_api 
)

◆ opus_packet_parse_impl()

int opus_packet_parse_impl ( const unsigned char *  data,
opus_int32  len,
int  self_delimited,
unsigned char *  out_toc,
const unsigned char *  frames[48],
opus_int16  size[48],
int *  payload_offset,
opus_int32 packet_offset 
)

◆ opus_repacketizer_out_range_impl()

opus_int32 opus_repacketizer_out_range_impl ( OpusRepacketizer rp,
int  begin,
int  end,
unsigned char *  data,
opus_int32  maxlen,
int  self_delimited,
int  pad 
)

◆ pad_frame()

int pad_frame ( unsigned char *  data,
opus_int32  len,
opus_int32  new_len 
)

◆ validate_layout()

int validate_layout ( const ChannelLayout layout)