Lines Matching refs:work

361 void fillEmptyWork(const std::unique_ptr<C2Work>& work) {  in fillEmptyWork()  argument
363 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork()
367 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork()
368 work->worklets.front()->output.buffers.clear(); in fillEmptyWork()
369 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork()
370 work->workletsProcessed = 1u; in fillEmptyWork()
374 const std::unique_ptr<C2Work>& work, in finishWork() argument
379 const std::unique_ptr<C2Work>& work) { in finishWork() argument
381 if ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) && in finishWork()
382 (c2_cntr64_t(index) == work->input.ordinal.frameIndex)) { in finishWork()
386 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in finishWork()
387 work->worklets.front()->output.buffers.clear(); in finishWork()
388 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
389 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
390 work->workletsProcessed = 1u; in finishWork()
392 for (const std::unique_ptr<C2Param> &param: work->input.configUpdate) { in finishWork()
404 work->worklets.front()->output.configUpdate.push_back( in finishWork()
414 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
415 fillWork(work); in finishWork()
421 void C2SoftAomDec::process(const std::unique_ptr<C2Work>& work, in process() argument
423 work->result = C2_OK; in process()
424 work->workletsProcessed = 0u; in process()
425 work->worklets.front()->output.configUpdate.clear(); in process()
426 work->worklets.front()->output.flags = work->input.flags; in process()
428 work->result = C2_BAD_VALUE; in process()
435 if (!work->input.buffers.empty()) { in process()
437 work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
441 work->result = C2_CORRUPTED; in process()
447 ((work->input.flags & C2FrameData::FLAG_CODEC_CONFIG) != 0); in process()
448 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
451 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
452 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
455 fillEmptyWork(work); in process()
459 int64_t frameIndex = work->input.ordinal.frameIndex.peekll(); in process()
478 work->result = C2_CORRUPTED; in process()
479 work->workletsProcessed = 1u; in process()
487 work->result = C2_CORRUPTED; in process()
488 work->workletsProcessed = 1u; in process()
494 (void)outputBuffer(pool, work); in process()
497 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
500 fillEmptyWork(work); in process()
630 const std::unique_ptr<C2Work> &work) in outputBuffer() argument
632 if (!(work && pool)) return false; in outputBuffer()
647 work->worklets.front()->output.configUpdate.push_back( in outputBuffer()
652 work->result = C2_CORRUPTED; in outputBuffer()
653 work->workletsProcessed = 1u; in outputBuffer()
679 work->result = err; in outputBuffer()
687 work->result = C2_CORRUPTED; in outputBuffer()
729 finishWork(*(int64_t*)img->user_priv, work, std::move(block)); in outputBuffer()
736 const std::unique_ptr<C2Work>& work) { in drainInternal() argument
751 while ((outputBuffer(pool, work))) { in drainInternal()
754 if (drainMode == DRAIN_COMPONENT_WITH_EOS && work && in drainInternal()
755 work->workletsProcessed == 0u) { in drainInternal()
756 fillEmptyWork(work); in drainInternal()