FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | 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
 

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 []
 
AVCodec ff_ylc_decoder
 

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 47 of file ylc.c.

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 64 of file ylc.c.

Referenced by build_vlc().

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

Definition at line 87 of file ylc.c.

Referenced by decode_frame().

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

Definition at line 283 of file ylc.c.

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 474 of file ylc.c.

Variable Documentation

const uint8_t table_y1[]
static

Definition at line 155 of file ylc.c.

Referenced by decode_frame().

const uint8_t table_u[]
static

Definition at line 187 of file ylc.c.

Referenced by decode_frame().

const uint8_t table_y2[]
static

Definition at line 219 of file ylc.c.

Referenced by decode_frame().

const uint8_t table_v[]
static

Definition at line 251 of file ylc.c.

Referenced by decode_frame().

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,
.decode = decode_frame,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}
static av_cold int decode_init(AVCodecContext *avctx)
Definition: ylc.c:47
static int init_thread_copy(AVCodecContext *avctx)
Definition: tta.c:392
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
Definition: ylc.c:37
#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:40
static av_cold int decode_end(AVCodecContext *avctx)
Definition: ylc.c:474
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: ylc.c:283
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1065
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
Definition: internal.h:218
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:1002

Definition at line 490 of file ylc.c.