e79797e9f4bee3a92a10b3ab80b0ae7eb7445262
[openwrt/staging/dangole.git] /
1 From c42a30d856fc0aa00089121f199d51aece77e57f Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 5 Aug 2021 16:38:34 +0100
4 Subject: [PATCH] staging/vchiq-mmal: Add parameters for interlaced
5 video support
6
7 Adds enum mmal_interlace_type and struct
8 mmal_parameter_video_interlace_type to allow for querying the
9 interlacing mode on decoders.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 .../vchiq-mmal/mmal-parameters.h | 37 +++++++++++++++++++
14 1 file changed, 37 insertions(+)
15
16 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h
17 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h
18 @@ -809,6 +809,43 @@ struct mmal_parameter_displayregion {
19 u32 alpha;
20 };
21
22 +enum mmal_interlace_type {
23 + /* The data is not interlaced, it is progressive scan */
24 + MMAL_INTERLACE_PROGRESSIVE,
25 + /*
26 + * The data is interlaced, fields sent separately in temporal order, with
27 + * upper field first
28 + */
29 + MMAL_INTERLACE_FIELD_SINGLE_UPPER_FIRST,
30 + /*
31 + * The data is interlaced, fields sent separately in temporal order, with
32 + * lower field first
33 + */
34 + MMAL_INTERLACE_FIELD_SINGLE_LOWER_FIRST,
35 + /*
36 + * The data is interlaced, two fields sent together line interleaved,
37 + * with the upper field temporally earlier
38 + */
39 + MMAL_INTERLACE_FIELDS_INTERLEAVED_UPPER_FIRST,
40 + /*
41 + * The data is interlaced, two fields sent together line interleaved,
42 + * with the lower field temporally earlier
43 + */
44 + MMAL_INTERLACE_FIELDS_INTERLEAVED_LOWER_FIRST,
45 + /*
46 + * The stream may contain a mixture of progressive and interlaced
47 + * frames
48 + */
49 + MMAL_INTERLACE_MIXED,
50 +
51 + MMAL_INTERLACE_DUMMY = 0x7FFFFFFF
52 +};
53 +
54 +struct mmal_parameter_video_interlace_type {
55 + enum mmal_interlace_type mode; /* The interlace type of the content */
56 + u32 bRepeatFirstField; /* Whether to repeat the first field */
57 +};
58 +
59 #define MMAL_MAX_IMAGEFX_PARAMETERS 5
60
61 struct mmal_parameter_imagefx_parameters {