Home
last modified time | relevance | path

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

123456789

/frameworks/base/voip/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/libmedia/
DSoundPool.cpp210 sp<Sample> sample = new Sample(++mNextSampleID, path); in load() local
211 mSamples.add(sample->sampleID(), sample); in load()
212 doLoad(sample); in load()
213 return sample->sampleID(); in load()
221 sp<Sample> sample = new Sample(++mNextSampleID, fd, offset, length); in load() local
222 mSamples.add(sample->sampleID(), sample); in load()
223 doLoad(sample); in load()
224 return sample->sampleID(); in load()
227 void SoundPool::doLoad(sp<Sample>& sample) in doLoad() argument
229 ALOGV("doLoad: loading sample sampleID=%d", sample->sampleID()); in doLoad()
[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/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/ml/bordeaux/service/src/android/bordeaux/services/
DLearning_MulticlassPA.java35 private IntFloatArray splitIntFloatArray(List<IntFloat> sample) { in splitIntFloatArray() argument
37 ArrayList<IntFloat> s = (ArrayList<IntFloat>)sample; in splitIntFloatArray()
72 public void TrainOneSample(List<IntFloat> sample, int target) { in TrainOneSample() argument
73 IntFloatArray splited = splitIntFloatArray(sample); in TrainOneSample()
82 public int Classify(List<IntFloat> sample) { in Classify() argument
83 IntFloatArray splited = splitIntFloatArray(sample); in Classify()
DBordeauxClassifier.java44 private ArrayList<IntFloat> getArrayList(final HashMap<Integer, Float> sample) { in getArrayList() argument
46 for (Map.Entry<Integer, Float> x : sample.entrySet()) { in getArrayList()
78 public boolean update(final HashMap<Integer, Float> sample, int target) { in update() argument
82 mClassifier.TrainOneSample(getArrayList(sample), target); in update()
90 public int classify(final HashMap<Integer, Float> sample) { in classify() argument
95 return mClassifier.Classify(getArrayList(sample)); in classify()
DBordeauxRanker.java45 private ArrayList<StringFloat> getArrayList(final HashMap<String, Float> sample) { in getArrayList() argument
47 for (Map.Entry<String, Float> x : sample.entrySet()) { in getArrayList()
107 public float scoreSample(final HashMap<String, Float> sample) { in scoreSample() argument
111 return mRanker.ScoreSample(getArrayList(sample)); in scoreSample()
118 public boolean setPriorWeight(final HashMap<String, Float> sample) { in setPriorWeight() argument
122 return mRanker.SetModelPriorWeight(getArrayList(sample)); in setPriorWeight()
DILearning_MulticlassPA.aidl27 void TrainOneSample(in List<IntFloat> sample, int target); in TrainOneSample() argument
28 int Classify(in List<IntFloat> sample); in Classify() argument
DLearning_StochasticLinearRanker.java75 public float ScoreSample(List<StringFloat> sample) { in ScoreSample() argument
76 ArrayList<StringFloat> temp = (ArrayList<StringFloat>)sample; in ScoreSample()
88 public boolean SetModelPriorWeight(List<StringFloat> sample) { in SetModelPriorWeight() argument
89 ArrayList<StringFloat> temp = (ArrayList<StringFloat>)sample; in SetModelPriorWeight()
/frameworks/base/docs/html/intl/zh-CN/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
222 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
225 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
228 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
231 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
236 {@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
[all …]
/frameworks/base/docs/html/intl/ko/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
222 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
225 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
228 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
231 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
236 {@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
[all …]
/frameworks/base/docs/html/intl/ja/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
222 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
225 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
228 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
231 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
236 {@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
[all …]
/frameworks/av/services/audioflinger/
DAudioResamplerCubic.cpp76 int32_t sample; in resampleStereo16() local
142 int32_t sample; in resampleMono16() local
147 sample = interp(&left, x); in resampleMono16()
148 out[outputIndex++] += vl * sample; in resampleMono16()
149 out[outputIndex++] += vr * sample; in resampleMono16()
DAudioResampler.cpp332 int32_t sample = Interp(mX0L, in[0], phaseFraction); in resampleMono16() local
333 out[outputIndex++] += vl * sample; in resampleMono16()
334 out[outputIndex++] += vr * sample; in resampleMono16()
356 int32_t sample = Interp(in[inputIndex-1], in[inputIndex], in resampleMono16() local
358 out[outputIndex++] += vl * sample; in resampleMono16()
359 out[outputIndex++] += vr * sample; in resampleMono16()
/frameworks/base/docs/html/intl/ru/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
222 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
225 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
228 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
231 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
236 {@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
[all …]
/frameworks/av/media/libstagefright/
DFLACExtractor.cpp109 MediaBuffer *readBuffer(FLAC__uint64 sample) { in readBuffer() argument
110 return readBuffer(true, sample); in readBuffer()
148 MediaBuffer *readBuffer(bool doSeek, FLAC__uint64 sample);
599 MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample) in readBuffer() argument
605 if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) { in readBuffer()
606 ALOGE("FLACParser::readBuffer seek to sample %llu failed", sample); in readBuffer()
609 ALOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample); in readBuffer()
711 FLAC__uint64 sample; in read() local
713 sample = 0LL; in read()
716 sample = (seekTimeUs * mParser->getSampleRate()) / 1000000LL; in read()
[all …]
/frameworks/rs/scriptc/
Drs_allocation.rsh174 * @param a 1D allocation to sample from
176 * @param location to sample from
182 * @param a 1D allocation to sample from
184 * @param location to sample from
185 * @param lod mip level to sample from, for fractional values
194 * @param a 2D allocation to sample from
196 * @param location to sample from
203 * @param a 2D allocation to sample from
205 * @param location to sample from
206 * @param lod mip level to sample from, for fractional values
/frameworks/base/docs/html/guide/google/play/billing/
Dbilling_integrate.jd41 billing sample application as an example.</p>
51 <li><a href="#billing-download">Download the in-app billing sample application</a>.</li>
66 <p>The in-app billing sample application shows you how to perform several tasks that are common to
77 <p>The sample application includes an application file (<code>Dungeons.java</code>), the AIDL file
82 <p>Table 1 lists the source files that are included with the sample application.</p>
83 <p class="table-caption" id="source-files-table"><strong>Table 1.</strong> In-app billing sample
139 <td>Defines various Google Play constants and sample application constants. All constants that
151 <p>The in-app billing sample application is available as a downloadable component of the Android
152 SDK. To download the sample application component, launch the Android SDK Manager and then
159 <strong>Figure 1.</strong> The Google Market Billing package contains the sample application and
[all …]
/frameworks/base/docs/html/training/multiscreen/
Dscreensizes.jd37 the sample app</a>
67 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
69 <p>Notice how the sample uses <code>"wrap_content"</code> and <code>"match_parent"</code>
78 <p class="img-caption"><strong>Figure 1.</strong> The News Reader sample app in portrait (left)
165 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
169 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
198 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
202 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
278 benefit from adjustments. In the News Reader sample app, here is how the layout
297 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
[all …]
Dindex.jd16 <li>Android 1.6 or higher (2.1+ for the sample app)</li>
36 the sample app</a>
57 <p>The code in each lesson comes from a sample application that demonstrates best practices in
58 optimizing for multiple screens. You can download the sample (to the right) and use it as a source
61 <p class="note"><strong>Note:</strong> This class and the associated sample use the <a
/frameworks/av/include/media/
DSoundPool.h94 void set(const sp<Sample>& sample, int channelID, float leftVolume,
96 sp<Sample> sample() { return mSample; } in sample() function
123 void play(const sp<Sample>& sample, int channelID, float leftVolume, float rightVolume,
197 void doLoad(sp<Sample>& sample);

123456789