Home
last modified time | relevance | path

Searched refs:frameSize (Results 1 – 25 of 70) sorted by relevance

123

/frameworks/av/media/tests/benchmark/src/native/encoder/
DC2Encoder.cpp116 int32_t frameSize = 0; in encodeFrames() local
118 frameSize = mWidth * mHeight * 3 / 2; in encodeFrames()
120 frameSize = DEFAULT_AUDIO_FRAME_SIZE; in encodeFrames()
122 if (frameSize > mInputMaxBufSize) { in encodeFrames()
123 frameSize = mInputMaxBufSize; in encodeFrames()
126 int32_t numFrames = (inputBufferSize + frameSize - 1) / frameSize; in encodeFrames()
128 char *data = (char *)malloc(frameSize); in encodeFrames()
157 presentationTimeUs = mNumInputFrame * frameSize * (1000000 / mSampleRate); in encodeFrames()
169 if (inputBufferSize - offset < frameSize) { in encodeFrames()
170 frameSize = inputBufferSize - offset; in encodeFrames()
[all …]
DEncoder.cpp50 size_t bytesToRead = mParams.frameSize; in onInputAvailable()
51 if (mInputBufferSize - mOffset < mParams.frameSize) { in onInputAvailable()
57 mParams.frameSize = bufSize; in onInputAvailable()
59 mParams.numFrames = (mInputBufferSize + mParams.frameSize - 1) / mParams.frameSize; in onInputAvailable()
68 if (bytesToRead < mParams.frameSize && mNumInputFrame < mParams.numFrames - 1) { in onInputAvailable()
70 mNumInputFrame, bytesToRead, mParams.frameSize, mParams.numFrames); in onInputAvailable()
97 (uint64_t)mNumInputFrame * mParams.frameSize * 1000000 / mParams.sampleRate; in onInputAvailable()
228 mParams.frameSize = mParams.width * mParams.height * 3 / 2; in encode()
230 mParams.frameSize = kDefaultAudioEncodeFrameSize; in encode()
237 if (mParams.frameSize > mParams.maxFrameSize) { in encode()
[all …]
/frameworks/wilhelm/src/android/util/
DAacAdtsExtractor.cpp50 size_t frameSize = 0; in getFrameSize() local
75 frameSize = (header[0] & 0x3) << 11 | header[1] << 3 | header[2] >> 5; in getFrameSize()
82 if (headSize > frameSize) { in getFrameSize()
84 frameSize, headSize); in getFrameSize()
90 return frameSize; in getFrameSize()
137 size_t frameSize; in AacAdtsExtractor() local
138 if ((frameSize = getFrameSize(mDataSource, offset)) == 0) { in AacAdtsExtractor()
147 offset += frameSize; in AacAdtsExtractor()
150 frameSize, (long long) offset, (long long) streamSize); in AacAdtsExtractor()
244 size_t frameSize, frameSizeWithoutHeader; in read() local
[all …]
/frameworks/av/media/extractors/amr/
DAMRExtractor.cpp91 size_t frameSize = isWide ? kFrameSizeWB[FT] : kFrameSizeNB[FT]; in getFrameSize() local
94 frameSize = (frameSize + 7) / 8 + 1; in getFrameSize()
96 return frameSize; in getFrameSize()
100 off64_t offset, bool isWide, size_t *frameSize) { in getFrameSizeByOffset() argument
111 *frameSize = getFrameSize(isWide, FT); in getFrameSizeByOffset()
112 if (*frameSize == 0) { in getFrameSizeByOffset()
164 size_t frameSize, numFrames = 0; in AMRExtractor() local
169 status_t status = getFrameSizeByOffset(source, offset, mIsWide, &frameSize); in AMRExtractor()
182 offset += frameSize; in AMRExtractor()
323 size_t frameSize = getFrameSize(mIsWide, FT); in read() local
[all …]
/frameworks/wilhelm/src/android/
DAacBqToPcmCbRenderer.cpp40 size_t frameSize = 0; in getAdtsFrameSize() local
57 frameSize = (header[0] & 0x3) << 11 | header[1] << 3 | header[2] >> 5; in getAdtsFrameSize()
64 if (headSize > frameSize) { in getAdtsFrameSize()
66 frameSize, headSize); in getAdtsFrameSize()
70 SL_LOGV("AacBqToPcmCbRenderer::getAdtsFrameSize() returns %u", frameSize); in getAdtsFrameSize()
72 return frameSize; in getAdtsFrameSize()
87 size_t frameSize = 0; in validateBufferStartEndOnFrameBoundaries() local
95 if ((frameSize = getAdtsFrameSize((uint8_t *)data, offset, size)) == 0) { in validateBufferStartEndOnFrameBoundaries()
100 offset += frameSize; in validateBufferStartEndOnFrameBoundaries()
/frameworks/av/media/libstagefright/rtsp/
DAAMRAssembler.cpp93 size_t frameSize = isWide ? kFrameSizeWB[FT] : kFrameSizeNB[FT]; in getFrameSize() local
96 frameSize = (frameSize + 7) / 8 + 1; in getFrameSize()
98 return frameSize; in getFrameSize()
193 size_t frameSize = getFrameSize(mIsWide, (toc >> 3) & 0x0f); in addPacket() local
195 if (offset + frameSize - 1 > buffer->size()) { in addPacket()
206 buffer->data() + offset, frameSize - 1); in addPacket()
208 offset += frameSize - 1; in addPacket()
209 dstOffset += frameSize - 1; in addPacket()
/frameworks/av/media/libnbaio/
DNBAIO.cpp70 size_t frameSize = Format_frameSize(mFormat); in writeVia() local
71 ALOG_ASSERT(frameSize > 0 && frameSize <= 8); in writeVia()
76 double buffer[((frameSize * block) + sizeof(double) - 1) / sizeof(double)]; in writeVia()
106 size_t frameSize = Format_frameSize(mFormat); in readVia() local
107 ALOG_ASSERT(frameSize > 0 && frameSize <= 8); in readVia()
112 double buffer[((frameSize * block) + sizeof(double) - 1) / sizeof(double)]; in readVia()
/frameworks/av/media/extractors/aac/
DAACExtractor.cpp97 size_t frameSize = 0; in getAdtsFrameLength() local
118 frameSize = (header[0] & 0x3) << 11 | header[1] << 3 | header[2] >> 5; in getAdtsFrameLength()
122 if (headSize > frameSize) { in getAdtsFrameLength()
129 return frameSize; in getAdtsFrameLength()
157 size_t frameSize = 0; in AACExtractor() local
162 if ((frameSize = getAdtsFrameLength(source, offset, NULL)) == 0) { in AACExtractor()
170 offset += frameSize; in AACExtractor()
289 size_t frameSize, frameSizeWithoutHeader, headerSize; in read() local
290 if ((frameSize = getAdtsFrameLength(mDataSource, mOffset, &headerSize)) == 0) { in read()
300 frameSizeWithoutHeader = frameSize - headerSize; in read()
[all …]
/frameworks/av/media/libstagefright/codecs/amrnb/fuzzer/
Damrnb_dec_fuzzer.cpp55 int32_t frameSize = 0; in decodeFrames() local
61 frameSize = kLocalIf2DecBytesPerFrame[frameType]; in decodeFrames()
63 frameSize = kLocalWmfDecBytesPerFrame[frameType]; in decodeFrames()
66 uint8_t *inputBuf = new uint8_t[frameSize]; in decodeFrames()
70 int32_t minSize = std::min((int32_t)size, frameSize); in decodeFrames()
/frameworks/av/include/private/media/
DAudioTrackShared.h207 Proxy(audio_track_cblk_t* cblk, void *buffers, size_t frameCount, size_t frameSize, bool isOut,
240 ClientProxy(audio_track_cblk_t* cblk, void *buffers, size_t frameCount, size_t frameSize,
361 size_t frameSize, bool clientInServer = false)
362 : ClientProxy(cblk, buffers, frameCount, frameSize, true /*isOut*/, in ClientProxy() argument
418 size_t frameSize);
474 size_t frameSize) in AudioRecordClientProxy() argument
475 : ClientProxy(cblk, buffers, frameCount, frameSize, in AudioRecordClientProxy()
495 ServerProxy(audio_track_cblk_t* cblk, void *buffers, size_t frameCount, size_t frameSize,
578 size_t frameSize, bool clientInServer = false, uint32_t sampleRate = 0)
579 : ServerProxy(cblk, buffers, frameCount, frameSize, true /*isOut*/, clientInServer), in ServerProxy() argument
[all …]
/frameworks/av/media/libstagefright/codecs/amrnb/dec/
DSoftAMR.cpp336 size_t frameSize = kFrameSizeWB[FT]; in getFrameSize() local
339 frameSize = (frameSize + 7) / 8 + 1; in getFrameSize()
341 return frameSize; in getFrameSize()
400 size_t frameSize = WmfDecBytesPerFrame[mode] + 1; in onQueueFilled() local
402 if (inHeader->nFilledLen < frameSize) { in onQueueFilled()
403 ALOGE("b/27662364: expected %zu bytes vs %u", frameSize, inHeader->nFilledLen); in onQueueFilled()
457 size_t frameSize = getFrameSize(mode); in onQueueFilled() local
458 if (inHeader->nFilledLen < frameSize) { in onQueueFilled()
459 ALOGE("b/27662364: expected %zu bytes vs %u", frameSize, inHeader->nFilledLen); in onQueueFilled()
494 numBytesRead = frameSize; in onQueueFilled()
/frameworks/av/media/libstagefright/
DSkipCutBuffer.cpp38 size_t frameSize = num16BitChannels * 2; in SkipCutBuffer() local
39 if (skip > INT32_MAX / frameSize || cut > INT32_MAX / frameSize in SkipCutBuffer()
40 || cut * frameSize > INT32_MAX - 4096) { in SkipCutBuffer()
45 skip *= frameSize; in SkipCutBuffer()
46 cut *= frameSize; in SkipCutBuffer()
/frameworks/av/media/codec2/sfplugin/
DSkipCutBuffer.cpp38 size_t frameSize = num16BitChannels * 2; in SkipCutBuffer() local
39 if (skip > INT32_MAX / frameSize || cut > INT32_MAX / frameSize in SkipCutBuffer()
40 || cut * frameSize > INT32_MAX - 4096) { in SkipCutBuffer()
45 skip *= frameSize; in SkipCutBuffer()
46 cut *= frameSize; in SkipCutBuffer()
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
DCachedFrameManager.java101 int frameSize = frame.getFormat().getSize(); in storeFrame() local
102 if (frameSize > mStorageCapacity) { in storeFrame()
107 int newStorageSize = mStorageSize + frameSize; in storeFrame()
110 newStorageSize = mStorageSize + frameSize; in storeFrame()
/frameworks/av/media/libstagefright/mpeg2ts/
DESQueue.cpp300 const uint8_t *ptr, size_t size, unsigned &frameSize, sp<MetaData> *metaData) { in parseAC4SyncFrame() argument
315 frameSize = bits.getBits(16); in parseAC4SyncFrame()
317 if (frameSize == 0xFFFF) { in parseAC4SyncFrame()
318 frameSize = bits.getBits(24); in parseAC4SyncFrame()
322 if (frameSize == 0) { in parseAC4SyncFrame()
326 frameSize += headerSize; in parseAC4SyncFrame()
329 frameSize += 2; // crc_word in parseAC4SyncFrame()
331 ALOGV("AC4 frameSize = %u", frameSize); in parseAC4SyncFrame()
365 static status_t IsSeeminglyValidAC4Header(const uint8_t *ptr, size_t size, unsigned &frameSize) { in IsSeeminglyValidAC4Header() argument
366 return parseAC4SyncFrame(ptr, size, frameSize, NULL); in IsSeeminglyValidAC4Header()
[all …]
/frameworks/av/cmds/stagefright/
DSineSource.cpp73 size_t frameSize = mNumChannels * sizeof(int16_t); in read() local
74 size_t numFramesPerBuffer = buffer->size() / frameSize; in read()
97 buffer->set_range(0, numFramesPerBuffer * frameSize); in read()
/frameworks/av/media/libstagefright/codecs/amrwb/fuzzer/
Damrwb_dec_fuzzer.cpp74 int32_t frameSize = kFrameSizes[mode]; in decodeFrames() local
76 uint8_t *inputBuf = new uint8_t[frameSize]; in decodeFrames()
80 int32_t minSize = std::min((int32_t)size, frameSize); in decodeFrames()
/frameworks/av/media/libstagefright/codecs/amrnb/dec/test/
Damrnbdec_test.cpp123 int32_t frameSize = kFrameSizes[frameType]; in main() local
124 bytesRead = fread(inputBuf, 1, frameSize, fpInput); in main()
125 if (bytesRead != frameSize) break; in main()
DAmrnbDecoderTest.cpp80 int32_t frameSize = kFrameSizes[frameType]; in DecodeFrames() local
81 if (frameSize < 0) { in DecodeFrames()
85 bytesRead = fread(inputBuf, 1, frameSize, mFpInput); in DecodeFrames()
86 if (bytesRead != frameSize) break; in DecodeFrames()
/frameworks/av/media/libstagefright/codecs/aacdec/
DSoftAAC2.cpp290 aacParams->nFrameLength = mStreamInfo->frameSize; in internalGetParameter()
775 (mStreamInfo->frameSize * mStreamInfo->numChannels)) { in onQueueFilled()
806 mStreamInfo->frameSize * sizeof(int16_t) * mStreamInfo->numChannels; in onQueueFilled()
810 mStreamInfo->frameSize * mStreamInfo->numChannels)) { in onQueueFilled()
821 mStreamInfo->frameSize * mStreamInfo->numChannels)) { in onQueueFilled()
933 int32_t tmpOutBufferSamples = mStreamInfo->frameSize * mStreamInfo->numChannels; in onQueueFilled()
944 >= mStreamInfo->frameSize * mStreamInfo->numChannels) { in onQueueFilled()
959 + mStreamInfo->frameSize * samplesize in onQueueFilled()
976 int numFrames = numSamples / (mStreamInfo->frameSize * mStreamInfo->numChannels); in onQueueFilled()
977 numSamples = numFrames * (mStreamInfo->frameSize * mStreamInfo->numChannels); in onQueueFilled()
[all …]
/frameworks/av/media/libstagefright/codecs/m4v_h263/enc/test/
DMpeg4H263EncoderTest.cpp150 int32_t frameSize = (mFrameWidth * mFrameHeight * 3) / 2; in getTotalFrames() local
154 int64_t totalFrames = (int64_t)(fileSize/frameSize); in getTotalFrames()
162 int32_t frameSize = (mFrameWidth * mFrameHeight * 3) / 2; in processEncoder() local
164 bytesRead = fread(mInputBuffer, 1, frameSize, mFpInput); in processEncoder()
166 if (bytesRead != frameSize) { in processEncoder()
/frameworks/av/media/libstagefright/codecs/amrwb/test/
Damrwbdec_test.cpp132 int32_t frameSize = kFrameSizes[mode]; in main() local
133 bytesRead = fread(inputBuf, 1, frameSize, fpInput); in main()
134 if (bytesRead != frameSize) break; in main()
DAmrwbDecoderTest.cpp90 int32_t frameSize = kFrameSizes[mode]; in DecodeFrames() local
92 if (frameSize < 0) { in DecodeFrames()
96 bytesRead = fread(inputBuf, 1, frameSize, mFpInput); in DecodeFrames()
97 if (bytesRead != frameSize) break; in DecodeFrames()
/frameworks/av/media/extractors/mp3/
DVBRISeeker.cpp52 size_t frameSize; in CreateFromSource() local
54 if (!GetMPEGAudioFrameSize(tmp, &frameSize, &sampleRate)) { in CreateFromSource()
114 seeker->mBasePos = post_id3_pos + frameSize; in CreateFromSource()
/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/src/main/cpp/
DNativeEncoder.cpp89 int32_t frameSize = jWidth * jHeight * 3 / 2; in Java_com_android_media_benchmark_library_Native_Encode() local
91 (((eleSize + frameSize - 1) / frameSize) / ENCODE_DEFAULT_FRAME_RATE) * 1000000; in Java_com_android_media_benchmark_library_Native_Encode()

123