Home
last modified time | relevance | path

Searched refs:sample (Results 1 – 25 of 105) sorted by relevance

12345

/frameworks/opt/net/voip/src/jni/rtp/
DG711Codec.cpp51 int sample = samples[i]; in encode() local
52 int sign = (sample >> 8) & 0x80; in encode()
53 if (sample < 0) { in encode()
54 sample = -sample; in encode()
56 sample += 132; in encode()
57 if (sample > 32767) { in encode()
58 sample = 32767; in encode()
60 int exponent = gExponents[sample >> 8]; in encode()
61 int mantissa = (sample >> (exponent + 3)) & 0x0F; in encode()
77 int sample = (((mantissa << 3) + 132) << exponent) - 132; in decode() local
[all …]
/frameworks/av/media/libstagefright/codecs/mp3dec/src/
Dpvmp3_polyphase_filter_window.h93 __inline int16 saturate16(int32 sample) in saturate16() argument
99 mov a, sample, asr#15 in saturate16()
100 teq a, sample, asr b in saturate16()
101 eorne sample, MAX_16BITS_INT, sample, asr#31 in saturate16()
103 return sample ; in saturate16()
108 inline int16 saturate16(int32 sample)
111 if ((sample >> 15) ^(sample >> 31))
113 sample = MAX_16BITS_INT ^(sample >> 31);
115 return sample;
/frameworks/av/media/libaudioclient/tests/
Dtrack_test_output_v1.0_ref_walleye.txt7 sample rate(48000), original sample rate(48000), speed(1.000000)
18 sample rate(24000), original sample rate(24000), speed(1.000000)
29 sample rate(16000), original sample rate(16000), speed(1.000000)
40 sample rate(8000), original sample rate(8000), speed(1.000000)
51 sample rate(44100), original sample rate(44100), speed(1.000000)
62 sample rate(22050), original sample rate(22050), speed(1.000000)
73 sample rate(11025), original sample rate(11025), speed(1.000000)
84 sample rate(48000), original sample rate(48000), speed(1.000000)
95 sample rate(48000), original sample rate(48000), speed(1.000000)
106 sample rate(48000), original sample rate(48000), speed(1.000000)
[all …]
Drecord_test_output_v1.0_ref_walleye.txt6 format(0x1), channel mask(0x10), channel count(1), sample rate(48000)
15 format(0x1), channel mask(0x10), channel count(1), sample rate(24000)
24 format(0x1), channel mask(0x10), channel count(1), sample rate(16000)
33 format(0x1), channel mask(0x10), channel count(1), sample rate(8000)
42 format(0x1), channel mask(0x10), channel count(1), sample rate(44100)
51 format(0x1), channel mask(0x10), channel count(1), sample rate(22050)
60 format(0x1), channel mask(0x10), channel count(1), sample rate(11025)
69 format(0x2), channel mask(0x10), channel count(1), sample rate(48000)
78 format(0x3), channel mask(0x10), channel count(1), sample rate(48000)
87 format(0x5), channel mask(0x10), channel count(1), sample rate(48000)
[all …]
/frameworks/ml/nn/driver/sample/
DAndroid.bp63 name: "android.hardware.neuralnetworks@1.3-service-sample-all",
66 init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-all.rc"],
67 vintf_fragments: ["config/android.hardware.neuralnetworks@1.3-service-sample-all.xml"],
71 name: "android.hardware.neuralnetworks@1.3-service-sample-float-fast",
74 init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-float-fast.rc"],
75 vintf_fragments: ["config/android.hardware.neuralnetworks@1.3-service-sample-float-fast.xml"],
79 name: "android.hardware.neuralnetworks@1.3-service-sample-float-slow",
82 init_rc: ["config/android.hardware.neuralnetworks@1.3-service-sample-float-slow.rc"],
83 vintf_fragments: ["config/android.hardware.neuralnetworks@1.3-service-sample-float-slow.xml"],
87 name: "android.hardware.neuralnetworks@1.3-service-sample-quant",
[all …]
/frameworks/ml/nn/common/random/
Drandom_distributions.h87 typename Generator::ResultType sample = (*gen)(); in operator() local
90 result[i] = Uint16ToHalf(sample[i]); // Truncate the upper 16 bits. in operator()
111 typename Generator::ResultType sample = (*gen)(); in operator() local
114 result[i] = Uint16ToGfloat16(sample[i]); in operator()
135 typename Generator::ResultType sample = (*gen)(); in operator() local
138 result[i] = Uint32ToFloat(sample[i]); in operator()
159 typename Generator::ResultType sample = (*gen)(); in operator() local
162 result[i] = Uint64ToDouble(sample[2 * i], sample[2 * i + 1]); in operator()
187 typename Generator::ResultType sample = (*gen)(); in operator() local
190 result[i] = SignedAdd(lo_, sample[i] % range_); in operator()
[all …]
/frameworks/av/media/libeffects/testlibs/
DAudioCommon.h73 inline int16_t audio_sample_t_to_s15(audio_sample_t sample) { in audio_sample_t_to_s15() argument
74 return int16_t((sample + (1 << 8)) >> 9); in audio_sample_t_to_s15()
78 inline int16_t audio_sample_t_to_s15_clip(audio_sample_t sample) { in audio_sample_t_to_s15_clip() argument
80 if (CC_UNLIKELY(sample >= (0x7FFF << 9))) { in audio_sample_t_to_s15_clip()
82 } else if (CC_UNLIKELY(sample <= -(0x8000 << 9))) { in audio_sample_t_to_s15_clip()
85 return audio_sample_t_to_s15(sample); in audio_sample_t_to_s15_clip()
/frameworks/base/core/java/android/gesture/
DInstance.java44 private Instance(long id, float[] sample, String sampleName) { in Instance() argument
46 vector = sample; in Instance()
51 float[] sample = vector; in normalize() local
54 int size = sample.length; in normalize()
56 sum += sample[i] * sample[i]; in normalize()
61 sample[i] /= magnitude; in normalize()
DInstanceLearner.java50 Instance sample = instances.get(i); in classify() local
51 if (sample.vector.length != vector.length) { in classify()
56 … distance = GestureUtils.minimumCosineDistance(sample.vector, vector, orientationType); in classify()
58 distance = GestureUtils.squaredEuclideanDistance(sample.vector, vector); in classify()
66 Double score = label2score.get(sample.label); in classify()
68 label2score.put(sample.label, weight); in classify()
DGestureUtils.java93 float[] sample = new float[bitmapSize * bitmapSize]; in spatialSampling() local
94 Arrays.fill(sample, 0); in spatialSampling()
159 plot(segmentStartX, segmentStartY, sample, bitmapSize); in spatialSampling()
168 plot(xpos, ypos, sample, bitmapSize); in spatialSampling()
177 plot(xpos, ypos, sample, bitmapSize); in spatialSampling()
188 plot(xpos, ypos, sample, bitmapSize); in spatialSampling()
197 plot(xpos, ypos, sample, bitmapSize); in spatialSampling()
206 return sample; in spatialSampling()
209 private static void plot(float x, float y, float[] sample, int sampleSize) { in plot() argument
220 if (sample[index] < 1){ in plot()
[all …]
/frameworks/base/media/jni/soundpool/
DSoundPool.cpp227 sp<Sample> sample = new Sample(sampleID, fd, offset, length); in load() local
228 mSamples.add(sampleID, sample); in load()
229 sample->startLoad(); in load()
261 sp<Sample> sample(findSample_l(sampleID)); in play() local
262 if ((sample == 0) || (sample->state() != Sample::READY)) { in play()
281 channel->play(sample, channelID, leftVolume, rightVolume, priority, loop, rate); in play()
723 void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftVolume, in play() argument
735 this, sample->sampleID(), nextChannelID, leftVolume, rightVolume, in play()
741 mNextEvent.set(sample, nextChannelID, leftVolume, rightVolume, priority, loop, rate); in play()
757 int numChannels = sample->numChannels(); in play()
[all …]
DSoundPoolThread.cpp106 sp <Sample> sample = mSoundPool->findSample(sampleID); in doLoadSample() local
108 if (sample != 0) { in doLoadSample()
109 status = sample->doLoad(); in doLoadSample()
/frameworks/base/tests/SystemMemoryTest/host/src/com/android/tests/sysmem/host/
DMemoryTest.java63 private void sample() throws TestException { in sample() method in MemoryTest
64 mMetrics.sample(String.format("%03d", mIterations)); in sample()
72 sample(); // Sample before running cujs in run()
74 sample(); // Sample after first iteration of cujs in run()
81 sample(); in run()
/frameworks/native/opengl/include/EGL/
DPlatform.h194 int sample,
200 int sample, in DefaultHistogramCustomCounts() argument
210 int sample,
214 int sample, in DefaultHistogramEnumeration() argument
219 using HistogramSparseFunc = void (*)(PlatformMethods *platform, const char *name, int sample);
220 inline void DefaultHistogramSparse(PlatformMethods *platform, const char *name, int sample) in DefaultHistogramSparse() argument
224 using HistogramBooleanFunc = void (*)(PlatformMethods *platform, const char *name, bool sample);
225 inline void DefaultHistogramBoolean(PlatformMethods *platform, const char *name, bool sample) in DefaultHistogramBoolean() argument
/frameworks/ml/nn/tools/
Dparse_benchmark.py51 sample = line.split(": ")[1]
52 name, value = sample.split("=")
93 for sample in data[name]:
95 print("{0:<34}{1:>10}".format(name, sample))
97 print(json.dumps({"benchmark": name, "sample": sample}))
/frameworks/base/media/tests/audiotests/
Dshared_mem_test.cpp152 long sample; in ComputeSine() local
155 sample = (amplitude*sin1024[(phi>>22) & 0x3ff]) >> 15; in ComputeSine()
161 sample = sample + l0; in ComputeSine()
163 return (short)sample; in ComputeSine()
/frameworks/av/media/libaaudio/examples/loopback/src/
DLoopbackAnalyzer.h45 static void printAudioScope(float sample) { in printAudioScope() argument
48 if (sample < -1.0) { in printAudioScope()
49 sample = -1.0; in printAudioScope()
51 } else if (sample > 1.0) { in printAudioScope()
52 sample = 1.0; in printAudioScope()
55 int numSpaces = (int) (((sample + 1.0) * 0.5) * maxStars); in printAudioScope()
400 const float sample = mData[i]; in square() local
401 mData[i] = sample * sample; in square()
627 float sample = s_Impulse[mSampleIndex++]; in sendImpulses() local
632 *outputData = sample; in sendImpulses()
[all …]
/frameworks/av/media/libaaudio/examples/utils/
DAAudioSimpleRecorder.h266 float sample; in SimpleRecorderDataCallbackProc() local
273 sample = audioBuffer[frameIndex * samplesPerFrame] * (1.0/32768); in SimpleRecorderDataCallbackProc()
275 if (sample > data->peakLevel) { in SimpleRecorderDataCallbackProc()
276 data->peakLevel = sample; in SimpleRecorderDataCallbackProc()
285 sample = audioBuffer[frameIndex * samplesPerFrame]; in SimpleRecorderDataCallbackProc()
287 if (sample > data->peakLevel) { in SimpleRecorderDataCallbackProc()
288 data->peakLevel = sample; in SimpleRecorderDataCallbackProc()
/frameworks/av/media/libaaudio/examples/input_monitor/src/
Dinput_monitor.cpp149 float sample = 0.0f; in main() local
151 sample = shortData[frameIndex * actualSamplesPerFrame] * (1.0/32768); in main()
153 sample = floatData[frameIndex * actualSamplesPerFrame]; in main()
155 if (sample > peakLevel) { in main()
156 peakLevel = sample; in main()
/frameworks/av/media/extractors/flac/
DFLACExtractor.cpp132 MediaBufferHelper *readBuffer(FLAC__uint64 sample) { in readBuffer() argument
133 return readBuffer(true, sample); in readBuffer()
169 MediaBufferHelper *readBuffer(bool doSeek, FLAC__uint64 sample);
578 MediaBufferHelper *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) in readBuffer() argument
584 if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) { in readBuffer()
585 ALOGE("FLACParser::readBuffer seek to sample %lld failed", (long long)sample); in readBuffer()
588 ALOGV("FLACParser::readBuffer seek to sample %lld succeeded", (long long)sample); in readBuffer()
713 FLAC__uint64 sample; in read() local
715 sample = 0LL; in read()
718 sample = (seekTimeUs * mParser->getSampleRate()) / 1000000LL; in read()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/transport/
DTransportStats.java115 private void register(long sample) { in register() argument
116 average = (average * n + sample) / (n + 1); in register()
118 max = Math.max(max, sample); in register()
119 min = Math.min(min, sample); in register()
/frameworks/av/media/libaudioprocessing/
DAudioResamplerCubic.cpp145 int32_t sample; in resampleMono16() local
150 sample = interp(&left, x); in resampleMono16()
151 out[outputIndex++] += vl * sample; in resampleMono16()
152 out[outputIndex++] += vr * sample; in resampleMono16()
/frameworks/av/media/libaaudio/src/flowgraph/
DMonoToMultiConverter.cpp40 float sample = *inputBuffer++; in onProcess() local
42 *outputBuffer++ = sample; in onProcess()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DDisplayManagerServiceTest.java395 DisplayedContentSample sample = displayManager.getDisplayedContentSampleInternal(0, 0, 0); in testDisplayedContentSampling() local
396 assertNotNull(sample); in testDisplayedContentSampling()
398 long numPixels = ddi.width * ddi.height * sample.getNumFrames(); in testDisplayedContentSampling()
399 long[] samples = sample.getSampleComponent(DisplayedContentSample.ColorComponent.CHANNEL0); in testDisplayedContentSampling()
402 samples = sample.getSampleComponent(DisplayedContentSample.ColorComponent.CHANNEL1); in testDisplayedContentSampling()
405 samples = sample.getSampleComponent(DisplayedContentSample.ColorComponent.CHANNEL2); in testDisplayedContentSampling()
408 samples = sample.getSampleComponent(DisplayedContentSample.ColorComponent.CHANNEL3); in testDisplayedContentSampling()
/frameworks/av/media/libeffects/loudness/
DEffectLoudnessEnhancer.cpp44 static inline int16_t clamp16(int32_t sample) in clamp16() argument
46 if ((sample>>15) ^ (sample>>31)) in clamp16()
47 sample = 0x7FFF ^ (sample>>31); in clamp16()
48 return sample; in clamp16()

12345