FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
kmvc.c File Reference

Karl Morton's Video Codec decoder. More...

#include <stdio.h>
#include <stdlib.h>
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  KmvcContext
 
struct  BitBuf
 

Macros

#define KMVC_KEYFRAME   0x80
 
#define KMVC_PALETTE   0x40
 
#define KMVC_METHOD   0x0F
 
#define MAX_PALSIZE   256
 
#define BLK(data, x, y)   data[av_clip((x) + (y) * 320, 0, 320 * 200 -1)]
 
#define kmvc_init_getbits(bb, g)   bb.bits = 7; bb.bitbuf = bytestream2_get_byte(g);
 
#define kmvc_getbit(bb, g, res)
 

Functions

static int kmvc_decode_intra_8x8 (KmvcContext *ctx, int w, int h)
 
static int kmvc_decode_inter_8x8 (KmvcContext *ctx, int w, int h)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_kmvc_decoder
 

Detailed Description

Karl Morton's Video Codec decoder.

Definition in file kmvc.c.

Macro Definition Documentation

#define KMVC_KEYFRAME   0x80

Definition at line 35 of file kmvc.c.

Referenced by decode_frame().

#define KMVC_PALETTE   0x40

Definition at line 36 of file kmvc.c.

Referenced by decode_frame().

#define KMVC_METHOD   0x0F

Definition at line 37 of file kmvc.c.

Referenced by decode_frame().

#define MAX_PALSIZE   256

Definition at line 38 of file kmvc.c.

Referenced by decode_init().

#define BLK (   data,
  x,
  y 
)    data[av_clip((x) + (y) * 320, 0, 320 * 200 -1)]

Definition at line 59 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

#define kmvc_init_getbits (   bb,
  g 
)    bb.bits = 7; bb.bitbuf = bytestream2_get_byte(g);

Definition at line 61 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

#define kmvc_getbit (   bb,
  g,
  res 
)
Value:
{\
res = 0; \
if (bb.bitbuf & (1 << bb.bits)) res = 1; \
bb.bits--; \
if(bb.bits == -1) { \
bb.bitbuf = bytestream2_get_byte(g); \
bb.bits = 7; \
} \
}
const char * g
Definition: vf_curves.c:108
if()
Definition: avfilter.c:975
uint8_t bits
Definition: crc.c:295

Definition at line 63 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

Function Documentation

static int kmvc_decode_intra_8x8 ( KmvcContext ctx,
int  w,
int  h 
)
static

Definition at line 73 of file kmvc.c.

Referenced by decode_frame().

static int kmvc_decode_inter_8x8 ( KmvcContext ctx,
int  w,
int  h 
)
static

Definition at line 162 of file kmvc.c.

Referenced by decode_frame().

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

Definition at line 262 of file kmvc.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 370 of file kmvc.c.

Variable Documentation

AVCodec ff_kmvc_decoder
Initial value:
= {
.name = "kmvc",
.long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
.priv_data_size = sizeof(KmvcContext),
.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static av_cold int decode_init(AVCodecContext *avctx)
Definition: kmvc.c:370
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: kmvc.c:262
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:522
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:856

Definition at line 416 of file kmvc.c.