Lines Matching refs:work
365 void fillEmptyWork(const std::unique_ptr<C2Work>& work) { in fillEmptyWork() argument
367 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork()
371 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork()
372 work->worklets.front()->output.buffers.clear(); in fillEmptyWork()
373 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork()
374 work->workletsProcessed = 1u; in fillEmptyWork()
378 const std::unique_ptr<C2Work>& work, in finishWork() argument
383 const std::unique_ptr<C2Work>& work) { in finishWork() argument
385 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork()
386 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork()
390 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in finishWork()
391 work->worklets.front()->output.buffers.clear(); in finishWork()
392 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
393 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
394 work->workletsProcessed = 1u; in finishWork()
396 for (const std::unique_ptr<C2Param> ¶m: work->input.configUpdate) { in finishWork()
408 work->worklets.front()->output.configUpdate.push_back( in finishWork()
418 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
419 fillWork(work); in finishWork()
425 void C2SoftAomDec::process(const std::unique_ptr<C2Work>& work, in process() argument
427 work->result = C2_OK; in process()
428 work->workletsProcessed = 0u; in process()
429 work->worklets.front()->output.configUpdate.clear(); in process()
430 work->worklets.front()->output.flags = work->input.flags; in process()
432 work->result = C2_BAD_VALUE; in process()
439 if (!work->input.buffers.empty()) { in process()
441 work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
445 work->result = C2_CORRUPTED; in process()
451 ((work->input.flags & C2FrameData::FLAG_CODEC_CONFIG) != 0); in process()
452 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
455 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
456 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
459 fillEmptyWork(work); in process()
463 int64_t frameIndex = work->input.ordinal.frameIndex.peekll(); in process()
482 work->result = C2_CORRUPTED; in process()
483 work->workletsProcessed = 1u; in process()
491 work->result = C2_CORRUPTED; in process()
492 work->workletsProcessed = 1u; in process()
498 (void)outputBuffer(pool, work); in process()
501 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
504 fillEmptyWork(work); in process()
628 const std::unique_ptr<C2Work> &work) in outputBuffer() argument
630 if (!(work && pool)) return false; in outputBuffer()
645 work->worklets.front()->output.configUpdate.push_back( in outputBuffer()
650 work->result = C2_CORRUPTED; in outputBuffer()
651 work->workletsProcessed = 1u; in outputBuffer()
677 work->result = err; in outputBuffer()
685 work->result = C2_CORRUPTED; in outputBuffer()
730 finishWork(*(int64_t*)img->user_priv, work, std::move(block)); in outputBuffer()
737 const std::unique_ptr<C2Work>& work) { in drainInternal() argument
752 while ((outputBuffer(pool, work))) { in drainInternal()
755 if (drainMode == DRAIN_COMPONENT_WITH_EOS && work && in drainInternal()
756 work->workletsProcessed == 0u) { in drainInternal()
757 fillEmptyWork(work); in drainInternal()