Skip to content

Commit

Permalink
Removing the formatting changes from ccx_decoders_structs
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchitBhonsle committed Mar 22, 2023
1 parent d664853 commit ad65396
Showing 1 changed file with 43 additions and 42 deletions.
85 changes: 43 additions & 42 deletions src/lib_ccx/ccx_decoders_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#define CCX_DECODER_608_SCREEN_ROWS 15
#define CCX_DECODER_608_SCREEN_WIDTH 32
#define MAXBFRAMES 50
#define SORTBUF (2 * MAXBFRAMES + 1)
#define SORTBUF (2*MAXBFRAMES+1)


/* flag raised when end of display marker arrives in Dvb Subtitle */
#define SUB_EOD_MARKER (1 << 0)
#define SUB_EOD_MARKER (1 << 0 )
struct cc_bitmap
{
int x;
Expand Down Expand Up @@ -76,22 +77,22 @@ enum ccx_decoder_608_color_code
};

/**
* This structure have fields which need to be ignored according to format,
* for example if format is SFORMAT_XDS then all fields other then
* xds related (xds_str, xds_len and cur_xds_packet_class) should be
* ignored and not to be dereferenced.
*
* TODO use union inside struct for each kind of fields
*/
* This structure have fields which need to be ignored according to format,
* for example if format is SFORMAT_XDS then all fields other then
* xds related (xds_str, xds_len and cur_xds_packet_class) should be
* ignored and not to be dereferenced.
*
* TODO use union inside struct for each kind of fields
*/
struct eia608_screen // A CC buffer
{
/** format of data inside this structure */
enum ccx_eia608_format format;
unsigned char characters[CCX_DECODER_608_SCREEN_ROWS][CCX_DECODER_608_SCREEN_WIDTH + 1];
enum ccx_decoder_608_color_code colors[CCX_DECODER_608_SCREEN_ROWS][CCX_DECODER_608_SCREEN_WIDTH + 1];
enum font_bits fonts[CCX_DECODER_608_SCREEN_ROWS][CCX_DECODER_608_SCREEN_WIDTH + 1]; // Extra char at the end for a 0
int row_used[CCX_DECODER_608_SCREEN_ROWS]; // Any data in row?
int empty; // Buffer completely empty?
int row_used[CCX_DECODER_608_SCREEN_ROWS]; // Any data in row?
int empty; // Buffer completely empty?
/** start time of this CC buffer */
LLONG start_time;
/** end time of this CC buffer */
Expand All @@ -109,20 +110,20 @@ struct eia608_screen // A CC buffer

struct ccx_decoders_common_settings_t
{
LLONG subs_delay; // ms to delay (or advance) subs
enum ccx_output_format output_format; // What kind of output format should be used?
int fix_padding; // Replace 0000 with 8080 in HDTV (needed for some cards)
LLONG subs_delay; // ms to delay (or advance) subs
enum ccx_output_format output_format; // What kind of output format should be used?
int fix_padding; // Replace 0000 with 8080 in HDTV (needed for some cards)
struct ccx_boundary_time extraction_start, extraction_end; // Segment we actually process
int cc_to_stdout;
int extract; // Extract 1st, 2nd or both fields
int fullbin; // Disable pruning of padding cc blocks
int extract; // Extract 1st, 2nd or both fields
int fullbin; // Disable pruning of padding cc blocks
int no_rollup;
int noscte20;
struct ccx_decoder_608_settings *settings_608; // Contains the settings for the 608 decoder.
ccx_decoder_dtvcc_settings *settings_dtvcc; // Same for cea 708 captions decoder (dtvcc)
int cc_channel; // Channel we want to dump in srt mode
struct ccx_decoder_608_settings *settings_608; // Contains the settings for the 608 decoder.
ccx_decoder_dtvcc_settings *settings_dtvcc; // Same for cea 708 captions decoder (dtvcc)
int cc_channel; // Channel we want to dump in srt mode
unsigned send_to_srv;
unsigned int hauppauge_mode; // If 1, use PID=1003, process specially and so on
unsigned int hauppauge_mode; // If 1, use PID=1003, process specially and so on
int program_number;
enum ccx_code_type codec;
int xds_write_to_file;
Expand All @@ -141,17 +142,17 @@ struct lib_cc_decode
void *context_cc608_field_1;
void *context_cc608_field_2;

int no_rollup; // If 1, write one line at a time
int no_rollup; // If 1, write one line at a time
int noscte20;
int fix_padding; // Replace 0000 with 8080 in HDTV (needed for some cards)
enum ccx_output_format write_format; // 0 = Raw, 1 = srt, 2 = SMI
int fix_padding; // Replace 0000 with 8080 in HDTV (needed for some cards)
enum ccx_output_format write_format; // 0 = Raw, 1 = srt, 2 = SMI
struct ccx_boundary_time extraction_start, extraction_end; // Segment we actually process
LLONG subs_delay; // ms to delay (or advance) subs
int extract; // Extract 1st, 2nd or both fields
int fullbin; // Disable pruning of padding cc blocks
LLONG subs_delay; // ms to delay (or advance) subs
int extract; // Extract 1st, 2nd or both fields
int fullbin; // Disable pruning of padding cc blocks
struct cc_subtitle dec_sub;
enum ccx_bufferdata_type in_bufferdatatype;
unsigned int hauppauge_mode; // If 1, use PID=1003, process specially and so on
unsigned int hauppauge_mode; // If 1, use PID=1003, process specially and so on

int frames_since_last_gop;
/* GOP-based timing */
Expand Down Expand Up @@ -184,7 +185,7 @@ struct lib_cc_decode
int in_pic_data;

unsigned int current_progressive_sequence;
unsigned int current_pulldownfields;
unsigned int current_pulldownfields ;

int temporal_reference;
enum ccx_frame_type picture_coding_type;
Expand All @@ -196,18 +197,18 @@ struct lib_cc_decode
/* Required in es_function.c and es_userdata.c */
unsigned top_field_first; // Needs to be global

/* Stats. Modified in es_userdata.c*/
int stat_numuserheaders;
int stat_dvdccheaders;
int stat_scte20ccheaders;
int stat_replay5000headers;
int stat_replay4000headers;
int stat_dishheaders;
int stat_hdtv;
int stat_divicom;
int false_pict_header;

void *dtvcc_rust;
/* Stats. Modified in es_userdata.c*/
int stat_numuserheaders;
int stat_dvdccheaders;
int stat_scte20ccheaders;
int stat_replay5000headers;
int stat_replay4000headers;
int stat_dishheaders;
int stat_hdtv;
int stat_divicom;
int false_pict_header;

void *dtvcc_rust;
dtvcc_ctx *dtvcc;
int current_field;
// Analyse/use the picture information
Expand All @@ -217,7 +218,7 @@ struct lib_cc_decode
// Store fts;
LLONG cc_fts[SORTBUF];
// Store HD CC packets
unsigned char cc_data_pkts[SORTBUF][10 * 31 * 3 + 1]; // *10, because MP4 seems to have different limits
unsigned char cc_data_pkts[SORTBUF][10*31*3+1]; // *10, because MP4 seems to have different limits

// The sequence number of the current anchor frame. All currently read
// B-Frames belong to this I- or P-frame.
Expand All @@ -227,7 +228,7 @@ struct lib_cc_decode

int (*writedata)(const unsigned char *data, int length, void *private_data, struct cc_subtitle *sub);

// dvb subtitle related
//dvb subtitle related
int ocr_quantmode;
struct lib_cc_decode *prev;
};
Expand Down

0 comments on commit ad65396

Please sign in to comment.