#if !defined(_entenc_H) # define _entenc_H (1) # include <stddef.h> # include "entcode.h"
/*Initializes the encoder. _buf:Thebuffertostoreoutputbytesin.
_size: The size of the buffer, in chars.*/ void ec_enc_init(ec_enc *_this,unsignedchar *_buf,opus_uint32 _size); /*Encodes a symbol given its frequency information. Thefrequencyinformationmustbediscerniblebythedecoder,assumingit hasreadonlytheprevioussymbolsfromthestream. Itisallowabletochangethefrequencyinformation,oreventheentire sourcealphabet,solongasthedecodercantellfromthecontextofthe previouslyencodedinformationthatitissupposedtodosoaswell. _fl:Thecumulativefrequencyofallsymbolsthatcomebeforetheonetobe encoded. _fh:Thecumulativefrequencyofallsymbolsuptoandincludingtheoneto beencoded. Togetherwith_fl,thisdefinestherange[_fl,_fh)inwhichthe decodedvaluewillfall.
_ft: The sum of the frequencies of all the symbols*/ void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft);
/*Equivalent to ec_encode() with _ft==1<<_bits.*/ void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits);
/* Encode a bit that has a 1/(1<<_logp) probability of being a one */ void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp);
/*Encodes a symbol given an "inverse" CDF table. _s:Theindexofthesymboltoencode. _icdf:The"inverse"CDF,suchthatsymbol_sfallsintherange [_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]),whereft=1<<_ftb. Thevaluesmustbemonotonicallynon-increasing,andthelastvalue mustbe0.
_ftb: The number of bits of precision in the cumulative distribution.*/ void ec_enc_icdf(ec_enc *_this,int _s,constunsignedchar *_icdf,unsigned _ftb);
/*Encodes a symbol given an "inverse" CDF table. _s:Theindexofthesymboltoencode. _icdf:The"inverse"CDF,suchthatsymbol_sfallsintherange [_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]),whereft=1<<_ftb. Thevaluesmustbemonotonicallynon-increasing,andthelastvalue mustbe0.
_ftb: The number of bits of precision in the cumulative distribution.*/ void ec_enc_icdf16(ec_enc *_this,int _s,const opus_uint16 *_icdf,unsigned _ftb);
/*Encodes a raw unsigned integer in the stream. _fl:Theintegertoencode. _ft:Thenumberofintegersthatcanbeencoded(onemorethanthemax).
This must be at least 2, and no more than 2**32-1.*/ void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft);
/*Encodes a sequence of raw bits in the stream. _fl:Thebitstoencode. _ftb:Thenumberofbitstoencode.
This must be between 1 and 25, inclusive.*/ void ec_enc_bits(ec_enc *_this,opus_uint32 _fl,unsigned _ftb);
/*Overwrites a few bits at the very start of an existing stream, after they havealreadybeenencoded. Thismakesitpossibletohaveafewflagsupfront,whereitiseasyfor decoderstoaccessthemwithoutparsingthewholestream,eveniftheir valuesarenotdetermineduntillateintheencodingprocess,withouthaving tobufferalltheintermediatesymbolsintheencoder. Inorderforthistowork,atleast_nbitsbitsmusthavealreadybeen encodedusingprobabilitiesthatareanexactpoweroftwo. Theencodercanverifythenumberofencodedbitsissufficient,butcannot checkthislattercondition. _val:Thebitstoencode(intheleast_nbitssignificantbits). Theywillbedecodedinorderfrommost-significanttoleast. _nbits:Thenumberofbitstooverwrite.
This must be no more than 8.*/ void ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits);
/*Compacts the data to fit in the target size. Thismovesuptherawbitsattheendofthecurrentbuffersotheyareat theendofthenewbuffersize. Thecallermustensurethattheamountofdatathat'salreadybeenwritten willfitinthenewsize. _size:Thenumberofbytesinthenewbuffer. Thismustbelargeenoughtocontainthebitsalreadywritten,and
must be no larger than the existing size.*/ void ec_enc_shrink(ec_enc *_this,opus_uint32 _size);
/*Indicates that there are no more symbols to encode. Allremainingoutputbytesareflushedtotheoutputbuffer.
ec_enc_init() must be called before the encoder can be used again.*/ void ec_enc_done(ec_enc *_this);
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.