FFmpeg
Data Structures | Macros | Functions | Variables
rpza.c File Reference
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/internal.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.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, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int rpza_decode_end (AVCodecContext *avctx)
 

Variables

const AVCodec 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 55 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 62 of file rpza.c.

Function Documentation

◆ rpza_decode_stream()

static int rpza_decode_stream ( RpzaContext s)
static

Definition at line 73 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 244 of file rpza.c.

◆ rpza_decode_frame()

static int rpza_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 258 of file rpza.c.

◆ rpza_decode_end()

static av_cold int rpza_decode_end ( AVCodecContext avctx)
static

Definition at line 280 of file rpza.c.

Variable Documentation

◆ ff_rpza_decoder

const AVCodec ff_rpza_decoder
Initial value:
= {
.name = "rpza",
.long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"),
.priv_data_size = sizeof(RpzaContext),
.close = rpza_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 289 of file rpza.c.

stride
int stride
Definition: mace.c:144
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
RpzaContext
Definition: rpza.c:47
init
static int init
Definition: av_tx.c:47
rpza_decode_end
static av_cold int rpza_decode_end(AVCodecContext *avctx)
Definition: rpza.c:280
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
width
#define width
s
#define s(width, name)
Definition: cbs_vp9.c:257
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
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:117
rpza_decode_frame
static int rpza_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: rpza.c:258
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_RPZA
@ AV_CODEC_ID_RPZA
Definition: codec_id.h:92
rpza_decode_init
static av_cold int rpza_decode_init(AVCodecContext *avctx)
Definition: rpza.c:244
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61