Lines Matching refs:work

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()
692 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
693 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
694 work->workletsProcessed = 1u; in finishWork()
696 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
697 fillWork(work); in finishWork()
738 const std::unique_ptr<C2Work> &work, in process() argument
741 work->result = C2_OK; in process()
742 work->workletsProcessed = 0u; in process()
743 work->worklets.front()->output.flags = work->input.flags; in process()
745 work->result = C2_BAD_VALUE; in process()
751 uint32_t workIndex = work->input.ordinal.frameIndex.peeku() & 0xFFFFFFFF; in process()
753 if (!work->input.buffers.empty()) { in process()
754 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
758 work->result = rView.error(); in process()
762 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
766 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
767 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
772 work->workletsProcessed = 1u; in process()
773 work->result = C2_CORRUPTED; in process()
783 work->result = wView.error(); in process()
789 work->workletsProcessed = 1u; in process()
790 work->result = C2_CORRUPTED; in process()
812 work->workletsProcessed = 1u; in process()
813 work->result = C2_CORRUPTED; in process()
818 work->workletsProcessed = 1u; in process()
819 work->result = C2_CORRUPTED; in process()
823 drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); in process()
826 work->workletsProcessed = 0u; in process()
846 work->worklets.front()->output.configUpdate.push_back( in process()
851 work->workletsProcessed = 1u; in process()
852 work->result = C2_CORRUPTED; in process()
861 finishWork(s_decode_op.u4_ts, work); in process()
875 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
878 fillEmptyWork(work); in process()
885 const std::unique_ptr<C2Work> &work) { in drainInternal() argument
899 work->workletsProcessed = 1u; in drainInternal()
900 work->result = C2_CORRUPTED; in drainInternal()
912 work->workletsProcessed = 1u; in drainInternal()
917 finishWork(s_decode_op.u4_ts, work); in drainInternal()
919 fillEmptyWork(work); in drainInternal()