11
11
#define CCX_DECODER_608_SCREEN_ROWS 15
12
12
#define CCX_DECODER_608_SCREEN_WIDTH 32
13
13
#define MAXBFRAMES 50
14
- #define SORTBUF (2*MAXBFRAMES+1)
15
-
14
+ #define SORTBUF (2 * MAXBFRAMES + 1)
16
15
17
16
/* flag raised when end of display marker arrives in Dvb Subtitle */
18
- #define SUB_EOD_MARKER (1 << 0 )
17
+ #define SUB_EOD_MARKER (1 << 0)
19
18
struct cc_bitmap
20
19
{
21
20
int x ;
@@ -77,22 +76,22 @@ enum ccx_decoder_608_color_code
77
76
};
78
77
79
78
/**
80
- * This structure have fields which need to be ignored according to format,
81
- * for example if format is SFORMAT_XDS then all fields other then
82
- * xds related (xds_str, xds_len and cur_xds_packet_class) should be
83
- * ignored and not to be dereferenced.
84
- *
85
- * TODO use union inside struct for each kind of fields
86
- */
79
+ * This structure have fields which need to be ignored according to format,
80
+ * for example if format is SFORMAT_XDS then all fields other then
81
+ * xds related (xds_str, xds_len and cur_xds_packet_class) should be
82
+ * ignored and not to be dereferenced.
83
+ *
84
+ * TODO use union inside struct for each kind of fields
85
+ */
87
86
struct eia608_screen // A CC buffer
88
87
{
89
88
/** format of data inside this structure */
90
89
enum ccx_eia608_format format ;
91
90
unsigned char characters [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
92
91
enum ccx_decoder_608_color_code colors [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
93
92
enum font_bits fonts [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ]; // Extra char at the end for a 0
94
- int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
95
- int empty ; // Buffer completely empty?
93
+ int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
94
+ int empty ; // Buffer completely empty?
96
95
/** start time of this CC buffer */
97
96
LLONG start_time ;
98
97
/** end time of this CC buffer */
@@ -110,20 +109,20 @@ struct eia608_screen // A CC buffer
110
109
111
110
struct ccx_decoders_common_settings_t
112
111
{
113
- LLONG subs_delay ; // ms to delay (or advance) subs
114
- enum ccx_output_format output_format ; // What kind of output format should be used?
115
- int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
112
+ LLONG subs_delay ; // ms to delay (or advance) subs
113
+ enum ccx_output_format output_format ; // What kind of output format should be used?
114
+ int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
116
115
struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
117
116
int cc_to_stdout ;
118
- int extract ; // Extract 1st, 2nd or both fields
119
- int fullbin ; // Disable pruning of padding cc blocks
117
+ int extract ; // Extract 1st, 2nd or both fields
118
+ int fullbin ; // Disable pruning of padding cc blocks
120
119
int no_rollup ;
121
120
int noscte20 ;
122
- struct ccx_decoder_608_settings * settings_608 ; // Contains the settings for the 608 decoder.
123
- ccx_decoder_dtvcc_settings * settings_dtvcc ; // Same for cea 708 captions decoder (dtvcc)
124
- int cc_channel ; // Channel we want to dump in srt mode
121
+ struct ccx_decoder_608_settings * settings_608 ; // Contains the settings for the 608 decoder.
122
+ ccx_decoder_dtvcc_settings * settings_dtvcc ; // Same for cea 708 captions decoder (dtvcc)
123
+ int cc_channel ; // Channel we want to dump in srt mode
125
124
unsigned send_to_srv ;
126
- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
125
+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
127
126
int program_number ;
128
127
enum ccx_code_type codec ;
129
128
int xds_write_to_file ;
@@ -142,17 +141,17 @@ struct lib_cc_decode
142
141
void * context_cc608_field_1 ;
143
142
void * context_cc608_field_2 ;
144
143
145
- int no_rollup ; // If 1, write one line at a time
144
+ int no_rollup ; // If 1, write one line at a time
146
145
int noscte20 ;
147
- int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
148
- enum ccx_output_format write_format ; // 0 = Raw, 1 = srt, 2 = SMI
146
+ int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
147
+ enum ccx_output_format write_format ; // 0 = Raw, 1 = srt, 2 = SMI
149
148
struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
150
- LLONG subs_delay ; // ms to delay (or advance) subs
151
- int extract ; // Extract 1st, 2nd or both fields
152
- int fullbin ; // Disable pruning of padding cc blocks
149
+ LLONG subs_delay ; // ms to delay (or advance) subs
150
+ int extract ; // Extract 1st, 2nd or both fields
151
+ int fullbin ; // Disable pruning of padding cc blocks
153
152
struct cc_subtitle dec_sub ;
154
153
enum ccx_bufferdata_type in_bufferdatatype ;
155
- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
154
+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
156
155
157
156
int frames_since_last_gop ;
158
157
/* GOP-based timing */
@@ -185,7 +184,7 @@ struct lib_cc_decode
185
184
int in_pic_data ;
186
185
187
186
unsigned int current_progressive_sequence ;
188
- unsigned int current_pulldownfields ;
187
+ unsigned int current_pulldownfields ;
189
188
190
189
int temporal_reference ;
191
190
enum ccx_frame_type picture_coding_type ;
@@ -197,17 +196,18 @@ struct lib_cc_decode
197
196
/* Required in es_function.c and es_userdata.c */
198
197
unsigned top_field_first ; // Needs to be global
199
198
200
- /* Stats. Modified in es_userdata.c*/
201
- int stat_numuserheaders ;
202
- int stat_dvdccheaders ;
203
- int stat_scte20ccheaders ;
204
- int stat_replay5000headers ;
205
- int stat_replay4000headers ;
206
- int stat_dishheaders ;
207
- int stat_hdtv ;
208
- int stat_divicom ;
209
- int false_pict_header ;
210
-
199
+ /* Stats. Modified in es_userdata.c*/
200
+ int stat_numuserheaders ;
201
+ int stat_dvdccheaders ;
202
+ int stat_scte20ccheaders ;
203
+ int stat_replay5000headers ;
204
+ int stat_replay4000headers ;
205
+ int stat_dishheaders ;
206
+ int stat_hdtv ;
207
+ int stat_divicom ;
208
+ int false_pict_header ;
209
+
210
+ void * dtvcc_rust ;
211
211
dtvcc_ctx * dtvcc ;
212
212
int current_field ;
213
213
// Analyse/use the picture information
@@ -217,7 +217,7 @@ struct lib_cc_decode
217
217
// Store fts;
218
218
LLONG cc_fts [SORTBUF ];
219
219
// Store HD CC packets
220
- unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
220
+ unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
221
221
222
222
// The sequence number of the current anchor frame. All currently read
223
223
// B-Frames belong to this I- or P-frame.
@@ -227,7 +227,7 @@ struct lib_cc_decode
227
227
228
228
int (* writedata )(const unsigned char * data , int length , void * private_data , struct cc_subtitle * sub );
229
229
230
- //dvb subtitle related
230
+ // dvb subtitle related
231
231
int ocr_quantmode ;
232
232
struct lib_cc_decode * prev ;
233
233
};
0 commit comments