FFmpeg
Loading...
Searching...
No Matches
kmvc.c File Reference

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

#include <stdio.h>
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.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)
 
#define kmvc_init_getbits(bb, 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, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 

Variables

const FFCodec ff_kmvc_decoder
 

Detailed Description

Karl Morton's Video Codec decoder.

Definition in file kmvc.c.

Macro Definition Documentation

◆ KMVC_KEYFRAME

#define KMVC_KEYFRAME   0x80

Definition at line 35 of file kmvc.c.

Referenced by decode_frame().

◆ KMVC_PALETTE

#define KMVC_PALETTE   0x40

Definition at line 36 of file kmvc.c.

Referenced by decode_frame().

◆ KMVC_METHOD

#define KMVC_METHOD   0x0F

Definition at line 37 of file kmvc.c.

Referenced by decode_frame().

◆ MAX_PALSIZE

#define MAX_PALSIZE   256

Definition at line 38 of file kmvc.c.

Referenced by decode_init().

◆ BLK

#define BLK ( data,
x,
y )
Value:
data[av_clip((x) + (y) * 320, 0, 320 * 200 -1)]
#define av_clip
Definition common.h:100
const char data[16]
Definition mxf.c:149

Definition at line 59 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

◆ kmvc_init_getbits

#define kmvc_init_getbits ( bb,
g )
Value:
bb.bits = 7; bb.bitbuf = bytestream2_get_byte(g);
const char * g
Definition vf_curves.c:128

Definition at line 61 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

◆ kmvc_getbit

#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; \
} \
}
static const uint8_t bits[8]
Definition fastaudio.c:100
if(svq3)

Definition at line 63 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

Function Documentation

◆ kmvc_decode_intra_8x8()

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().

◆ kmvc_decode_inter_8x8()

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().

◆ decode_frame()

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

Definition at line 262 of file kmvc.c.

◆ decode_init()

static av_cold int decode_init ( AVCodecContext * avctx)
static

Definition at line 357 of file kmvc.c.

Variable Documentation

◆ ff_kmvc_decoder

const FFCodec ff_kmvc_decoder
Initial value:
= {
.p.name = "kmvc",
CODEC_LONG_NAME("Karl Morton's video codec"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(KmvcContext),
.p.capabilities = AV_CODEC_CAP_DR1,
}
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_KMVC
Definition codec_id.h:135
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int decode_init(AVCodecContext *avctx)
Definition 4xm.c:998
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition 4xm.c:837

Definition at line 403 of file kmvc.c.