Lines Matching refs:work
699 static void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument
701 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork()
705 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork()
706 work->worklets.front()->output.buffers.clear(); in fillEmptyWork()
707 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork()
708 work->workletsProcessed = 1u; in fillEmptyWork()
711 void C2SoftAvcDec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument
727 void operator()(const std::unique_ptr<C2Work>& work) { in finishWork() argument
728 work->worklets.front()->output.flags = (C2FrameData::flags_t)mFlags; in finishWork()
729 work->worklets.front()->output.buffers.clear(); in finishWork()
730 work->worklets.front()->output.ordinal = mOrdinal; in finishWork()
731 work->workletsProcessed = 1u; in finishWork()
732 work->result = C2_OK; in finishWork()
734 work->worklets.front()->output.buffers.push_back(mBuffer); in finishWork()
747 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument
748 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork()
749 work->worklets.front()->output.buffers.clear(); in finishWork()
750 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
751 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
752 work->workletsProcessed = 1u; in finishWork()
754 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
755 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in finishWork()
760 C2WorkOrdinalStruct outOrdinal = work->input.ordinal; in finishWork()
762 mOutIndex, work, in finishWork()
767 fillWork(work); in finishWork()
806 const std::unique_ptr<C2Work> &work, in process() argument
809 work->result = C2_OK; in process()
810 work->workletsProcessed = 0u; in process()
811 work->worklets.front()->output.flags = work->input.flags; in process()
813 work->result = C2_BAD_VALUE; in process()
819 uint32_t workIndex = work->input.ordinal.frameIndex.peeku() & 0xFFFFFFFF; in process()
821 if (!work->input.buffers.empty()) { in process()
822 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
826 work->result = rView.error(); in process()
830 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
834 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
835 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
840 work->workletsProcessed = 1u; in process()
841 work->result = C2_CORRUPTED; in process()
853 work->result = wView.error(); in process()
859 work->workletsProcessed = 1u; in process()
860 work->result = C2_CORRUPTED; in process()
882 work->workletsProcessed = 1u; in process()
883 work->result = C2_CORRUPTED; in process()
889 work->workletsProcessed = 1u; in process()
890 work->result = C2_CORRUPTED; in process()
894 drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); in process()
897 work->workletsProcessed = 0u; in process()
905 work->workletsProcessed = 1u; in process()
906 work->result = C2_CORRUPTED; in process()
918 work->worklets.front()->output.configUpdate.push_back( in process()
923 work->workletsProcessed = 1u; in process()
924 work->result = C2_CORRUPTED; in process()
943 work->worklets.front()->output.configUpdate.push_back( in process()
948 work->workletsProcessed = 1u; in process()
949 work->result = C2_CORRUPTED; in process()
958 finishWork(ps_decode_op->u4_ts, work); in process()
963 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
966 fillEmptyWork(work); in process()
969 work->input.buffers.clear(); in process()
975 const std::unique_ptr<C2Work> &work) { in drainInternal() argument
989 work->workletsProcessed = 1u; in drainInternal()
990 work->result = C2_CORRUPTED; in drainInternal()
1004 work->workletsProcessed = 1u; in drainInternal()
1009 finishWork(ps_decode_op->u4_ts, work); in drainInternal()
1011 fillEmptyWork(work); in drainInternal()