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

Go to the source code of this file.

Data Structures

union  MacroBlock
 
union  SuperBlock
 
struct  CodeBook
 
struct  Escape124Context
 

Macros

#define BITSTREAM_READER_LE
 

Functions

static av_cold int escape124_decode_init (AVCodecContext *avctx)
 Initialize the decoder. More...
 
static av_cold int escape124_decode_close (AVCodecContext *avctx)
 
static CodeBook unpack_codebook (GetBitContext *gb, unsigned depth, unsigned size)
 
static unsigned decode_skip_count (GetBitContext *gb)
 
static MacroBlock decode_macroblock (Escape124Context *s, GetBitContext *gb, int *codebook_index, int superblock_index)
 
static void insert_mb_into_sb (SuperBlock *sb, MacroBlock mb, unsigned index)
 
static void copy_superblock (uint16_t *dest, ptrdiff_t dest_stride, uint16_t *src, ptrdiff_t src_stride)
 
static int escape124_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 

Variables

static const uint16_t mask_matrix []
 
const FFCodec ff_escape124_decoder
 

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 22 of file escape124.c.

Function Documentation

◆ escape124_decode_init()

static av_cold int escape124_decode_init ( AVCodecContext avctx)
static

Initialize the decoder.

Parameters
avctxdecoder context
Returns
0 success, negative on error

Definition at line 58 of file escape124.c.

◆ escape124_decode_close()

static av_cold int escape124_decode_close ( AVCodecContext avctx)
static

Definition at line 74 of file escape124.c.

◆ unpack_codebook()

static CodeBook unpack_codebook ( GetBitContext gb,
unsigned  depth,
unsigned  size 
)
static

Definition at line 87 of file escape124.c.

Referenced by escape124_decode_frame().

◆ decode_skip_count()

static unsigned decode_skip_count ( GetBitContext gb)
static

Definition at line 111 of file escape124.c.

Referenced by escape124_decode_frame().

◆ decode_macroblock()

static MacroBlock decode_macroblock ( Escape124Context s,
GetBitContext gb,
int *  codebook_index,
int  superblock_index 
)
static

Definition at line 133 of file escape124.c.

Referenced by escape124_decode_frame().

◆ insert_mb_into_sb()

static void insert_mb_into_sb ( SuperBlock sb,
MacroBlock  mb,
unsigned  index 
)
static

Definition at line 165 of file escape124.c.

Referenced by escape124_decode_frame().

◆ copy_superblock()

static void copy_superblock ( uint16_t *  dest,
ptrdiff_t  dest_stride,
uint16_t *  src,
ptrdiff_t  src_stride 
)
static

Definition at line 174 of file escape124.c.

Referenced by escape124_decode_frame().

◆ escape124_decode_frame()

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

Definition at line 192 of file escape124.c.

Variable Documentation

◆ mask_matrix

const uint16_t mask_matrix[]
static
Initial value:
= {0x1, 0x2, 0x10, 0x20,
0x4, 0x8, 0x40, 0x80,
0x100, 0x200, 0x1000, 0x2000,
0x400, 0x800, 0x4000, 0x8000}

Definition at line 187 of file escape124.c.

Referenced by escape124_decode_frame().

◆ ff_escape124_decoder

const FFCodec ff_escape124_decoder
Initial value:
= {
.p.name = "escape124",
CODEC_LONG_NAME("Escape 124"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(Escape124Context),
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 375 of file escape124.c.

Escape124Context
Definition: escape124.c:45
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
escape124_decode_frame
static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: escape124.c:192
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
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
escape124_decode_close
static av_cold int escape124_decode_close(AVCodecContext *avctx)
Definition: escape124.c:74
AV_CODEC_ID_ESCAPE124
@ AV_CODEC_ID_ESCAPE124
Definition: codec_id.h:167
escape124_decode_init
static av_cold int escape124_decode_init(AVCodecContext *avctx)
Initialize the decoder.
Definition: escape124.c:58
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201