FFmpeg
Data Structures | Functions | Variables
msrleenc.c File Reference
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"

Go to the source code of this file.

Data Structures

struct  MSRLEContext
 

Functions

static av_cold int msrle_encode_init (AVCodecContext *avctx)
 
static void write_run (AVCodecContext *avctx, uint8_t **data, int len, int value)
 
static void write_absolute (AVCodecContext *avctx, uint8_t **data, const uint8_t *line, int len)
 
static void write_delta (AVCodecContext *avctx, uint8_t **data, int delta)
 
static void write_yskip (AVCodecContext *avctx, uint8_t **data, int yskip)
 
static void encode_line (AVCodecContext *avctx, uint8_t **data, const uint8_t *line, int length)
 
static int encode (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int keyframe, int *got_keyframe)
 
static int msrle_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 
static int msrle_encode_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_msrle_encoder
 

Detailed Description

MSRLE encoder

See also
https://wiki.multimedia.cx/index.php?title=Microsoft_RLE

Definition in file msrleenc.c.

Function Documentation

◆ msrle_encode_init()

static av_cold int msrle_encode_init ( AVCodecContext avctx)
static

Definition at line 38 of file msrleenc.c.

◆ write_run()

static void write_run ( AVCodecContext avctx,
uint8_t **  data,
int  len,
int  value 
)
static

Definition at line 50 of file msrleenc.c.

Referenced by encode_line(), and write_absolute().

◆ write_absolute()

static void write_absolute ( AVCodecContext avctx,
uint8_t **  data,
const uint8_t *  line,
int  len 
)
static

Definition at line 67 of file msrleenc.c.

Referenced by encode_line().

◆ write_delta()

static void write_delta ( AVCodecContext avctx,
uint8_t **  data,
int  delta 
)
static

Definition at line 94 of file msrleenc.c.

Referenced by encode().

◆ write_yskip()

static void write_yskip ( AVCodecContext avctx,
uint8_t **  data,
int  yskip 
)
static

Definition at line 115 of file msrleenc.c.

Referenced by encode().

◆ encode_line()

static void encode_line ( AVCodecContext avctx,
uint8_t **  data,
const uint8_t *  line,
int  length 
)
static

Definition at line 140 of file msrleenc.c.

Referenced by encode().

◆ encode()

static int encode ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pict,
int  keyframe,
int got_keyframe 
)
static

Definition at line 166 of file msrleenc.c.

Referenced by msrle_encode_frame().

◆ msrle_encode_frame()

static int msrle_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pict,
int got_packet 
)
static

Definition at line 247 of file msrleenc.c.

◆ msrle_encode_close()

static int msrle_encode_close ( AVCodecContext avctx)
static

Definition at line 279 of file msrleenc.c.

Variable Documentation

◆ ff_msrle_encoder

const FFCodec ff_msrle_encoder
Initial value:
= {
.p.name = "msrle",
CODEC_LONG_NAME("Microsoft RLE"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(MSRLEContext),
.p.pix_fmts = (const enum AVPixelFormat[]){
},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 286 of file msrleenc.c.

msrle_encode_init
static av_cold int msrle_encode_init(AVCodecContext *avctx)
Definition: msrleenc.c:38
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
MSRLEContext
Definition: msrleenc.c:33
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:295
msrle_encode_frame
static int msrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: msrleenc.c:247
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:271
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_CODEC_ID_MSRLE
@ AV_CODEC_ID_MSRLE
Definition: codec_id.h:97
AV_PIX_FMT_PAL8
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:84
msrle_encode_close
static int msrle_encode_close(AVCodecContext *avctx)
Definition: msrleenc.c:279
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201