#include <assert.h>
#include "avcodec.h"
#include "ass.h"
#include "codec_internal.h"
#include "libavutil/attributes.h"
#include "libavutil/opt.h"
Go to the source code of this file.
|
| enum | cc_mode { CCMODE_POPON
, CCMODE_PAINTON
, CCMODE_ROLLUP
, CCMODE_TEXT
} |
| |
| enum | cc_color_code {
CCCOL_WHITE
, CCCOL_GREEN
, CCCOL_BLUE
, CCCOL_CYAN
,
CCCOL_RED
, CCCOL_YELLOW
, CCCOL_MAGENTA
, CCCOL_USERDEFINED
,
CCCOL_BLACK
, CCCOL_TRANSPARENT
} |
| |
| enum | cc_font { CCFONT_REGULAR
, CCFONT_ITALICS
, CCFONT_UNDERLINED
, CCFONT_UNDERLINED_ITALICS
} |
| |
| enum | cc_charset { CCSET_BASIC_AMERICAN
, CCSET_SPECIAL_AMERICAN
, CCSET_EXTENDED_SPANISH_FRENCH_MISC
, CCSET_EXTENDED_PORTUGUESE_GERMAN_DANISH
} |
| |
|
| static av_cold int | init_decoder (AVCodecContext *avctx) |
| |
| static av_cold int | close_decoder (AVCodecContext *avctx) |
| |
| static av_cold void | flush_decoder (AVCodecContext *avctx) |
| |
| static void | write_char (CCaptionSubContext *ctx, struct Screen *screen, char ch) |
| |
| static int | validate_cc_data_pair (const uint8_t *cc_data_pair, uint8_t *hi) |
| | This function after validating parity bit, also remove it from data pair.
|
| |
| static struct Screen * | get_writing_screen (CCaptionSubContext *ctx) |
| |
| static void | roll_up (CCaptionSubContext *ctx) |
| |
| static int | capture_screen (CCaptionSubContext *ctx) |
| |
| static void | update_time (CCaptionSubContext *ctx, int64_t pts) |
| |
| static void | handle_bgattr (CCaptionSubContext *ctx, uint8_t hi, uint8_t lo) |
| |
| static void | handle_textattr (CCaptionSubContext *ctx, uint8_t hi, uint8_t lo) |
| |
| static void | handle_pac (CCaptionSubContext *ctx, uint8_t hi, uint8_t lo) |
| |
| static int | handle_edm (CCaptionSubContext *ctx) |
| |
| static int | handle_eoc (CCaptionSubContext *ctx) |
| |
| static void | handle_delete_end_of_row (CCaptionSubContext *ctx) |
| |
| static void | handle_char (CCaptionSubContext *ctx, char hi, char lo) |
| |
| static int | process_cc608 (CCaptionSubContext *ctx, uint8_t hi, uint8_t lo) |
| |
| static int | decode (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub, const AVPacket *avpkt) |
| |
◆ SCREEN_ROWS
◆ SCREEN_COLUMNS
| #define SCREEN_COLUMNS 32 |
◆ SET_FLAG
| #define SET_FLAG |
( |
| var, |
|
|
| val ) |
◆ UNSET_FLAG
| #define UNSET_FLAG |
( |
| var, |
|
|
| val ) |
◆ CHECK_FLAG
| #define CHECK_FLAG |
( |
| var, |
|
|
| val ) |
◆ CHARSET_OVERRIDE_LIST
◆ START_SET
◆ ENTRY
| #define ENTRY |
( |
| idx, |
|
|
| string ) |
◆ END_SET
◆ EMPTY_START
| #define EMPTY_START |
( |
| IDX | ) |
|
◆ EMPTY_END
◆ ASSERT_ENTRY
| #define ASSERT_ENTRY |
( |
| IDX, |
|
|
| str ) |
Value:
"'" str "' string takes too much space");
static const char charset_overrides[4][128][sizeof("\u266a")]
Definition at line 185 of file ccaption_dec.c.
◆ OFFSET
◆ SD
Definition at line 944 of file ccaption_dec.c.
Referenced by common_vt_4t_24w_msa(), common_vt_4t_8x6_msa(), common_vt_8t_12w_msa(), copy_8x8_msa(), copy_width8_msa(), copy_width8_msa(), ff_loop_filter_v_16_8_msa(), ff_loop_filter_v_8_8_msa(), ff_vp8_v_loop_filter8uv_msa(), hevc_copy_12w_msa(), hevc_copy_6w_msa(), hevc_hz_4t_6w_msa(), hevc_hz_bi_8t_12w_msa(), hevc_hz_bi_8t_24w_msa(), hevc_hz_biwgt_8t_24w_msa(), hevc_intra_pred_angular_lower_4width_msa(), hevc_intra_pred_angular_upper_4width_msa(), hevc_intra_pred_dc_8x8_msa(), hevc_intra_pred_horiz_8x8_msa(), hevc_intra_pred_vert_8x8_msa(), hevc_loopfilter_luma_hor_msa(), hevc_sao_edge_filter_0degree_8width_msa(), hevc_sao_edge_filter_135degree_8width_msa(), hevc_sao_edge_filter_45degree_8width_msa(), hevc_sao_edge_filter_90degree_8width_msa(), hevc_vt_4t_6w_msa(), and intra_predict_plane_8x8_msa().
◆ cc_mode
| Enumerator |
|---|
| CCMODE_POPON | |
| CCMODE_PAINTON | |
| CCMODE_ROLLUP | |
| CCMODE_TEXT | |
Definition at line 38 of file ccaption_dec.c.
◆ cc_color_code
| Enumerator |
|---|
| CCCOL_WHITE | |
| CCCOL_GREEN | |
| CCCOL_BLUE | |
| CCCOL_CYAN | |
| CCCOL_RED | |
| CCCOL_YELLOW | |
| CCCOL_MAGENTA | |
| CCCOL_USERDEFINED | |
| CCCOL_BLACK | |
| CCCOL_TRANSPARENT | |
Definition at line 45 of file ccaption_dec.c.
◆ cc_font
| Enumerator |
|---|
| CCFONT_REGULAR | |
| CCFONT_ITALICS | |
| CCFONT_UNDERLINED | |
| CCFONT_UNDERLINED_ITALICS | |
Definition at line 58 of file ccaption_dec.c.
◆ cc_charset
| Enumerator |
|---|
| CCSET_BASIC_AMERICAN | |
| CCSET_SPECIAL_AMERICAN | |
| CCSET_EXTENDED_SPANISH_FRENCH_MISC | |
| CCSET_EXTENDED_PORTUGUESE_GERMAN_DANISH | |
Definition at line 65 of file ccaption_dec.c.
◆ init_decoder()
◆ close_decoder()
◆ flush_decoder()
◆ write_char()
◆ validate_cc_data_pair()
| static int validate_cc_data_pair |
( |
const uint8_t * | cc_data_pair, |
|
|
uint8_t * | hi ) |
|
static |
This function after validating parity bit, also remove it from data pair.
The first byte doesn't pass parity, we replace it with a solid blank and process the pair. If the second byte doesn't pass parity, it returns INVALIDDATA user can ignore the whole pair and pass the other pair.
Definition at line 378 of file ccaption_dec.c.
Referenced by decode().
◆ get_writing_screen()
◆ roll_up()
◆ capture_screen()
◆ update_time()
◆ handle_bgattr()
◆ handle_textattr()
◆ handle_pac()
◆ handle_edm()
◆ handle_eoc()
◆ handle_delete_end_of_row()
◆ handle_char()
◆ process_cc608()
◆ decode()
◆ ms_tb
◆ charset_overrides
| const char charset_overrides[4][128][sizeof("\u266a")] |
|
static |
Initial value:=
{
#define START_SET(IDX) \
#define ENTRY(idx, string) \
#define END_SET \
}
Definition at line 173 of file ccaption_dec.c.
Referenced by capture_screen().
◆ bg_attribs
| const unsigned char bg_attribs[8] |
|
static |
◆ pac2_attribs
| const unsigned char pac2_attribs[32][3] |
|
static |
◆ options
Initial value:= {
{
"real_time",
"emit subtitle events as they are decoded for real-time display",
OFFSET(real_time),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
SD },
{
"real_time_latency_msec",
"minimum elapsed time between emitting real-time subtitle events",
OFFSET(real_time_latency_msec),
AV_OPT_TYPE_INT, { .i64 = 200 }, 0, 500,
SD },
{
"data_field",
"select data field",
OFFSET(data_field),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1,
SD, .unit =
"data_field" },
{
"auto",
"pick first one that appears", 0,
AV_OPT_TYPE_CONST, { .i64 =-1 }, 0, 0,
SD, .unit =
"data_field" },
}
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition at line 945 of file ccaption_dec.c.
◆ ccaption_dec_class
Initial value:= {
.class_name = "Closed Captions Decoder",
}
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
Definition at line 955 of file ccaption_dec.c.
◆ ff_ccaption_decoder
Initial value:= {
.p.name = "cc_dec",
}
static av_cold void close(AVCodecParserContext *s)
static av_cold int close_decoder(AVCodecContext *avctx)
static av_cold void flush_decoder(AVCodecContext *avctx)
static const AVClass ccaption_dec_class
static av_cold int init_decoder(AVCodecContext *avctx)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_DECODE_SUB_CB(func)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
void(* flush)(AVBSFContext *ctx)
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition at line 962 of file ccaption_dec.c.