FFmpeg
Data Structures | Macros | Functions | Variables
gdv.c File Reference
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  GDVContext
 
struct  Bits8
 
struct  Bits32
 

Macros

#define PREAMBLE_SIZE   4096
 

Functions

static av_cold int gdv_decode_init (AVCodecContext *avctx)
 
static void scaleup (uint8_t *dst, const uint8_t *src, int w)
 
static void scaleup_rev (uint8_t *dst, const uint8_t *src, int w)
 
static void scaledown (uint8_t *dst, const uint8_t *src, int w)
 
static void rescale (GDVContext *gdv, uint8_t *dst, int w, int h, int scale_v, int scale_h)
 
static int read_bits2 (Bits8 *bits, GetByteContext *gb)
 
static void fill_bits32 (Bits32 *bits, GetByteContext *gb)
 
static int read_bits32 (Bits32 *bits, GetByteContext *gb, int nbits)
 
static void lz_copy (PutByteContext *pb, GetByteContext *g2, int offset, unsigned len)
 
static int decompress_2 (AVCodecContext *avctx)
 
static int decompress_5 (AVCodecContext *avctx, unsigned skip)
 
static int decompress_68 (AVCodecContext *avctx, unsigned skip, unsigned use8)
 
static int gdv_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int gdv_decode_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_gdv_decoder
 

Macro Definition Documentation

◆ PREAMBLE_SIZE

#define PREAMBLE_SIZE   4096

Definition at line 53 of file gdv.c.

Function Documentation

◆ gdv_decode_init()

static av_cold int gdv_decode_init ( AVCodecContext avctx)
static

Definition at line 55 of file gdv.c.

◆ scaleup()

static void scaleup ( uint8_t *  dst,
const uint8_t *  src,
int  w 
)
static

Definition at line 77 of file gdv.c.

Referenced by gdv_decode_frame().

◆ scaleup_rev()

static void scaleup_rev ( uint8_t *  dst,
const uint8_t *  src,
int  w 
)
static

Definition at line 95 of file gdv.c.

Referenced by rescale().

◆ scaledown()

static void scaledown ( uint8_t *  dst,
const uint8_t *  src,
int  w 
)
static

Definition at line 114 of file gdv.c.

Referenced by rescale().

◆ rescale()

static void rescale ( GDVContext gdv,
uint8_t *  dst,
int  w,
int  h,
int  scale_v,
int  scale_h 
)
static

Definition at line 132 of file gdv.c.

Referenced by gdv_decode_frame(), and silk_decode_frame().

◆ read_bits2()

static int read_bits2 ( Bits8 bits,
GetByteContext gb 
)
static

Definition at line 180 of file gdv.c.

Referenced by decompress_2(), and decompress_5().

◆ fill_bits32()

static void fill_bits32 ( Bits32 bits,
GetByteContext gb 
)
static

Definition at line 195 of file gdv.c.

Referenced by decompress_68().

◆ read_bits32()

static int read_bits32 ( Bits32 bits,
GetByteContext gb,
int  nbits 
)
static

Definition at line 201 of file gdv.c.

Referenced by decompress_68().

◆ lz_copy()

static void lz_copy ( PutByteContext pb,
GetByteContext g2,
int  offset,
unsigned  len 
)
static

Definition at line 215 of file gdv.c.

Referenced by decompress_2(), decompress_5(), and decompress_68().

◆ decompress_2()

static int decompress_2 ( AVCodecContext avctx)
static

Definition at line 244 of file gdv.c.

Referenced by gdv_decode_frame().

◆ decompress_5()

static int decompress_5 ( AVCodecContext avctx,
unsigned  skip 
)
static

Definition at line 286 of file gdv.c.

Referenced by gdv_decode_frame().

◆ decompress_68()

static int decompress_68 ( AVCodecContext avctx,
unsigned  skip,
unsigned  use8 
)
static

Definition at line 333 of file gdv.c.

Referenced by gdv_decode_frame().

◆ gdv_decode_frame()

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

Definition at line 459 of file gdv.c.

◆ gdv_decode_close()

static av_cold int gdv_decode_close ( AVCodecContext avctx)
static

Definition at line 556 of file gdv.c.

Variable Documentation

◆ ff_gdv_decoder

const FFCodec ff_gdv_decoder
Initial value:
= {
.p.name = "gdv",
CODEC_LONG_NAME("Gremlin Digital Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_GDV,
.priv_data_size = sizeof(GDVContext),
.close = gdv_decode_close,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 563 of file gdv.c.

AV_CODEC_ID_GDV
@ AV_CODEC_ID_GDV
Definition: codec_id.h:285
gdv_decode_frame
static int gdv_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: gdv.c:459
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
gdv_decode_init
static av_cold int gdv_decode_init(AVCodecContext *avctx)
Definition: gdv.c:55
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
gdv_decode_close
static av_cold int gdv_decode_close(AVCodecContext *avctx)
Definition: gdv.c:556
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
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
GDVContext
Definition: gdv.c:30
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201