/hardware/google/av/codec2/hidl/1.0/mts/common/ |
D | media_c2_hidl_test_common.cpp | 28 std::unique_ptr<C2Work> work; in testInputBuffer() local 33 work.swap(workQueue.front()); in testInputBuffer() 39 ASSERT_NE(work, nullptr); in testInputBuffer() 41 work->input.flags = (C2FrameData::flags_t)flags; in testInputBuffer() 42 work->input.ordinal.timestamp = 0; in testInputBuffer() 43 work->input.ordinal.frameIndex = 0; in testInputBuffer() 44 work->input.buffers.clear(); in testInputBuffer() 46 work->input.buffers.emplace_back(nullptr); in testInputBuffer() 48 work->worklets.clear(); in testInputBuffer() 49 work->worklets.emplace_back(new C2Worklet); in testInputBuffer() [all …]
|
/hardware/google/av/media/codecs/flac/ |
D | C2SoftFlacDec.cpp | 161 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 162 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 163 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 164 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 165 work->workletsProcessed = 1u; in fillEmptyWork() 170 const std::unique_ptr<C2Work> &work, in process() argument 173 work->result = C2_OK; in process() 174 work->workletsProcessed = 1u; in process() 175 work->worklets.front()->output.configUpdate.clear(); in process() 176 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
D | C2SoftFlacEnc.cpp | 170 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 171 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 172 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 173 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 177 const std::unique_ptr<C2Work> &work, in process() argument 180 work->result = C2_OK; in process() 181 work->workletsProcessed = 1u; in process() 182 work->worklets.front()->output.flags = work->input.flags; in process() 185 work->result = C2_BAD_VALUE; in process() 189 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() [all …]
|
/hardware/google/av/media/codecs/vorbis/ |
D | C2SoftVorbisDec.cpp | 204 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 205 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 206 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 207 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 208 work->workletsProcessed = 1u; in fillEmptyWork() 232 const std::unique_ptr<C2Work> &work, in process() argument 235 work->result = C2_OK; in process() 236 work->workletsProcessed = 1u; in process() 237 work->worklets.front()->output.configUpdate.clear(); in process() 238 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/hardware/google/av/media/codecs/opus/ |
D | C2SoftOpusDec.cpp | 184 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 185 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 186 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 187 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 188 work->workletsProcessed = 1u; in fillEmptyWork() 301 const std::unique_ptr<C2Work> &work, in process() argument 304 work->result = C2_OK; in process() 305 work->workletsProcessed = 1u; in process() 306 work->worklets.front()->output.configUpdate.clear(); in process() 307 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/hardware/google/av/media/codecs/vpx/ |
D | C2SoftVpxDec.cpp | 391 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 393 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 397 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 398 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 399 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 400 work->workletsProcessed = 1u; in fillEmptyWork() 403 void C2SoftVpxDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work, in finishWork() argument 408 const std::unique_ptr<C2Work> &work) { in finishWork() argument 410 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 411 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
D | C2SoftVpxEnc.cpp | 413 const std::unique_ptr<C2Work> &work, in process() argument 416 work->result = C2_OK; in process() 417 work->workletsProcessed = 1u; in process() 418 work->worklets.front()->output.flags = work->input.flags; in process() 421 work->result = C2_BAD_VALUE; in process() 428 work->result = C2_CORRUPTED; in process() 434 if (!work->input.buffers.empty()) { in process() 435 inputBuffer = work->input.buffers[0]; in process() 440 work->result = C2_CORRUPTED; in process() 446 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in process() [all …]
|
/hardware/google/av/media/codecs/mpeg4_h263/ |
D | C2SoftMpeg4Dec.cpp | 350 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 352 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 356 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 357 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 358 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 359 work->workletsProcessed = 1u; in fillEmptyWork() 362 void C2SoftMpeg4Dec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 366 auto fillWork = [buffer, index](const std::unique_ptr<C2Work> &work) { in finishWork() argument 368 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 369 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
D | C2SoftMpeg4Enc.cpp | 303 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 305 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 309 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 310 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 311 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 312 work->workletsProcessed = 1u; in fillEmptyWork() 400 const std::unique_ptr<C2Work> &work, in process() argument 403 work->result = C2_OK; in process() 404 work->workletsProcessed = 1u; in process() 405 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/hardware/google/av/media/codecs/gsm/ |
D | C2SoftGsmDec.cpp | 175 const std::unique_ptr<C2Work> &work, in process() argument 178 work->result = C2_OK; in process() 179 work->workletsProcessed = 1u; in process() 180 work->worklets.front()->output.flags = work->input.flags; in process() 183 work->result = C2_BAD_VALUE; in process() 187 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() 191 if (!work->input.buffers.empty()) { in process() 192 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 196 work->result = rView.error(); in process() 202 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/hardware/google/av/media/codecs/g711/ |
D | C2SoftG711Dec.cpp | 141 const std::unique_ptr<C2Work> &work, in process() argument 144 work->result = C2_OK; in process() 145 work->workletsProcessed = 1u; in process() 146 work->worklets.front()->output.flags = work->input.flags; in process() 149 work->result = C2_BAD_VALUE; in process() 156 if (!work->input.buffers.empty()) { in process() 157 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 161 work->result = C2_CORRUPTED; in process() 165 bool eos = (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0; in process() 169 (int)work->input.ordinal.timestamp.peeku(), (int)work->input.ordinal.frameIndex.peeku()); in process() [all …]
|
/hardware/google/av/media/codecs/amr_nb_wb/ |
D | C2SoftAmrNbEnc.cpp | 181 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 182 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 183 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 184 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 185 work->workletsProcessed = 1u; in fillEmptyWork() 189 const std::unique_ptr<C2Work> &work, in process() argument 192 work->result = C2_OK; in process() 193 work->workletsProcessed = 1u; in process() 194 work->worklets.front()->output.flags = work->input.flags; in process() 197 work->result = C2_BAD_VALUE; in process() [all …]
|
D | C2SoftAmrDec.cpp | 246 const std::unique_ptr<C2Work> &work, in process() argument 249 work->result = C2_OK; in process() 250 work->workletsProcessed = 1u; in process() 251 work->worklets.front()->output.flags = work->input.flags; in process() 254 work->result = C2_BAD_VALUE; in process() 261 if (!work->input.buffers.empty()) { in process() 262 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 266 work->result = rView.error(); in process() 271 bool eos = (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0; in process() 273 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
D | C2SoftAmrWbEnc.cpp | 264 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 265 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 266 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 267 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 268 work->workletsProcessed = 1u; in fillEmptyWork() 272 const std::unique_ptr<C2Work> &work, in process() argument 275 work->result = C2_OK; in process() 276 work->workletsProcessed = 1u; in process() 277 work->worklets.front()->output.flags = work->input.flags; in process() 280 work->result = C2_BAD_VALUE; in process() [all …]
|
/hardware/google/av/media/codecs/base/ |
D | SimpleC2Component.cpp | 34 std::unique_ptr<C2Work> work = std::move(mQueue.front().work); in pop_front() local 36 return work; in pop_front() 39 void SimpleC2Component::WorkQueue::push_back(std::unique_ptr<C2Work> work) { in push_back() argument 40 mQueue.push_back({ std::move(work), NO_DRAIN }); in push_back() 220 std::unique_ptr<C2Work> work = queue->pop_front(); in flush_sm() local 221 if (work) { in flush_sm() 222 flushedWork->push_back(std::move(work)); in flush_sm() 342 std::list<std::unique_ptr<C2Work>> vec(std::unique_ptr<C2Work> &work) { in vec() argument 344 ret.push_back(std::move(work)); in vec() 352 std::unique_ptr<C2Work> work; in finish() local [all …]
|
/hardware/google/av/media/codecs/mp3/ |
D | C2SoftMp3Dec.cpp | 337 const std::unique_ptr<C2Work> &work, in process() argument 340 work->result = C2_OK; in process() 341 work->workletsProcessed = 1u; in process() 342 work->worklets.front()->output.configUpdate.clear(); in process() 343 work->worklets.front()->output.flags = work->input.flags; in process() 346 work->result = C2_BAD_VALUE; in process() 350 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() 353 if (!work->input.buffers.empty()) { in process() 354 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 358 work->result = rView.error(); in process() [all …]
|
/hardware/google/av/media/codecs/aac/ |
D | C2SoftAacDec.cpp | 440 const std::unique_ptr<C2Work> &work, in drainRingBuffer() argument 468 const std::unique_ptr<C2Work> &work, c2_status_t err) { in drainRingBuffer() argument 469 work->result = err; in drainRingBuffer() 470 C2FrameData &output = work->worklets.front()->output; in drainRingBuffer() 471 output.flags = work->input.flags; in drainRingBuffer() 473 output.ordinal = work->input.ordinal; in drainRingBuffer() 475 work->workletsProcessed = 1u; in drainRingBuffer() 501 const std::unique_ptr<C2Work> &work) { in drainRingBuffer() argument 502 work->result = C2_OK; in drainRingBuffer() 503 C2FrameData &output = work->worklets.front()->output; in drainRingBuffer() [all …]
|
/hardware/google/av/codec2/hidl/1.0/mts/audio/ |
D | MtsHidlC2V1_0TargetAudioEncTest.cpp | 138 for (std::unique_ptr<C2Work>& work : workItems) { in handleWorkDone() 139 if (!work->worklets.empty()) { in handleWorkDone() 140 workDone(mComponent, work, mFlushedIndices, mQueueLock, in handleWorkDone() 283 std::unique_ptr<C2Work> work; in encodeNFrames() local 285 while (!work && (maxRetry < MAX_RETRY)) { in encodeNFrames() 288 work.swap(workQueue.front()); in encodeNFrames() 295 if (!work && (maxRetry >= MAX_RETRY)) { in encodeNFrames() 304 work->input.flags = (C2FrameData::flags_t)flags; in encodeNFrames() 305 work->input.ordinal.timestamp = timestamp; in encodeNFrames() 306 work->input.ordinal.frameIndex = frameID; in encodeNFrames() [all …]
|
/hardware/google/av/media/codecs/raw/ |
D | C2SoftRawDec.cpp | 146 const std::unique_ptr<C2Work> &work, in process() argument 149 work->result = C2_OK; in process() 150 work->workletsProcessed = 1u; in process() 153 work->result = C2_BAD_VALUE; in process() 158 (int)work->input.ordinal.timestamp.peeku(), (int)work->input.ordinal.frameIndex.peeku()); in process() 160 work->worklets.front()->output.flags = work->input.flags; in process() 161 work->worklets.front()->output.buffers.clear(); in process() 162 work->worklets.front()->output.ordinal = work->input.ordinal; in process() 163 if (!work->input.buffers.empty()) { in process() 164 work->worklets.front()->output.buffers.push_back(work->input.buffers[0]); in process() [all …]
|
/hardware/google/av/codec2/hidl/1.0/mts/video/ |
D | MtsHidlC2V1_0TargetVideoEncTest.cpp | 141 for (std::unique_ptr<C2Work>& work : workItems) { in handleWorkDone() 142 if (!work->worklets.empty()) { in handleWorkDone() 143 if (work->result != C2_OK) mFailedWorkReceived++; in handleWorkDone() 144 workDone(mComponent, work, mFlushedIndices, mQueueLock, in handleWorkDone() 263 std::unique_ptr<C2Work> work; in encodeNFrames() local 265 while (!work && (maxRetry < MAX_RETRY)) { in encodeNFrames() 268 work.swap(workQueue.front()); in encodeNFrames() 275 if (!work && (maxRetry >= MAX_RETRY)) { in encodeNFrames() 285 work->input.flags = (C2FrameData::flags_t)flags; in encodeNFrames() 286 work->input.ordinal.timestamp = timestamp; in encodeNFrames() [all …]
|
D | MtsHidlC2V1_0TargetVideoDecTest.cpp | 144 for (std::unique_ptr<C2Work>& work : workItems) { in handleWorkDone() 145 if (!work->worklets.empty()) { in handleWorkDone() 149 bool codecConfig = ((work->worklets.front()->output.flags & in handleWorkDone() 152 !work->worklets.front()->output.buffers.empty()) { in handleWorkDone() 154 (work->worklets.front()->output.ordinal.timestamp.peeku()), in handleWorkDone() 157 work->worklets.front()->output.ordinal.timestamp.peeku(); in handleWorkDone() 183 workDone(mComponent, work, mFlushedIndices, mQueueLock, in handleWorkDone() 344 std::unique_ptr<C2Work> work; in decodeNFrames() local 346 while (!work && (maxRetry < MAX_RETRY)) { in decodeNFrames() 349 work.swap(workQueue.front()); in decodeNFrames() [all …]
|
/hardware/google/av/media/codecs/mpeg2/ |
D | C2SoftMpeg2Dec.cpp | 748 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 750 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 754 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 755 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 756 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 757 work->workletsProcessed = 1u; in fillEmptyWork() 760 void C2SoftMpeg2Dec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 769 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument 770 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork() 771 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/hardware/google/av/media/codecs/hevc/ |
D | C2SoftHevcDec.cpp | 666 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 668 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 672 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 673 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 674 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 675 work->workletsProcessed = 1u; in fillEmptyWork() 678 void C2SoftHevcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 687 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument 688 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork() 689 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/hardware/google/av/media/codecs/avc/ |
D | C2SoftAvcDec.cpp | 668 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 670 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 674 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 675 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 676 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 677 work->workletsProcessed = 1u; in fillEmptyWork() 680 void C2SoftAvcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 689 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument 690 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork() 691 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/hardware/google/av/media/sfplugin/ |
D | C2OMXNode.cpp | 244 std::unique_ptr<C2Work> work(new C2Work); in emptyBuffer() local 245 work->input.flags = (C2FrameData::flags_t)c2Flags; in emptyBuffer() 246 work->input.ordinal.timestamp = timestamp; in emptyBuffer() 250 work->input.ordinal.customOrdinal = timestamp; // save input timestamp in emptyBuffer() 257 work->input.ordinal.timestamp = in emptyBuffer() 261 work->input.ordinal.timestamp = mPrevCodecTimestamp - mAdjustTimestampGapUs; in emptyBuffer() 263 mPrevInputTimestamp = work->input.ordinal.customOrdinal; in emptyBuffer() 264 mPrevCodecTimestamp = work->input.ordinal.timestamp; in emptyBuffer() 266 work->input.ordinal.customOrdinal.peekll(), in emptyBuffer() 267 work->input.ordinal.timestamp.peekll(), in emptyBuffer() [all …]
|