diff --git a/include/daedalus_v4l2_proto.h b/include/daedalus_v4l2_proto.h index 04e2dc2..c437e60 100644 --- a/include/daedalus_v4l2_proto.h +++ b/include/daedalus_v4l2_proto.h @@ -71,7 +71,18 @@ struct daedalus_msg_hdr { __u32 reserved; }; -#define DAEDALUS_PROTO_MAX_PAYLOAD (64u * 1024u) /* 64 KiB */ +/* + * Wire-protocol payload cap. Sized to comfortably hold real-world + * H.264 / VP9 / AV1 access-unit bitstreams: + * - 720p H.264 worst-case I-frame: ~200 KiB + * - 1080p H.264 worst-case I-frame: ~500 KiB + * - 4K H.264 worst-case I-frame: ~2 MiB (would need a bump) + * 1 MiB is the conservative end of what cedrus / rkvdec / hantro + * report as OUTPUT_MPLANE sizeimage. Allocations (chardev kmalloc + * / kmemdup, daemon read buffer, vb2 plane backing) are sized per- + * payload at runtime; this only sets the ceiling. Issue #19. + */ +#define DAEDALUS_PROTO_MAX_PAYLOAD (1024u * 1024u) /* 1 MiB */ /* -- REQ_DECODE / RESP_FRAME payload structures ---------------------- */