FFmpeg
Data Structures | Macros | Functions | Variables
dvbsubenc.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "libavutil/colorspace.h"

Go to the source code of this file.

Data Structures

struct  DVBSubtitleContext
 

Macros

#define PUTBITS2(val)
 
#define PUTBITS4(val)
 

Functions

static int dvb_encode_rle2 (uint8_t **pq, int buf_size, const uint8_t *bitmap, int linesize, int w, int h)
 
static int dvb_encode_rle4 (uint8_t **pq, int buf_size, const uint8_t *bitmap, int linesize, int w, int h)
 
static int dvb_encode_rle8 (uint8_t **pq, int buf_size, const uint8_t *bitmap, int linesize, int w, int h)
 
static int dvbsub_encode (AVCodecContext *avctx, uint8_t *outbuf, int buf_size, const AVSubtitle *h)
 

Variables

const FFCodec ff_dvbsub_encoder
 

Macro Definition Documentation

◆ PUTBITS2

#define PUTBITS2 (   val)
Value:
{\
bitbuf |= (val) << bitcnt;\
bitcnt -= 2;\
if (bitcnt < 0) {\
bitcnt = 6;\
*q++ = bitbuf;\
bitbuf = 0;\
}\
}

Definition at line 30 of file dvbsubenc.c.

◆ PUTBITS4

#define PUTBITS4 (   val)
Value:
{\
bitbuf |= (val) << bitcnt;\
bitcnt -= 4;\
if (bitcnt < 0) {\
bitcnt = 4;\
*q++ = bitbuf;\
bitbuf = 0;\
}\
}

Definition at line 124 of file dvbsubenc.c.

Function Documentation

◆ dvb_encode_rle2()

static int dvb_encode_rle2 ( uint8_t **  pq,
int  buf_size,
const uint8_t *  bitmap,
int  linesize,
int  w,
int  h 
)
static

Definition at line 41 of file dvbsubenc.c.

Referenced by dvbsub_encode().

◆ dvb_encode_rle4()

static int dvb_encode_rle4 ( uint8_t **  pq,
int  buf_size,
const uint8_t *  bitmap,
int  linesize,
int  w,
int  h 
)
static

Definition at line 136 of file dvbsubenc.c.

Referenced by dvbsub_encode().

◆ dvb_encode_rle8()

static int dvb_encode_rle8 ( uint8_t **  pq,
int  buf_size,
const uint8_t *  bitmap,
int  linesize,
int  w,
int  h 
)
static

Definition at line 211 of file dvbsubenc.c.

Referenced by dvbsub_encode().

◆ dvbsub_encode()

static int dvbsub_encode ( AVCodecContext avctx,
uint8_t *  outbuf,
int  buf_size,
const AVSubtitle h 
)
static

Definition at line 272 of file dvbsubenc.c.

Variable Documentation

◆ ff_dvbsub_encoder

const FFCodec ff_dvbsub_encoder
Initial value:
= {
.p.name = "dvbsub",
CODEC_LONG_NAME("DVB subtitles"),
.priv_data_size = sizeof(DVBSubtitleContext),
}

Definition at line 509 of file dvbsubenc.c.

AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:204
dvbsub_encode
static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size, const AVSubtitle *h)
Definition: dvbsubenc.c:272
val
static double val(void *priv, double ch)
Definition: aeval.c:77
AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
Definition: codec_id.h:545
DVBSubtitleContext
Definition: dvbsubenc.c:26
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
FF_CODEC_ENCODE_SUB_CB
#define FF_CODEC_ENCODE_SUB_CB(func)
Definition: codec_internal.h:318