FFmpeg
Data Structures | Enumerations | Functions | Variables
vb.c File Reference
#include "libavutil/mem.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  VBDecContext
 

Enumerations

enum  VBFlags {
  VB_HAS_GMC = 0x01, VB_HAS_AUDIO = 0x04, VB_HAS_VIDEO = 0x08, VB_HAS_PALETTE = 0x10,
  VB_HAS_LENGTH = 0x20, VB_HAS_GMC = 0x01, VB_HAS_AUDIO = 0x04, VB_HAS_VIDEO = 0x08,
  VB_HAS_PALETTE = 0x10, VB_HAS_LENGTH = 0x20
}
 

Functions

static void vb_decode_palette (VBDecContext *c, int data_size)
 
static int check_pixel (uint8_t *buf, uint8_t *start, uint8_t *end)
 
static int check_line (uint8_t *buf, uint8_t *start, uint8_t *end)
 
static int vb_decode_framedata (VBDecContext *c, int offset)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

static const uint16_t vb_patterns [64]
 
const FFCodec ff_vb_decoder
 

Detailed Description

VB Video decoder

Definition in file vb.c.

Enumeration Type Documentation

◆ VBFlags

enum VBFlags
Enumerator
VB_HAS_GMC 
VB_HAS_AUDIO 
VB_HAS_VIDEO 
VB_HAS_PALETTE 
VB_HAS_LENGTH 
VB_HAS_GMC 
VB_HAS_AUDIO 
VB_HAS_VIDEO 
VB_HAS_PALETTE 
VB_HAS_LENGTH 

Definition at line 33 of file vb.c.

Function Documentation

◆ vb_decode_palette()

static void vb_decode_palette ( VBDecContext c,
int  data_size 
)
static

Definition at line 60 of file vb.c.

Referenced by decode_frame().

◆ check_pixel()

static int check_pixel ( uint8_t *  buf,
uint8_t *  start,
uint8_t *  end 
)
inlinestatic

Definition at line 78 of file vb.c.

Referenced by vb_decode_framedata().

◆ check_line()

static int check_line ( uint8_t *  buf,
uint8_t *  start,
uint8_t *  end 
)
inlinestatic

Definition at line 83 of file vb.c.

Referenced by vb_decode_framedata().

◆ vb_decode_framedata()

static int vb_decode_framedata ( VBDecContext c,
int  offset 
)
static

Definition at line 88 of file vb.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 190 of file vb.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 257 of file vb.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 273 of file vb.c.

Variable Documentation

◆ vb_patterns

const uint16_t vb_patterns[64]
static
Initial value:
= {
0x0660, 0xFF00, 0xCCCC, 0xF000, 0x8888, 0x000F, 0x1111, 0xFEC8,
0x8CEF, 0x137F, 0xF731, 0xC800, 0x008C, 0x0013, 0x3100, 0xCC00,
0x00CC, 0x0033, 0x3300, 0x0FF0, 0x6666, 0x00F0, 0x0F00, 0x2222,
0x4444, 0xF600, 0x8CC8, 0x006F, 0x1331, 0x318C, 0xC813, 0x33CC,
0x6600, 0x0CC0, 0x0066, 0x0330, 0xF900, 0xC88C, 0x009F, 0x3113,
0x6000, 0x0880, 0x0006, 0x0110, 0xCC88, 0xFC00, 0x00CF, 0x88CC,
0x003F, 0x1133, 0x3311, 0xF300, 0x6FF6, 0x0603, 0x08C6, 0x8C63,
0xC631, 0x6310, 0xC060, 0x0136, 0x136C, 0x36C8, 0x6C80, 0x324C
}

Definition at line 49 of file vb.c.

Referenced by vb_decode_framedata().

◆ ff_vb_decoder

const FFCodec ff_vb_decoder
Initial value:
= {
.p.name = "vb",
CODEC_LONG_NAME("Beam Software VB"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_VB,
.priv_data_size = sizeof(VBDecContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 283 of file vb.c.

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:43
AV_CODEC_ID_VB
@ AV_CODEC_ID_VB
Definition: codec_id.h:160
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: vb.c:190
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: vb.c:257
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
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
VBDecContext
Definition: vb.c:41
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: vb.c:273
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201