FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
zmbv.c File Reference
#include <stddef.h>
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "zlib_wrapper.h"
#include <zlib.h>

Go to the source code of this file.

Data Structures

struct  ZmbvContext
 

Macros

#define ZMBV_KEYFRAME   1
 
#define ZMBV_DELTAPAL   2
 

Enumerations

enum  ZmbvFormat {
  ZMBV_FMT_NONE = 0, ZMBV_FMT_1BPP = 1, ZMBV_FMT_2BPP = 2, ZMBV_FMT_4BPP = 3,
  ZMBV_FMT_8BPP = 4, ZMBV_FMT_15BPP = 5, ZMBV_FMT_16BPP = 6, ZMBV_FMT_24BPP = 7,
  ZMBV_FMT_32BPP = 8, ZMBV_FMT_NONE = 0, ZMBV_FMT_1BPP = 1, ZMBV_FMT_2BPP = 2,
  ZMBV_FMT_4BPP = 3, ZMBV_FMT_8BPP = 4, ZMBV_FMT_15BPP = 5, ZMBV_FMT_16BPP = 6,
  ZMBV_FMT_24BPP = 7, ZMBV_FMT_32BPP = 8
}
 

Functions

static int zmbv_decode_xor_8 (ZmbvContext *c)
 Decode XOR'ed frame - 8bpp version. More...
 
static int zmbv_decode_xor_16 (ZmbvContext *c)
 Decode XOR'ed frame - 15bpp and 16bpp version. More...
 
static int zmbv_decode_xor_32 (ZmbvContext *c)
 Decode XOR'ed frame - 32bpp version. More...
 
static int zmbv_decode_intra (ZmbvContext *c)
 Decode intraframe. More...
 
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

const FFCodec ff_zmbv_decoder
 

Detailed Description

Zip Motion Blocks Video decoder

Definition in file zmbv.c.

Macro Definition Documentation

◆ ZMBV_KEYFRAME

#define ZMBV_KEYFRAME   1

Definition at line 39 of file zmbv.c.

◆ ZMBV_DELTAPAL

#define ZMBV_DELTAPAL   2

Definition at line 40 of file zmbv.c.

Enumeration Type Documentation

◆ ZmbvFormat

enum ZmbvFormat
Enumerator
ZMBV_FMT_NONE 
ZMBV_FMT_1BPP 
ZMBV_FMT_2BPP 
ZMBV_FMT_4BPP 
ZMBV_FMT_8BPP 
ZMBV_FMT_15BPP 
ZMBV_FMT_16BPP 
ZMBV_FMT_24BPP 
ZMBV_FMT_32BPP 
ZMBV_FMT_NONE 
ZMBV_FMT_1BPP 
ZMBV_FMT_2BPP 
ZMBV_FMT_4BPP 
ZMBV_FMT_8BPP 
ZMBV_FMT_15BPP 
ZMBV_FMT_16BPP 
ZMBV_FMT_24BPP 
ZMBV_FMT_32BPP 

Definition at line 42 of file zmbv.c.

Function Documentation

◆ zmbv_decode_xor_8()

static int zmbv_decode_xor_8 ( ZmbvContext c)
static

Decode XOR'ed frame - 8bpp version.

Definition at line 82 of file zmbv.c.

Referenced by decode_frame().

◆ zmbv_decode_xor_16()

static int zmbv_decode_xor_16 ( ZmbvContext c)
static

Decode XOR'ed frame - 15bpp and 16bpp version.

Definition at line 161 of file zmbv.c.

Referenced by decode_frame().

◆ zmbv_decode_xor_32()

static int zmbv_decode_xor_32 ( ZmbvContext c)
static

Decode XOR'ed frame - 32bpp version.

Definition at line 323 of file zmbv.c.

Referenced by decode_frame().

◆ zmbv_decode_intra()

static int zmbv_decode_intra ( ZmbvContext c)
static

Decode intraframe.

Definition at line 398 of file zmbv.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 412 of file zmbv.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 605 of file zmbv.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 634 of file zmbv.c.

Variable Documentation

◆ ff_zmbv_decoder

const FFCodec ff_zmbv_decoder
Initial value:
= {
.p.name = "zmbv",
CODEC_LONG_NAME("Zip Motion Blocks Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(ZmbvContext),
.close = decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 647 of file zmbv.c.

ZmbvContext
Definition: zmbv.c:57
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:42
AV_CODEC_ID_ZMBV
@ AV_CODEC_ID_ZMBV
Definition: codec_id.h:133
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: zmbv.c:412
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: zmbv.c:605
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
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
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: zmbv.c:634
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201