[FFmpeg-trac] #11245(undetermined:new): FFMPEG SLOW FOR HEIC TO PNG WITH HEVC_CUVID
FFmpeg
trac at avcodec.org
Tue Oct 15 19:54:13 EEST 2024
#11245: FFMPEG SLOW FOR HEIC TO PNG WITH HEVC_CUVID
-------------------------------------+-------------------------------------
Reporter: dkode | Owner: (none)
Type: defect | Status: new
Priority: important | Component:
| undetermined
Version: 7.1 | Resolution:
Keywords: heif Hevc | Blocked By:
cuvid |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by dkode):
@Bailing
I don't this it is required and functionally the process is working fine.I
have a requirement that software decoding cannot be used (software decoder
explicitly disabled using disable-decoder flag while compiling).
Al thought functionally correct, But it is super slow for tile based heic
images.I could see in the logs that cuda is getting opened and closed a
lot of times, this may be the reason. Please find the trace logs attached
above.
{{{
[AVHWDeviceContext @ 0x555d4e3fb540] Loaded lib: libcuda.so.1
587 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuInit
588 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDriverGetVersion
589 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuDeviceGetCount
590 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuDeviceGet
591 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDeviceGetAttribute
592 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuDeviceGetName
593 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDeviceComputeCapability
594 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuCtxCreate_v2
595 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuCtxGetCurrent
596 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuCtxSetLimit
597 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuCtxPushCurrent_v2
598 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuCtxPopCurrent_v2
599 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuCtxDestroy_v2
600 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemAlloc_v2
601 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMemAllocPitch_v2
602 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemAllocManaged
603 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemsetD8Async
604 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemFree_v2
605 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpy
606 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpyAsync
607 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpy2D_v2
608 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMemcpy2DAsync_v2
609 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpyHtoD_v2
610 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMemcpyHtoDAsync_v2
611 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpyDtoH_v2
612 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMemcpyDtoHAsync_v2
613 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuMemcpyDtoD_v2
614 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMemcpyDtoDAsync_v2
615 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuGetErrorName
616 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuGetErrorString
617 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuCtxGetDevice
618 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDevicePrimaryCtxRetain
619 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDevicePrimaryCtxRelease
620 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDevicePrimaryCtxSetFlags
621 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDevicePrimaryCtxGetState
622 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDevicePrimaryCtxReset
623 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuStreamCreate
624 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuStreamQuery
625 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuStreamSynchronize
626 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuStreamDestroy_v2
627 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuStreamAddCallback
628 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuStreamWaitEvent
629 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuEventCreate
630 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuEventDestroy_v2
631 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEventSynchronize
632 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuEventQuery
633 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuEventRecord
634 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuLaunchKernel
635 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuLinkCreate
636 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuLinkAddData
637 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuLinkComplete
638 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuLinkDestroy
639 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuModuleLoadData
640 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuModuleUnload
641 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuModuleGetFunction
642 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuModuleGetGlobal
643 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuTexObjectCreate
644 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuTexObjectDestroy
645 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuGLGetDevices_v2
646 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsGLRegisterImage
647 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsUnregisterResource
648 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsMapResources
649 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsUnmapResources
650 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsSubResourceGetMappedArray
651 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuGraphicsResourceGetMappedPointer_v2
652 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuDeviceGetUuid
653 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDeviceGetUuid_v2
654 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuDeviceGetLuid
655 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDeviceGetByPCIBusId
656 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDeviceGetPCIBusId
657 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuImportExternalMemory
658 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDestroyExternalMemory
659 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuExternalMemoryGetMappedBuffer
660 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuExternalMemoryGetMappedMipmappedArray
661 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMipmappedArrayGetLevel
662 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuMipmappedArrayDestroy
663 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuImportExternalSemaphore
664 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuDestroyExternalSemaphore
665 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuSignalExternalSemaphoresAsync
666 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuWaitExternalSemaphoresAsync
667 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuArrayCreate_v2
668 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuArray3DCreate_v2
669 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym: cuArrayDestroy
670 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEGLStreamProducerConnect
671 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEGLStreamProducerDisconnect
672 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEGLStreamConsumerDisconnect
673 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEGLStreamProducerPresentFrame
674 [AVHWDeviceContext @ 0x555d4e3fb540] Loaded sym:
cuEGLStreamProducerReturnFrame
675 [AVHWDeviceContext @ 0x555d4e3fb540] Calling cu->cuInit(0)
676 [AVHWDeviceContext @ 0x555d4e3fb540] Calling
cu->cuDeviceGet(&hwctx->internal->cuda_device, device_idx)
677 [AVHWDeviceContext @ 0x555d4e3fb540] Calling
cu->cuCtxCreate(&hwctx->cuda_ctx, desired_flags,
hwctx->internal->cuda_device)
678 [AVHWDeviceContext @ 0x555d4e3fb540] Calling
cu->cuCtxPopCurrent(&dummy)
679 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cudl->cuCtxPushCurrent(cuda_ctx)
680 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps8)
681 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps10)
682 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps12)
683 [hevc_cuvid @ 0x555d4e38a2c0] CUVID capabilities for hevc_cuvid:
684 [hevc_cuvid @ 0x555d4e38a2c0] 8 bit: supported: 1, min_width: 144,
max_width: 8192, min_height: 144, max_height: 8192
685 [hevc_cuvid @ 0x555d4e38a2c0] 10 bit: supported: 1, min_width:
144, max_width: 8192, min_height: 144, max_height: 8192
686 [hevc_cuvid @ 0x555d4e38a2c0] 12 bit: supported: 1, min_width:
144, max_width: 8192, min_height: 144, max_height: 8192
687 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cvdl->cuvidCreateVideoParser(&ctx->cuparser, &ctx->cuparseinfo)
688 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cvdl->cuvidParseVideoData(ctx->cuparser, &seq_pkt)
689 [hevc_cuvid @ 0x555d4e38a2c0] Calling
ctx->cudl->cuCtxPopCurrent(&dummy)
690 [hevc_cuvid @ 0x555d4e38b580] Format nv12 chosen by get_format().
691 [hevc_cuvid @ 0x555d4e38b580] Loaded lib: libnvcuvid.so.1
692 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidGetDecoderCaps
693 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCreateDecoder
694 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidDestroyDecoder
695 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidDecodePicture
696 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidGetDecodeStatus
697 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidReconfigureDecoder
698 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidMapVideoFrame64
699 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidUnmapVideoFrame64
700 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCtxLockCreate
701 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCtxLockDestroy
702 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCtxLock
703 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCtxUnlock
704 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCreateVideoSource
705 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCreateVideoSourceW
706 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidDestroyVideoSource
707 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidSetVideoSourceState
708 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidGetVideoSourceState
709 [hevc_cuvid @ 0x555d4e38b580] Loaded sym:
cuvidGetSourceVideoFormat
710 [hevc_cuvid @ 0x555d4e38b580] Loaded sym:
cuvidGetSourceAudioFormat
711 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidCreateVideoParser
712 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidParseVideoData
713 [hevc_cuvid @ 0x555d4e38b580] Loaded sym: cuvidDestroyVideoParser
}}}
This log appears 50 times for a simple command.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11245#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list