FFmpeg  4.0
Data Structures | Macros | Functions | Variables
rv10.c File Reference

RV10/RV20 decoder. More...

#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "error_resilience.h"
#include "h263.h"
#include "h263data.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mpeg4video.h"
#include "mpegvideodata.h"
#include "rv10.h"

Go to the source code of this file.

Data Structures

struct  RVDecContext
 

Macros

#define RV_GET_MAJOR_VER(x)   ((x) >> 28)
 
#define RV_GET_MINOR_VER(x)   (((x) >> 20) & 0xFF)
 
#define RV_GET_MICRO_VER(x)   (((x) >> 12) & 0xFF)
 
#define DC_VLC_BITS   14
 
#define ERROR_SKIP_FRAME   -123
 

Functions

int ff_rv_decode_dc (MpegEncContext *s, int n)
 
static int rv10_decode_picture_header (MpegEncContext *s)
 
static int rv20_decode_picture_header (RVDecContext *rv)
 
static av_cold int rv10_decode_init (AVCodecContext *avctx)
 
static av_cold int rv10_decode_end (AVCodecContext *avctx)
 
static int rv10_decode_packet (AVCodecContext *avctx, const uint8_t *buf, int buf_size, int buf_size2)
 
static int get_slice_offset (AVCodecContext *avctx, const uint8_t *buf, int n)
 
static int rv10_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

static const uint16_t rv_lum_code [256]
 
static const uint8_t rv_lum_bits [256]
 
static const uint16_t rv_chrom_code [256]
 
static const uint8_t rv_chrom_bits [256]
 
static VLC rv_dc_lum
 
static VLC rv_dc_chrom
 
AVCodec ff_rv10_decoder
 
AVCodec ff_rv20_decoder
 

Detailed Description

RV10/RV20 decoder.

Definition in file rv10.c.

Macro Definition Documentation

◆ RV_GET_MAJOR_VER

#define RV_GET_MAJOR_VER (   x)    ((x) >> 28)

Definition at line 44 of file rv10.c.

Referenced by rv10_decode_init().

◆ RV_GET_MINOR_VER

#define RV_GET_MINOR_VER (   x)    (((x) >> 20) & 0xFF)

Definition at line 45 of file rv10.c.

Referenced by rv10_decode_init(), and rv20_decode_picture_header().

◆ RV_GET_MICRO_VER

#define RV_GET_MICRO_VER (   x)    (((x) >> 12) & 0xFF)

Definition at line 46 of file rv10.c.

Referenced by rv10_decode_init().

◆ DC_VLC_BITS

#define DC_VLC_BITS   14

Definition at line 48 of file rv10.c.

Referenced by ff_rv_decode_dc(), and rv10_decode_init().

◆ ERROR_SKIP_FRAME

#define ERROR_SKIP_FRAME   -123

Function Documentation

◆ ff_rv_decode_dc()

int ff_rv_decode_dc ( MpegEncContext s,
int  n 
)

Definition at line 198 of file rv10.c.

Referenced by h263_decode_block().

◆ rv10_decode_picture_header()

static int rv10_decode_picture_header ( MpegEncContext s)
static

Definition at line 249 of file rv10.c.

Referenced by rv10_decode_packet().

◆ rv20_decode_picture_header()

static int rv20_decode_picture_header ( RVDecContext rv)
static

Definition at line 308 of file rv10.c.

Referenced by rv10_decode_packet().

◆ rv10_decode_init()

static av_cold int rv10_decode_init ( AVCodecContext avctx)
static

Definition at line 466 of file rv10.c.

◆ rv10_decode_end()

static av_cold int rv10_decode_end ( AVCodecContext avctx)
static

Definition at line 544 of file rv10.c.

◆ rv10_decode_packet()

static int rv10_decode_packet ( AVCodecContext avctx,
const uint8_t buf,
int  buf_size,
int  buf_size2 
)
static

Definition at line 552 of file rv10.c.

Referenced by rv10_decode_frame().

◆ get_slice_offset()

static int get_slice_offset ( AVCodecContext avctx,
const uint8_t buf,
int  n 
)
static

Definition at line 694 of file rv10.c.

Referenced by rv10_decode_frame().

◆ rv10_decode_frame()

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

Definition at line 702 of file rv10.c.

Variable Documentation

◆ rv_lum_code

const uint16_t rv_lum_code[256]
static

Definition at line 56 of file rv10.c.

Referenced by rv10_decode_init().

◆ rv_lum_bits

const uint8_t rv_lum_bits[256]
static

Definition at line 91 of file rv10.c.

Referenced by rv10_decode_init().

◆ rv_chrom_code

const uint16_t rv_chrom_code[256]
static

Definition at line 126 of file rv10.c.

Referenced by rv10_decode_init().

◆ rv_chrom_bits

const uint8_t rv_chrom_bits[256]
static

Definition at line 161 of file rv10.c.

Referenced by rv10_decode_init().

◆ rv_dc_lum

VLC rv_dc_lum
static

Definition at line 196 of file rv10.c.

◆ rv_dc_chrom

VLC rv_dc_chrom
static

Definition at line 196 of file rv10.c.

◆ ff_rv10_decoder

AVCodec ff_rv10_decoder
Initial value:
= {
.name = "rv10",
.long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
.priv_data_size = sizeof(RVDecContext),
.close = rv10_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: rv10.c:702
static av_cold int rv10_decode_end(AVCodecContext *avctx)
Definition: rv10.c:544
static av_cold int rv10_decode_init(AVCodecContext *avctx)
Definition: rv10.c:466
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:266
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:62
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 791 of file rv10.c.

◆ ff_rv20_decoder

AVCodec ff_rv20_decoder
Initial value:
= {
.name = "rv20",
.long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
.priv_data_size = sizeof(RVDecContext),
.close = rv10_decode_end,
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:984
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
void ff_mpeg_flush(AVCodecContext *avctx)
Definition: mpegvideo.c:2264
static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: rv10.c:702
static av_cold int rv10_decode_end(AVCodecContext *avctx)
Definition: rv10.c:544
static av_cold int rv10_decode_init(AVCodecContext *avctx)
Definition: rv10.c:466
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:266
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:62
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 808 of file rv10.c.