Lines Matching refs:work
748 void fillEmptyWork(const std::unique_ptr<C2Work> &work) { in fillEmptyWork() argument
750 if (work->input.flags & C2FrameData::FLAG_END_OF_STREAM) { in fillEmptyWork()
754 work->worklets.front()->output.flags = (C2FrameData::flags_t)flags; in fillEmptyWork()
755 work->worklets.front()->output.buffers.clear(); in fillEmptyWork()
756 work->worklets.front()->output.ordinal = work->input.ordinal; in fillEmptyWork()
757 work->workletsProcessed = 1u; in fillEmptyWork()
760 void C2SoftMpeg2Dec::finishWork(uint64_t index, const std::unique_ptr<C2Work> &work) { in finishWork() argument
769 auto fillWork = [buffer](const std::unique_ptr<C2Work> &work) { in finishWork() argument
770 work->worklets.front()->output.flags = (C2FrameData::flags_t)0; in finishWork()
771 work->worklets.front()->output.buffers.clear(); in finishWork()
772 work->worklets.front()->output.buffers.push_back(buffer); in finishWork()
773 work->worklets.front()->output.ordinal = work->input.ordinal; in finishWork()
774 work->workletsProcessed = 1u; in finishWork()
776 if (work && c2_cntr64_t(index) == work->input.ordinal.frameIndex) { in finishWork()
777 fillWork(work); in finishWork()
818 const std::unique_ptr<C2Work> &work, in process() argument
821 work->result = C2_OK; in process()
822 work->workletsProcessed = 0u; in process()
823 work->worklets.front()->output.configUpdate.clear(); in process()
824 work->worklets.front()->output.flags = work->input.flags; in process()
827 work->result = C2_BAD_VALUE; in process()
833 uint32_t workIndex = work->input.ordinal.frameIndex.peeku() & 0xFFFFFFFF; in process()
835 if (!work->input.buffers.empty()) { in process()
836 rView = work->input.buffers[0]->data().linearBlocks().front().map().get(); in process()
840 work->result = C2_CORRUPTED; in process()
844 bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); in process()
848 inSize, (int)work->input.ordinal.timestamp.peeku(), in process()
849 (int)work->input.ordinal.frameIndex.peeku(), work->input.flags); in process()
854 work->workletsProcessed = 1u; in process()
855 work->result = C2_CORRUPTED; in process()
861 work->result = C2_CORRUPTED; in process()
870 work->workletsProcessed = 1u; in process()
871 work->result = C2_CORRUPTED; in process()
887 drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); in process()
889 work->workletsProcessed = 0u; in process()
900 work->worklets.front()->output.configUpdate.push_back( in process()
905 work->workletsProcessed = 1u; in process()
906 work->result = C2_CORRUPTED; in process()
913 work->workletsProcessed = 1u; in process()
914 work->result = C2_CORRUPTED; in process()
920 drainInternal(DRAIN_COMPONENT_NO_EOS, pool, work); in process()
923 work->workletsProcessed = 0u; in process()
939 work->worklets.front()->output.configUpdate.push_back( in process()
944 work->workletsProcessed = 1u; in process()
945 work->result = C2_CORRUPTED; in process()
954 finishWork(s_decode_op.u4_ts, work); in process()
966 drainInternal(DRAIN_COMPONENT_WITH_EOS, pool, work); in process()
969 fillEmptyWork(work); in process()
976 const std::unique_ptr<C2Work> &work) { in drainInternal() argument
990 work->workletsProcessed = 1u; in drainInternal()
991 work->result = C2_CORRUPTED; in drainInternal()
1003 work->workletsProcessed = 1u; in drainInternal()
1008 finishWork(s_decode_op.u4_ts, work); in drainInternal()
1010 fillEmptyWork(work); in drainInternal()