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.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 37 of file leaddec.c.

◆ CHROMA_DC_BITS

#define CHROMA_DC_BITS   11

Definition at line 38 of file leaddec.c.

◆ LUMA_AC_BITS

#define LUMA_AC_BITS   10

Definition at line 39 of file leaddec.c.

◆ CHROMA_AC_BITS

#define CHROMA_AC_BITS   10

Definition at line 40 of file leaddec.c.

Function Documentation

◆ lead_init_static_data()

static av_cold void lead_init_static_data ( void  )
static

Definition at line 47 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 75 of file leaddec.c.

◆ calc_dequant()

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

Definition at line 92 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 98 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 141 of file leaddec.c.

◆ lead_decode_end()

static av_cold int lead_decode_end ( AVCodecContext avctx)
static

Definition at line 294 of file leaddec.c.

Variable Documentation

◆ luma_dc_vlc

VLCElem luma_dc_vlc[1<< LUMA_DC_BITS]
static

Definition at line 42 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 43 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 44 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 45 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 303 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:43
lead_decode_end
static av_cold int lead_decode_end(AVCodecContext *avctx)
Definition: leaddec.c:294
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
AV_CODEC_ID_LEAD
@ AV_CODEC_ID_LEAD
Definition: codec_id.h:328
lead_decode_init
static av_cold int lead_decode_init(AVCodecContext *avctx)
Definition: leaddec.c:75
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
lead_decode_frame
static int lead_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: leaddec.c:141
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
LeadContext
Definition: leaddec.c:67