/* What the master hands the slave each frame (m_main.c, s_main.c). */ #ifndef C1JOB_H #define C1JOB_H #include #include "c1dec.h" #define C1_FB_BASE 0x100 /* word offset of stored row 0, after the 256-word line table */ typedef struct { const uint8_t *payload; int ref; /* planes index holding the reference; the frame decodes into ref ^ 1 */ } c1_job_t; extern uint8_t c1_plane_mem[2][C1_ROWS * C1_W * 3 / 2]; extern c1_planes c1_p[2]; extern c1_job_t c1_job; extern uint8_t c1_changed[C1_NMB]; /* Spin without touching the bus: a register count-down, run from the cache. Polling a * 32X register back to back would hold the shared bus against the other CPU. */ static inline void c1_pause(void) { int n = 64; __asm__ volatile("1: dt %0\n\tbf 1b" : "+r"(n)); } #endif