escape124.c File Reference
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
Include dependency graph for escape124.c:

Go to the source code of this file.

Data Structures

union  MacroBlock
 
union  SuperBlock
 
struct  CodeBook
 
struct  Escape124Context
 

Macros

#define BITSTREAM_READER_LE
 

Typedefs

typedef union MacroBlock MacroBlock
 
typedef union SuperBlock SuperBlock
 
typedef struct CodeBook CodeBook
 
typedef struct Escape124Context Escape124Context
 

Functions

static int can_safely_read (GetBitContext *gb, uint64_t bits)
 
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, unsigned dest_stride, uint16_t *src, unsigned src_stride)
 
static int escape124_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

static const uint16_t mask_matrix []
 
AVCodec ff_escape124_decoder
 

Macro Definition Documentation

#define BITSTREAM_READER_LE

Definition at line 25 of file escape124.c.

Typedef Documentation

typedef struct CodeBook CodeBook
typedef union MacroBlock MacroBlock
typedef union SuperBlock SuperBlock

Function Documentation

static int can_safely_read ( GetBitContext gb,
uint64_t  bits 
)
static

Definition at line 52 of file escape124.c.

Referenced by decode_skip_count(), escape124_decode_frame(), and unpack_codebook().

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

Definition at line 181 of file escape124.c.

Referenced by escape124_decode_frame().

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

Definition at line 141 of file escape124.c.

Referenced by escape124_decode_frame().

static unsigned decode_skip_count ( GetBitContext gb)
static

Definition at line 119 of file escape124.c.

Referenced by escape124_decode_frame().

static av_cold int escape124_decode_close ( AVCodecContext avctx)
static

Definition at line 74 of file escape124.c.

static int escape124_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 199 of file escape124.c.

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 61 of file escape124.c.

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

Definition at line 172 of file escape124.c.

Referenced by escape124_decode_frame().

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

Definition at line 87 of file escape124.c.

Referenced by escape124_decode_frame().

Variable Documentation

AVCodec ff_escape124_decoder
Initial value:
= {
.name = "escape124",
.priv_data_size = sizeof(Escape124Context),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Escape 124"),
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int escape124_decode_close(AVCodecContext *avctx)
Definition: escape124.c:74
struct Escape124Context Escape124Context
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static av_cold int escape124_decode_init(AVCodecContext *avctx)
Initialize the decoder.
Definition: escape124.c:61
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868
static int escape124_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: escape124.c:199

Definition at line 369 of file escape124.c.

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 194 of file escape124.c.

Referenced by escape124_decode_frame().