FFmpeg
Data Structures | Macros | Functions | Variables
leaddec.c File Reference
#include "avcodec.h"
#include "blockdsp.h"
#include "codec_internal.h"
#include "copy_block.h"
#include "decode.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "jpegquanttables.h"
#include "jpegtables.h"
#include "leaddata.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"

Go to the source code of this file.

Data Structures

struct  LeadContext
 

Macros

#define LUMA_DC_BITS   9
 
#define CHROMA_DC_BITS   11
 
#define LUMA_AC_BITS   10
 
#define CHROMA_AC_BITS   10
 

Functions

static av_cold void lead_init_static_data (void)
 
static av_cold int lead_decode_init (AVCodecContext *avctx)
 
static void calc_dequant (uint16_t *dequant, const uint8_t *quant_tbl, int q)
 
static int decode_block (LeadContext *s, GetBitContext *gb, const VLCElem *dc_table, int dc_bits, const VLCElem *ac_table, int ac_bits, int16_t *dc_pred, const uint16_t *dequant, uint8_t *dst, int stride)
 
static int lead_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int lead_decode_end (AVCodecContext *avctx)
 

Variables

static VLCElem luma_dc_vlc [1<< LUMA_DC_BITS]
 
static VLCElem chroma_dc_vlc [1<< CHROMA_DC_BITS]
 
static VLCElem luma_ac_vlc [1160]
 
static VLCElem chroma_ac_vlc [1160]
 
const FFCodec ff_lead_decoder
 

Macro Definition Documentation

◆ LUMA_DC_BITS

#define LUMA_DC_BITS   9

Definition at line 36 of file leaddec.c.

◆ CHROMA_DC_BITS

#define CHROMA_DC_BITS   11

Definition at line 37 of file leaddec.c.

◆ LUMA_AC_BITS

#define LUMA_AC_BITS   10

Definition at line 38 of file leaddec.c.

◆ CHROMA_AC_BITS

#define CHROMA_AC_BITS   10

Definition at line 39 of file leaddec.c.

Function Documentation

◆ lead_init_static_data()

static av_cold void lead_init_static_data ( void  )
static

Definition at line 46 of file leaddec.c.

Referenced by lead_decode_init().

◆ lead_decode_init()

static av_cold int lead_decode_init ( AVCodecContext avctx)
static

Definition at line 74 of file leaddec.c.

◆ calc_dequant()

static void calc_dequant ( uint16_t *  dequant,
const uint8_t *  quant_tbl,
int  q 
)
static

Definition at line 91 of file leaddec.c.

Referenced by lead_decode_frame().

◆ decode_block()

static int decode_block ( LeadContext s,
GetBitContext gb,
const VLCElem dc_table,
int  dc_bits,
const VLCElem ac_table,
int  ac_bits,
int16_t *  dc_pred,
const uint16_t *  dequant,
uint8_t *  dst,
int  stride 
)
static

Definition at line 97 of file leaddec.c.

Referenced by lead_decode_frame().

◆ lead_decode_frame()

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

Definition at line 140 of file leaddec.c.

◆ lead_decode_end()

static av_cold int lead_decode_end ( AVCodecContext avctx)
static

Definition at line 296 of file leaddec.c.

Variable Documentation

◆ luma_dc_vlc

VLCElem luma_dc_vlc[1<< LUMA_DC_BITS]
static

Definition at line 41 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ chroma_dc_vlc

VLCElem chroma_dc_vlc[1<< CHROMA_DC_BITS]
static

Definition at line 42 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ luma_ac_vlc

VLCElem luma_ac_vlc[1160]
static

Definition at line 43 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ chroma_ac_vlc

VLCElem chroma_ac_vlc[1160]
static

Definition at line 44 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ ff_lead_decoder

const FFCodec ff_lead_decoder
Initial value:
= {
.p.name = "lead",
CODEC_LONG_NAME("LEAD MCMP"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(LeadContext),
.close = lead_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 305 of file leaddec.c.

FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
lead_decode_end
static av_cold int lead_decode_end(AVCodecContext *avctx)
Definition: leaddec.c:296
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_ID_LEAD
@ AV_CODEC_ID_LEAD
Definition: codec_id.h:324
lead_decode_init
static av_cold int lead_decode_init(AVCodecContext *avctx)
Definition: leaddec.c:74
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
lead_decode_frame
static int lead_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: leaddec.c:140
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
LeadContext
Definition: leaddec.c:66