/frameworks/av/media/codec2/components/opus/ |
D | C2SoftOpusDec.cpp | 177 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 178 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 179 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 180 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 181 work->workletsProcessed = 1u; in fillEmptyWork() 209 const std::unique_ptr<C2Work> &work, in process() argument 212 work->result = C2_OK; in process() 213 work->workletsProcessed = 1u; in process() 214 work->worklets.front()->output.configUpdate.clear(); in process() 215 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
D | C2SoftOpusEnc.cpp | 299 void C2SoftOpusEnc::process(const std::unique_ptr<C2Work>& work, in process() argument 302 work->result = C2_OK; in process() 303 work->workletsProcessed = 1u; in process() 304 work->worklets.front()->output.flags = work->input.flags; in process() 307 work->result = C2_BAD_VALUE; in process() 311 bool eos = (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0; in process() 316 if (!work->input.buffers.empty()) { in process() 318 work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 322 work->result = C2_CORRUPTED; in process() 328 inSize, (int)work->input.ordinal.timestamp.peeku(), in process() [all …]
|
/frameworks/av/media/codec2/components/vorbis/ |
D | C2SoftVorbisDec.cpp | 197 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 198 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 199 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 200 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 201 work->workletsProcessed = 1u; in fillEmptyWork() 225 const std::unique_ptr<C2Work> &work, in process() argument 228 work->result = C2_OK; in process() 229 work->workletsProcessed = 1u; in process() 230 work->worklets.front()->output.configUpdate.clear(); in process() 231 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/frameworks/av/media/codec2/components/flac/ |
D | C2SoftFlacDec.cpp | 168 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 169 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 170 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 171 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 172 work->workletsProcessed = 1u; 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.configUpdate.clear(); in process() 183 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
D | C2SoftFlacEnc.cpp | 191 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 192 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 193 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 194 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 198 const std::unique_ptr<C2Work> &work, in process() argument 201 work->result = C2_OK; in process() 202 work->workletsProcessed = 1u; in process() 203 work->worklets.front()->output.flags = work->input.flags; in process() 206 work->result = C2_BAD_VALUE; in process() 210 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() [all …]
|
/frameworks/av/media/codec2/hidl/1.0/vts/functional/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 …]
|
/frameworks/av/media/codec2/components/g711/ |
D | C2SoftG711Dec.cpp | 135 const std::unique_ptr<C2Work> &work, in process() argument 138 work->result = C2_OK; in process() 139 work->workletsProcessed = 1u; in process() 140 work->worklets.front()->output.flags = work->input.flags; in process() 143 work->result = C2_BAD_VALUE; in process() 150 if (!work->input.buffers.empty()) { in process() 151 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 155 work->result = C2_CORRUPTED; in process() 159 bool eos = (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0; in process() 163 (int)work->input.ordinal.timestamp.peeku(), (int)work->input.ordinal.frameIndex.peeku()); in process() [all …]
|
/frameworks/av/media/codec2/components/gsm/ |
D | C2SoftGsmDec.cpp | 169 const std::unique_ptr<C2Work> &work, in process() argument 172 work->result = C2_OK; in process() 173 work->workletsProcessed = 1u; in process() 174 work->worklets.front()->output.flags = work->input.flags; in process() 177 work->result = C2_BAD_VALUE; in process() 181 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() 185 if (!work->input.buffers.empty()) { in process() 186 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 190 work->result = rView.error(); in process() 196 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
/frameworks/av/media/codec2/components/mpeg4_h263/ |
D | C2SoftMpeg4Dec.cpp | 354 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 356 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 360 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 361 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 362 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 363 work->workletsProcessed = 1u; in fillEmptyWork() 366 void C2SoftMpeg4Dec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 370 auto fillWork = [buffer, index](const std::unique_ptr<C2Work> &work) { in finishWork() argument 372 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 373 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
/frameworks/av/media/codec2/components/amr_nb_wb/ |
D | C2SoftAmrNbEnc.cpp | 174 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 175 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 176 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 177 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 178 work->workletsProcessed = 1u; in fillEmptyWork() 182 const std::unique_ptr<C2Work> &work, in process() argument 185 work->result = C2_OK; in process() 186 work->workletsProcessed = 1u; in process() 187 work->worklets.front()->output.flags = work->input.flags; in process() 190 work->result = C2_BAD_VALUE; in process() [all …]
|
D | C2SoftAmrDec.cpp | 240 const std::unique_ptr<C2Work> &work, in process() argument 243 work->result = C2_OK; in process() 244 work->workletsProcessed = 1u; in process() 245 work->worklets.front()->output.flags = work->input.flags; in process() 248 work->result = C2_BAD_VALUE; in process() 255 if (!work->input.buffers.empty()) { in process() 256 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 260 work->result = rView.error(); in process() 265 bool eos = (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0; in process() 267 work->worklets.front()->output.flags = work->input.flags; in process() [all …]
|
D | C2SoftAmrWbEnc.cpp | 256 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 257 work->worklets.front()->output.flags = work->input.flags; in fillEmptyWork() 258 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 259 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 260 work->workletsProcessed = 1u; in fillEmptyWork() 264 const std::unique_ptr<C2Work> &work, in process() argument 267 work->result = C2_OK; in process() 268 work->workletsProcessed = 1u; in process() 269 work->worklets.front()->output.flags = work->input.flags; in process() 272 work->result = C2_BAD_VALUE; in process() [all …]
|
/frameworks/av/media/codec2/components/mp3/ |
D | C2SoftMp3Dec.cpp | 330 const std::unique_ptr<C2Work> &work, in process() argument 333 work->result = C2_OK; in process() 334 work->workletsProcessed = 1u; in process() 335 work->worklets.front()->output.configUpdate.clear(); in process() 336 work->worklets.front()->output.flags = work->input.flags; in process() 339 work->result = C2_BAD_VALUE; in process() 343 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process() 346 if (!work->input.buffers.empty()) { in process() 347 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process() 351 work->result = rView.error(); in process() [all …]
|
/frameworks/av/media/codec2/components/gav1/ |
D | C2SoftGav1Dec.cpp | 352 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 354 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 358 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 359 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 360 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 361 work->workletsProcessed = 1u; in fillEmptyWork() 365 const std::unique_ptr<C2Work> &work, in finishWork() argument 369 auto fillWork = [buffer, index](const std::unique_ptr<C2Work> &work) { in finishWork() argument 371 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 372 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
/frameworks/av/media/codec2/components/hevc/ |
D | C2SoftHevcDec.cpp | 685 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 687 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 691 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 692 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 693 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 694 work->workletsProcessed = 1u; in fillEmptyWork() 697 void C2SoftHevcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 713 void operator()(const std::unique_ptr<C2Work>& work) { in finishWork() argument 714 work->worklets.front()->output.flags = (C2FrameData::flags_t)mFlags; in finishWork() 715 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/frameworks/av/media/codec2/components/avc/ |
D | C2SoftAvcDec.cpp | 689 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 691 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 695 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 696 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 697 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 698 work->workletsProcessed = 1u; in fillEmptyWork() 701 void C2SoftAvcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 717 void operator()(const std::unique_ptr<C2Work>& work) { in finishWork() argument 718 work->worklets.front()->output.flags = (C2FrameData::flags_t)mFlags; in finishWork() 719 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/frameworks/av/media/codec2/components/aom/ |
D | C2SoftAomDec.cpp | 363 void fillEmptyWork(const std::unique_ptr<C2Work>& work) { in fillEmptyWork() argument 365 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 369 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 370 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 371 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 372 work->workletsProcessed = 1u; in fillEmptyWork() 376 const std::unique_ptr<C2Work>& work, in finishWork() argument 381 const std::unique_ptr<C2Work>& work) { in finishWork() argument 383 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 384 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
/frameworks/av/media/codec2/components/aac/ |
D | C2SoftAacDec.cpp | 427 const std::unique_ptr<C2Work> &work, in drainRingBuffer() argument 455 const std::unique_ptr<C2Work> &work, c2_status_t err) { in drainRingBuffer() argument 456 work->result = err; in drainRingBuffer() 457 C2FrameData &output = work->worklets.front()->output; in drainRingBuffer() 458 output.flags = work->input.flags; in drainRingBuffer() 460 output.ordinal = work->input.ordinal; in drainRingBuffer() 462 work->workletsProcessed = 1u; in drainRingBuffer() 488 const std::unique_ptr<C2Work> &work) { in drainRingBuffer() argument 489 work->result = C2_OK; in drainRingBuffer() 490 C2FrameData &output = work->worklets.front()->output; in drainRingBuffer() [all …]
|
/frameworks/av/media/codec2/components/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() 270 std::unique_ptr<C2Work> work = queue->pop_front(); in flush_sm() local 271 if (work) { in flush_sm() 272 flushedWork->push_back(std::move(work)); in flush_sm() 383 std::list<std::unique_ptr<C2Work>> vec(std::unique_ptr<C2Work> &work) { in vec() argument 385 ret.push_back(std::move(work)); in vec() 393 std::unique_ptr<C2Work> work; in finish() local [all …]
|
/frameworks/av/media/codec2/components/vpx/ |
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 …]
|
D | C2SoftVpxDec.cpp | 488 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 490 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 494 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 495 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 496 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 497 work->workletsProcessed = 1u; in fillEmptyWork() 500 void C2SoftVpxDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work, in finishWork() argument 505 const std::unique_ptr<C2Work> &work) { in finishWork() argument 507 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork() 508 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork() [all …]
|
/frameworks/av/media/codec2/hidl/1.0/vts/functional/video/ |
D | VtsHalMediaC2V1_0TargetVideoDecTest.cpp | 148 for (std::unique_ptr<C2Work>& work : workItems) { in handleWorkDone() 149 if (!work->worklets.empty()) { in handleWorkDone() 153 bool codecConfig = ((work->worklets.front()->output.flags & in handleWorkDone() 156 !work->worklets.front()->output.buffers.empty()) { in handleWorkDone() 158 (work->worklets.front()->output.ordinal.timestamp.peeku()), in handleWorkDone() 161 work->worklets.front()->output.ordinal.timestamp.peeku(); in handleWorkDone() 187 workDone(mComponent, work, mFlushedIndices, mQueueLock, in handleWorkDone() 348 std::unique_ptr<C2Work> work; in decodeNFrames() local 350 while (!work && (maxRetry < MAX_RETRY)) { in decodeNFrames() 353 work.swap(workQueue.front()); in decodeNFrames() [all …]
|
/frameworks/av/media/codec2/components/raw/ |
D | C2SoftRawDec.cpp | 139 const std::unique_ptr<C2Work> &work, in process() argument 142 work->result = C2_OK; in process() 143 work->workletsProcessed = 1u; in process() 146 work->result = C2_BAD_VALUE; in process() 151 (int)work->input.ordinal.timestamp.peeku(), (int)work->input.ordinal.frameIndex.peeku()); in process() 153 work->worklets.front()->output.flags = work->input.flags; in process() 154 work->worklets.front()->output.buffers.clear(); in process() 155 work->worklets.front()->output.ordinal = work->input.ordinal; in process() 156 if (!work->input.buffers.empty()) { in process() 157 work->worklets.front()->output.buffers.push_back(work->input.buffers[0]); in process() [all …]
|
/frameworks/av/media/codec2/components/mpeg2/ |
D | C2SoftMpeg2Dec.cpp | 759 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument 761 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork() 765 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork() 766 work->worklets.front()->output.buffers.clear(); in fillEmptyWork() 767 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork() 768 work->workletsProcessed = 1u; in fillEmptyWork() 771 void C2SoftMpeg2Dec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument 787 void operator()(const std::unique_ptr<C2Work>& work) { in finishWork() argument 788 work->worklets.front()->output.flags = (C2FrameData::flags_t)mFlags; in finishWork() 789 work->worklets.front()->output.buffers.clear(); in finishWork() [all …]
|
/frameworks/av/media/codec2/hidl/1.0/vts/functional/audio/ |
D | VtsHalMediaC2V1_0TargetAudioEncTest.cpp | 132 for (std::unique_ptr<C2Work>& work : workItems) { in handleWorkDone() 133 if (!work->worklets.empty()) { in handleWorkDone() 134 workDone(mComponent, work, mFlushedIndices, mQueueLock, in handleWorkDone() 299 std::unique_ptr<C2Work> work; in encodeNFrames() local 301 while (!work && (maxRetry < MAX_RETRY)) { in encodeNFrames() 304 work.swap(workQueue.front()); in encodeNFrames() 311 if (!work && (maxRetry >= MAX_RETRY)) { in encodeNFrames() 320 work->input.flags = (C2FrameData::flags_t)flags; in encodeNFrames() 321 work->input.ordinal.timestamp = timestamp; in encodeNFrames() 322 work->input.ordinal.frameIndex = frameID; in encodeNFrames() [all …]
|