Home
last modified time | relevance | path

Searched refs:bytesPerSample (Results 1 – 19 of 19) sorted by relevance

/cts/tests/media/common/src/android/mediav2/common/cts/
DOutputManager.java185 int bytesPerSample) { in checksum() argument
190 if (width > 0 && height > 0 && stride > 0 && bytesPerSample > 0) { in checksum()
192 byte[] bb = new byte[width * height * bytesPerSample]; in checksum()
194 System.arraycopy(buf.array(), offset, bb, i * width * bytesPerSample, in checksum() local
195 width * bytesPerSample); in checksum() local
198 mCrc32UsingBuffer.update(bb, 0, width * height * bytesPerSample); in checksum()
200 dumpY(bb, 0, width * height * bytesPerSample); in checksum()
205 } else if (width > 0 && height > 0 && stride > 0 && bytesPerSample > 0) { in checksum()
208 byte[] bb = new byte[width * height * bytesPerSample]; in checksum()
219 dup.get(bb, i * width * bytesPerSample, width * bytesPerSample); in checksum()
[all …]
DDecodeStreamToYuv.java176 int bytesPerSample = (ImageFormat.getBitsPerPixel(format) * 2) / (8 * 3); // YUV420 in getImage() local
192 assertEquals(bytesPerSample, pixelStride); in getImage()
205 byte[] bb = new byte[width * height * bytesPerSample]; in getImage()
209 if (pixelStride == bytesPerSample) { in getImage()
212 buf.get(bb, y * width * bytesPerSample, width * bytesPerSample); in getImage()
222 buf.get(lb, 0, pixelStride * (width - 1) + bytesPerSample); in getImage()
224 for (int bytePos = 0; bytePos < bytesPerSample; ++bytePos) { in getImage()
225 bb[y * width * bytesPerSample + x * bytesPerSample + bytePos] = in getImage()
DCompareStreams.java148 int bytesPerSample, int inpFrameWidth, int inpFrameHeight, byte[] inputData) { in fillByteArray() argument
164 byte[] outputData = new byte[width * height * bytesPerSample]; in fillByteArray()
171 inOffset + j * tileWidth * bytesPerSample, in fillByteArray()
173 (k + j) * width * bytesPerSample + i * bytesPerSample, in fillByteArray()
174 colsToCopy * bytesPerSample); in fillByteArray()
178 inOffset += tileWidth * tileHeight * bytesPerSample; in fillByteArray()
194 int bytesPerSample = (ImageFormat.getBitsPerPixel(imgFormat) * 2) / (8 * 3); in dequeueOutput() local
195 if (mRefYuv.mBytesPerSample != bytesPerSample) { in dequeueOutput()
199 + " %d", mRefYuv.mBytesPerSample, bytesPerSample); in dequeueOutput()
208 height, bytesPerSample); in dequeueOutput()
DCodecEncoderTestBase.java361 int bytesPerSample = (ImageFormat.getBitsPerPixel(format) * 2) / (8 * 3); // YUV420 in fillImage() local
362 assertEquals("Invalid bytes per sample \n" + mTestConfig + mTestEnv, bytesPerSample, in fillImage()
383 if (pixelStride == bytesPerSample) { in fillImage()
385 buf.put(mInputData, offset, width * height * bytesPerSample); in fillImage()
392 buf.position((z + y) * rowStride + x * bytesPerSample); in fillImage() local
393 buf.put(mInputData, offset + y * tileWidth * bytesPerSample, in fillImage()
394 colsToCopy * bytesPerSample); in fillImage()
408 for (int bytePos = 0; bytePos < bytesPerSample; bytePos++) { in fillImage()
410 buf.put(mInputData[offset + y * tileWidth * bytesPerSample in fillImage()
411 + w * bytesPerSample + bytePos]); in fillImage()
[all …]
DRawResource.java97 public Builder setBytesPerSample(int bytesPerSample) { in setBytesPerSample() argument
98 this.mBytesPerSample = bytesPerSample; in setBytesPerSample()
DVideoErrorManager.java127 static double computeMSE(byte[] data0, byte[] data1, int bytesPerSample, int imgWidth, in computeMSE() argument
130 int length = data0.length / bytesPerSample; in computeMSE()
143 if (bytesPerSample == 2) { in computeMSE()
168 static double computePSNR(double mse, int bytesPerSample) { in computePSNR() argument
170 final int peakSignal = (1 << (8 * bytesPerSample)) - 1; in computePSNR()
DCodecDecoderMultiAccessUnitTestBase.java247 int bytesPerSample = AudioFormat.getBytesPerSample( in configureKeysForLargeAudioFrameMode() local
251 int maxOutputSize = (maxOutSizeInMs * bytesPerSample * sampleRate * channelCount) / 1000; in configureKeysForLargeAudioFrameMode()
255 (thresOutSizeInMs * bytesPerSample * sampleRate * channelCount) / 1000; in configureKeysForLargeAudioFrameMode()
DCodecDecoderBlockModelMultiAccessUnitTestBase.java250 int bytesPerSample = AudioFormat.getBytesPerSample( in configureKeysForLargeAudioBlockModelFrameMode() local
254 int maxOutputSize = (maxOutSizeInMs * bytesPerSample * sampleRate * channelCount) / 1000; in configureKeysForLargeAudioBlockModelFrameMode()
258 (thresOutSizeInMs * bytesPerSample * sampleRate * channelCount) / 1000; in configureKeysForLargeAudioBlockModelFrameMode()
DCodecDecoderTestBase.java273 int bytesPerSample = (ImageFormat.getBitsPerPixel(imgFormat) * 2) / (8 * 3); in dequeueOutput() local
280 mOutputBuff.checksum(buf, info.size, width, height, stride, bytesPerSample); in dequeueOutput()
/cts/tests/media/jni/
DNativeCodecTestBase.cpp275 int stride, int bytesPerSample) { in updateChecksum() argument
284 if (width > 0 && height > 0 && stride > 0 && bytesPerSample > 0) { in updateChecksum()
286 std::vector<uint8_t> tmp(width * height * bytesPerSample, 0u); in updateChecksum()
289 memcpy(tmp.data() + (i * width * bytesPerSample), buf + offset, width * bytesPerSample); in updateChecksum()
292 crc32value = crc32(crc32value, tmp.data(), width * height * bytesPerSample); in updateChecksum()
DNativeCodecTestBase.h138 int stride, int bytesPerSample);
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DMediaSyncEventTest.java155 final int bytesPerSample = AudioFormat.getBytesPerSample(RECORD_ENCODING); in testSynchronizedRecord() local
156 final int bytesPerFrame = numChannels * bytesPerSample; in testSynchronizedRecord()
DAudioTrack_ListenerTest.java168 final int bytesPerSample = AudioFormat.getBytesPerSample(TEST_FORMAT); in doTest() local
169 final int bytesPerFrame = numChannels * bytesPerSample; in doTest()
DAudioRecordTest.java706 final int bytesPerSample = AudioFormat.getBytesPerSample(RECORD_ENCODING); in testTimestamp() local
707 final int bytesPerFrame = numChannels * bytesPerSample; in testTimestamp()
1163 final int bytesPerSample = AudioFormat.getBytesPerSample(TEST_FORMAT); in doTest() local
1164 final int bytesPerFrame = numChannels * bytesPerSample; in doTest()
1186 ByteBuffer.allocateDirect(BUFFER_SAMPLES * bytesPerSample); in doTest()
1192 final int amount = samples * bytesPerSample; // in bytes in doTest()
1202 return ret / bytesPerSample; in doTest()
DAudioTrackLatencyTest.java176 public int bytesPerSample = 2; field in AudioTrackLatencyTest.TestSetup
201 int smallBuffSizeInFrames = smallBufferSize / (samplesPerFrame * bytesPerSample); in createTrack()
DAudioTrackTest.java2312 final int bytesPerSample = AudioFormat.getBytesPerSample(TEST_FORMAT); in testVariableRatePlayback() local
2313 final int bytesPerFrame = numChannels * bytesPerSample; in testVariableRatePlayback()
2380 final int bytesPerSample = AudioFormat.getBytesPerSample(TEST_FORMAT); in testStopDrain() local
2381 final int bytesPerFrame = channelCount * bytesPerSample; in testStopDrain()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java124 int bytesPerSample = getBytesPerSample(mInputAudioFormat); in run() local
138 (float)(mInputSampleRate * bytesPerSample * in run()
195 mAudioShortArray.length; i += bytesPerSample) { in run()
/cts/tests/tests/voiceinteraction/service/src/android/voiceinteraction/service/
DMainHotwordDetectionService.java563 int bytesPerSample = 2; // for ENCODING_PCM_16BIT in canReadAudio() local
565 int bytesPerSecond = bytesPerSample * sampleRate; // for single channel in canReadAudio()
/cts/tests/media/src/android/mediav2/cts/
DCodecDecoderTest.java276 int bytesPerSample = AudioFormat.getBytesPerSample(audioFormat); in verify() local
281 bufferSize % bytesPerSample); in verify()
283 int refObjectLen = bufferSize / bytesPerSample; in verify()