FFmpeg
Data Structures | Macros | Functions | Variables
ylc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bswapdsp.h"
#include "get_bits.h"
#include "huffyuvdsp.h"
#include "internal.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, void *data, 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 AVCodec ff_ylc_decoder
 

Macro Definition Documentation

◆ YLC_VLC_BITS

#define YLC_VLC_BITS   10

Definition at line 25 of file ylc.c.

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 47 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 63 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 86 of file ylc.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 281 of file ylc.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 443 of file ylc.c.

Variable Documentation

◆ table_y1

const uint8_t table_y1[]
static

Definition at line 153 of file ylc.c.

Referenced by decode_frame().

◆ table_u

const uint8_t table_u[]
static

Definition at line 185 of file ylc.c.

Referenced by decode_frame().

◆ table_y2

const uint8_t table_y2[]
static

Definition at line 217 of file ylc.c.

Referenced by decode_frame().

◆ table_v

const uint8_t table_v[]
static

Definition at line 249 of file ylc.c.

Referenced by decode_frame().

◆ ff_ylc_decoder

const AVCodec ff_ylc_decoder
Initial value:
= {
.name = "ylc",
.long_name = NULL_IF_CONFIG_SMALL("YUY2 Lossless Codec"),
.priv_data_size = sizeof(YLCContext),
.close = decode_end,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 455 of file ylc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
YLCContext
Definition: ylc.c:39
init
static int init
Definition: av_tx.c:47
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: ylc.c:281
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: ylc.c:443
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:113
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_CODEC_ID_YLC
@ AV_CODEC_ID_YLC
Definition: codec_id.h:271
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: ylc.c:47