FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
cinepak.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  cvid_strip
 
struct  CinepakContext
 

Macros

#define MAX_STRIPS   32
 

Typedefs

typedef uint8_t cvid_codebook[12]
 

Functions

static void cinepak_decode_codebook (cvid_codebook *codebook, int chunk_id, int size, const uint8_t *data)
 
static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip, int chunk_id, int size, const uint8_t *data)
 
static int cinepak_decode_strip (CinepakContext *s, cvid_strip *strip, const uint8_t *data, int size)
 
static int cinepak_predecode_check (CinepakContext *s)
 
static int cinepak_decode (CinepakContext *s)
 
static av_cold int cinepak_decode_init (AVCodecContext *avctx)
 
static int cinepak_decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int cinepak_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_cinepak_decoder
 

Detailed Description

Cinepak video decoder

Author
Ewald Snel ewald.nosp@m.@ram.nosp@m.bo.it.nosp@m.s.tu.nosp@m.delft.nosp@m..nl
See also
For more information on the Cinepak algorithm, visit: http://www.csse.monash.edu.au/~timf/
For more information on the quirky data inside Sega FILM/CPK files, visit: http://wiki.multimedia.cx/index.php?title=Sega_FILM

Cinepak colorspace support (c) 2013 Rl, Aetey Global Technologies AB

Author
Cinepak colorspace, Rl, Aetey Global Technologies AB

Definition in file cinepak.c.

Macro Definition Documentation

◆ MAX_STRIPS

#define MAX_STRIPS   32

Definition at line 50 of file cinepak.c.

Typedef Documentation

◆ cvid_codebook

typedef uint8_t cvid_codebook[12]

Definition at line 48 of file cinepak.c.

Function Documentation

◆ cinepak_decode_codebook()

static void cinepak_decode_codebook ( cvid_codebook codebook,
int  chunk_id,
int  size,
const uint8_t *  data 
)
static

Definition at line 78 of file cinepak.c.

Referenced by cinepak_decode_strip().

◆ cinepak_decode_vectors()

static int cinepak_decode_vectors ( CinepakContext s,
cvid_strip strip,
int  chunk_id,
int  size,
const uint8_t *  data 
)
static

Definition at line 134 of file cinepak.c.

Referenced by cinepak_decode_strip().

◆ cinepak_decode_strip()

static int cinepak_decode_strip ( CinepakContext s,
cvid_strip strip,
const uint8_t *  data,
int  size 
)
static

Definition at line 268 of file cinepak.c.

Referenced by cinepak_decode().

◆ cinepak_predecode_check()

static int cinepak_predecode_check ( CinepakContext s)
static

Definition at line 320 of file cinepak.c.

Referenced by cinepak_decode_frame().

◆ cinepak_decode()

static int cinepak_decode ( CinepakContext s)
static

Definition at line 371 of file cinepak.c.

Referenced by cinepak_decode_frame().

◆ cinepak_decode_init()

static av_cold int cinepak_decode_init ( AVCodecContext avctx)
static

Definition at line 426 of file cinepak.c.

◆ cinepak_decode_frame()

static int cinepak_decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 452 of file cinepak.c.

◆ cinepak_decode_end()

static av_cold int cinepak_decode_end ( AVCodecContext avctx)
static

Definition at line 500 of file cinepak.c.

Variable Documentation

◆ ff_cinepak_decoder

const FFCodec ff_cinepak_decoder
Initial value:
= {
.p.name = "cinepak",
.p.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(CinepakContext),
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 509 of file cinepak.c.

init
static int init
Definition: av_tx.c:47
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
AV_CODEC_ID_CINEPAK
@ AV_CODEC_ID_CINEPAK
Definition: codec_id.h:93
cinepak_decode_frame
static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: cinepak.c:452
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
cinepak_decode_init
static av_cold int cinepak_decode_init(AVCodecContext *avctx)
Definition: cinepak.c:426
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: codec_internal.h:31
CinepakContext
Definition: cinepak.c:60
cinepak_decode_end
static av_cold int cinepak_decode_end(AVCodecContext *avctx)
Definition: cinepak.c:500
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201