Home
last modified time | relevance | path

Searched refs:frame_length (Results 1 – 25 of 87) sorted by relevance

1234

/external/webrtc/src/common_audio/vad/
Dwebrtc_vad.c137 WebRtc_Word16 frame_length) in WebRtcVad_Process() argument
160 if ((frame_length != 320) && (frame_length != 640) && (frame_length != 960)) in WebRtcVad_Process()
164 vad = WebRtcVad_CalcVad32khz((VadInstT*)vad_inst, speech_frame, frame_length); in WebRtcVad_Process()
168 if ((frame_length != 160) && (frame_length != 320) && (frame_length != 480)) in WebRtcVad_Process()
172 vad = WebRtcVad_CalcVad16khz((VadInstT*)vad_inst, speech_frame, frame_length); in WebRtcVad_Process()
176 if ((frame_length != 80) && (frame_length != 160) && (frame_length != 240)) in WebRtcVad_Process()
180 vad = WebRtcVad_CalcVad8khz((VadInstT*)vad_inst, speech_frame, frame_length); in WebRtcVad_Process()
Dvad_unittest.cc40 bool ValidRatesAndFrameLengths(int16_t rate, int16_t frame_length) { in ValidRatesAndFrameLengths() argument
42 if (frame_length == 80 || frame_length == 160 || frame_length == 240) { in ValidRatesAndFrameLengths()
47 if (frame_length == 160 || frame_length == 320 || frame_length == 480) { in ValidRatesAndFrameLengths()
53 if (frame_length == 320 || frame_length == 640 || frame_length == 960) { in ValidRatesAndFrameLengths()
Dvad_core.h109 int frame_length);
111 int frame_length);
113 int frame_length);
133 WebRtc_Word16 total_power, int frame_length);
/external/chromium_org/third_party/webrtc/common_audio/vad/
Dvad_unittest.cc28 bool VadTest::ValidRatesAndFrameLengths(int rate, int frame_length) { in ValidRatesAndFrameLengths() argument
30 if (frame_length == 80 || frame_length == 160 || frame_length == 240) { in ValidRatesAndFrameLengths()
35 if (frame_length == 160 || frame_length == 320 || frame_length == 480) { in ValidRatesAndFrameLengths()
40 if (frame_length == 320 || frame_length == 640 || frame_length == 960) { in ValidRatesAndFrameLengths()
45 if (frame_length == 480 || frame_length == 960 || frame_length == 1440) { in ValidRatesAndFrameLengths()
Dwebrtc_vad.c72 int frame_length) { in WebRtcVad_Process() argument
86 if (WebRtcVad_ValidRateAndFrameLength(fs, frame_length) != 0) { in WebRtcVad_Process()
91 vad = WebRtcVad_CalcVad48khz(self, audio_frame, frame_length); in WebRtcVad_Process()
93 vad = WebRtcVad_CalcVad32khz(self, audio_frame, frame_length); in WebRtcVad_Process()
95 vad = WebRtcVad_CalcVad16khz(self, audio_frame, frame_length); in WebRtcVad_Process()
97 vad = WebRtcVad_CalcVad8khz(self, audio_frame, frame_length); in WebRtcVad_Process()
106 int WebRtcVad_ValidRateAndFrameLength(int rate, int frame_length) { in WebRtcVad_ValidRateAndFrameLength() argument
119 if (frame_length == valid_length) { in WebRtcVad_ValidRateAndFrameLength()
Dvad_core.h107 int frame_length);
109 int frame_length);
111 int frame_length);
113 int frame_length);
Dvad_core.c125 int16_t total_power, int frame_length) { in GmmProbability() argument
149 if (frame_length == 80) { in GmmProbability()
154 } else if (frame_length == 160) { in GmmProbability()
607 int frame_length) { in WebRtcVad_CalcVad48khz() argument
616 int num_10ms_frames = frame_length / kFrameLen10ms48khz; in WebRtcVad_CalcVad48khz()
626 vad = WebRtcVad_CalcVad8khz(inst, speech_nb, frame_length / 6); in WebRtcVad_CalcVad48khz()
632 int frame_length) in WebRtcVad_CalcVad32khz() argument
641 frame_length); in WebRtcVad_CalcVad32khz()
642 len = WEBRTC_SPL_RSHIFT_W16(frame_length, 1); in WebRtcVad_CalcVad32khz()
654 int frame_length) in WebRtcVad_CalcVad16khz() argument
[all …]
/external/chromium_org/third_party/webrtc/tools/frame_editing/
Dframe_editing_lib.cc39 int frame_length = CalcBufferSize(kI420, width, height); in EditFrames() local
41 webrtc::scoped_ptr<uint8_t[]> temp_buffer(new uint8_t[frame_length]); in EditFrames()
55 while ((num_bytes_read = fread(temp_buffer.get(), 1, frame_length, in_fid)) in EditFrames()
56 == frame_length) { in EditFrames()
60 fwrite(temp_buffer.get(), 1, frame_length, out_fid); in EditFrames()
69 fwrite(temp_buffer.get(), 1, frame_length, out_fid); in EditFrames()
74 fwrite(temp_buffer.get(), 1, frame_length, out_fid); in EditFrames()
79 if (num_bytes_read > 0 && num_bytes_read < frame_length) { in EditFrames()
/external/libopus/silk/
Ddecoder_set_fs.c41 opus_int frame_length, ret = 0; in silk_decoder_set_fs() local
48 frame_length = silk_SMULBB( psDec->nb_subfr, psDec->subfr_length ); in silk_decoder_set_fs()
58 if( psDec->fs_kHz != fs_kHz || frame_length != psDec->frame_length ) { in silk_decoder_set_fs()
100 psDec->frame_length = frame_length; in silk_decoder_set_fs()
104 silk_assert( psDec->frame_length > 0 && psDec->frame_length <= MAX_FRAME_LENGTH ); in silk_decoder_set_fs()
Dstereo_LR_to_MS.c47 …opus_int frame_length /* I Number of samples … in silk_stereo_LR_to_MS() argument
61 ALLOC( side, frame_length + 2, opus_int16 ); in silk_stereo_LR_to_MS()
63 for( n = 0; n < frame_length + 2; n++ ) { in silk_stereo_LR_to_MS()
73 silk_memcpy( state->sMid, &mid[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
74 silk_memcpy( state->sSide, &side[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
77 ALLOC( LP_mid, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
78 ALLOC( HP_mid, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
79 for( n = 0; n < frame_length; n++ ) { in silk_stereo_LR_to_MS()
86 ALLOC( LP_side, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
87 ALLOC( HP_side, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
[all …]
Ddecode_frame.c53 L = psDec->frame_length; in silk_decode_frame()
74 psDec->indices.quantOffsetType, psDec->frame_length ); in silk_decode_frame()
105 silk_assert( psDec->ltp_mem_length >= psDec->frame_length ); in silk_decode_frame()
106 mv_len = psDec->ltp_mem_length - psDec->frame_length; in silk_decode_frame()
107 … silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) ); in silk_decode_frame()
108 silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) ); in silk_decode_frame()
DVAD.c102 silk_assert( MAX_FRAME_LENGTH >= psEncC->frame_length ); in silk_VAD_GetSA_Q8()
103 silk_assert( psEncC->frame_length <= 512 ); in silk_VAD_GetSA_Q8()
104 silk_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) ); in silk_VAD_GetSA_Q8()
109 decimated_framelength1 = silk_RSHIFT( psEncC->frame_length, 1 ); in silk_VAD_GetSA_Q8()
110 decimated_framelength2 = silk_RSHIFT( psEncC->frame_length, 2 ); in silk_VAD_GetSA_Q8()
111 decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 ); in silk_VAD_GetSA_Q8()
129 X, &X[ X_offset[ 3 ] ], psEncC->frame_length ); in silk_VAD_GetSA_Q8()
156 …decimated_framelength = silk_RSHIFT( psEncC->frame_length, silk_min_int( VAD_N_BANDS - b, VAD_N_BA… in silk_VAD_GetSA_Q8()
257 if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { in silk_VAD_GetSA_Q8()
277 if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { in silk_VAD_GetSA_Q8()
Ddecode_pulses.c42 …const opus_int frame_length /* I Frame length … in silk_decode_pulses() argument
57 iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_decode_pulses()
58 if( iter * SHELL_CODEC_FRAME_LENGTH < frame_length ) { in silk_decode_pulses()
59 silk_assert( frame_length == 12 * 10 ); /* Make sure only happens for 10 ms @ 12 kHz */ in silk_decode_pulses()
114 silk_decode_signs( psRangeDec, pulses, frame_length, signalType, quantOffsetType, sum_pulses ); in silk_decode_pulses()
Dstereo_MS_to_LR.c41 …opus_int frame_length /* I Number of samples … in silk_stereo_MS_to_LR() argument
50 silk_memcpy( state->sMid, &x1[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_MS_to_LR()
51 silk_memcpy( state->sSide, &x2[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_MS_to_LR()
69 for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) { in silk_stereo_MS_to_LR()
79 for( n = 0; n < frame_length; n++ ) { in silk_stereo_MS_to_LR()
/external/chromium_org/third_party/opus/src/silk/
Ddecoder_set_fs.c41 opus_int frame_length, ret = 0; in silk_decoder_set_fs() local
48 frame_length = silk_SMULBB( psDec->nb_subfr, psDec->subfr_length ); in silk_decoder_set_fs()
58 if( psDec->fs_kHz != fs_kHz || frame_length != psDec->frame_length ) { in silk_decoder_set_fs()
100 psDec->frame_length = frame_length; in silk_decoder_set_fs()
104 silk_assert( psDec->frame_length > 0 && psDec->frame_length <= MAX_FRAME_LENGTH ); in silk_decoder_set_fs()
Dstereo_LR_to_MS.c47 …opus_int frame_length /* I Number of samples … in silk_stereo_LR_to_MS() argument
61 ALLOC( side, frame_length + 2, opus_int16 ); in silk_stereo_LR_to_MS()
63 for( n = 0; n < frame_length + 2; n++ ) { in silk_stereo_LR_to_MS()
73 silk_memcpy( state->sMid, &mid[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
74 silk_memcpy( state->sSide, &side[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_LR_to_MS()
77 ALLOC( LP_mid, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
78 ALLOC( HP_mid, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
79 for( n = 0; n < frame_length; n++ ) { in silk_stereo_LR_to_MS()
86 ALLOC( LP_side, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
87 ALLOC( HP_side, frame_length, opus_int16 ); in silk_stereo_LR_to_MS()
[all …]
Ddecode_frame.c53 L = psDec->frame_length; in silk_decode_frame()
74 psDec->indices.quantOffsetType, psDec->frame_length ); in silk_decode_frame()
105 silk_assert( psDec->ltp_mem_length >= psDec->frame_length ); in silk_decode_frame()
106 mv_len = psDec->ltp_mem_length - psDec->frame_length; in silk_decode_frame()
107 … silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) ); in silk_decode_frame()
108 silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) ); in silk_decode_frame()
DVAD.c102 silk_assert( MAX_FRAME_LENGTH >= psEncC->frame_length ); in silk_VAD_GetSA_Q8()
103 silk_assert( psEncC->frame_length <= 512 ); in silk_VAD_GetSA_Q8()
104 silk_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) ); in silk_VAD_GetSA_Q8()
109 decimated_framelength1 = silk_RSHIFT( psEncC->frame_length, 1 ); in silk_VAD_GetSA_Q8()
110 decimated_framelength2 = silk_RSHIFT( psEncC->frame_length, 2 ); in silk_VAD_GetSA_Q8()
111 decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 ); in silk_VAD_GetSA_Q8()
129 X, &X[ X_offset[ 3 ] ], psEncC->frame_length ); in silk_VAD_GetSA_Q8()
156 …decimated_framelength = silk_RSHIFT( psEncC->frame_length, silk_min_int( VAD_N_BANDS - b, VAD_N_BA… in silk_VAD_GetSA_Q8()
257 if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { in silk_VAD_GetSA_Q8()
277 if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { in silk_VAD_GetSA_Q8()
Ddecode_pulses.c42 …const opus_int frame_length /* I Frame length … in silk_decode_pulses() argument
57 iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_decode_pulses()
58 if( iter * SHELL_CODEC_FRAME_LENGTH < frame_length ) { in silk_decode_pulses()
59 silk_assert( frame_length == 12 * 10 ); /* Make sure only happens for 10 ms @ 12 kHz */ in silk_decode_pulses()
114 silk_decode_signs( psRangeDec, pulses, frame_length, signalType, quantOffsetType, sum_pulses ); in silk_decode_pulses()
Dstereo_MS_to_LR.c41 …opus_int frame_length /* I Number of samples … in silk_stereo_MS_to_LR() argument
50 silk_memcpy( state->sMid, &x1[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_MS_to_LR()
51 silk_memcpy( state->sSide, &x2[ frame_length ], 2 * sizeof( opus_int16 ) ); in silk_stereo_MS_to_LR()
69 for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) { in silk_stereo_MS_to_LR()
79 for( n = 0; n < frame_length; n++ ) { in silk_stereo_MS_to_LR()
Dencode_pulses.c65 …const opus_int frame_length /* I Frame length … in silk_encode_pulses() argument
87 iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_encode_pulses()
88 if( iter * SHELL_CODEC_FRAME_LENGTH < frame_length ) { in silk_encode_pulses()
89 silk_assert( frame_length == 12 * 10 ); /* Make sure only happens for 10 ms @ 12 kHz */ in silk_encode_pulses()
91 silk_memset( &pulses[ frame_length ], 0, SHELL_CODEC_FRAME_LENGTH * sizeof(opus_int8)); in silk_encode_pulses()
204 silk_encode_signs( psRangeEnc, pulses, frame_length, signalType, quantOffsetType, sum_pulses ); in silk_encode_pulses()
/external/webrtc/test/testsupport/metrics/
Dvideo_metrics.cc108 const int frame_length = 3 * width * height >> 1; in CalculateMetrics() local
109 uint8_t* ref = new uint8_t[frame_length]; in CalculateMetrics()
110 uint8_t* test = new uint8_t[frame_length]; in CalculateMetrics()
112 int ref_bytes = fread(ref, 1, frame_length, ref_fp); in CalculateMetrics()
113 int test_bytes = fread(test, 1, frame_length, test_fp); in CalculateMetrics()
114 while (ref_bytes == frame_length && test_bytes == frame_length) { in CalculateMetrics()
134 ref_bytes = fread(ref, 1, frame_length, ref_fp); in CalculateMetrics()
135 test_bytes = fread(test, 1, frame_length, test_fp); in CalculateMetrics()
/external/chromium_org/third_party/webrtc/test/testsupport/metrics/
Dvideo_metrics.cc111 const size_t frame_length = 3 * width * height >> 1; in CalculateMetrics() local
114 scoped_ptr<uint8_t[]> ref_buffer(new uint8_t[frame_length]); in CalculateMetrics()
115 scoped_ptr<uint8_t[]> test_buffer(new uint8_t[frame_length]); in CalculateMetrics()
122 size_t ref_bytes = fread(ref_buffer.get(), 1, frame_length, ref_fp); in CalculateMetrics()
123 size_t test_bytes = fread(test_buffer.get(), 1, frame_length, test_fp); in CalculateMetrics()
124 while (ref_bytes == frame_length && test_bytes == frame_length) { in CalculateMetrics()
147 ref_bytes = fread(ref_buffer.get(), 1, frame_length, ref_fp); in CalculateMetrics()
148 test_bytes = fread(test_buffer.get(), 1, frame_length, test_fp); in CalculateMetrics()
/external/webrtc/src/modules/audio_coding/codecs/isac/main/source/
Dbandwidth_estimator.c137 const WebRtc_Word32 frame_length, in WebRtcIsac_UpdateBandwidthEstimator() argument
160 if ( frame_length != bwest_str->prev_frame_length ) in WebRtcIsac_UpdateBandwidthEstimator()
163 1000.0f / (float)frame_length; /* bits/s */ in WebRtcIsac_UpdateBandwidthEstimator()
168 rec_rtp_rate = ((float)pksize * 8.0f * 1000.0f / (float)frame_length) + in WebRtcIsac_UpdateBandwidthEstimator()
181 bwest_str->prev_frame_length = frame_length; in WebRtcIsac_UpdateBandwidthEstimator()
205 if (send_ts_diff <= (16 * frame_length)*2) in WebRtcIsac_UpdateBandwidthEstimator()
219 (float)frame_length); in WebRtcIsac_UpdateBandwidthEstimator()
268 if ( frame_length != bwest_str->prev_frame_length ) in WebRtcIsac_UpdateBandwidthEstimator()
272 1000.0f / (float)frame_length; /* bits/s */ in WebRtcIsac_UpdateBandwidthEstimator()
287 late_diff = arr_ts_diff - (float)(16 * frame_length); in WebRtcIsac_UpdateBandwidthEstimator()
[all …]
/external/chromium_org/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/
Dbandwidth_estimator.c137 const int32_t frame_length, in WebRtcIsac_UpdateBandwidthEstimator() argument
160 if ( frame_length != bwest_str->prev_frame_length ) in WebRtcIsac_UpdateBandwidthEstimator()
163 1000.0f / (float)frame_length; /* bits/s */ in WebRtcIsac_UpdateBandwidthEstimator()
168 rec_rtp_rate = ((float)pksize * 8.0f * 1000.0f / (float)frame_length) + in WebRtcIsac_UpdateBandwidthEstimator()
181 bwest_str->prev_frame_length = frame_length; in WebRtcIsac_UpdateBandwidthEstimator()
205 if (send_ts_diff <= (16 * frame_length)*2) in WebRtcIsac_UpdateBandwidthEstimator()
219 (float)frame_length); in WebRtcIsac_UpdateBandwidthEstimator()
268 if ( frame_length != bwest_str->prev_frame_length ) in WebRtcIsac_UpdateBandwidthEstimator()
272 1000.0f / (float)frame_length; /* bits/s */ in WebRtcIsac_UpdateBandwidthEstimator()
287 late_diff = arr_ts_diff - (float)(16 * frame_length); in WebRtcIsac_UpdateBandwidthEstimator()
[all …]

1234