Go to the source code of this file.
|
| static void | dvd_encode_rle (uint8_t **pq, const uint8_t *bitmap, int linesize, int w, int h, const int cmap[256]) |
| |
| static int | color_distance (uint32_t a, uint32_t b) |
| |
| static void | count_colors (AVCodecContext *avctx, unsigned hits[33], const AVSubtitleRect *r) |
| | Count colors used in a rectangle, quantizing alpha and grouping by nearest global palette entry.
|
| |
| static void | select_palette (AVCodecContext *avctx, int out_palette[4], int out_alpha[4], unsigned hits[33]) |
| |
| static void | build_color_map (AVCodecContext *avctx, int cmap[], const uint32_t palette[], const int out_palette[], unsigned int const out_alpha[]) |
| |
| static void | copy_rectangle (AVSubtitleRect *dst, AVSubtitleRect *src, int cmap[]) |
| |
| static int | dvdsub_encode (AVCodecContext *avctx, uint8_t *outbuf, int outbuf_size, const AVSubtitle *h) |
| |
| static int | bprint_to_extradata (AVCodecContext *avctx, struct AVBPrint *buf) |
| |
| static av_cold int | dvdsub_init (AVCodecContext *avctx) |
| |
◆ PUTNIBBLE
Value:do {\
if (ncnt++ & 1)\
*q++ = bitbuf | ((
val) & 0x0f);\
else\
} while(0)
static double val(void *priv, double ch)
Definition at line 39 of file dvdsubenc.c.
Referenced by dvd_encode_rle().
◆ OFFSET
◆ SE
◆ dvd_encode_rle()
| static void dvd_encode_rle |
( |
uint8_t ** | pq, |
|
|
const uint8_t * | bitmap, |
|
|
int | linesize, |
|
|
int | w, |
|
|
int | h, |
|
|
const int | cmap[256] ) |
|
static |
◆ color_distance()
| static int color_distance |
( |
uint32_t | a, |
|
|
uint32_t | b ) |
|
static |
◆ count_colors()
Count colors used in a rectangle, quantizing alpha and grouping by nearest global palette entry.
Definition at line 119 of file dvdsubenc.c.
Referenced by dvdsub_encode().
◆ select_palette()
| static void select_palette |
( |
AVCodecContext * | avctx, |
|
|
int | out_palette[4], |
|
|
int | out_alpha[4], |
|
|
unsigned | hits[33] ) |
|
static |
◆ build_color_map()
| static void build_color_map |
( |
AVCodecContext * | avctx, |
|
|
int | cmap[], |
|
|
const uint32_t | palette[], |
|
|
const int | out_palette[], |
|
|
unsigned int const | out_alpha[] ) |
|
static |
◆ copy_rectangle()
◆ dvdsub_encode()
◆ bprint_to_extradata()
| static int bprint_to_extradata |
( |
AVCodecContext * | avctx, |
|
|
struct AVBPrint * | buf ) |
|
static |
◆ dvdsub_init()
◆ options
Initial value:= {
{
"even_rows_fix",
"Make number of rows even (workaround for some players)",
OFFSET(even_rows_fix),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1,
SE},
}
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition at line 481 of file dvdsubenc.c.
◆ dvdsubenc_class
Initial value:= {
.class_name = "VOBSUB subtitle encoder",
}
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
Definition at line 487 of file dvdsubenc.c.
◆ ff_dvdsub_encoder
Initial value:= {
.p.name = "dvdsub",
}
#define FF_CODEC_ENCODE_SUB_CB(func)
#define CODEC_LONG_NAME(str)
static av_cold int dvdsub_init(AVCodecContext *avctx)
static int dvdsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int outbuf_size, const AVSubtitle *h)
static const AVClass dvdsubenc_class
@ AV_CODEC_ID_DVD_SUBTITLE
Definition at line 494 of file dvdsubenc.c.