FFmpeg
Data Structures | Macros | Functions | Variables
vble.c File Reference
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "lossless_videodsp.h"
#include "mathops.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  VBLEContext
 

Macros

#define BITSTREAM_READER_LE
 

Functions

static int vble_unpack (VBLEContext *ctx, GetBitContext *gb)
 
static void vble_restore_plane (VBLEContext *ctx, AVFrame *pic, GetBitContext *gb, int plane, int offset, int width, int height)
 
static int vble_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int vble_decode_close (AVCodecContext *avctx)
 
static av_cold int vble_decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_vble_decoder
 

Detailed Description

VBLE Decoder

Definition in file vble.c.

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 29 of file vble.c.

Function Documentation

◆ vble_unpack()

static int vble_unpack ( VBLEContext ctx,
GetBitContext gb 
)
static

Definition at line 45 of file vble.c.

Referenced by vble_decode_frame().

◆ vble_restore_plane()

static void vble_restore_plane ( VBLEContext ctx,
AVFrame pic,
GetBitContext gb,
int  plane,
int  offset,
int  width,
int  height 
)
static

Definition at line 85 of file vble.c.

Referenced by vble_decode_frame().

◆ vble_decode_frame()

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

Definition at line 117 of file vble.c.

◆ vble_decode_close()

static av_cold int vble_decode_close ( AVCodecContext avctx)
static

Definition at line 174 of file vble.c.

Referenced by vble_decode_init().

◆ vble_decode_init()

static av_cold int vble_decode_init ( AVCodecContext avctx)
static

Definition at line 182 of file vble.c.

Variable Documentation

◆ ff_vble_decoder

AVCodec ff_vble_decoder
Initial value:
= {
.name = "vble",
.long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"),
.priv_data_size = sizeof(VBLEContext),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 207 of file vble.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:40
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
vble_decode_close
static av_cold int vble_decode_close(AVCodecContext *avctx)
Definition: vble.c:174
vble_decode_init
static av_cold int vble_decode_init(AVCodecContext *avctx)
Definition: vble.c:182
VBLEContext
Definition: vble.c:37
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1037
ONLY_IF_THREADS_ENABLED
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
Definition: internal.h:227
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
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:188
init_thread_copy
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have add an init_thread_copy() which re-allocates them for other threads. Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. If there are inter-frame dependencies
vble_decode_frame
static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: vble.c:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_VBLE
@ AV_CODEC_ID_VBLE
Definition: avcodec.h:373