1111#define CCX_DECODER_608_SCREEN_ROWS 15
1212#define CCX_DECODER_608_SCREEN_WIDTH 32
1313#define MAXBFRAMES 50
14- #define SORTBUF (2 * MAXBFRAMES + 1)
14+ #define SORTBUF (2*MAXBFRAMES+1)
15+
1516
1617/* flag raised when end of display marker arrives in Dvb Subtitle */
17- #define SUB_EOD_MARKER (1 << 0)
18+ #define SUB_EOD_MARKER (1 << 0 )
1819struct cc_bitmap
1920{
2021 int x ;
@@ -76,22 +77,22 @@ enum ccx_decoder_608_color_code
7677};
7778
7879/**
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- */
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+ */
8687struct eia608_screen // A CC buffer
8788{
8889 /** format of data inside this structure */
8990 enum ccx_eia608_format format ;
9091 unsigned char characters [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
9192 enum ccx_decoder_608_color_code colors [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
9293 enum font_bits fonts [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ]; // Extra char at the end for a 0
93- int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
94- int empty ; // Buffer completely empty?
94+ int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
95+ int empty ; // Buffer completely empty?
9596 /** start time of this CC buffer */
9697 LLONG start_time ;
9798 /** end time of this CC buffer */
@@ -109,20 +110,20 @@ struct eia608_screen // A CC buffer
109110
110111struct ccx_decoders_common_settings_t
111112{
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)
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)
115116 struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
116117 int cc_to_stdout ;
117- int extract ; // Extract 1st, 2nd or both fields
118- int fullbin ; // Disable pruning of padding cc blocks
118+ int extract ; // Extract 1st, 2nd or both fields
119+ int fullbin ; // Disable pruning of padding cc blocks
119120 int no_rollup ;
120121 int noscte20 ;
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
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
124125 unsigned send_to_srv ;
125- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
126+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
126127 int program_number ;
127128 enum ccx_code_type codec ;
128129 int xds_write_to_file ;
@@ -141,17 +142,17 @@ struct lib_cc_decode
141142 void * context_cc608_field_1 ;
142143 void * context_cc608_field_2 ;
143144
144- int no_rollup ; // If 1, write one line at a time
145+ int no_rollup ; // If 1, write one line at a time
145146 int noscte20 ;
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
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
148149 struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
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
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
152153 struct cc_subtitle dec_sub ;
153154 enum ccx_bufferdata_type in_bufferdatatype ;
154- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
155+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
155156
156157 int frames_since_last_gop ;
157158 /* GOP-based timing */
@@ -184,7 +185,7 @@ struct lib_cc_decode
184185 int in_pic_data ;
185186
186187 unsigned int current_progressive_sequence ;
187- unsigned int current_pulldownfields ;
188+ unsigned int current_pulldownfields ;
188189
189190 int temporal_reference ;
190191 enum ccx_frame_type picture_coding_type ;
@@ -196,18 +197,18 @@ struct lib_cc_decode
196197 /* Required in es_function.c and es_userdata.c */
197198 unsigned top_field_first ; // Needs to be global
198199
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 ;
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+
211+ void * dtvcc_rust ;
211212 dtvcc_ctx * dtvcc ;
212213 int current_field ;
213214 // Analyse/use the picture information
@@ -217,7 +218,7 @@ struct lib_cc_decode
217218 // Store fts;
218219 LLONG cc_fts [SORTBUF ];
219220 // Store HD CC packets
220- unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
221+ unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
221222
222223 // The sequence number of the current anchor frame. All currently read
223224 // B-Frames belong to this I- or P-frame.
@@ -227,7 +228,7 @@ struct lib_cc_decode
227228
228229 int (* writedata )(const unsigned char * data , int length , void * private_data , struct cc_subtitle * sub );
229230
230- // dvb subtitle related
231+ //dvb subtitle related
231232 int ocr_quantmode ;
232233 struct lib_cc_decode * prev ;
233234};
0 commit comments