FFmpeg
Data Structures | Macros | Functions | Variables
ylc.c File Reference
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "thread.h"
#include "unary.h"

Go to the source code of this file.

Data Structures

struct  YLCContext
 
struct  Node
 

Macros

#define YLC_VLC_BITS   10
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static void get_tree_codes (uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos)
 
static int build_vlc (AVCodecContext *avctx, VLC *vlc, const uint32_t *table)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

static const uint8_t table_y1 []
 
static const uint8_t table_u []
 
static const uint8_t table_y2 []
 
static const uint8_t table_v []
 
const FFCodec ff_ylc_decoder
 

Macro Definition Documentation

◆ YLC_VLC_BITS

#define YLC_VLC_BITS   10

Definition at line 23 of file ylc.c.

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 43 of file ylc.c.

◆ get_tree_codes()

static void get_tree_codes ( uint32_t *  bits,
int16_t *  lens,
uint8_t *  xlat,
Node nodes,
int  node,
uint32_t  pfx,
int  pl,
int *  pos 
)
static

Definition at line 59 of file ylc.c.

Referenced by build_vlc().

◆ build_vlc()

static int build_vlc ( AVCodecContext avctx,
VLC vlc,
const uint32_t *  table 
)
static

Definition at line 82 of file ylc.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame p,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 277 of file ylc.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 434 of file ylc.c.

Variable Documentation

◆ table_y1

const uint8_t table_y1[]
static

Definition at line 149 of file ylc.c.

Referenced by decode_frame().

◆ table_u

const uint8_t table_u[]
static

Definition at line 181 of file ylc.c.

Referenced by decode_frame().

◆ table_y2

const uint8_t table_y2[]
static

Definition at line 213 of file ylc.c.

Referenced by decode_frame().

◆ table_v

const uint8_t table_v[]
static

Definition at line 245 of file ylc.c.

Referenced by decode_frame().

◆ ff_ylc_decoder

const FFCodec ff_ylc_decoder
Initial value:
= {
.p.name = "ylc",
CODEC_LONG_NAME("YUY2 Lossless Codec"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_YLC,
.priv_data_size = sizeof(YLCContext),
.close = decode_end,
}

Definition at line 446 of file ylc.c.

YLCContext
Definition: ylc.c:35
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: ylc.c:434
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:110
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
Definition: ylc.c:277
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
AV_CODEC_ID_YLC
@ AV_CODEC_ID_YLC
Definition: codec_id.h:276
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: ylc.c:43