#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, src) bb.bits = 7; bb.bitbuf = *src++; |
#define | kmvc_getbit(bb, src, src_end, res) |
Functions | |
static int | kmvc_decode_intra_8x8 (KmvcContext *ctx, const uint8_t *src, int src_size, int w, int h) |
static int | kmvc_decode_inter_8x8 (KmvcContext *ctx, const uint8_t *src, int src_size, 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 |
Definition in file kmvc.c.
Definition at line 57 of file kmvc.c.
Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().
#define kmvc_getbit | ( | bb, | |||
src, | |||||
src_end, | |||||
res | ) |
Value:
{\ res = 0; \ if (bb.bitbuf & (1 << bb.bits)) res = 1; \ bb.bits--; \ if(bb.bits == -1) { \ if (src >= src_end) { \ av_log(ctx->avctx, AV_LOG_ERROR, "Data overrun\n"); \ return AVERROR_INVALIDDATA; \ } \ bb.bitbuf = *src++; \ bb.bits = 7; \ } \ }
Definition at line 61 of file kmvc.c.
Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().
Definition at line 59 of file kmvc.c.
Referenced by kmvc_decode_inter_8x8(), and kmvc_decode_intra_8x8().
#define KMVC_KEYFRAME 0x80 |
#define KMVC_METHOD 0x0F |
#define KMVC_PALETTE 0x40 |
#define MAX_PALSIZE 256 |
static av_cold int decode_end | ( | AVCodecContext * | avctx | ) | [static] |
static int decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
static av_cold int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static int kmvc_decode_inter_8x8 | ( | KmvcContext * | ctx, | |
const uint8_t * | src, | |||
int | src_size, | |||
int | w, | |||
int | h | |||
) | [static] |
static int kmvc_decode_intra_8x8 | ( | KmvcContext * | ctx, | |
const uint8_t * | src, | |||
int | src_size, | |||
int | w, | |||
int | h | |||
) | [static] |
Initial value:
{ "kmvc", AVMEDIA_TYPE_VIDEO, CODEC_ID_KMVC, sizeof(KmvcContext), decode_init, NULL, decode_end, decode_frame, CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"), }