ENUM HANTRO_ENC_FMT(9)
πΈ enum hantro_enc_fmt(9) β the Kernel API Manual, bestie edition πΈ
okay so this is a page from the Kernel API Manual and we're talking about enum hantro_enc_fmt. Yes it's a manual page, no it's not boring, stay with me π
β¨ NAME β¨
enum hantro_enc_fmt β literally just the source format ID for hardware registers. that's the whole vibe. it tells the hardware "hey bestie, this is what the pixels look like" π
π¦ SYNOPSIS π¦
enum hantro_enc_fmt {
ROCKCHIP_VPU_ENC_FMT_YUV420P ,
ROCKCHIP_VPU_ENC_FMT_YUV420SP ,
ROCKCHIP_VPU_ENC_FMT_YUYV422 ,
ROCKCHIP_VPU_ENC_FMT_UYVY422
};
like, that's it. four constants, all named in full uppercase because the kernel is dramatic like that π
π Constants π
okay so here's the cast of characters, and yes I love all of them equally:
ROCKCHIP_VPU_ENC_FMT_YUV420Pβ the Y/CbCr 4:2:0 planar format. planar! meaning the planes are all separate. very organized, very main character energy β¨ROCKCHIP_VPU_ENC_FMT_YUV420SPβ the Y/CbCr 4:2:0 semi-planar format. semi-planar, because sometimes you want your planes to hang out together π«ΆROCKCHIP_VPU_ENC_FMT_YUYV422β the YUV 4:2:2 packed format (YUYV). packed! everything interleaved! chaotic but in a cute way π¦ROCKCHIP_VPU_ENC_FMT_UYVY422β the YUV 4:2:2 packed format (UYVY). same packed vibe as the one above but the bytes are in a different order, and honestly? iconic for that π
ngl, the ordering difference betweenYUYVandUYVYis exactly the kind of thing that will ruin your entire afternoon if you mix them up, so keep your eyes on it fr fr π
π SEE ALSO π
the kernel file we're living in is ./drivers/media/platform/verisilicon/hantro_hw.h, and bestie, the friend group is huge. go say hi to:
struct hantro_aux_buf(9)struct hantro_h264_dec_ctrls(9)struct hantro_h264_dec_reflists(9)struct hantro_h264_dec_hw_ctx(9)struct hantro_hevc_dec_ctrls(9)struct hantro_hevc_dec_hw_ctx(9)struct hantro_mpeg2_dec_hw_ctx(9)struct hantro_vp8_dec_hw_ctx(9)struct hantro_vp9_frame_info(9)struct hantro_vp9_dec_hw_ctx(9)struct hantro_av1_dec_ctrls(9)struct hantro_av1_dec_hw_ctx(9)struct hantro_postproc_ctx(9)struct hantro_postproc_ops(9)struct hantro_codec_ops(9)
like, that's a whole group chat worth of structs. every codec showed up to the party ππ₯
and that's the page!! mwah π this came out of ./drivers/media/platform/veris... β the version compiled October 2026 β and it's still titled enum hantro_enc_fmt(9). slay, go forth and encode π§π
π¦ 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