/* Copyright (c) 2017 Google Inc.
Written by Andrew Allen */ /* Redistributionanduseinsourceandbinaryforms,withorwithout modification,arepermittedprovidedthatthefollowingconditions aremet:
/** These are the actual encoder and decoder CTL ID numbers. *Theyshouldnotbeuseddirectlybyapplications.c
* In general, SETs should be even and GETs should be odd.*/ /**@{*/ #define OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN_REQUEST 6001 #define OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE_REQUEST 6003 #define OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST 6005 /**@}*/
/** @endcond */
/** @defgroup opus_projection_ctls Projection specific encoder and decoder CTLs * *Theseareconveniencemacrosthatarespecifictothe *opus_projection_encoder_ctl()andopus_projection_decoder_ctl() *interface. *TheCTLsfrom@refopus_genericctls,@refopus_encoderctls, *@refopus_decoderctls,and@refopus_multistream_ctlsmaybeappliedtoa *projectionencoderordecoderaswell.
*/ /**@{*/
/** Gets the gain (in dB. S7.8-format) of the demixing matrix from the encoder. *@param[out]x<tt>opus_int32*</tt>:Returnsthegain(indB.S7.8-format) *ofthedemixingmatrix. *@hideinitializer
*/ #define OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN(x) OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN_REQUEST, opus_check_int_ptr(x)
/** Gets the size in bytes of the demixing matrix from the encoder. *@param[out]x<tt>opus_int32*</tt>:Returnsthesizeinbytesofthe *demixingmatrix. *@hideinitializer
*/ #define OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE(x) OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE_REQUEST, opus_check_int_ptr(x)
/** Copies the demixing matrix to the supplied pointer location. *@param[out]x<tt>unsignedchar*</tt>:Returnsthedemixingmatrixtothe *suppliedpointerlocation. *@paramy<tt>opus_int32</tt>:Thesizeinbytesofthereservedmemoryatthe *pointerlocation. *@hideinitializer
*/ #define OPUS_PROJECTION_GET_DEMIXING_MATRIX(x,y) OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST, x, opus_check_int(y)
/** Gets the size of an OpusProjectionEncoder structure. *@paramchannels<tt>int</tt>:Thetotalnumberofinputchannelstoencode. *Thismustbenomorethan255. *@parammapping_family<tt>int</tt>:Themappingfamilytouseforselecting *theappropriateprojection. *@returnsThesizeinbytesonsuccess,oranegativeerrorcode *(see@refopus_errorcodes)onerror.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_projection_ambisonics_encoder_get_size( int channels, int mapping_family
);
/** Allocates and initializes a projection encoder state. *Callopus_projection_encoder_destroy()torelease *thisobjectwhenfinished. *@paramFs<tt>opus_int32</tt>:Samplingrateoftheinputsignal(inHz). *Thismustbeoneof8000,12000,16000, *24000,or48000. *@paramchannels<tt>int</tt>:Numberofchannelsintheinputsignal. *Thismustbeatmost255. *Itmaybegreaterthanthenumberof *codedchannels(<code>streams+ *coupled_streams</code>). *@parammapping_family<tt>int</tt>:Themappingfamilytouseforselecting *theappropriateprojection. *@param[out]streams<tt>int*</tt>:Thetotalnumberofstreamsthatwill *beencodedfromtheinput. *@param[out]coupled_streams<tt>int*</tt>:Numberofcoupled(2channel) *streamsthatwillbeencodedfromtheinput. *@paramapplication<tt>int</tt>:Thetargetencoderapplication. *Thismustbeoneofthefollowing: *<dl> *<dt>#OPUS_APPLICATION_VOIP</dt> *<dd>Processsignalforimprovedspeechintelligibility.</dd> *<dt>#OPUS_APPLICATION_AUDIO</dt> *<dd>Favorfaithfulnesstotheoriginalinput.</dd> *<dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt> *<dd>Configuretheminimumpossiblecodingdelaybydisablingcertainmodes *ofoperation.</dd> *</dl> *@param[out]error<tt>int*</tt>:Returns#OPUS_OKonsuccess,oranerror *code(see@refopus_errorcodes)on *failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusProjectionEncoder *opus_projection_ambisonics_encoder_create(
opus_int32 Fs, int channels, int mapping_family, int *streams, int *coupled_streams, int application, int *error
) OPUS_ARG_NONNULL(4) OPUS_ARG_NONNULL(5);
/** Initialize a previously allocated projection encoder state. *Thememorypointedtoby\astmustbeatleastthesizereturnedby *opus_projection_ambisonics_encoder_get_size(). *Thisisintendedforapplicationswhichusetheirownallocatorinsteadof *malloc. *Toresetapreviouslyinitializedstate,usethe#OPUS_RESET_STATECTL. *@seeopus_projection_ambisonics_encoder_create *@seeopus_projection_ambisonics_encoder_get_size *@paramst<tt>OpusProjectionEncoder*</tt>:Projectionencoderstatetoinitialize. *@paramFs<tt>opus_int32</tt>:Samplingrateoftheinputsignal(inHz). *Thismustbeoneof8000,12000,16000, *24000,or48000. *@paramchannels<tt>int</tt>:Numberofchannelsintheinputsignal. *Thismustbeatmost255. *Itmaybegreaterthanthenumberof *codedchannels(<code>streams+ *coupled_streams</code>). *@paramstreams<tt>int</tt>:Thetotalnumberofstreamstoencodefromthe *input. *Thismustbenomorethanthenumberofchannels. *@paramcoupled_streams<tt>int</tt>:Numberofcoupled(2channel)streams *toencode. *Thismustbenolargerthanthetotal *numberofstreams. *Additionally,Thetotalnumberof *encodedchannels(<code>streams+ *coupled_streams</code>)mustbeno *morethanthenumberofinputchannels. *@paramapplication<tt>int</tt>:Thetargetencoderapplication. *Thismustbeoneofthefollowing: *<dl> *<dt>#OPUS_APPLICATION_VOIP</dt> *<dd>Processsignalforimprovedspeechintelligibility.</dd> *<dt>#OPUS_APPLICATION_AUDIO</dt> *<dd>Favorfaithfulnesstotheoriginalinput.</dd> *<dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt> *<dd>Configuretheminimumpossiblecodingdelaybydisablingcertainmodes *ofoperation.</dd> *</dl> *@returns#OPUS_OKonsuccess,oranerrorcode(see@refopus_errorcodes) *onfailure.
*/
OPUS_EXPORT int opus_projection_ambisonics_encoder_init(
OpusProjectionEncoder *st,
opus_int32 Fs, int channels, int mapping_family, int *streams, int *coupled_streams, int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6);
/** Frees an <code>OpusProjectionEncoder</code> allocated by *opus_projection_ambisonics_encoder_create(). *@paramst<tt>OpusProjectionEncoder*</tt>:Projectionencoderstatetobefreed.
*/
OPUS_EXPORT void opus_projection_encoder_destroy(OpusProjectionEncoder *st);
/** Perform a CTL function on a projection Opus encoder. * *Generallytherequestandsubsequentargumentsaregeneratedbya *conveniencemacro. *@paramst<tt>OpusProjectionEncoder*</tt>:Projectionencoderstate. *@paramrequestThisandallremainingparametersshouldbereplacedbyone *oftheconveniencemacrosin@refopus_genericctls, *@refopus_encoderctls,@refopus_multistream_ctls,or *@refopus_projection_ctls *@seeopus_genericctls *@seeopus_encoderctls *@seeopus_multistream_ctls *@seeopus_projection_ctls
*/
OPUS_EXPORT int opus_projection_encoder_ctl(OpusProjectionEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/**@}*/
/**\name Projection decoder functions */ /**@{*/
/** Gets the size of an <code>OpusProjectionDecoder</code> structure. *@paramchannels<tt>int</tt>:Thetotalnumberofoutputchannels. *Thismustbenomorethan255. *@paramstreams<tt>int</tt>:Thetotalnumberofstreamscodedinthe *input. *Thismustbenomorethan255. *@paramcoupled_streams<tt>int</tt>:Numberstreamstodecodeascoupled *(2channel)streams. *Thismustbenolargerthanthetotal *numberofstreams. *Additionally,Thetotalnumberof *codedchannels(<code>streams+ *coupled_streams</code>)mustbeno *morethan255. *@returnsThesizeinbytesonsuccess,oranegativeerrorcode *(see@refopus_errorcodes)onerror.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_projection_decoder_get_size( int channels, int streams, int coupled_streams
);
/** Decode a projection Opus packet with floating point output. *@paramst<tt>OpusProjectionDecoder*</tt>:Projectiondecoderstate. *@param[in]data<tt>constunsignedchar*</tt>:Inputpayload. *Usea<code>NULL</code> *pointertoindicatepacket *loss. *@paramlen<tt>opus_int32</tt>:Numberofbytesinpayload. *@param[out]pcm<tt>opus_int16*</tt>:Outputsignal,withinterleaved *samples. *Thismustcontainroomfor *<code>frame_size*channels</code> *samples. *@paramframe_size<tt>int</tt>:Thenumberofsamplesperchannelof *availablespacein\apcm. *Ifthisislessthanthemaximumpacketduration *(120ms;5760for48kHz),thisfunctionwillnotbecapable *ofdecodingsomepackets.InthecaseofPLC(data==NULL) *orFEC(decode_fec=1),thenframe_sizeneedstobeexactly *thedurationofaudiothatismissing,otherwisethe *decoderwillnotbeintheoptimalstatetodecodethe *nextincomingpacket.ForthePLCandFECcases,frame_size *<b>must</b>beamultipleof2.5ms. *@paramdecode_fec<tt>int</tt>:Flag(0or1)torequestthatanyin-band *forwarderrorcorrectiondatabedecoded. *Ifnosuchdataisavailable,theframeis *decodedasifitwerelost. *@returnsNumberofsamplesdecodedonsuccessoranegativeerrorcode *(see@refopus_errorcodes)onfailure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_projection_decode_float(
OpusProjectionDecoder *st, constunsignedchar *data,
opus_int32 len, float *pcm, int frame_size, int decode_fec
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Perform a CTL function on a projection Opus decoder. * *Generallytherequestandsubsequentargumentsaregeneratedbya *conveniencemacro. *@paramst<tt>OpusProjectionDecoder*</tt>:Projectiondecoderstate. *@paramrequestThisandallremainingparametersshouldbereplacedbyone *oftheconveniencemacrosin@refopus_genericctls, *@refopus_decoderctls,@refopus_multistream_ctls,or *@refopus_projection_ctls. *@seeopus_genericctls *@seeopus_decoderctls *@seeopus_multistream_ctls *@seeopus_projection_ctls
*/
OPUS_EXPORT int opus_projection_decoder_ctl(OpusProjectionDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/** Frees an <code>OpusProjectionDecoder</code> allocated by *opus_projection_decoder_create(). *@paramst<tt>OpusProjectionDecoder</tt>:Projectiondecoderstatetobefreed.
*/
OPUS_EXPORT void opus_projection_decoder_destroy(OpusProjectionDecoder *st);
/**@}*/
/**@}*/
#ifdef __cplusplus
} #endif
#endif/* OPUS_PROJECTION_H */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.28 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.