Libav
Data Structures | Macros | Functions | Variables
dxv.c File Reference
#include <stdint.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "lzf.h"
#include "texturedsp.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  DXVContext
 

Macros

#define CHECKPOINT(x)
 

Functions

static int decompress_texture_thread (AVCodecContext *avctx, void *arg, int slice, int thread_nb)
 
static int dxv_decompress_dxt1 (AVCodecContext *avctx)
 
static int dxv_decompress_dxt5 (AVCodecContext *avctx)
 
static int dxv_decompress_lzf (AVCodecContext *avctx)
 
static int dxv_decompress_raw (AVCodecContext *avctx)
 
static int dxv_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static int dxv_init (AVCodecContext *avctx)
 
static int dxv_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_dxv_decoder
 

Macro Definition Documentation

◆ CHECKPOINT

#define CHECKPOINT (   x)
Value:
do { \
if (state == 0) { \
value = bytestream2_get_le32(gbc); \
state = 16; \
} \
op = value & 0x3; \
value >>= 2; \
state--; \
switch (op) { \
case 1: \
idx = x; \
break; \
case 2: \
idx = (bytestream2_get_byte(gbc) + 2) * x; \
break; \
case 3: \
idx = (bytestream2_get_le16(gbc) + 0x102) * x; \
break; \
} \
} while(0)
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Definition: anm.c:76
static struct @174 state

Definition at line 93 of file dxv.c.

Referenced by dxv_decompress_dxt1(), and dxv_decompress_dxt5().

Function Documentation

◆ decompress_texture_thread()

static int decompress_texture_thread ( AVCodecContext avctx,
void arg,
int  slice,
int  thread_nb 
)
static

Definition at line 49 of file dxv.c.

Referenced by dxv_decode().

◆ dxv_decompress_dxt1()

static int dxv_decompress_dxt1 ( AVCodecContext avctx)
static

Definition at line 115 of file dxv.c.

Referenced by dxv_decode().

◆ dxv_decompress_dxt5()

static int dxv_decompress_dxt5 ( AVCodecContext avctx)
static

Definition at line 164 of file dxv.c.

Referenced by dxv_decode().

◆ dxv_decompress_lzf()

static int dxv_decompress_lzf ( AVCodecContext avctx)
static

Definition at line 319 of file dxv.c.

Referenced by dxv_decode().

◆ dxv_decompress_raw()

static int dxv_decompress_raw ( AVCodecContext avctx)
static

Definition at line 325 of file dxv.c.

Referenced by dxv_decode().

◆ dxv_decode()

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

Definition at line 334 of file dxv.c.

◆ dxv_init()

static int dxv_init ( AVCodecContext avctx)
static

Definition at line 457 of file dxv.c.

◆ dxv_close()

static int dxv_close ( AVCodecContext avctx)
static

Definition at line 481 of file dxv.c.

Variable Documentation

◆ ff_dxv_decoder

AVCodec ff_dxv_decoder
Initial value:
= {
.name = "dxv",
.long_name = NULL_IF_CONFIG_SMALL("Resolume DXV"),
.init = dxv_init,
.decode = dxv_decode,
.close = dxv_close,
.priv_data_size = sizeof(DXVContext),
.capabilities = AV_CODEC_CAP_DR1 |
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
#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
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static int dxv_close(AVCodecContext *avctx)
Definition: dxv.c:481
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:893
Definition: dxv.c:33
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: avcodec.h:897
static int dxv_init(AVCodecContext *avctx)
Definition: dxv.c:457
static int dxv_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: dxv.c:334
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:838

Definition at line 490 of file dxv.c.