Lines Matching refs:silk_mode
69 silk_EncControlStruct silk_mode; member
211 ret = silk_InitEncoder( silk_enc, st->arch, &st->silk_mode ); in opus_encoder_init()
215 st->silk_mode.nChannelsAPI = channels; in opus_encoder_init()
216 st->silk_mode.nChannelsInternal = channels; in opus_encoder_init()
217 st->silk_mode.API_sampleRate = st->Fs; in opus_encoder_init()
218 st->silk_mode.maxInternalSampleRate = 16000; in opus_encoder_init()
219 st->silk_mode.minInternalSampleRate = 8000; in opus_encoder_init()
220 st->silk_mode.desiredInternalSampleRate = 16000; in opus_encoder_init()
221 st->silk_mode.payloadSize_ms = 20; in opus_encoder_init()
222 st->silk_mode.bitRate = 25000; in opus_encoder_init()
223 st->silk_mode.packetLossPercentage = 0; in opus_encoder_init()
224 st->silk_mode.complexity = 9; in opus_encoder_init()
225 st->silk_mode.useInBandFEC = 0; in opus_encoder_init()
226 st->silk_mode.useDTX = 0; in opus_encoder_init()
227 st->silk_mode.useCBR = 0; in opus_encoder_init()
228 st->silk_mode.reducedDependency = 0; in opus_encoder_init()
236 celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(st->silk_mode.complexity)); in opus_encoder_init()
986 bak_to_mono = st->silk_mode.toMono; in encode_multiframe_packet()
994 st->silk_mode.toMono = 0; in encode_multiframe_packet()
1032 st->silk_mode.toMono = bak_to_mono; in encode_multiframe_packet()
1138 if (st->silk_mode.complexity >= 10 && st->Fs>=16000) in opus_encode_native()
1140 if (st->silk_mode.complexity >= 7 && st->Fs>=16000) in opus_encode_native()
1296 st->use_vbr, 0, st->silk_mode.complexity, st->silk_mode.packetLossPercentage); in opus_encode_native()
1339 st->use_vbr, 0, st->silk_mode.complexity, st->silk_mode.packetLossPercentage); in opus_encode_native()
1386 if (st->silk_mode.useInBandFEC && st->silk_mode.packetLossPercentage > (128-voice_est)>>4) in opus_encode_native()
1392 st->silk_mode.useDTX = st->use_dtx && !(analysis_info.valid || is_silence); in opus_encode_native()
1394 st->silk_mode.useDTX = st->use_dtx; in opus_encode_native()
1396 if (st->silk_mode.useDTX && voice_est > 100) in opus_encode_native()
1434 if (st->stream_channels == 1 && st->prev_channels ==2 && st->silk_mode.toMono==0 in opus_encode_native()
1438 st->silk_mode.toMono = 1; in opus_encode_native()
1441 st->silk_mode.toMono = 0; in opus_encode_native()
1446 st->use_vbr, st->mode, st->silk_mode.complexity, st->silk_mode.packetLossPercentage); in opus_encode_native()
1456 if (st->mode == MODE_CELT_ONLY || st->first || st->silk_mode.allowBandwidthSwitch) in opus_encode_native()
1497 …if (!st->first && st->mode != MODE_CELT_ONLY && !st->silk_mode.inWBmodeWithoutVariableLP && st->ba… in opus_encode_native()
1547 …st->silk_mode.LBRR_coded = decide_fec(st->silk_mode.useInBandFEC, st->silk_mode.packetLossPercenta… in opus_encode_native()
1548 st->silk_mode.LBRR_coded, st->mode, &st->bandwidth, equiv_rate); in opus_encode_native()
1691 st->silk_mode.bitRate = compute_silk_rate_for_hybrid(total_bitRate, in opus_encode_native()
1692 curr_bandwidth, st->Fs == 50 * frame_size, st->use_vbr, st->silk_mode.LBRR_coded, in opus_encode_native()
1697 celt_rate = total_bitRate - st->silk_mode.bitRate; in opus_encode_native()
1702 st->silk_mode.bitRate = total_bitRate; in opus_encode_native()
1739 rate_offset = MAX32(rate_offset, -2*st->silk_mode.bitRate/3); in opus_encode_native()
1742 st->silk_mode.bitRate += 3*rate_offset/5; in opus_encode_native()
1744 st->silk_mode.bitRate += rate_offset; in opus_encode_native()
1747 st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs; in opus_encode_native()
1748 st->silk_mode.nChannelsAPI = st->channels; in opus_encode_native()
1749 st->silk_mode.nChannelsInternal = st->stream_channels; in opus_encode_native()
1751 st->silk_mode.desiredInternalSampleRate = 8000; in opus_encode_native()
1753 st->silk_mode.desiredInternalSampleRate = 12000; in opus_encode_native()
1756 st->silk_mode.desiredInternalSampleRate = 16000; in opus_encode_native()
1760 st->silk_mode.minInternalSampleRate = 16000; in opus_encode_native()
1762 st->silk_mode.minInternalSampleRate = 8000; in opus_encode_native()
1765 st->silk_mode.maxInternalSampleRate = 16000; in opus_encode_native()
1773 st->silk_mode.maxInternalSampleRate = 12000; in opus_encode_native()
1774 … st->silk_mode.desiredInternalSampleRate = IMIN(12000, st->silk_mode.desiredInternalSampleRate); in opus_encode_native()
1778 st->silk_mode.maxInternalSampleRate = 8000; in opus_encode_native()
1779 … st->silk_mode.desiredInternalSampleRate = IMIN(8000, st->silk_mode.desiredInternalSampleRate); in opus_encode_native()
1783 st->silk_mode.useCBR = !st->use_vbr; in opus_encode_native()
1788 st->silk_mode.maxBits = (max_data_bytes-1)*8; in opus_encode_native()
1792 st->silk_mode.maxBits -= redundancy_bytes*8 + 1; in opus_encode_native()
1794 st->silk_mode.maxBits -= 20; in opus_encode_native()
1796 if (st->silk_mode.useCBR) in opus_encode_native()
1800 … st->silk_mode.maxBits = IMIN(st->silk_mode.maxBits, st->silk_mode.bitRate * frame_size / st->Fs); in opus_encode_native()
1807 … opus_int32 maxBitRate = compute_silk_rate_for_hybrid(st->silk_mode.maxBits*st->Fs / frame_size, in opus_encode_native()
1808 … curr_bandwidth, st->Fs == 50 * frame_size, st->use_vbr, st->silk_mode.LBRR_coded, in opus_encode_native()
1810 st->silk_mode.maxBits = maxBitRate * frame_size / st->Fs; in opus_encode_native()
1834 …silk_Encode( silk_enc, &st->silk_mode, pcm_silk, st->encoder_buffer, NULL, &zero, prefill, activit… in opus_encode_native()
1836 st->silk_mode.opusCanSwitch = 0; in opus_encode_native()
1845 … ret = silk_Encode( silk_enc, &st->silk_mode, pcm_silk, frame_size, &enc, &nBytes, 0, activity ); in opus_encode_native()
1855 if( st->silk_mode.internalSampleRate == 8000 ) { in opus_encode_native()
1857 } else if( st->silk_mode.internalSampleRate == 12000 ) { in opus_encode_native()
1859 } else if( st->silk_mode.internalSampleRate == 16000 ) { in opus_encode_native()
1863 celt_assert( st->silk_mode.internalSampleRate == 16000 ); in opus_encode_native()
1866 st->silk_mode.opusCanSwitch = st->silk_mode.switchReady && !st->nonfinal_frame; in opus_encode_native()
1877 if (st->silk_mode.opusCanSwitch) in opus_encode_native()
1915 if (st->silk_mode.reducedDependency) in opus_encode_native()
1922 celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps-st->silk_mode.bitRate)); in opus_encode_native()
1960 st->silk_mode.stereoWidth_Q14 = 16384; in opus_encode_native()
1962 st->silk_mode.stereoWidth_Q14 = 0; in opus_encode_native()
1964 … st->silk_mode.stereoWidth_Q14 = 16384 - 2048*(opus_int32)(32000-equiv_rate)/(equiv_rate-14000); in opus_encode_native()
1968 if( st->hybrid_stereo_width_Q14 < (1 << 14) || st->silk_mode.stereoWidth_Q14 < (1 << 14) ) { in opus_encode_native()
1971 g2 = (opus_val16)(st->silk_mode.stereoWidth_Q14); in opus_encode_native()
1981 st->hybrid_stereo_width_Q14 = st->silk_mode.stereoWidth_Q14; in opus_encode_native()
2036 info.signalType = st->silk_mode.signalType; in opus_encode_native()
2037 info.offset = st->silk_mode.offset; in opus_encode_native()
2076 celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps-st->silk_mode.bitRate)); in opus_encode_native()
2360 st->silk_mode.maxInternalSampleRate = 8000; in opus_encoder_ctl()
2362 st->silk_mode.maxInternalSampleRate = 12000; in opus_encoder_ctl()
2364 st->silk_mode.maxInternalSampleRate = 16000; in opus_encoder_ctl()
2387 st->silk_mode.maxInternalSampleRate = 8000; in opus_encoder_ctl()
2389 st->silk_mode.maxInternalSampleRate = 12000; in opus_encoder_ctl()
2391 st->silk_mode.maxInternalSampleRate = 16000; in opus_encoder_ctl()
2432 st->silk_mode.complexity = value; in opus_encoder_ctl()
2443 *value = st->silk_mode.complexity; in opus_encoder_ctl()
2453 st->silk_mode.useInBandFEC = value; in opus_encoder_ctl()
2463 *value = st->silk_mode.useInBandFEC; in opus_encoder_ctl()
2473 st->silk_mode.packetLossPercentage = value; in opus_encoder_ctl()
2484 *value = st->silk_mode.packetLossPercentage; in opus_encoder_ctl()
2495 st->silk_mode.useCBR = 1-value; in opus_encoder_ctl()
2650 st->silk_mode.reducedDependency = value; in opus_encoder_ctl()
2658 *value = st->silk_mode.reducedDependency; in opus_encoder_ctl()