FFmpeg
Data Structures | Macros | Functions | Variables
rpza.c File Reference
#include <stdint.h>
#include "libavutil/internal.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  RpzaContext
 

Macros

#define CHECK_BLOCK()
 
#define ADVANCE_BLOCK()
 

Functions

static int rpza_decode_stream (RpzaContext *s)
 
static av_cold int rpza_decode_init (AVCodecContext *avctx)
 
static int rpza_decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int rpza_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_rpza_decoder
 

Detailed Description

QT RPZA Video Decoder by Roberto Togni For more information about the RPZA format, visit: http://www.pcisys.net/~melanson/codecs/

The RPZA decoder outputs RGB555 colorspace data.

Note that this decoder reads big endian RGB555 pixel values from the bytestream, arranges them in the host's endian order, and outputs them to the final rendered map in the same host endian order. This is intended behavior as the libavcodec documentation states that RGB555 pixels shall be stored in native CPU endianness.

Definition in file rpza.c.

Macro Definition Documentation

◆ CHECK_BLOCK

#define CHECK_BLOCK ( )
Value:
if (total_blocks < 1) { \
av_log(s->avctx, AV_LOG_ERROR, \
"Block counter just went negative (this should not happen)\n"); \
} \

Definition at line 53 of file rpza.c.

◆ ADVANCE_BLOCK

#define ADVANCE_BLOCK ( )
Value:
{ \
pixel_ptr += 4; \
if (pixel_ptr >= width) \
{ \
pixel_ptr = 0; \
row_ptr += stride * 4; \
} \
total_blocks--; \
}

Definition at line 60 of file rpza.c.

Function Documentation

◆ rpza_decode_stream()

static int rpza_decode_stream ( RpzaContext s)
static

Definition at line 71 of file rpza.c.

Referenced by rpza_decode_frame().

◆ rpza_decode_init()

static av_cold int rpza_decode_init ( AVCodecContext avctx)
static

Definition at line 242 of file rpza.c.

◆ rpza_decode_frame()

static int rpza_decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 256 of file rpza.c.

◆ rpza_decode_end()

static av_cold int rpza_decode_end ( AVCodecContext avctx)
static

Definition at line 277 of file rpza.c.

Variable Documentation

◆ ff_rpza_decoder

const FFCodec ff_rpza_decoder
Initial value:
= {
.p.name = "rpza",
CODEC_LONG_NAME("QuickTime video (RPZA)"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(RpzaContext),
.close = rpza_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 286 of file rpza.c.

RpzaContext
Definition: rpza.c:45
rpza_decode_end
static av_cold int rpza_decode_end(AVCodecContext *avctx)
Definition: rpza.c:277
rpza_decode_frame
static int rpza_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: rpza.c:256
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
width
#define width
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
s
#define s(width, name)
Definition: cbs_vp9.c:198
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
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
stride
#define stride
Definition: h264pred_template.c:537
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_RPZA
@ AV_CODEC_ID_RPZA
Definition: codec_id.h:94
rpza_decode_init
static av_cold int rpza_decode_init(AVCodecContext *avctx)
Definition: rpza.c:242
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61