libavcodec/xan.c File Reference

Xan video decoder for Wing Commander III computer game by Mario Brito (mbrito@student.dei.uc.pt) and Mike Melanson (melanson@pcisys.net). More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  XanContext

Functions

static av_cold int xan_decode_init (AVCodecContext *avctx)
static void bytecopy (unsigned char *dest, const unsigned char *src, int count)
static int xan_huffman_decode (unsigned char *dest, const unsigned char *src, int dest_len)
static void xan_unpack (unsigned char *dest, const unsigned char *src, int dest_len)
static void xan_wc3_output_pixel_run (XanContext *s, const unsigned char *pixel_buffer, int x, int y, int pixel_count)
static void xan_wc3_copy_pixel_run (XanContext *s, int x, int y, int pixel_count, int motion_x, int motion_y)
static void xan_wc3_decode_frame (XanContext *s)
static void xan_wc4_decode_frame (XanContext *s)
static int xan_decode_frame (AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
static av_cold int xan_decode_end (AVCodecContext *avctx)

Variables

AVCodec xan_wc3_decoder


Detailed Description

Xan video decoder for Wing Commander III computer game by Mario Brito (mbrito@student.dei.uc.pt) and Mike Melanson (melanson@pcisys.net).

The xan_wc3 decoder outputs PAL8 data.

Definition in file xan.c.


Function Documentation

static void bytecopy ( unsigned char *  dest,
const unsigned char *  src,
int  count 
) [inline, static]

Definition at line 91 of file xan.c.

Referenced by xan_unpack().

static av_cold int xan_decode_end ( AVCodecContext avctx  )  [static]

Definition at line 449 of file xan.c.

static int xan_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
const uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 406 of file xan.c.

static av_cold int xan_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 58 of file xan.c.

static int xan_huffman_decode ( unsigned char *  dest,
const unsigned char *  src,
int  dest_len 
) [static]

Definition at line 99 of file xan.c.

Referenced by xan_wc3_decode_frame().

static void xan_unpack ( unsigned char *  dest,
const unsigned char *  src,
int  dest_len 
) [static]

Definition at line 133 of file xan.c.

Referenced by xan_wc3_decode_frame().

static void xan_wc3_copy_pixel_run ( XanContext s,
int  x,
int  y,
int  pixel_count,
int  motion_x,
int  motion_y 
) [inline, static]

Definition at line 238 of file xan.c.

Referenced by xan_wc3_decode_frame().

static void xan_wc3_decode_frame ( XanContext s  )  [static]

Definition at line 275 of file xan.c.

Referenced by xan_decode_frame().

static void xan_wc3_output_pixel_run ( XanContext s,
const unsigned char *  pixel_buffer,
int  x,
int  y,
int  pixel_count 
) [inline, static]

Definition at line 209 of file xan.c.

Referenced by xan_wc3_decode_frame().

static void xan_wc4_decode_frame ( XanContext s  )  [static]

Definition at line 403 of file xan.c.

Referenced by xan_decode_frame().


Variable Documentation

Initial value:

 {
    "xan_wc3",
    CODEC_TYPE_VIDEO,
    CODEC_ID_XAN_WC3,
    sizeof(XanContext),
    xan_decode_init,
    NULL,
    xan_decode_end,
    xan_decode_frame,
    CODEC_CAP_DR1,
    .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"),
}

Definition at line 465 of file xan.c.


Generated on Fri Oct 26 02:35:45 2012 for FFmpeg by  doxygen 1.5.8