libavcodec/kmvc.c File Reference

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

#include <stdio.h>
#include <stdlib.h>
#include "avcodec.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  KmvcContext
struct  BitBuf

Defines

#define KMVC_KEYFRAME   0x80
#define KMVC_PALETTE   0x40
#define KMVC_METHOD   0x0F
#define MAX_PALSIZE   256
#define BLK(data, x, y)   data[(x) + (y) * 320]
#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 *data_size, AVPacket *avpkt)
static av_cold int decode_init (AVCodecContext *avctx)
static av_cold int decode_end (AVCodecContext *avctx)

Variables

AVCodec ff_kmvc_decoder


Detailed Description

Karl Morton's Video Codec decoder.

Definition in file kmvc.c.


Define Documentation

#define BLK ( data,
x,
 )     data[(x) + (y) * 320]

Definition at line 58 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; \
    } \
}

Definition at line 62 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 60 of file kmvc.c.

Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().

#define KMVC_KEYFRAME   0x80

Definition at line 33 of file kmvc.c.

Referenced by decode_frame().

#define KMVC_METHOD   0x0F

Definition at line 35 of file kmvc.c.

Referenced by decode_frame().

#define KMVC_PALETTE   0x40

Definition at line 34 of file kmvc.c.

Referenced by decode_frame().

#define MAX_PALSIZE   256

Definition at line 36 of file kmvc.c.

Referenced by decode_init().


Function Documentation

static av_cold int decode_end ( AVCodecContext avctx  )  [static]

Definition at line 428 of file kmvc.c.

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 261 of file kmvc.c.

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

Definition at line 374 of file kmvc.c.

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

Definition at line 161 of file kmvc.c.

Referenced by decode_frame().

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

Definition at line 72 of file kmvc.c.

Referenced by decode_frame().


Variable Documentation

Initial value:

 {
    .name           = "kmvc",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_KMVC,
    .priv_data_size = sizeof(KmvcContext),
    .init           = decode_init,
    .close          = decode_end,
    .decode         = decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
}

Definition at line 440 of file kmvc.c.


Generated on Fri Oct 26 02:47:57 2012 for FFmpeg by  doxygen 1.5.8