2 #define _INPUT_STATE_H 1
4 #include <movit/image_format.h>
7 #include "ref_counted_frame.h"
8 #include "shared/shared_defs.h"
10 struct BufferedFrame {
11 RefCountedFrame frame;
12 unsigned field_number;
15 // Encapsulates the state of all inputs at any given instant.
16 // In particular, this is captured by Theme::get_chain(),
17 // so that it can hold on to all the frames it needs for rendering.
19 // For each card, the last five frames (or fields), with 0 being the
20 // most recent one. Note that we only need the actual history if we have
21 // interlaced output (for deinterlacing), so if we detect progressive input,
22 // we immediately clear out all history and all entries will point to the same
24 BufferedFrame buffered_frames[MAX_VIDEO_CARDS][FRAME_HISTORY_LENGTH];
26 // For each card, the current Y'CbCr input settings. Ignored for BGRA inputs.
27 // If ycbcr_coefficients_auto = true for a given card, the others are ignored
28 // for that card (SD is taken to be Rec. 601, HD is taken to be Rec. 709,
29 // both limited range).
30 bool ycbcr_coefficients_auto[MAX_VIDEO_CARDS];
31 movit::YCbCrLumaCoefficients ycbcr_coefficients[MAX_VIDEO_CARDS];
32 bool full_range[MAX_VIDEO_CARDS];
35 #endif // !defined(_INPUT_STATE_H)