webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
rate.c File Reference
#include <math.h>
#include "modes.h"
#include "cwrs.h"
#include "arch.h"
#include "os_support.h"
#include "entcode.h"
#include "rate.h"

Macros

#define ALLOC_STEPS   6
 

Functions

int compute_allocation (const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo, opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth)
 

Macro Definition Documentation

◆ ALLOC_STEPS

#define ALLOC_STEPS   6

Function Documentation

◆ compute_allocation()

int compute_allocation ( const CELTMode m,
int  start,
int  end,
const int *  offsets,
const int *  cap,
int  alloc_trim,
int *  intensity,
int *  dual_stero,
opus_int32  total,
opus_int32 balance,
int *  pulses,
int *  ebits,
int *  fine_priority,
int  C,
int  LM,
ec_ctx ec,
int  encode,
int  prev,
int  signalBandwidth 
)

Compute the pulse allocation, i.e. how many pulses will go in each band.

Parameters
mmode
offsetsRequested increase or decrease in the number of bits for each band
totalNumber of bands
pulsesNumber of pulses per band (returned)
Returns
Total number of bits allocated