FFmpeg
Data Structures | Enumerations | Functions | Variables
vmnc.c File Reference
#include "libavutil/common.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  VmncContext
 

Enumerations

enum  EncTypes {
  MAGIC_WMVd = 0x574D5664, MAGIC_WMVe, MAGIC_WMVf, MAGIC_WMVg,
  MAGIC_WMVh, MAGIC_WMVi, MAGIC_WMVj
}
 
enum  HexTile_Flags {
  HT_RAW = 1, HT_BKG = 2, HT_FG = 4, HT_SUB = 8,
  HT_CLR = 16
}
 

Functions

static av_always_inline int vmnc_get_pixel (GetByteContext *gb, int bpp, int be)
 
static void load_cursor (VmncContext *c)
 
static void put_cursor (uint8_t *dst, int stride, VmncContext *c, int dx, int dy)
 
static av_always_inline void paint_rect (uint8_t *dst, int dx, int dy, int w, int h, int color, int bpp, int stride)
 
static av_always_inline void paint_raw (uint8_t *dst, int w, int h, GetByteContext *gb, int bpp, int be, int stride)
 
static int decode_hextile (VmncContext *c, uint8_t *dst, GetByteContext *gb, int w, int h, int stride)
 
static void reset_buffers (VmncContext *c)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_vmnc_decoder
 

Detailed Description

VMware Screen Codec (VMnc) decoder As Alex Beregszaszi discovered, this is effectively RFB data dump

Definition in file vmnc.c.

Enumeration Type Documentation

◆ EncTypes

enum EncTypes
Enumerator
MAGIC_WMVd 
MAGIC_WMVe 
MAGIC_WMVf 
MAGIC_WMVg 
MAGIC_WMVh 
MAGIC_WMVi 
MAGIC_WMVj 

Definition at line 34 of file vmnc.c.

◆ HexTile_Flags

Enumerator
HT_RAW 
HT_BKG 
HT_FG 
HT_SUB 
HT_CLR 

Definition at line 44 of file vmnc.c.

Function Documentation

◆ vmnc_get_pixel()

static av_always_inline int vmnc_get_pixel ( GetByteContext gb,
int  bpp,
int  be 
)
static

Definition at line 75 of file vmnc.c.

Referenced by decode_hextile(), load_cursor(), and paint_raw().

◆ load_cursor()

static void load_cursor ( VmncContext c)
static

Definition at line 93 of file vmnc.c.

Referenced by decode_frame().

◆ put_cursor()

static void put_cursor ( uint8_t *  dst,
int  stride,
VmncContext c,
int  dx,
int  dy 
)
static

Definition at line 128 of file vmnc.c.

Referenced by decode_frame().

◆ paint_rect()

static av_always_inline void paint_rect ( uint8_t *  dst,
int  dx,
int  dy,
int  w,
int  h,
int  color,
int  bpp,
int  stride 
)
static

Definition at line 188 of file vmnc.c.

Referenced by decode_hextile().

◆ paint_raw()

static av_always_inline void paint_raw ( uint8_t *  dst,
int  w,
int  h,
GetByteContext gb,
int  bpp,
int  be,
int  stride 
)
static

Definition at line 218 of file vmnc.c.

Referenced by decode_frame(), and decode_hextile().

◆ decode_hextile()

static int decode_hextile ( VmncContext c,
uint8_t *  dst,
GetByteContext gb,
int  w,
int  h,
int  stride 
)
static

Definition at line 242 of file vmnc.c.

Referenced by decode_frame().

◆ reset_buffers()

static void reset_buffers ( VmncContext c)
static

Definition at line 313 of file vmnc.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 323 of file vmnc.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 524 of file vmnc.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 560 of file vmnc.c.

Variable Documentation

◆ ff_vmnc_decoder

const FFCodec ff_vmnc_decoder
Initial value:
= {
.p.name = "vmnc",
CODEC_LONG_NAME("VMware Screen Codec / VMware Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(VmncContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 572 of file vmnc.c.

decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: vmnc.c:560
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: vmnc.c:524
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: vmnc.c:323
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
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
VmncContext
Definition: vmnc.c:55
AV_CODEC_ID_VMNC
@ AV_CODEC_ID_VMNC
Definition: codec_id.h:141
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201