FFmpeg
Loading...
Searching...
No Matches
rpza.c File Reference

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

#include <stdint.h>
#include "libavutil/attributes.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"); \
} \
#define s(width, name)
Definition cbs_vp9.c:198
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition error.h:61
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210

Definition at line 54 of file rpza.c.

Referenced by mpegts_probe(), and rpza_decode_stream().

◆ ADVANCE_BLOCK

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

Definition at line 61 of file rpza.c.

Referenced by rpza_decode_stream().

Function Documentation

◆ rpza_decode_stream()

static int rpza_decode_stream ( RpzaContext * s)
static

Definition at line 72 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,
AVFrame * rframe,
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 279 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),
.p.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_RPZA
Definition codec_id.h:92
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int rpza_decode_end(AVCodecContext *avctx)
Definition rpza.c:279
static int rpza_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition rpza.c:258
static av_cold int rpza_decode_init(AVCodecContext *avctx)
Definition rpza.c:244

Definition at line 288 of file rpza.c.