Commit 7ed3972f8faf55050a936dc37c16b9eec91b64ca

Authored by Hu Chunming
1 parent e1ce3bbb

去掉过时代码

src/decoder/dvpp/DvppDecoder.cpp
... ... @@ -618,12 +618,6 @@ void DvppDecoder::read_thread() {
618 618 break;
619 619 }
620 620 nSended = sendPkt(vdecChannelDesc, pkt, frame_nb);
621   -
622   - if(frame_nb > 20 && m_avg_decode_time > 0)
623   - {
624   - // 针对文件,根据解码时间做延时,避免占用过多显存
625   - std::this_thread::sleep_for(std::chrono::milliseconds(m_avg_decode_time));
626   - }
627 621 }
628 622  
629 623 if(nSended < 0) {
... ... @@ -806,20 +800,6 @@ void DvppDecoder::doVdppVdecCallBack(acldvppStreamDesc *input, acldvppPicDesc *o
806 800  
807 801 m_out_count++;
808 802  
809   - if (m_out_count % 20 == 0)
810   - {
811   - m_decode_20_time -= m_avg_decode_time*20; // 减去等待用的时间就是实际解码用时
812   - m_avg_decode_time = m_decode_20_time / 20;
813   - LOG_INFO("[{}]- m_avg_decode_time: {}", m_dec_name, m_avg_decode_time);
814   - if (m_avg_decode_time <= 0) {
815   - m_avg_decode_time = 1;
816   - }
817   - m_decode_20_time = 0;
818   - }
819   - m_decode_20_time += UtilTools::get_cur_time_ms() - userData->sendTime;
820   - // LOG_INFO("[{}]- m_decode_20_time: {}", m_dec_name, m_decode_20_time);
821   -
822   -
823 803 CHECK_AND_RETURN_NOVALUE(aclrtSetCurrentContext(m_context), "aclrtSetCurrentContext failed");
824 804  
825 805 void *inputDataDev = acldvppGetStreamDescData(input);
... ...