nal_hevc_write_sps(9)
π nal_hevc_write_sps(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 π β this is the little function that takes your SPS and makes it RBSP. Ngl it's giving "small function, big job" energy and we're obsessed β¨
πΈ NAME πΈ
nal_hevc_write_sps β literally writes an SPS NAL unit into RBSP format π that's it, that's the whole vibe.
β¨ SYNOPSIS β¨
ssize_t nal_hevc_write_sps (const struct device *dev , void *dest ,
size_t n , struct nal_hevc_sps *sps );
look at her π so clean, so iconic, so many arguments. let's go through them one by one, no skipping, i promise π«Ά
π¦ ARGUMENTS π¦
devβ the device pointer. yeah, that one. the device bestie πdestβ the buffer that gets filled with RBSP data π this is the glow-up location, where the data goes to become beautifulnβ the maximum size ofdest, in bytes. it's the vibe check on how much roomdestactually has π₯spsβ thestruct nal_hevc_spswe're converting to RBSP. the main character of this whole operation π
π DESCRIPTION π
so what does she do? she converts sps to RBSP data and writes it right into dest β¨ that's the whole gig, and she does it flawlessly.
but β and this is the important part, don't scroll past it β the size of the SPS NAL unit is not known in advance π so there's no cute little pre-flight check you can do beforehand. and this function will fail if dest does not hold sufficient space for the SPS NAL unit π like, she's not gonna squeeze it in, she's not gonna improvise, she's just gonna fail. so pls, pls, pls give her enough room π
π RETURN π
she returns the number of bytes written to dest π (slay) β or a negative error code π if things didn't work out. check it! always check it! periodt π
π SEE ALSO π
- the kernel file:
./drivers/media/platform/allegro-dvt/nal-hevc.cπ (the whole squad lives here) nal_hevc_write_vps(9)β the VPS-writing bestienal_hevc_read_vps(9)β the VPS-reading bestienal_hevc_read_sps(9)β the SPS-reading bestie (the mirror of this one, we stan a duo π«Ά)nal_hevc_write_pps(9)β the PPS-writing bestienal_hevc_read_pps(9)β the PPS-reading bestienal_hevc_write_filler(9)β the filler-writing bestienal_hevc_read_filler(9)β the filler-reading bestie
the whole friend group fr fr π§β¨
and that's the page!! π sign-off time: this one came from ./drivers/media/platform/alleg... and it's dated October 2026, filed under nal_hevc_write_sps(9) π mwah, go write some RBSP, you got this π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms