FFmpeg
Loading...
Searching...
No Matches
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/attributes.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 38 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ CHROMA_DC_BITS

#define CHROMA_DC_BITS   11

Definition at line 39 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ LUMA_AC_BITS

#define LUMA_AC_BITS   10

Definition at line 40 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

◆ CHROMA_AC_BITS

#define CHROMA_AC_BITS   10

Definition at line 41 of file leaddec.c.

Referenced by lead_decode_frame(), and lead_init_static_data().

Function Documentation

◆ lead_init_static_data()

static av_cold void lead_init_static_data ( void )
static

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

◆ calc_dequant()

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

Definition at line 93 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 99 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 142 of file leaddec.c.

◆ lead_decode_end()

static av_cold int lead_decode_end ( AVCodecContext * avctx)
static

Definition at line 310 of file leaddec.c.

Variable Documentation

◆ luma_dc_vlc

VLCElem luma_dc_vlc[1<< LUMA_DC_BITS]
static

Definition at line 43 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 44 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 45 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 46 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),
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_LEAD
Definition codec_id.h:319
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int lead_decode_end(AVCodecContext *avctx)
Definition leaddec.c:310
static av_cold int lead_decode_init(AVCodecContext *avctx)
Definition leaddec.c:76
static int lead_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition leaddec.c:142

Definition at line 319 of file leaddec.c.