FFmpeg
|
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "libavcodec/ass.h"
#include "libavutil/avstring.h"
#include "libavutil/avutil.h"
#include "libavutil/mem.h"
#include "libavutil/thread.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include <aribcaption/aribcaption.h>
Go to the source code of this file.
Data Structures | |
struct | ARIBCaptionContext |
Macros | |
#define | DEFAULT_FONT_ASS "sans-serif" |
#define | ARIBC_BPRINT_SIZE_INIT 64 |
#define | ARIBC_BPRINT_SIZE_MAX (8 * 1024) |
#define | ARIBC_ALPHA_MAX_NUM 4 |
#define | ARIBC_ALPHA_DEFAULT_FRONT 0xFF |
#define | ARIBC_ALPHA_DEFAULT_BACK 0x80 |
#define | ARIBCC_COLOR_RGB(c) ((c) & 0xFFFFFF) |
#define | ARIBCC_COLOR_DIFF_RGB(c1, c2) (((c1) ^ (c2)) & 0x00FFFFFF) |
#define | ARIBCC_COLOR_DIFF_A(c1, c2) (((c1) ^ (c2)) & 0xFF000000) |
#define | CLUT_RGBA(r, g, b, a) (((unsigned)(a) << 24) | ((r) << 16) | ((g) << 8) | (b)) |
#define | CLUT_A(c) (((c) >> 24) & 0xFF) |
#define | CLUT_R(c) (((c) >> 16) & 0xFF) |
#define | CLUT_G(c) (((c) >> 8) & 0xFF) |
#define | CLUT_B(c) ( (c) & 0xFF) |
#define | ARIBCC_COLOR_TO_CLUT_RGBA(c, a) |
#define | ASS_SINGLE_RECT 0 |
#define | OFFSET(x) offsetof(ARIBCaptionContext, x) |
#define | SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Functions | |
static void | hex_dump_debug (void *ctx, const char *buf, int buf_size) |
static void | logcat_callback (aribcc_loglevel_t level, const char *message, void *userdata) |
static void | estimate_video_frame_size (ARIBCaptionContext *ctx) |
static void | clut_set_alpha (ARIBCaptionContext *ctx, uint8_t a) |
static uint8_t | clut_find_nearlest_alpha (ARIBCaptionContext *ctx, uint8_t a) |
static int | clut_find (ARIBCaptionContext *ctx, uint32_t rgba) |
static int | clut_color_distance (uint32_t rgba1, uint32_t rgba2) |
static uint8_t | clut_pick_or_set (ARIBCaptionContext *ctx, int r, int g, int b, int a) |
static void | clut_init (ARIBCaptionContext *ctx, aribcc_caption_region_t *region) |
static int | aribcaption_trans_bitmap_subtitle (ARIBCaptionContext *ctx) |
aribcaption_trans_{bitmap|ass|text}_subtitle() More... | |
static int | set_ass_header (ARIBCaptionContext *ctx) |
static void | set_ass_color (AVBPrint *buf, int color_num, aribcc_color_t new_color, aribcc_color_t old_color) |
static int | aribcaption_trans_ass_subtitle (ARIBCaptionContext *ctx) |
static int | aribcaption_trans_text_subtitle (ARIBCaptionContext *ctx) |
static int | aribcaption_decode (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt) |
static void | aribcaption_flush (AVCodecContext *avctx) |
static int | aribcaption_close (AVCodecContext *avctx) |
static int | aribcaption_init (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
static const AVClass | aribcaption_class |
const FFCodec | ff_libaribcaption_decoder |
#define DEFAULT_FONT_ASS "sans-serif" |
Definition at line 36 of file libaribcaption.c.
#define ARIBC_BPRINT_SIZE_INIT 64 |
Definition at line 39 of file libaribcaption.c.
#define ARIBC_BPRINT_SIZE_MAX (8 * 1024) |
Definition at line 40 of file libaribcaption.c.
#define ARIBC_ALPHA_MAX_NUM 4 |
Definition at line 41 of file libaribcaption.c.
#define ARIBC_ALPHA_DEFAULT_FRONT 0xFF |
Definition at line 42 of file libaribcaption.c.
#define ARIBC_ALPHA_DEFAULT_BACK 0x80 |
Definition at line 43 of file libaribcaption.c.
Definition at line 45 of file libaribcaption.c.
Definition at line 46 of file libaribcaption.c.
Definition at line 47 of file libaribcaption.c.
Definition at line 49 of file libaribcaption.c.
Definition at line 50 of file libaribcaption.c.
Definition at line 51 of file libaribcaption.c.
Definition at line 52 of file libaribcaption.c.
Definition at line 53 of file libaribcaption.c.
#define ASS_SINGLE_RECT 0 |
Definition at line 1110 of file libaribcaption.c.
#define OFFSET | ( | x | ) | offsetof(ARIBCaptionContext, x) |
Definition at line 1113 of file libaribcaption.c.
#define SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM |
Definition at line 1114 of file libaribcaption.c.
|
static |
Definition at line 106 of file libaribcaption.c.
Referenced by aribcaption_decode().
|
static |
Definition at line 119 of file libaribcaption.c.
Referenced by aribcaption_init().
|
static |
Definition at line 140 of file libaribcaption.c.
Referenced by aribcaption_init(), and aribcaption_trans_bitmap_subtitle().
|
static |
Definition at line 165 of file libaribcaption.c.
Referenced by clut_init().
|
static |
Definition at line 180 of file libaribcaption.c.
Referenced by clut_pick_or_set().
|
static |
Definition at line 201 of file libaribcaption.c.
Referenced by clut_init().
|
inlinestatic |
Definition at line 212 of file libaribcaption.c.
Referenced by clut_pick_or_set().
|
static |
Definition at line 219 of file libaribcaption.c.
Referenced by aribcaption_trans_bitmap_subtitle().
|
static |
Definition at line 254 of file libaribcaption.c.
Referenced by aribcaption_trans_bitmap_subtitle().
|
static |
aribcaption_trans_{bitmap|ass|text}_subtitle()
Transfer decoded subtitle to AVSubtitle with corresponding subtitle type.
ctx | pointer to the ARIBCaptionContext |
Definition at line 317 of file libaribcaption.c.
Referenced by aribcaption_decode().
|
static |
Definition at line 499 of file libaribcaption.c.
Referenced by aribcaption_init(), and aribcaption_trans_ass_subtitle().
|
static |
Definition at line 571 of file libaribcaption.c.
Referenced by aribcaption_trans_ass_subtitle().
|
static |
Definition at line 582 of file libaribcaption.c.
Referenced by aribcaption_decode().
|
static |
Definition at line 792 of file libaribcaption.c.
Referenced by aribcaption_decode().
|
static |
Definition at line 844 of file libaribcaption.c.
|
static |
Definition at line 930 of file libaribcaption.c.
|
static |
Definition at line 942 of file libaribcaption.c.
|
static |
Definition at line 957 of file libaribcaption.c.
Definition at line 1115 of file libaribcaption.c.
|
static |
Definition at line 1163 of file libaribcaption.c.
const FFCodec ff_libaribcaption_decoder |
Definition at line 1170 of file libaribcaption.c.