STRUCT HVA_ENC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct hva_enc(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual β€” this is the page for struct hva_enc, aka the hva encoder. it's giving "the blueprint every encoder has to fill out" energy, and honestly? iconic. let's get into it πŸ’…


✨ NAME ✨

struct hva_enc β€” hva encoder

like, literally the struct that is an encoder. no cap 🫢


🌸 SYNOPSIS 🌸

struct hva_enc {
    const char      *name;
    u32 streamformat;
    u32 pixelformat;
    u32 max_width;
    u32 max_height;
    int (*open)(struct hva_ctx *ctx);
    int (*close)(struct hva_ctx *ctx);
    int (*encode)(struct hva_ctx *ctx, struct hva_frame *frame, struct hva_stream *stream);
};

look at her. main character struct. every field is a whole personality trait πŸ’–


πŸ¦‹ Members πŸ¦‹

okay so let's go member by member, bestie, because each one matters:

  • name β€” the encoder name. it's her name. her whole identity. say it with your chest ✨
  • streamformat β€” fourcc code for compressed video format (H.264...). yes, the compressed one, the squeezed one πŸ“
  • pixelformat β€” fourcc code for uncompressed video format. the raw, unbothered, unfiltered version πŸ’…
  • max_width β€” maximum width of frame for this encoder. she has limits, and that's healthy 🌸
  • max_height β€” maximum height of frame for this encoder. same vibe, vertical edition πŸŽ€
  • open β€” open encoder. wake her up, do her hair πŸ’–
  • close β€” close encoder. nap time, she earned it 😭
  • encode β€” encode a frame (struct hva_frame) in a stream (struct hva_stream). this is the moment, this is the whole point, this is when she slays πŸ”₯πŸ‘‘

🌈 SEE ALSO 🌈

Kernel file ./drivers/media/platform/st/sti/hva/hva.h β€” go read it, iykyk πŸ‘€ β€” plus these absolute besties:

  • struct hva_frameinfo(9)
  • struct hva_streaminfo(9)
  • struct hva_controls(9)
  • struct hva_frame(9)
  • struct hva_stream(9)
  • struct hva_ctx_dbg(9)
  • struct hva_ctx(9)
  • struct hva_dev_dbg(9)
  • struct hva_dev(9)
bestie. read them in order. the lore goes deep and you will be obsessed πŸ§šπŸ’œ

and that's the page!! sourced straight from ./drivers/media/platform/st/st... and dated October 2026 β€” so yes, she's from the future, and yes, she ate πŸ’€β­πŸ†

mwah, go write some encoders, ily πŸ«ΆπŸ’–

πŸ“¦ where this page comes from