FFmpeg
Macros | Functions | Variables
wnv1.c File Reference
#include "libavutil/thread.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"

Go to the source code of this file.

Macros

#define BITSTREAM_READER_LE
 
#define CODE_VLC_BITS   9
 

Functions

static int wnv1_get_code (GetBitContext *gb, int shift, int base_value)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold void wnv1_init_static (void)
 
static av_cold int decode_init (AVCodecContext *avctx)
 

Variables

static const uint8_t code_tab [16][2]
 
static VLC code_vlc
 
const AVCodec ff_wnv1_decoder
 

Detailed Description

Winnov WNV1 codec.

Definition in file wnv1.c.

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 29 of file wnv1.c.

◆ CODE_VLC_BITS

#define CODE_VLC_BITS   9

Definition at line 40 of file wnv1.c.

Function Documentation

◆ wnv1_get_code()

static int wnv1_get_code ( GetBitContext gb,
int  shift,
int  base_value 
)
inlinestatic

Definition at line 44 of file wnv1.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 54 of file wnv1.c.

◆ wnv1_init_static()

static av_cold void wnv1_init_static ( void  )
static

Definition at line 117 of file wnv1.c.

Referenced by decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 125 of file wnv1.c.

Variable Documentation

◆ code_tab

const uint8_t code_tab[16][2]
static
Initial value:
= {
{ 7, 1 }, { 8, 3 }, { 6, 3 }, { 9, 4 }, { 5, 4 }, { 10, 5 }, { 4, 5 },
{ 11, 6 }, { 3, 6 }, { 12, 7 }, { 2, 7 }, { 13, 8 }, { 1, 8 }, { 14, 9 },
{ 0, 9 }, { 15, 8 }
}

Definition at line 34 of file wnv1.c.

Referenced by wnv1_init_static().

◆ code_vlc

VLC code_vlc
static

Definition at line 41 of file wnv1.c.

Referenced by decode_channel(), wnv1_get_code(), and wnv1_init_static().

◆ ff_wnv1_decoder

const AVCodec ff_wnv1_decoder
Initial value:
= {
.name = "wnv1",
.long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
.init = decode_init,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 136 of file wnv1.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
AV_CODEC_ID_WNV1
@ AV_CODEC_ID_WNV1
Definition: codec_id.h:123
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: wnv1.c:125
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
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: wnv1.c:54
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201