Revert "Merge pull request 'kernel + daemon: H.264 B-frame display reorder fix (closes #6)' (#7) from noether/kernel-daemon-h264-reorder-fix into main"

This reverts commit 79256dc7ef, reversing
changes made to 7ff2d897ea.
This commit is contained in:
2026-05-21 14:40:59 +02:00
parent 49e60c9bba
commit 714d781d22
6 changed files with 276 additions and 713 deletions
-26
View File
@@ -18,44 +18,18 @@
struct ffmpeg_loader;
struct daedalus_decoder;
/*
* Per-inflight (cookie, src_pts) tracking for the H.264 B-frame
* display-reorder fix (daedalus-v4l2#6). When the daemon drains a
* frame from libavcodec, frame->pts (= src_pts of the OUTPUT bitstream
* that contained the frame's slices) identifies which cookie's CAPTURE
* buffer the pixels belong in — distinct from the cookie of the REQ
* that triggered the receive_frame call. Mapping is small (bounded
* by the V4L2 client's buffer pool depth, typically ≤24) so a linear
* array beats a hashtable for cache-locality.
*
* cached_req carries the capture geometry (num_planes, plane sizes,
* strides, pix_fmt) so a later drain — which may target this cookie
* from a DIFFERENT REQ's drain loop — can call GET_DMABUF + open
* planes with the original REQ's parameters.
*/
#define DAEDALUS_MAX_PENDING_COOKIES 64
struct chardev_pending_cookie {
int used;
uint64_t src_pts;
uint32_t cookie;
struct daedalus_req_decode cached_req;
};
/**
* struct chardev_client - daemon-side chardev state
* @fd: open /dev/daedalus-v4l2 descriptor (-1 if not open)
* @loader: dlopen'd FFmpeg loader (borrowed; not owned)
* @decoder: per-codec AVCodecContext cache (owned)
* @stop_flag: set non-zero from a signal handler to break the loop
* @pending: pts → cookie lookup table for split SRC/DST RESPs
*/
struct chardev_client {
int fd;
struct ffmpeg_loader *loader;
struct daedalus_decoder *decoder;
volatile sig_atomic_t *stop_flag;
struct chardev_pending_cookie pending[DAEDALUS_MAX_PENDING_COOKIES];
};
/**