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

Go to the source code of this file.

Data Structures

struct  QtrleEncContext
 

Macros

#define MAX_RLE_BULK   127
 Maximum RLE code for bulk copy. More...
 
#define MAX_RLE_REPEAT   128
 Maximum RLE code for repeat. More...
 
#define MAX_RLE_SKIP   254
 Maximum RLE code for skip. More...
 

Functions

static av_cold int qtrle_encode_end (AVCodecContext *avctx)
 
static av_cold int qtrle_encode_init (AVCodecContext *avctx)
 
static void qtrle_encode_line (QtrleEncContext *s, const AVFrame *p, int line, uint8_t **buf)
 Compute the best RLE sequence for a line. More...
 
static int encode_frame (QtrleEncContext *s, const AVFrame *p, uint8_t *buf)
 Encode frame including header. More...
 
static int qtrle_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 

Variables

const FFCodec ff_qtrle_encoder
 

Macro Definition Documentation

◆ MAX_RLE_BULK

#define MAX_RLE_BULK   127

Maximum RLE code for bulk copy.

Definition at line 32 of file qtrleenc.c.

◆ MAX_RLE_REPEAT

#define MAX_RLE_REPEAT   128

Maximum RLE code for repeat.

Definition at line 34 of file qtrleenc.c.

◆ MAX_RLE_SKIP

#define MAX_RLE_SKIP   254

Maximum RLE code for skip.

Definition at line 36 of file qtrleenc.c.

Function Documentation

◆ qtrle_encode_end()

static av_cold int qtrle_encode_end ( AVCodecContext avctx)
static

Definition at line 67 of file qtrleenc.c.

◆ qtrle_encode_init()

static av_cold int qtrle_encode_init ( AVCodecContext avctx)
static

Definition at line 78 of file qtrleenc.c.

◆ qtrle_encode_line()

static void qtrle_encode_line ( QtrleEncContext s,
const AVFrame p,
int  line,
uint8_t **  buf 
)
static

Compute the best RLE sequence for a line.

Definition at line 136 of file qtrleenc.c.

Referenced by encode_frame().

◆ encode_frame()

static int encode_frame ( QtrleEncContext s,
const AVFrame p,
uint8_t *  buf 
)
static

Encode frame including header.

Definition at line 326 of file qtrleenc.c.

Referenced by qtrle_encode_frame().

◆ qtrle_encode_frame()

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

Definition at line 367 of file qtrleenc.c.

Variable Documentation

◆ ff_qtrle_encoder

const FFCodec ff_qtrle_encoder
Initial value:
= {
.p.name = "qtrle",
CODEC_LONG_NAME("QuickTime Animation (RLE) video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(QtrleEncContext),
.close = qtrle_encode_end,
.p.pix_fmts = (const enum AVPixelFormat[]){
},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 401 of file qtrleenc.c.

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
qtrle_encode_end
static av_cold int qtrle_encode_end(AVCodecContext *avctx)
Definition: qtrleenc.c:67
AV_PIX_FMT_RGB555BE
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:114
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:296
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:75
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_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:99
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
qtrle_encode_frame
static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: qtrleenc.c:367
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_QTRLE
@ AV_CODEC_ID_QTRLE
Definition: codec_id.h:107
qtrle_encode_init
static av_cold int qtrle_encode_init(AVCodecContext *avctx)
Definition: qtrleenc.c:78
QtrleEncContext
Definition: qtrleenc.c:38