[Libav-user] Avoiding RBSP -> SODB perf penalty in decoding pipeline
Ben Harper
rogojin at gmail.com
Sun Dec 10 07:28:14 EET 2023
Hi!
I'm reading H264 packets from an RTSP stream, and decoding into YUV. Part
of this process involves a pointless conversion from RBSP -> SODB -> RBSP,
via the adding of emulation_prevention_three_byte, and then subsequent
removal of emulation_prevention_three_byte.
The packet timeline:
1. RTSP stream brings in RBSP packets (no three_byte)
2. I add 00.00.01 NAL start code, and three_byte escape.
3. I call avcodec_send_packet
4. three_byte needs to be unescaped again by the codec.
For reference, on my target platform Raspberry Pi 5, the encode/decode
process runs at 302 MB/s, which is less than 1/10 of memory bandwidth (4690
MB/s), so the conversion penalty is not trivial.
Is there any way to pass the H264 codec RBSP data instead of SODB?
Thanks for reading!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20231210/f3d1a9b3/attachment.htm>
More information about the Libav-user
mailing list