FFmpeg
Data Structures | Macros | Functions | Variables
dvbsub.c File Reference
#include "avcodec.h"
#include "bytestream.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 void dvb_encode_rle2 (uint8_t **pq, const uint8_t *bitmap, int linesize, int w, int h)
 
static void dvb_encode_rle4 (uint8_t **pq, const uint8_t *bitmap, int linesize, int w, int h)
 
static void dvb_encode_rle8 (uint8_t **pq, const uint8_t *bitmap, int linesize, int w, int h)
 
static int encode_dvb_subtitles (AVCodecContext *avctx, uint8_t *outbuf, const AVSubtitle *h)
 
static int dvbsub_encode (AVCodecContext *avctx, unsigned char *buf, int buf_size, const AVSubtitle *sub)
 

Variables

AVCodec 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 29 of file dvbsub.c.

◆ PUTBITS4

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

Definition at line 116 of file dvbsub.c.

Function Documentation

◆ dvb_encode_rle2()

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

Definition at line 40 of file dvbsub.c.

Referenced by encode_dvb_subtitles().

◆ dvb_encode_rle4()

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

Definition at line 128 of file dvbsub.c.

Referenced by encode_dvb_subtitles().

◆ dvb_encode_rle8()

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

Definition at line 196 of file dvbsub.c.

Referenced by encode_dvb_subtitles().

◆ encode_dvb_subtitles()

static int encode_dvb_subtitles ( AVCodecContext avctx,
uint8_t outbuf,
const AVSubtitle h 
)
static

Definition at line 250 of file dvbsub.c.

Referenced by dvbsub_encode().

◆ dvbsub_encode()

static int dvbsub_encode ( AVCodecContext avctx,
unsigned char *  buf,
int  buf_size,
const AVSubtitle sub 
)
static

Definition at line 459 of file dvbsub.c.

Variable Documentation

◆ ff_dvbsub_encoder

AVCodec ff_dvbsub_encoder
Initial value:
= {
.name = "dvbsub",
.long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
.priv_data_size = sizeof(DVBSubtitleContext),
.encode_sub = dvbsub_encode,
}

Definition at line 469 of file dvbsub.c.

AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:204
AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
Definition: avcodec.h:659
DVBSubtitleContext
Definition: dvbsub.c:25
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
val
const char const char void * val
Definition: avisynth_c.h:863
dvbsub_encode
static int dvbsub_encode(AVCodecContext *avctx, unsigned char *buf, int buf_size, const AVSubtitle *sub)
Definition: dvbsub.c:459