ipu_image_convert_prepare(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ipu_image_convert_prepare(9) ✨

okay so real talk, bestie β€” this is a page straight out of the Kernel API Manual, and it's about ipu_image_convert_prepare. It's a kernel function, it's giving ✨serious business✨, and you're gonna understand it. let's go πŸ’…


🌸 NAME 🌸

ipu_image_convert_prepare β€” literally just: prepare a conversion context. that's the whole vibe. you're setting things up before the actual converting happens πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ipu_image_convert_ctx * ipu_image_convert_prepare (struct ipu_soc
*ipu , enum ipu_ic_task ic_task , struct ipu_image *in , struct
ipu_image *out , enum ipu_rotate_mode rot_mode , ipu_image_convert_cb_t
complete , void *complete_context );

she's long, she takes seven arguments, and yes you're gonna need all of them 🫢 no cap, do not skip a parameter, the compiler WILL notice.


πŸ’– ARGUMENTS πŸ’–

  • ipu β€” the IPU handle you're using for all these conversions. your main character device, basically.
  • ic_task β€” the IC task to use for the conversions. important! pick the right one bestie πŸ™ˆ
  • in β€” the input image format.
  • out β€” the output image format.
  • rot_mode β€” rotation mode. yes, rotating. spin that image 🌈
  • complete β€” the run completion callback. she gets called when the work is done, iconic behaviour honestly.
  • complete_context β€” a context pointer that gets handed to the completion callback. it's the little bag of stuff you send along with her πŸŽ€

✨ DESCRIPTION ✨

In V4L2, drivers should call ipu_image_convert_prepare at streamon. that's it, that's the rule. streamon time = prepare time. not earlier, not randomly, at streamon πŸ’…


πŸ”₯ RETURN πŸ”₯

on success you get an opaque conversion context pointer back. on failure you get an error pointer. simple as that πŸ’€

⚠️ heads up bestie: the input/output formats and the rotation mode must already meet IPU retrictions before you call this. already. like, pre-checked. don't come crying to her about it after πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

read them all, they're the whole friend group honestly 🫢


so that's the page!! this one lives in ./include/video, version dated October 2026 β€” mwah, go prepare some conversion contexts, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from