FFmpeg
Data Structures | Macros | Functions | Variables
vmixdec.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "golomb.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  SliceContext
 
struct  VMIXContext
 

Macros

#define CACHED_BITSTREAM_READER   !ARCH_X86_32
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int get_se_golomb_vmix (GetBitContext *gb)
 
static int decode_dcac (AVCodecContext *avctx, GetBitContext *dc_gb, GetBitContext *ac_gb, unsigned *dcrun, unsigned *acrun, AVFrame *frame, int width, int by, int plane)
 
static int decode_slice (AVCodecContext *avctx, AVFrame *frame, const uint8_t *dc_src, unsigned dc_slice_size, const uint8_t *ac_src, unsigned ac_slice_size, int by)
 
static int decode_slices (AVCodecContext *avctx, void *arg, int n, int thread_nb)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

static const uint8_t quality []
 
static const uint8_t quant [64]
 
const FFCodec ff_vmix_decoder
 

Macro Definition Documentation

◆ CACHED_BITSTREAM_READER

#define CACHED_BITSTREAM_READER   !ARCH_X86_32

Definition at line 32 of file vmixdec.c.

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 82 of file vmixdec.c.

◆ get_se_golomb_vmix()

static int get_se_golomb_vmix ( GetBitContext gb)
inlinestatic

Definition at line 98 of file vmixdec.c.

Referenced by decode_dcac().

◆ decode_dcac()

static int decode_dcac ( AVCodecContext avctx,
GetBitContext dc_gb,
GetBitContext ac_gb,
unsigned *  dcrun,
unsigned *  acrun,
AVFrame frame,
int  width,
int  by,
int  plane 
)
static

Definition at line 105 of file vmixdec.c.

Referenced by decode_slice().

◆ decode_slice()

static int decode_slice ( AVCodecContext avctx,
AVFrame frame,
const uint8_t *  dc_src,
unsigned  dc_slice_size,
const uint8_t *  ac_src,
unsigned  ac_slice_size,
int  by 
)
static

Definition at line 164 of file vmixdec.c.

Referenced by decode_slices().

◆ decode_slices()

static int decode_slices ( AVCodecContext avctx,
void *  arg,
int  n,
int  thread_nb 
)
static

Definition at line 206 of file vmixdec.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 220 of file vmixdec.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 297 of file vmixdec.c.

Variable Documentation

◆ quality

const uint8_t quality[]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1,64,63,62,61,
60,59,58,57,56,55,54,53,52,51,
50,49,48,47,46,45,44,43,42,41,
40,39,38,37,36,35,34,33,32,31,
30,29,28,27,26,25,24,23,22,21,
20,19,18,17,16,15,14,13,12,11,
10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
}

Definition at line 58 of file vmixdec.c.

Referenced by decode_frame().

◆ quant

const uint8_t quant[64]
static

◆ ff_vmix_decoder

const FFCodec ff_vmix_decoder
Initial value:
= {
.p.name = "vmix",
CODEC_LONG_NAME("vMix Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(VMIXContext),
.close = decode_end,
}

Definition at line 304 of file vmixdec.c.

decode_end
static av_cold int decode_end(AVCodecContext *avctx)
Definition: vmixdec.c:297
AV_CODEC_ID_VMIX
@ AV_CODEC_ID_VMIX
Definition: codec_id.h:326
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: vmixdec.c:220
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:110
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: vmixdec.c:82
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
AV_CODEC_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:114
VMIXContext
Definition: vmixdec.c:45
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201