mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
The decoding time of a single frame is too long. #8
Labels
No labels
bug
enhancement
help wanted
invalid
pull-request
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/ffmpeg-rockchip#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MapleAura on GitHub (Jan 20, 2024).
When I calculated the time to decode, I found out the average time is almost 84ms.
Open the log and find such a problem “Decoder buffer is full”. This happens regardless of whether I export to NV12 format or drm_prime.
This is the test code:

@nyanmisaka commented on GitHub (Jan 20, 2024):
Bear in mind that
memcpyandResizetime should not be counted in HW decoding time.In particular,
av_hwframe_transfer_data()already includesmemcpyfor AV_PIX_FMT_DRM_PRIME => AV_PIX_FMT_NV12 conversion.Therefore your code contains redundant
memcpy.@daoan1412 commented on GitHub (Jan 20, 2024):
I have a similar problem, even without using memcpy and Resize.
@MapleAura commented on GitHub (Jan 21, 2024):
I've counted the cost on several interfaces. ‘av_read_frame’ cost almost 20ms per frame. I send data three times just receive decoded data once sussessfully. The log message indicates that the queue is full. In other words, the result can only be returned once if the data is read three times and it takes almost 60 ms. According to the information I have observed from the log, it seems that the decoding time is larger than reading time. But from the experiments done by others, if I do not carry out the copy operation (just export drm_prime), the decoding time is only a few ms.

@nyanmisaka commented on GitHub (Jan 21, 2024):
@MapleAura
I did find an issue regarding the high latency. Please try this patch and see if it helps.
@MapleAura commented on GitHub (Jan 22, 2024):
That's great. It works. :)
@nyanmisaka commented on GitHub (Jan 23, 2024):
Closed by
e753665h264_rkmppplay rtsp stream,avcodec_receive_frameallways return -11. #22