Lines Matching refs:work
690 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument
692 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork()
696 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork()
697 work->worklets.front()->output.buffers.clear(); in fillEmptyWork()
698 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork()
699 work->workletsProcessed = 1u; in fillEmptyWork()
702 void C2SoftHevcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument
718 void operator()(const std::unique_ptr<C2Work>& work) { in finishWork() argument
719 work->worklets.front()->output.flags = (C2FrameData::flags_t)mFlags; in finishWork()
720 work->worklets.front()->output.buffers.clear(); in finishWork()
721 work->worklets.front()->output.ordinal = mOrdinal; in finishWork()
722 work->workletsProcessed = 1u; in finishWork()
723 work->result = C2_OK; in finishWork()
725 work->worklets.front()->output.buffers.push_back(mBuffer); in finishWork()
738 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument
739 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork()
740 work->worklets.front()->output.buffers.clear(); in finishWork()
741 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
742 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
743 work->workletsProcessed = 1u; in finishWork()
745 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
746 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in finishWork()
751 C2WorkOrdinalStruct outOrdinal = work->input.ordinal; in finishWork()
753 mOutIndex, work, in finishWork()
758 fillWork(work); in finishWork()
797 const std::unique_ptr<C2Work> &work, in process() argument
800 work->result = C2_OK; in process()
801 work->workletsProcessed = 0u; in process()
802 work->worklets.front()->output.configUpdate.clear(); in process()
803 work->worklets.front()->output.flags = work->input.flags; in process()
806 work->result = C2_BAD_VALUE; in process()
812 uint32_t workIndex = work->input.ordinal.frameIndex.peeku() & 0xFFFFFFFF; in process()
814 if (!work->input.buffers.empty()) { in process()
815 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
819 work->result = rView.error(); in process()
823 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
827 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
828 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
833 work->workletsProcessed = 1u; in process()
834 work->result = C2_CORRUPTED; in process()
840 work->result = wView.error(); in process()
850 work->workletsProcessed = 1u; in process()
851 work->result = C2_CORRUPTED; in process()
871 work->workletsProcessed = 1u; in process()
872 work->result = C2_CORRUPTED; in process()
878 work->workletsProcessed = 1u; in process()
879 work->result = C2_CORRUPTED; in process()
883 drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); in process()
886 work->workletsProcessed = 0u; in process()
894 work->workletsProcessed = 1u; in process()
895 work->result = C2_CORRUPTED; in process()
907 work->worklets.front()->output.configUpdate.push_back( in process()
912 work->workletsProcessed = 1u; in process()
913 work->result = C2_CORRUPTED; in process()
932 work->worklets.front()->output.configUpdate.push_back( in process()
937 work->workletsProcessed = 1u; in process()
938 work->result = C2_CORRUPTED; in process()
947 finishWork(ps_decode_op->u4_ts, work); in process()
962 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
965 fillEmptyWork(work); in process()
972 const std::unique_ptr<C2Work> &work) { in drainInternal() argument
986 work->workletsProcessed = 1u; in drainInternal()
987 work->result = C2_CORRUPTED; in drainInternal()
1001 work->workletsProcessed = 1u; in drainInternal()
1006 finishWork(ps_decode_op->u4_ts, work); in drainInternal()
1008 fillEmptyWork(work); in drainInternal()